]> git.saurik.com Git - bison.git/blob - ChangeLog
aa23252a1f910cb845fe3489c6b914b3d1315222
[bison.git] / ChangeLog
1 2009-06-29 Akim Demaille <demaille@gostai.com>
2
3 parse.error: fix.
4 * data/bison.m4: Move code related to specific variables after the
5 definition of the variable-maintaining macros so that we don't
6 "invoke" b4_percent_define_check_values before it is defined.
7
8 2009-06-29 Akim Demaille <demaille@gostai.com>
9
10 variables: parse.error
11
12 Implement, document, and test the replacement of %error-verbose
13 by %define parse.error "verbose".
14 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
15 values of the parse.error variable.
16 Make "simple" its default value.
17 Check the valid values.
18 * src/parse-gram.y: Use %define parse.error.
19 (PERCENT_ERROR_VERBOSE): New token.
20 Support it.
21 * src/scan-gram.l: Support %error-verbose.
22
23 * doc/bison.texinfo (Decl Summary): Replace the documentation of
24 %define error-verbose by that of %define parse.error.
25 * NEWS: Document it.
26
27 * tests/actions.at, tests/calc.at: Use parse.error instead of
28 %error-verbose.
29
30 2009-06-27 Alex Rozenman <rozenman@gmail.com>
31
32 Implement support for named symbol references.
33 * src/parse-gram.y: Add new syntax (named_ref.opt).
34 * src/reader.c: Store named refs in symbol lists.
35 * src/reader.h: New argument for symbol_append and
36 action_append functions.
37 * src/scan-code.h: Add new field (named_ref) into
38 code_props data structure. Keeps named ref of midrule
39 actions.
40 * src/scan-code.l: Support for named refs in semantic
41 action code. New function 'parse_named_ref'.
42 * src/scan-gram.l: Support bracketed id.
43 * src/symlist.c: Store named refs in symbol lists.
44 * src/symlist.h: New field in symbol list: named_ref.
45 * src/named-ref.h: New file, a struct for named_ref.
46 * src/named-ref.cp: New file, named_ref_new function.
47 * src/local.mk: Add two new files.
48 * tests/testsuite.at: Include new test group:
49 * tests/named-refs.at: this new file.
50
51 2009-06-25 Akim Demaille <demaille@gostai.com>
52
53 hash: check insertion for memory exhaustion.
54 * src/uniqstr.c (uniqstr_new): New.
55
56 2009-06-24 Akim Demaille <demaille@gostai.com>
57
58 variables: rename namespace as api.namespace.
59 Discussed in
60 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
61
62 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
63 New.
64 (b4_percent_define_use): New.
65 Use it where applicable.
66 * data/c++.m4: Replace uses of the variable "namespace" by
67 "api.namespace".
68 Default the latter to the former.
69 * doc/bison.texinfo (Decl Summary): Document "namespace" as
70 obsolete.
71 Document api.namespace.
72 Use @samp to document %define uses, keep @code for identifiers.
73 * NEWS: Likewise.
74 * tests/c++.at, tests/input.at: Test api.namespace instead of
75 namespace. (The tests passed with namespace.)
76
77 2009-06-11 Akim Demaille <demaille@gostai.com>
78
79 style changes.
80 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
81 * src/print-xml.c: Style changes.
82 * tests/conflicts.at: Comment changes.
83
84 2009-06-11 Akim Demaille <demaille@gostai.com>
85
86 xml: beware of user strings used to give a %prec to rules.
87 * tests/conflicts.at (%prec with user strings): New.
88 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
89 XML output.
90
91 2009-06-11 Akim Demaille <demaille@gostai.com>
92
93 hash: check insertion for memory exhaustion.
94 * src/muscle-tab.c (muscle_insert, muscle_grow)
95 * src/state.c (state_hash_insert): Check the return value of
96 hash_insert.
97
98 2009-06-11 Akim Demaille <demaille@gostai.com>
99
100 tests: honor TESTSUITEFLAGS in every check target.
101 * tests/local.mk (RUN_TESTSUITE): New.
102 (check-local, installcheck-local, maintainer-check-g++)
103 (maintainer-check-posix, maintainer-check-valgrind): Use it.
104
105 2009-06-10 Akim Demaille <demaille@gostai.com>
106
107 deterministic test suite.
108 Some consistency checks on symbols are performed after all the
109 symbols were read, by an iteration over the symbol table. This
110 traversal is nondeterministic, which can be a problem for test
111 cases.
112 Avoid this.
113 Addresses another form of nondeterminism reported by Joel E. Denny.
114 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
115
116 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
117 test in two.
118 Use different file names for the three tests to make the
119 maintenance easier.
120
121 2009-06-10 Akim Demaille <demaille@gostai.com>
122
123 gnulib: update.
124 * gnulib: Update to latest.
125 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
126 * m4/.gitignore: Regen.
127 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
128 Call xalloc_die on hash_insert failures.
129 Requested by the new __warn_unused_result__ attribute of
130 hash_insert.
131
132 2009-06-10 Akim Demaille <demaille@gostai.com>
133
134 deterministic user-token-number redeclaration errors.
135 Address nondeterminism reported by Joel E. Denny.
136 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
137
138 * src/uniqstr.h: Comment changes.
139 * src/location.h (boundary_cmp, location_cmp): New.
140 * src/symtab.c (user_token_number_redeclaration): New.
141 (symbol_translation): Use it.
142 * tests/input.at (Numbered tokens): Adjust the expected output.
143
144 2009-05-25 Akim Demaille <demaille@gostai.com>
145
146 build: avoid ignored errors.
147 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
148 errors, they pollute the output.
149
150 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
151
152 Convert multiple variable definition warnings to complaints.
153 * NEWS (2.5): Add a new entry for that change.
154 * doc/bison.texinfo (Decl Summary): Update %define entry.
155 (Bison Options): Update -D/--define/-F/--force-define entry.
156 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
157 * src/muscle-tab.h (muscle_percent_define_insert): Update
158 comments.
159 * tests/input.at (`%define errors'): Update.
160 (`%define, --define, --force-define'): Update.
161
162 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
163
164 -F/--force-define and relative %define/-D/--define priorities.
165 * NEWS (2.5): Add documentation to -D/--define entry.
166 * build-aux/cross-options.pl: Hard-code association of
167 --force-define with %define.
168 * doc/bison.texinfo (Decl Summary): In %define entry,
169 cross-reference command-line options.
170 (Bison Options): Add documentation to -D/--define entry.
171 (Option Cross Key): Widen column for --force-define row.
172 * src/getargs.c (usage): Document -F/--force-define. Realign
173 options in output.
174 (short_options, long_options, getargs): Parse -F/--force-define,
175 and update muscle_percent_define_insert invocations.
176 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
177 (muscle_percent_define_insert): Add argument with that type.
178 * src/muscle-tab.c (muscle_percent_define_insert): Implement
179 -F/--force-define behavior and priorities.
180 (muscle_percent_define_ensure): Update
181 muscle_percent_define_insert invocation.
182 * src/parse-gram.y (prologue_declaration): Update
183 muscle_percent_define_insert invocations.
184 * tests/input.at (`%define, --define'): Rename to...
185 (`%define, --define, --force-define'): ... this and extend.
186
187 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
188
189 Update some comments to make sense for -D.
190 * data/bison.m4 (b4_check_user_names): In header comments, say
191 "user occurrence" instead of "grammar occurrence".
192 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
193 (muscle_percent_code_grow): Likewise just for consistency.
194
195 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
196
197 * data/c++.m4 (b4_namespace_close): Simplify slightly.
198
199 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
200
201 Handle a trailing `:' in a user-supplied C++ namespace better.
202 * data/c++.m4 (b4_namespace_close): Don't let it be printed
203 among the closing braces here. This fix might make the
204 generated code easier to debug, but otherwise it should be
205 insignificant because a trailing `:' is a C++ error already.
206
207 2009-05-19 Akim Demaille <demaille@gostai.com>
208
209 remove useless variable.
210 * src/getargs.c (skeleton_arg): Remove now useless variable.
211 Should help the compiler see that this printf-like call is sane.
212
213 2009-05-15 Akim Demaille <demaille@gostai.com>
214
215 Rename token.prefix as api.tokens.prefix.
216 Discussed here.
217 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
218
219 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
220 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
221 (token.prefix): Rename as...
222 (api.tokens.prefix): this.
223
224 2009-05-11 Akim Demaille <demaille@gostai.com>
225
226 doc: use C++ headers.
227 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
228 headers.
229
230 2009-05-11 Akim Demaille <demaille@gostai.com>
231
232 doc: token.prefix
233 * doc/bison.simple (Decl Summary): Document token.prefix.
234 (Calc++ Parser): Various fixes.
235 Formatting changes.
236 Use token.prefix.
237 Introduce a macro TOKEN to shorten the code and make it more
238 readable.
239 (Calc++ Scanner): Adjust.
240 * NEWS (Variable token.prefix): New.
241
242 2009-05-04 Akim Demaille <demaille@gostai.com>
243
244 bison: catch bad symbol names.
245 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
246 * tests/input.at: Adjust.
247
248 2009-05-04 Akim Demaille <demaille@gostai.com>
249
250 identifiers: dashes are letters.
251 Dashes can now start identifiers (symbols and directives).
252
253 * src/scan-gram.l ({letter}): Add dash.
254 ({id}): Remove it.
255 * tests/input.at (Symbols): Adjust.
256 Remove stray comment.
257 * tests/regression.at (Invalid inputs): Adjust error message.
258 * doc/bison.texinfo (Symbols): Update.
259
260 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
261
262 Declare %code to be a permanent feature.
263 * NEWS (2.4.2): Here.
264 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
265 experimental.
266 (Decl Summary): Likewise.
267
268 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
269
270 Convert underscores to dashes in some %define variable names.
271 For now, just api.push-pull and lr.keep-unreachable-states.
272 Maintain old names for backward compatibility.
273 * NEWS (2.5): Document.
274 * data/c.m4 (b4_identification): Update comment.
275 * data/yacc.c: Update access.
276 * doc/bison.texinfo: Update.
277 * etc/bench.pl.in (bench_push_parser): Update use.
278 * src/files.c (tr): Move to...
279 * src/getargs.c, src/getargs.h (tr): ... here because I can't
280 think of a better place to expose it. My logic is that, for all
281 uses of tr so far, command-line arguments can be involved, and
282 getargs.h is already included.
283 * src/main.c (main): Update access.
284 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
285 variable names to new variable names before assigning value.
286 * src/reader.c (reader): Update setting default.
287 * tests/calc.at: Update uses.
288 * tests/conflicts.at (Unreachable States After Conflict
289 Resolution): Update use.
290 * tests/input.at (%define enum variables): Update use.
291 (%define backward compatibility): New test group.
292 * tests/push.at: Update uses.
293 * tests/reduce.at: Update uses.
294 * tests/torture.at: Update uses.
295
296 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
297
298 Set all front-end %define defaults in one place.
299 * src/main.c (main): Move lr.keep_unreachable_states default...
300 * src/reader.c (reader): ... to here.
301
302 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
303
304 Rename lr.default_reductions to lr.default-reductions.
305 * NEWS (2.5): Here.
306 * doc/bison.texinfo: Here.
307 * src/lalr.c (initialize_LA): Here.
308 * src/print.c (print_reductions): Here.
309 * src/reader.c (reader): Here.
310 * src/tables.c (action_row): Here.
311 * tests/input.at (%define enum variables): Here.
312 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
313
314 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
315
316 Pacify ./configure --enable-gcc-warnings.
317 * tests/input.at (Symbols): Prototype yyerror and yylex.
318
319 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
320
321 Document how `%define "var" "value"' is not M4-friendly.
322 * src/parse-gram.y (variable): In comments here.
323
324 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
325
326 Clean up recent patches a little.
327 Reported by Akim Demaille.
328 * doc/bison.texinfo (Understanding): Fix typos.
329 * src/print.c (print_reductions): Don't use negated variable.
330
331 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
332
333 List accepted values for a %define enum variable with an invalid value.
334 Suggested by Akim Demaille at
335 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
336 * data/bison.m4 (_b4_percent_define_check_values): Implement.
337 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
338 * tests/input.at (%define lr.default_reductions invalid values): Merge
339 into...
340 (%define enum variables): ... here, and update output.
341
342 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
343
344 Rename "default rule" to "default reduction".
345 This includes changing variable names in code, changing
346 comments, and renaming %define lr.default_rules to %define
347 lr.default_reductions.
348 * NEWS (2.5): Update IELR documentation.
349 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
350 documentation.
351 * data/glr.c, data/lalr1.java: Sync copyright dates.
352 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
353 and lr.type documentation. Make some other wording
354 improvements.
355 (Glossary): Adjust cross-references and Default Reduction
356 definition.
357 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
358 Remove a confusing comment pointed out by Akim Demaille.
359 (initialize_LA): Adjust code.
360 * src/print-xml.c (print_reductions): Adjust code.
361 * src/print.c (print_reductions): Adjust code.
362 * src/reader.c (reader): Adjust code.
363 * src/tables.c (action_row): Adjust code.
364 (token_actions): Adjust code.
365 * src/tables.h: Adjust YYDEFACT documentation.
366 * tests/input.at (%define lr.default_rules invalid values):
367 Rename test group to...
368 (%define lr.default_reductions invalid values): ... this, and
369 update grammar file and expected output.
370 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
371 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
372
373 2009-04-21 Akim Demaille <demaille@gostai.com>
374
375 tests: check the use of dashes and periods in symbols.
376 * tests/input.at (Symbol): New test group.
377
378 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
379
380 Document %define lr.type and lr.default_rules.
381 * NEWS (2.5): Add an entry.
382 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
383 besides just LALR(1) and GLR(1).
384 * doc/bison.texinfo (Introduction): Likewise.
385 (Language and Grammar): Bison is no longer limited to LALR(1)
386 restrictions.
387 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
388 when trying to distinguish from GLR. Talk about LR(1) grammars
389 rather than LALR(1) grammars.
390 (Decl Summary): In %define api.push_pull entry, say it applies
391 to deterministic parsers in C rather than LALR(1) parsers in C.
392 Add lr.default_rules entry.
393 Add lr.type entry.
394 (Mystery Conflicts): Bison is no longer limited to LALR(1)
395 restrictions.
396 (Generalized LR Parsing): Same changes as for the previous GLR
397 section.
398 (Memory Management): Say deterministic rather than LALR(1).
399 (Understanding): Correct some bison output.
400 Index discussion of "accepting state".
401 Say deterministic rather than LALR(1).
402 (Bison Options): In --yacc entry, say deterministic rather than
403 LALR(1).
404 In --report, --graph, and --xml entries, just don't mention
405 LALR(1).
406 (C++ Parsers): Say deterministic rather than LALR(1).
407 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
408 (Glossary): Add Accepting State, Consistent State, Default Rule,
409 and IELR(1) definitions.
410 In Generalized LR (GLR) definition, make same changes as in
411 previous GLR sections.
412 In LALR(1) definition, say Bison uses LALR(1) by default rather
413 than implying Bison is limited to LALR(1).
414 (LocalWords): Add IELR.
415
416 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
417
418 Finish implementing %define lr.type.
419 Its value can be "LALR", "IELR", or "canonical LR".
420 * lib/timevar.def (TV_IELR_PHASE1): New var.
421 (TV_IELR_PHASE2): New var.
422 (TV_IELR_PHASE3): New var.
423 (TV_IELR_PHASE4): New var.
424 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
425 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
426 Sbitset.h, ielr.h, and ielr.c.
427 * src/getargs.h, src/getargs.c (enum trace, trace_args,
428 trace_types): Add trace_ielr.
429 * src/lalr.h, src/lalr.c (ngotos): Export it.
430 (F): Rename to...
431 (goto_follows): ... this, update all uses, and export it.
432 (set_goto_map): Export it.
433 (map_goto): Export it.
434 (compute_lookahead_tokens): Don't free goto_follows yet. Now
435 handled in ielr.
436 (initialize_LA): Export it. Move lookback allocation to...
437 (lalr): ... here because, for canonical LR, initialize_LA must
438 be invoked but lookback and much of the rest of LALR isn't
439 needed.
440 * main.c (main): Instead of lalr, invoke ielr, which invokes
441 lalr.
442 * src/reader.c (reader): Default lr.type to "LALR".
443 Default lr.default_rules to "accepting" if lr.type is "canonical
444 LR". Leave the default as "all" otherwise.
445 Check for a valid lr.type value.
446 * src/state.h, src/state.c (struct state_list): Add state_list
447 member.
448 (state_new): Initialize state_list member to NULL.
449 (state_new_isocore): New function, exported.
450 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
451 exercises all values of lr.type.
452 (GNU AWK Grammar): Rename test group to...
453 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
454 AT_TEST_EXISTING_GRAMMAR.
455 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
456 (GNU pic Grammar): Rename test group to...
457 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
458 AT_TEST_EXISTING_GRAMMAR.
459 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
460 all values of lr.type.
461 (Single State Split): New test groups using AT_TEST_LR_TYPE.
462 (Lane Split): Likewise.
463 (Complex Lane Split): Likewise.
464 (Split During Added Lookahead Propagation): Likewise.
465
466 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
467
468 Add new files for IELR and canonical LR implementation.
469 * src/AnnotationList.c: New.
470 * src/AnnotationList.h: New.
471 * src/InadequacyList.c: New.
472 * src/InadequacyList.h: New.
473 * src/Sbitset.c: New.
474 * src/Sbitset.h: New.
475 * src/ielr.c: New.
476 * src/ielr.h: New.
477
478 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
479
480 Implement %define lr.default_rules.
481 Its value describes the states that are permitted to contain
482 default rules: "all", "consistent", or "accepting".
483 * src/reader.c (reader): Default lr.default_rules to "all".
484 Check for a valid lr.default_rules value.
485 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
486 is "accepting", then only mark the accepting state as
487 consistent.
488 (initialize_LA): Tell state_lookahead_tokens_count whether
489 lr.default_rules is "accepting".
490 * src/tables.c (action_row): If lr.default_rules is not "all",
491 then disable default rules in inconsistent states.
492 * src/print.c (print_reductions): Use this opportunity to
493 perform some assertions about whether lr.default_rules was
494 obeyed correctly.
495 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
496 helps with checking the parser tables for a grammar.
497 * tests/input.at (%define lr.default_rules invalid values): New
498 test group.
499 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
500 AT_TEST_TABLES_AND_PARSE.
501 (`no %define lr.default_rules'): New test group generated by
502 AT_TEST_LR_DEFAULT_RULES.
503 (`%define lr.default_rules "all"'): Likewise.
504 (`%define lr.default_rules "consistent"'): Likewise.
505 (`%define lr.default_rules "accepting"'): Likewise.
506
507 2009-04-20 Akim Demaille <demaille@gostai.com>
508
509 Formatting change.
510
511 2009-04-20 Akim Demaille <demaille@gostai.com>
512
513 bison: factoring.
514 * src/output.c (token_definitions_output): Use symbol_id_get
515 instead of duplicating its logic.
516 * TODO (YYERRCODE): Extend.
517
518 2009-04-20 Akim Demaille <demaille@gostai.com>
519
520 variables: prefer error-verbose to error_verbose.
521 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
522 instead of error_verbose.
523 * src/scan-gram.l (%error-verbose): Map to the error-verbose
524 variable.
525 * doc/bison.texinfo: Promote %define error-verbose instead of
526 %error-verbose.
527 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
528
529 2009-04-15 Akim Demaille <demaille@gostai.com>
530
531 variables: accept dashes.
532 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
533 underscores.
534 * src/scan-gram.l ({id}): Also accept dashes after the initial
535 letter.
536 ({directive}): Use {id}.
537 * src/parse-gram.y: Comment and formatting changes.
538 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
539 symbols.
540 * src/complain.h, src/complain.c (yacc_at): New.
541 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
542 symbol names.
543 * src/output.c (token_definitions_output): Do not #define token
544 names with dashes.
545
546 2009-04-20 Akim Demaille <demaille@gostai.com>
547
548 Consistently refer to Yacc, not YACC.
549 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
550
551 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
552
553 Pacify make maintainer-check-posix.
554 * tests/input.at (%define, --define): Move bison command-line
555 options before grammar file name.
556
557 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
558
559 Document semicolon warnings.
560 * NEWS (2.5): Here.
561
562 2009-04-14 Akim Demaille <demaille@gostai.com>
563
564 variables: use `parse.assert' instead of `assert'.
565 * TODO (assert): Remove.
566 * data/bison.m4 (b4_assert_if): Replace with...
567 (b4_parse_assert_if): this.
568 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
569 * doc/bison.texinfo (Decl Summary): Document parse.assert.
570
571 2009-04-14 Akim Demaille <demaille@gostai.com>
572
573 variables: use `parse.trace' instead of `debug'.
574 * src/getargs.c (getargs): Map -t to %define trace.parse.
575 * src/scan-gram.l (%debug): Map to %define trace.parse.
576 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
577 names to `_' in macro names.
578 (b4_debug_if): Replace with...
579 (b4_parse_trace_if): this.
580 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
581 * data/yacc.c: Adjust.
582 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
583 Use @code to label the variable list.
584 Document the variable parse.trace.
585 (Tracing): Promote the parse.trace variable.
586 * TODO: %printer is not documented.
587
588 2009-04-14 Akim Demaille <demaille@gostai.com>
589
590 doc: minor fixes.
591 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
592 (Table of Symbols): Remove duplicate entry for %debug.
593
594 2009-04-10 Eric Blake <ebb9@byu.net>
595
596 submodules: update to latest
597 * submodules/autoconf: Use latest upstream Autoconf.
598
599 2009-04-06 Eric Blake <ebb9@byu.net>
600
601 Work around autoconf 2.63b bug in testsuite.
602 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
603 autoconf bug related to # in test.
604
605 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
606
607 * NEWS (2.5): New section. Describe new -D/--define feature.
608
609 2009-04-06 Akim Demaille <demaille@gostai.com>
610
611 Regen.
612 * src/parse-gram.h, src/parse-gram.c: Regen.
613
614 2009-04-06 Akim Demaille <demaille@gostai.com>
615
616 rename muscle_tab.* as muscle-tab.* for consistency.
617 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
618 * src/muscle-tab.h, src/muscle-tab.c: these.
619 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
620 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
621
622 2009-04-06 Akim Demaille <demaille@gostai.com>
623
624 Makefile: introduce $(BISON).
625 * src/local.mk (BISON): New.
626 (YACC): Use it.
627
628 2009-04-06 Akim Demaille <demaille@gostai.com>
629
630 parser: handle %locations as %define locations.
631 * src/getargs.h, src/getargs.c (locations_flag): Remove.
632 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
633 to set "locations" to true.
634 * src/output.c (prepare): Don't output "locations".
635 * src/scan-gram.l (%locations): Handle it as a %<flag>.
636 * src/parse-gram.y: It's no longer a token.
637 Don't handle it.
638 * data/bison.m4 (b4_locations_if): Define it with
639 b4_percent_define_if_define.
640 * data/c.m4, data/glr.cc: Adjust.
641
642 2009-04-06 Akim Demaille <demaille@gostai.com>
643
644 Regen.
645 * src/parse-gram.c: Regen.
646
647 2009-04-06 Akim Demaille <demaille@gostai.com>
648
649 muscle: factor the handling of obsolete of obsolete directives.
650 Suggested by Joel E. Denny.
651
652 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
653 New, extracted from...
654 * src/parse-gram.y (prologue_declaration: pure-parser): here.
655 Remove it.
656 (prologue_declaration: "%<flag>"): Use
657 muscle_percent_define_ensure.
658 (%error-verbose, %pure-parser): No longer tokens.
659 * src/scan-gram.l (pure-parser): Return as a %<flag>.
660
661 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
662
663 Fix options documentation.
664 * build-aux/cross-options.pl: As in --help output, write optional
665 arguments as [=ARG] not =[ARG].
666 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
667
668 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
669
670 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
671 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
672 requirements for a correct m4 are stricter.
673 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
674 * configure.ac: Update to use AC_PROG_GNU_M4.
675 Reported by Eric Blake.
676
677 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
678
679 Help with updating web manual.
680 * HACKING: Incorporate instructions from gnulib/doc/README.
681 * bootstrap.conf (gnulib_modules): Add gendocs.
682
683 2009-04-03 Akim Demaille <demaille@gostai.com>
684
685 Regen.
686 * src/parse-gram.h, src/parse-gram.c: Regen.
687
688 2009-04-03 Akim Demaille <demaille@gostai.com>
689
690 Factor %FLAG at scan level.
691 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
692 definitions and associated rules, replaced by....
693 (PERCENT_FLAG): this new token type, and rule.
694 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
695 Use it for %debug and %error-verbose.
696
697 2009-04-03 Akim Demaille <demaille@gostai.com>
698
699 Regen.
700 * src/parse-gram.h, src/parse-gram.c: Regen.
701
702 2009-04-03 Akim Demaille <demaille@gostai.com>
703
704 Treat %debug as %define debug.
705 * data/bison.m4 (b4_debug_if): New.
706 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
707 * data/lalr1.java: Use it instead of b4_debug_flag.
708 * src/getargs.h, src/getargs.c (debug_flag): Remove.
709 * src/output.c (prepare): Don't output it.
710 * src/parse-gram.y: Treat %debug as %define debug.
711
712 2009-04-03 Akim Demaille <demaille@gostai.com>
713
714 Treat %error-verbose as %define error_verbose.
715 This allows to pass -Derror_verbose on the command line. Better
716 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
717 ERROR_VERBOSE being defined as false or true.
718 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
719 on b4_percent_define_ifdef, for does not check the defined value,
720 but only whether the symbol is defined, rely on
721 b4_percent_define_flag_if, so that a value of "false" is processed
722 as a false.
723 If not defined, define the flag to "false".
724 (b4_error_verbose_if): New.
725 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
726 b4_error_verbose_flag.
727 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
728 * src/output.c (prepare): Don't output it.
729 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
730
731 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
732
733 Fix strange %define locations for default values.
734 Reported by Akim Demaille at
735 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
736 and discussed again starting at
737 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
738 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
739 because location information is bogus.
740 Use angle brackets to delimit fake file name because square brackets
741 look like underexpanded m4. Choose a better fake file name.
742 Use negative line numbers.
743 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
744 * src/location.c (location_print): If line for a boundary is negative,
745 only print that boundary's file name.
746 * src/location.h: Document that.
747 * tests/skeletons.at (%define Boolean variables: invalid skeleton
748 defaults): Update output.
749
750 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
751
752 Pacify ./configure --enable-gcc-warnings.
753 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
754 in lib won't compile with it.
755 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
756
757 2009-03-31 Akim Demaille <demaille@gostai.com>
758
759 bootstrap: --help to stdout.
760 * bootstrap (usage): Don't send --help to stderr.
761 Use a here doc instead of a long string.
762
763 2009-03-31 Akim Demaille <demaille@gostai.com>
764
765 bootstrap: README-hacking no longer exists
766 * bootstrap (checkout_only_file): Set to HACKING.
767
768 2009-03-26 Akim Demaille <demaille@gostai.com>
769
770 doc: merge HACKING and README-hacking.
771 Two files is confusing.
772 Reported by Alexandre Duret-Lutz.
773
774 * README-hacking: Merge into...
775 * HACKING (Working from the repository): here.
776
777 2009-03-26 Akim Demaille <demaille@gostai.com>
778
779 doc: update README-hacking.
780 * README-hacking: We now use git and git submodules.
781 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
782
783 2009-03-26 Akim Demaille <demaille@gostai.com>
784
785 lalr1.cc: avoid GCC 4.3 warnings.
786 GCC 4.3 now warns about "a || b && c" and asks for explicit
787 parentheses.
788 Reported by Alexandre Duret-Lutz.
789 * data/location.cc: Update copyright years.
790 (Position::operator==): Use parens to make precedence explicit.
791 Compare lines and columns first, as they are more likely to be
792 different, and they are faster to compare.
793
794 2009-03-26 Akim Demaille <demaille@gostai.com>
795
796 gnulib: update.
797 * gnulib: Update to latest.
798 * src/local.mk (AM_CFLAGS): Move to...
799 * Makefile.am: here.
800 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
801 AM_CFLAGS.
802
803 2009-03-02 Akim Demaille <demaille@gostai.com>
804
805 Comment changes.
806
807 2009-03-02 Akim Demaille <demaille@gostai.com>
808
809 Share b4_yytranslate_define.
810 * data/lalr1.cc (b4_yytranslate_define): Move to...
811 * data/c++.m4: here.
812
813 2009-03-02 Akim Demaille <demaille@gostai.com>
814
815 Use locations in the variant example.
816 Yes, this obfuscates the point of this example, variants only.
817 But glr.cc cannot work (yet?) without locations. This change
818 makes it easier to use this example with glr.cc.
819
820 * examples/variant.yy (assert): %define it.
821 (locations): Request them.
822 (yylex): Bind the location to the stage.
823
824 2009-03-02 Akim Demaille <demaille@gostai.com>
825
826 Dub make_TOKEN as a public type interface.
827 * data/c++.m4 (b4_symbol_constructor_declare)
828 (b4_symbol_constructor_define): New empty stubs.
829 (b4_public_types_declare, b4_public_types_define): Use them.
830 * data/lalr1.cc (b4_symbol_constructor_declare)
831 (b4_symbol_constructor_declare_)
832 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
833 Move to...
834 * data/variant.hh: here.
835 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
836 needed.
837 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
838 b4_symbol_constructor_declare, as it is now done by
839 b4_public_types_define and b4_public_types_declare.
840
841 2009-03-02 Akim Demaille <demaille@gostai.com>
842
843 Coding style changes.
844 * data/lalr1.cc (b4_symbol_constructor_declaration_)
845 (b4_symbol_constructor_declarations)
846 (b4_symbol_constructor_definition_)
847 (b4_symbol_constructor_definitions)
848 (b4_yytranslate_definition): Rename as...
849 (b4_symbol_constructor_declare_)
850 (b4_symbol_constructor_declare)
851 (b4_symbol_constructor_define_)
852 (b4_symbol_constructor_define)
853 (b4_yytranslate_define): these.
854 * data/variant.hh (b4_variant_definition): Rename as...
855 (b4_variant_define): this.
856
857 2009-03-02 Akim Demaille <demaille@gostai.com>
858
859 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
860 * data/bison.m4 (b4_percent_define_if_define): New.
861 * data/c++.m4 (b4_variant_if): Move to...
862 * data/bison.m4: Here, using b4_percent_define_if_define.
863 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
864 * data/bison.m4: Here, using b4_percent_define_if_define.
865
866 2009-03-02 Akim Demaille <demaille@gostai.com>
867
868 Dub symbol_type_base as a public type.
869 * data/c++.m4 (b4_public_types_declare): Now define
870 symbol_type_base and symbol_type.
871 (b4_public_types_define): New.
872 In both cases, the definitions are taken verbatim from lalr1.cc.
873 * data/lalr1.cc: Adjust.
874
875 2009-03-02 Akim Demaille <demaille@gostai.com>
876
877 b4_public_types_declare.
878 * data/c++.m4 (b4_public_types_declare): New.
879 * data/glr.cc, data/lalr1.cc: Use it.
880
881 2009-03-02 Akim Demaille <demaille@gostai.com>
882
883 b4_semantic_type_declare.
884 * data/c++.m4 (b4_semantic_type_declare): New.
885 Factors and generalizes what was in glr.cc and lalr1.cc.
886 * data/variant.hh (b4_semantic_type_declare): Redefine it for
887 variants.
888 * data/lalr1.cc, data/glr.cc: Use it.
889
890 2009-02-26 Akim Demaille <demaille@gostai.com>
891
892 Upgrade gnulib.
893 * gnulib: Upgrade from master.
894 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
895 Regen.
896
897 2009-02-25 Akim Demaille <demaille@gostai.com>
898
899 Remove useless arguments.
900 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
901 relevant.
902
903 2009-02-25 Akim Demaille <demaille@gostai.com>
904
905 Comment changes.
906 * data/lalr1.cc: here.
907
908 2009-02-25 Akim Demaille <demaille@gostai.com>
909
910 Fix glr.cc's debug level handling.
911 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
912 glr.c which is used.
913 (debug_level, set_debug_level): Adjust.
914
915 2009-02-25 Akim Demaille <demaille@gostai.com>
916
917 Copyright years.
918 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
919
920 2009-02-25 Akim Demaille <demaille@gostai.com>
921
922 Style changes.
923 * etc/bench.pl.in (generate_grammar_list): Consitently use
924 location_type, not yy::location.
925
926 2009-02-25 Akim Demaille <demaille@gostai.com>
927
928 Comment change.
929 * data/lalr1.cc: here.
930
931 2009-02-19 Akim Demaille <demaille@gostai.com>
932
933 Make yyparser::error public.
934 * data/lalr1.cc: here.
935 There is no good reason to keep it private (and it is convenient
936 to use it from the scanner for instance). It is already public in
937 glr.cc.
938
939 2009-02-19 Akim Demaille <demaille@gostai.com>
940
941 Comment changes.
942 * data/glr.cc: here.
943
944 2009-02-19 Akim Demaille <demaille@gostai.com>
945
946 Remove trailing blanks.
947 The epilogue has its own ending \n, no need to add another.
948
949 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
950 epilogue.
951 * data/glr.cc: dnl when extending the epilogue.
952 Remove stray "private:".
953
954 2009-02-19 Akim Demaille <demaille@gostai.com>
955
956 Use b4_c_modern.
957 * data/c.m4 (b4_c_function_decl): Here.
958
959 2009-02-19 Akim Demaille <demaille@gostai.com>
960
961 Comment changes.
962 * data/lalr1.cc: here.
963
964 2009-02-19 Akim Demaille <demaille@gostai.com>
965
966 Extract variant.hh
967 * data/variant.hh: New, extracted from...
968 * data/lalr1.cc: here.
969 Adjust.
970 * data/local.mk: Adjust.
971
972 2009-02-19 Akim Demaille <demaille@gostai.com>
973
974 Extract stack.hh from lalr1.cc.
975 * data/stack.hh: New.
976 * data/lalr1.cc: Extract from here.
977 * data/local.mk: Adjust.
978
979 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
980
981 Add reminder about uploading public key to keys.gnupg.net.
982 * HACKING (Release Procedure): Here.
983
984 2009-01-28 Akim Demaille <demaille@gostai.com>
985
986 * NEWS: Update information about 2.4.1 and 2.4.2.
987
988 2008-11-04 Akim Demaille <demaille@gostai.com>
989
990 Reformat NEWS.
991 * NEWS: Use more outline-mode markup.
992 Suggested by Jim Meyering.
993
994 2009-01-08 Akim Demaille <demaille@gostai.com>
995
996 Fix grep portability issues.
997 Grep on Solaris does not support -q.
998 Reported by Summum Bonum.
999
1000 * NEWS: Add a stub for 2.4.2.
1001 * THANKS: Add Summum Bonum.
1002 * tests/atlocal.in (EGREP): New.
1003 (CC, CXX, XSLTPROC): Make it possible to override them via
1004 envvars.
1005 * tests/java.at: Use $EGREP instead of egrep.
1006 Use AT_CHECK's ignore instead of grep's -q.
1007
1008 2008-12-11 Akim Demaille <demaille@gostai.com>
1009
1010 Pass the token type to yysyntax_error.
1011 * data/yacc.c (yysyntax_error): Take the transated token instead
1012 of the raw number.
1013 Adjust callers.
1014 * TODO: Update.
1015
1016 2008-12-11 Akim Demaille <demaille@gostai.com>
1017
1018 Formatting changes.
1019 * data/glr.c: Formatting changes.
1020
1021 2008-12-11 Akim Demaille <demaille@gostai.com>
1022
1023 Propagate i18n changes into glr.c.
1024 * TODO: Update.
1025 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1026 building the error message format dynamically.
1027 * data/lalr1.java: Formatting changes.
1028
1029 2008-12-11 Akim Demaille <demaille@gostai.com>
1030
1031 Use testsuite -C.
1032 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1033 Solves problems when top_srcdir is an absolute path.
1034 Suggested by Eric Blake.
1035 * configure.ac: Require Autoconf 2.62.
1036
1037 2008-12-11 Akim Demaille <demaille@gostai.com>
1038
1039 Simplify the i18n of the error messages.
1040 * data/lalr1.cc: Comment changes.
1041 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1042 lalr1.cc instead of building dynamically the format string.
1043
1044 2008-12-08 Akim Demaille <demaille@gostai.com>
1045
1046 Fix portability issue in the test suite.
1047 * tests/local.at (AT_MATCHES_CHECK): New.
1048 Based on Perl instead of Sed. Sed has too many portability
1049 pitfalls, not ever Sed is GNU Sed.
1050 * tests/actions.at (Fix user actions without a trailing semicolon):
1051 Use it.
1052
1053 2008-12-08 Akim Demaille <demaille@gostai.com>
1054
1055 Update data/README.
1056 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1057
1058 2008-12-08 Akim Demaille <demaille@gostai.com>
1059
1060 Install autoconf as a submodule to get m4sugar.
1061 * .gitmodules: Add submodules/autoconf.
1062 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1063 submodules/autoconf.
1064
1065 2008-12-08 Akim Demaille <demaille@gostai.com>
1066
1067 Test token.prefix in all the skeletons.
1068 * data/java.m4 (b4_token_enum): Use the token.prefix.
1069 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1070 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1071 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1072 * tests/java.at: Comment changes.
1073 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1074 (Java parser class and package names): Add token.prefix check.
1075
1076 2008-12-08 Akim Demaille <demaille@gostai.com>
1077
1078 Fix regeneration of atconfig.
1079 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1080 remove it: now that there is no tests/Makefile.am, the top-level
1081 Makefile properly updates atconfig when needed.
1082
1083 2008-12-07 Di-an Jan <dianj@freeshell.org>
1084
1085 Implement the FIXME that ends an user action with a semicolon
1086 if it seems necessary.
1087 * src/scan-code.l (flex rules section): Flag cpp directive from
1088 any `#' to the first unescaped end-of-line. Semicolon is not
1089 needed after `;', `{', '}', or cpp directives and is needed after
1090 any other token (whitespaces and comments have no effect).
1091 * tests/actions.at (Fix user actions without a trailing semicolon):
1092 New test.
1093 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1094 to make user actions complete statements.
1095 Adjust column numbers in error messages.
1096 * tests/regression.at (Fix user actions without a trailing semicolon):
1097 Remove. Covered by new test.
1098
1099 2008-12-07 Akim Demaille <demaille@gostai.com>
1100
1101 Update gnulib.
1102 * gnulib: Update from master.
1103
1104 2008-12-05 Eric Blake <ebb9@byu.net>
1105
1106 Avoid compiler warning.
1107 * src/output.c (muscle_insert_item_number_table): Delete unused
1108 function.
1109
1110 2008-12-02 Eric Blake <ebb9@byu.net>
1111
1112 Build testsuite with newer autoconf.
1113 * tests/output.at (m4_expand): Don't override in newer autoconf,
1114 where the underlying implementation changed.
1115 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1116 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1117 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1118 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1119 since some of them contain unbalanced ')'.
1120
1121 2008-12-01 Akim Demaille <demaille@gostai.com>
1122
1123 Use b4_symbol for printers and destructors everywhere.
1124 * data/bison.m4 (b4_symbol_action_location): New.
1125 * data/c.m4 (b4_symbol_actions): Remove.
1126 Adjust all callers to use by b4_symbol_foreach and the corresponding
1127 b4_symbol_printer/destructor macro.
1128 * data/glr.cc: Adjust.
1129 * data/lalr1.java: Adjust the %destructor sanity check.
1130 * src/output.c (symbol_code_props_output): Remove, we no longer
1131 need the b4_symbol_printers/destructors tables.
1132
1133 2008-12-01 Akim Demaille <demaille@gostai.com>
1134
1135 Use b4_symbol_case_.
1136 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1137 b4_symbol_case_.
1138
1139 2008-12-01 Akim Demaille <demaille@gostai.com>
1140
1141 Move b4_symbol based macro to bison.m4.
1142 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1143 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1144 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1145 (b4_type_foreach): Move to...
1146 * data/bison.m4: Here.
1147 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1148 b4_symbol_value_template instead of b4_symbol_value.
1149
1150 2008-12-01 Akim Demaille <demaille@gostai.com>
1151
1152 b4_symbol/type_foreach.
1153 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1154 Use them.
1155
1156 2008-12-01 Akim Demaille <demaille@gostai.com>
1157
1158 Use the symbol properties to output the printer/destructor for lalr1.cc.
1159 Instead of defining complex list of tuples to define various
1160 properties of the symbols, we now prefer to define symbols as
1161 "structs" in m4: using the symbol key (its number), and the
1162 property name, b4_symbol gives it value. Use this to handle
1163 destructors and printers.
1164
1165 * src/output.c (CODE_PROP): New.
1166 (prepare_symbol_definitions): Use it to define the printer and
1167 destructor related attributes of the symbols.
1168 * data/lalr1.cc (b4_symbol_actions): Rename as...
1169 (b4_symbol_action): this.
1170 Use b4_symbol instead of 6 arguments.
1171 (b4_symbol_printer, b4_symbol_destructor): New.
1172 Use them instead of b4_symbol_actions.
1173
1174 2008-12-01 Akim Demaille <demaille@gostai.com>
1175
1176 Avoid capturing variables too easily.
1177 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
1178 v__ and p__ instead of v and p.
1179
1180 2008-12-01 Akim Demaille <demaille@gostai.com>
1181
1182 Remove spurious empty line before syncline.
1183 * data/bison.m4 (b4_syncline): Don't output an empty line before
1184 the output.
1185
1186 2008-11-26 Akim Demaille <demaille@gostai.com>
1187
1188 Convert lib/Makefile.am into lib/local.mk.
1189 The real problem is rather gnulib.mk, which itself is extracted
1190 from a Makefile.am that gnulib expects to the "recursive". The
1191 tool prefix-gnulib-mk converts such a gnulib.mk to be
1192 non-recursive. Also, some AC_SUBST variables need to be adjusted.
1193
1194 * etc/prefix-gnulib-mk: New.
1195 * bootstrap (slurp): Use it to convert further gnulib.mk.
1196 No longer try to avoid re-creation of lib/gnulib.mk as the changes
1197 are deeper.
1198 * lib/Makefile.am: Rename as...
1199 * lib/local.mk: this.
1200 Adjust to be prefixed.
1201 * Makefile.am, configure.ac: Adjust.
1202 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
1203
1204 2008-11-26 Akim Demaille <demaille@gostai.com>
1205
1206 s/_FLAGS/FLAGS/.
1207 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1208 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1209 Reported by Eric Blake.
1210
1211 2008-11-26 Akim Demaille <demaille@gostai.com>
1212
1213 Use b4_parser_tables_define in glr.cc.
1214 * data/glr.c: Use b4_parser_tables_define instead of defining the
1215 (deterministic integral) tables by hand.
1216
1217 2008-11-26 Akim Demaille <demaille@gostai.com>
1218
1219 Use b4_parser_tables_define in Java.
1220 * data/java.m4 (b4_typed_parser_table): Rename as...
1221 (b4_typed_parser_table_define): this, for consistency.
1222 Accept a comment as $4.
1223 Move $2 into yy*_.
1224 (b4_integral_parser_table): Rename as...
1225 (b4_integral_parser_table_define): this.
1226 * data/lalr1.java: Adjust all uses.
1227 Use b4_parser_tables_define instead of generation by hand.
1228
1229 2008-11-26 Akim Demaille <demaille@gostai.com>
1230
1231 Prepare the convergence bw C style and Java table generation.
1232 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1233 (b4_tables_define): Rename as...
1234 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1235 (b4_parser_tables_define): these.
1236 * data/c.m4 (b4_table_define): Rename as...
1237 (b4_integral_parser_table_define): this.
1238 * data/lalr1.cc: Adjust.
1239 (b4_table_define, b4_table_declare): Rename as...
1240 (b4_integral_parser_table_define)
1241 (b4_integral_parser_table_declare): these.
1242 (yyrline_): Move the comment where it is actually used.
1243 * data/yacc.c: Adjust.
1244 (yyrline): Use b4_integral_parser_table_define.
1245
1246 2008-11-26 Akim Demaille <demaille@gostai.com>
1247
1248 Regen.
1249 * src/parse-gram.h, src/parse-gram.c: Regen.
1250
1251 2008-11-26 Akim Demaille <demaille@gostai.com>
1252
1253 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1254 * data/lalr1.cc (b4_tables_map): Move to...
1255 * data/bison.m4: here.
1256 Update the comment for yytable during the flight.
1257 (b4_tables_declare, b4_tables_define): New.
1258 * data/lalr1.cc: Use them.
1259 * data/c.m4 (b4_table_define): New.
1260 * data/yacc.c: Use b4_tables_define instead of output the tables
1261 by hand.
1262 * tests/regression.at (Web2c Actions): Adjust the expected output,
1263 the order of the tables changed.
1264
1265 2008-11-26 Akim Demaille <demaille@gostai.com>
1266
1267 Get rid of (yy)rhs and (yy)prhs.
1268 These tables are no longer needed in the parsers, and they don't seem to
1269 be useful. They are not documented either.
1270
1271 * src/output.c (prepare_rules): Get rid of rhs and prhs.
1272 Adjust the computation of (yy)r2.
1273
1274 2008-11-26 Akim Demaille <demaille@gostai.com>
1275
1276 Rule length is unsigned.
1277 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
1278
1279 2008-11-26 Akim Demaille <demaille@gostai.com>
1280
1281 Get rid of lalr1-split.cc.
1282 It was no longer maintainer.
1283
1284 * data/lalr1-split.cc: Remove.
1285 * etc/bench.pl.in (bench_fusion_parser): Remove.
1286 Adjust.
1287
1288 2008-11-26 Akim Demaille <demaille@gostai.com>
1289
1290 Use yy* consistently.
1291 * data/glr.c: Now that yyrhs no longer exists as a global
1292 variable, rename local "rhs" variables into "yyrhs" for
1293 consistency.
1294
1295 2008-11-25 Akim Demaille <demaille@gostai.com>
1296
1297 Get rid of yyrhs and yyprhs in glr.c.
1298 * data/glr.c (yyrhs, yyprhs): Remove.
1299 Instead, use the state stack and yystos.
1300
1301 2008-11-25 Akim Demaille <demaille@gostai.com>
1302
1303 Flag glr tests.
1304 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
1305 as an Autotest keyword.
1306
1307 2008-11-25 Akim Demaille <demaille@gostai.com>
1308
1309 Prefer TESTSUITE_FLAGS.
1310 TESTSUITEFLAGS is barely readable.
1311
1312 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
1313 for backward compatibility.
1314 Use the former instead of the latter.
1315
1316 2008-11-25 Akim Demaille <demaille@gostai.com>
1317
1318 Get rid of yyrhs and yyprhs in larl1.java.
1319 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
1320 (yy_reduce_print): Rather, use yystos_ and the state stack.
1321
1322 2008-11-25 Akim Demaille <demaille@gostai.com>
1323
1324 Formatting changes.
1325
1326 2008-11-25 Akim Demaille <demaille@gostai.com>
1327
1328 Get rid of yyrhs and yyprhs in yacc.c.
1329 They were used to get the symbol types, given a rule number, when
1330 displaying the top of the stack before a reduction. But the
1331 symbol type is available from the state stack. This has two be
1332 benefits: two tables less in the parser (making it smaller), and a
1333 more consistent use of the three stacks which will help to fuse
1334 them.
1335
1336 * data/yacc.c (yyprhs, yyrhs): Remove.
1337 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
1338 (yy_reduce_print): Take yyssp as argument.
1339 Use it, together with yystos, to get the symbol type.
1340 * tests/regression.at (Web2c Report): Remove these tables from the
1341 expected output.
1342
1343 2008-11-25 Akim Demaille <demaille@gostai.com>
1344
1345 b4_tables_map.
1346 The point is to factor the generation of the tables across skeletons.
1347 This is language dependant.
1348
1349 * data/c.m4 (b4_comment_): New.
1350 Should be usable to define how to generate tables independently of
1351 the language.
1352 (b4_c_comment): New.
1353 (b4_comment): Bounce to b4_c_comment.
1354 Now support $2 = [PREFIX] for indentation.
1355 * data/lalr1.cc (b4_table_declare): Don't output a comment if
1356 there is no comment.
1357 Indent it properly when there is one.
1358 Output the ending semicolon.
1359 (b4_table_define): Space changes.
1360 Output the ending semicolon.
1361 (b4_tables_map): New.
1362 Use it twice instead of declaring and defining the (integral)
1363 tables by hand.
1364
1365 2008-11-25 Akim Demaille <demaille@gostai.com>
1366
1367 b4_table_declare.
1368 * data/lalr1.cc (b4_table_declare): New.
1369 Use it to declare the tables defined with b4_table_define.
1370 (b4_table_define): Declare a third arg to match b4_table_declare
1371 signature.
1372 Move all the comments around invocations of b4_table_define into
1373 the invocations itselves.
1374 Move things around to have the order for declarations and
1375 definitions.
1376
1377 2008-11-25 Akim Demaille <demaille@gostai.com>
1378
1379 Formatting changes.
1380 * data/lalr1.java: here.
1381
1382 2008-11-25 Akim Demaille <demaille@gostai.com>
1383
1384 b4_args is more general than only C++.
1385 * data/lalr1.cc (b4_args, _b4_args): Move to...
1386 * data/bison.m4: here.
1387
1388 2008-11-21 Di-an Jan <dianj@freeshell.org>
1389
1390 Implement no-XXX arguments for --warnings, --report, --trace.
1391 * src/getargs.c (flags_argmatch): Handles no-XXX.
1392 Fix typo in doxygen comment.
1393
1394 2008-11-21 Akim Demaille <demaille@gostai.com>
1395
1396 Display the changes in cross-options.texi.
1397 * build-aux/cross-options.pl ($sep): New, to separate items.
1398 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
1399 changes.
1400
1401 2008-11-20 Di-an Jan <dianj@freeshell.org>
1402
1403 Improves options in the manual.
1404 * doc/bison.texinfo (-g, -x): Add space before argument.
1405 (Option Cross Key): Implement FIXME: listing directives also.
1406 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1407 (Short Option): Special case -d. Put arguments inside @option.
1408 (Bison Directive): Add column, automatically extracted from
1409 src/scan-gram.l (actual name passed as the first argument)
1410 with special case for %define.
1411 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
1412 to build-aux/cross-options.pl.
1413 * src/getargs.c (usage): Document limitations of cross-options.pl.
1414 * src/scan-gram.l: Likewise.
1415
1416 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1417
1418 Fix unexpanded macros in GLR defines file.
1419 Reported by Csaba Raduly at
1420 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1421 * THANKS (Csaba Raduly): Add.
1422 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1423 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1424 lexer in a separate module that includes the defines file.
1425 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
1426 source.
1427 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1428 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1429 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1430 (AT_DATA_SOURCE_PROLOGUE): New.
1431 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1432 (AT_DATA_SOURCE): New.
1433 (AT_FULL_COMPILE): Extend to support an additional source file.
1434
1435 2008-11-18 Akim Demaille <demaille@gostai.com>
1436
1437 More TODO.
1438 * TODO: More short term issues.
1439
1440 2008-11-18 Akim Demaille <demaille@gostai.com>
1441
1442 Regen.
1443 * src/parse-gram.h, src/parse-gram.c: Regen.
1444
1445 2008-11-18 Akim Demaille <demaille@gostai.com>
1446
1447 Use b4_subtract where possible.
1448 * data/lalr1.cc (b4_subtract): Move to...
1449 * data/bison.m4: here.
1450 * data/glr.c (b4_rhs_data): Use it.
1451 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
1452
1453 2008-11-18 Akim Demaille <demaille@gostai.com>
1454
1455 Remove incorrect mode specification.
1456 * data/glr.cc: Don't pretend it's C code.
1457
1458 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1459
1460 Simplify last patch slightly.
1461 * src/getargs.c (getargs): Here.
1462
1463 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1464
1465 Fix last warning from --enable-gcc-warnings.
1466 * src/getargs.c (getargs): Don't assign const address to non-const
1467 pointer.
1468
1469 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1470
1471 Don't let maintainer-*-check targets force a version update.
1472 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1473 handled.
1474
1475 2008-11-17 Di-an Jan <dianj@freeshell.org>
1476
1477 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1478 Align menus. Adjust word wrapping. Use node names for menu names.
1479 (Examples): Don't abbreviate node names.
1480 (LocalWords): Remove abbreviations.
1481 (Copying): Make description a sentence.
1482 (Java Action Features): Remove period to match the rest of menu.
1483
1484 2008-11-17 Di-an Jan <dianj@freeshell.org>
1485
1486 Handles several --enable-gcc-warnings.
1487 * src/getargs.c (command_line_location): Set parameters to void.
1488 * src/output.c (symbol_type_name_cmp): Make static.
1489 (symbols_by_type_name): Set parameters to void.
1490 (symbol_definitions_output): Remove unused parameter. Rename as...
1491 (prepare_symbol_definitions): this.
1492 (muscles_output): Move symbol_definitions_output to...
1493 (output): here as prepare_symbol_definitions.
1494 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
1495 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
1496
1497 2008-11-17 Di-an Jan <dianj@freeshell.org>
1498
1499 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
1500 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
1501
1502 2008-11-16 Akim Demaille <demaille@gostai.com>
1503
1504 Add missing $(EXEEXT).
1505 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
1506 "src/bison$(EXEEXT)".
1507 Reported by Di-an Jan.
1508
1509 2008-11-15 Akim Demaille <demaille@gostai.com>
1510
1511 * TODO: Update.
1512
1513 2008-11-15 Akim Demaille <demaille@gostai.com>
1514
1515 Formatting changes.
1516 * tests/input.at: here.
1517
1518 2008-11-15 Akim Demaille <demaille@gostai.com>
1519
1520 Remove duplicate header inclusion.
1521 * src/LR0.c: here.
1522
1523 2008-11-15 Akim Demaille <demaille@gostai.com>
1524
1525 * src/parse-gram.h, src/parse-gram.c: Regen.
1526
1527 2008-11-15 Akim Demaille <demaille@gostai.com>
1528
1529 Support parametric types.
1530
1531 There are two issues to handle: first scanning nested angle
1532 bracket pairs to support types such as std::pair< std::string,
1533 std::list<std::string> > >.
1534
1535 Another issue is to address idiosyncracies of C++: do not glue two
1536 closing angle brackets together (otherwise it's operator>>), and
1537 avoid sticking blindly a TYPE to the opening <, as it can result
1538 in '<:' which is a digraph for '['.
1539
1540 * src/scan-gram.l (brace_level): Rename as...
1541 (nesting): this.
1542 (SC_TAG): New.
1543 Implement support for complex tags.
1544 (tag): Accept
1545 , but not <.
1546 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
1547 (b4_symbol_variant): Leave space around types as parameters.
1548 * examples/variant.yy: Use nested template types and leading ::.
1549 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
1550 Rename as...
1551 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
1552 * tests/c++.at: Test parametric types.
1553
1554 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1555
1556 Test token.prefix.
1557 This is not sufficient, but we test at least that the make_SYMBOL
1558 interface is not affected by token.prefix. A more general test
1559 will be implemented when the support of token.prefix is generalized
1560 to more skeletons.
1561
1562 * tests/c++.at: One more variant test, using token.prefix.
1563
1564 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1565
1566 Test the make_TOKEN interface.
1567 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
1568 Factor the common code in yylex.
1569 Use it to test "%define lex_symbol".
1570
1571 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1572
1573 Formatting change.
1574
1575 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1576
1577 Simplify code for variants bench marks.
1578 * etc/bench.pl.in (&generate_grammar_list): Define and use
1579 location_type.
1580 Factor the common code in yylex.
1581
1582 2008-11-15 Akim Demaille <demaille@gostai.com>
1583
1584 Better error message.
1585 * bootstrap (find_tool): Fix the error message.
1586
1587 2008-11-15 Akim Demaille <demaille@gostai.com>
1588
1589 Update variant.yy to newest interface.
1590 * examples/variant.yy: Define lex_symbol.
1591 Adjust.
1592
1593 2008-11-15 Akim Demaille <demaille@gostai.com>
1594
1595 Don't use locations in variant.yy.
1596 * examples/variant.yy: Adjust to not using locations.
1597
1598 2008-11-15 Akim Demaille <demaille@gostai.com>
1599
1600 Comment changes.
1601 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
1602 comments for the license.
1603
1604 2008-11-15 Akim Demaille <demaille@gostai.com>
1605
1606 Remove tests/Makefile.am.
1607 * tests/Makefile.am: Rename as...
1608 * tests/local.mk: this.
1609 * Makefile.am, configure.ac: Adjust.
1610 * Makefile.am (DISTCLEANFILES): Define.
1611 (maintainer-check, maintainer-xml-check, maintainer-push-check):
1612 Remove, we no longer need to bounce to the real targets.
1613
1614 2008-11-15 Akim Demaille <demaille@gostai.com>
1615
1616 Comment changes.
1617
1618 2008-11-15 Akim Demaille <demaille@gostai.com>
1619
1620 djgpp/local.mk.
1621 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
1622 * djgpp/local.mk: this new file.
1623
1624 2008-11-15 Akim Demaille <demaille@gostai.com>
1625
1626 Remove doc/Makefile.am.
1627 * doc/Makefile.am: Rename as...
1628 * doc/local.mk: this.
1629 Adjust paths
1630 * Makefile.am, configure.ac: Adjust.
1631 * Makefile.am (MOSTLYCLEANFILES): New.
1632 * src/local.mk: Adjust.
1633
1634 2008-11-15 Akim Demaille <demaille@gostai.com>
1635
1636 Move sc_tight_scope into maint.mk.
1637 It does not work, and I don't know how it was supposed to work: it
1638 seems to be looking for sources in the build tree. I just moved
1639 it at a better place, fixing it is still required.
1640
1641 * src/local.mk (echo): Remove.
1642 (sc_tight_scope): Move to...
1643 * maint.mk: here.
1644
1645 2008-11-15 Akim Demaille <demaille@gostai.com>
1646
1647 Regen.
1648 * src/parse-gram.h, src/parse-gram.h: Regen.
1649
1650 2008-11-15 Akim Demaille <demaille@gostai.com>
1651
1652 Remove src/Makefile.am.
1653 * src/Makefile.am: Rename as...
1654 * src/local.mk: this.
1655 Prefix all the paths with src/.
1656 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
1657 (AM_CPPFLAGS): Find find in builddir/src.
1658 (YACC): Move the flags into...
1659 (AM_YFLAGS): here.
1660 * maint.mk (sc_tight_scope): Disable.
1661 It used to bounce to the version in src/Makefile.am which is now
1662 part of this very Makefile.
1663 * Makefile.am, configure.ac: Adjust.
1664 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
1665 include "..." to find files "here": we are no longer in src/, so
1666 qualify the includes with src/.
1667 * doc/Makefile.am (PREPATH): No longer include the top_builddir
1668 prefix.
1669 (.x.1): Adjust to be able to create src/foo from the top level
1670 Makefile, instead of going bounce to src/Makefile the creation of
1671 foo.
1672
1673 2008-11-15 Akim Demaille <demaille@gostai.com>
1674
1675 Remove useless variable.
1676 * doc/Makefile.am (srcsrcdir): Remove.
1677
1678 2008-11-15 Akim Demaille <demaille@gostai.com>
1679
1680 Remove data/Makefile.am.
1681 * data/Makefile.am: Rename as...
1682 * data/local.mk: this.
1683 Adjust paths.
1684 * Makefile.am, configure.ac: Adjust.
1685
1686 2008-11-15 Akim Demaille <demaille@gostai.com>
1687
1688 Remove etc/Makefile.am.
1689 * etc/Makefile.am: Rename as...
1690 * etc/local.mk: this.
1691 Adjust.
1692 * Makefile.am, configure.ac: Adjust.
1693
1694 2008-11-15 Akim Demaille <demaille@gostai.com>
1695
1696 Remove examples/local.mk.
1697 examples/calc++/Makefile.am might be interesting to keep as is, since
1698 it is an example in itself.
1699
1700 * examples/Makefile.am: Rename as...
1701 * examples/local.mk: this.
1702 Adjust.
1703 * Makefile.am, configure.ac: Adjust.
1704
1705 2008-11-15 Akim Demaille <demaille@gostai.com>
1706
1707 Remove build-aux/Makefile.am.
1708 Recursive Makefiles are really way too slow, let's get rid of some of
1709 them.
1710
1711 * build-aux/Makefile.am: Rename as...
1712 * build-aux/local.mk: this.
1713 Adjust paths.
1714 * Makefile.am, configure.ac: Adjust.
1715
1716 2008-11-15 Akim Demaille <demaille@gostai.com>
1717
1718 Provide convenience constructors for locations and positions.
1719 * data/location.cc (position::position): Accept file, line and
1720 column as arguments with default values.
1721 Always qualify initial line and column literals as unsigned.
1722 (location::location): Provide convenience constructors.
1723
1724 2008-11-15 Akim Demaille <demaille@gostai.com>
1725
1726 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
1727 token type.
1728 Using template buys us nothing, and makes it uselessly complex to
1729 construct a symbol. Besides, it could not be generalized to other
1730 languages, while make_FOO would work in C/Java etc.
1731
1732 * data/lalr1.cc (b4_symbol_): New.
1733 (b4_symbol): Use it.
1734 (b4_symbol_constructor_declaration_)
1735 (b4_symbol_constructor_definition_): Instead of generating
1736 specializations of an overloaded template function, just generate
1737 several functions whose names are forged from the token names
1738 without the token.prefix.
1739 (b4_symbol_constructor_declarations): Generate them for all the
1740 symbols, not just by class of symbol type, now that instead of
1741 specializing a function template by the token, we generate a
1742 function named after the token.
1743 (b4_symbol_constructor_specialization_)
1744 (b4_symbol_constructor_specializations): Remove.
1745 * etc/bench.pl.in: Adjust to this new API.
1746
1747 2008-11-13 Akim Demaille <demaille@gostai.com>
1748
1749 %define token.prefix.
1750 Provide a means to add a prefix to the name of the tokens as
1751 output in the generated files. Because of name clashes, it is
1752 good to have such a prefix such as TOK_ that protects from names
1753 such as EOF, FILE etc. But it clutters the grammar itself.
1754
1755 * data/bison.m4 (token.prefix): Empty by default.
1756 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
1757 * data/lalr1.cc (b4_symbol): Ditto.
1758
1759 2008-11-13 Akim Demaille <demaille@gostai.com>
1760
1761 Compute at M4 time some of the subtractions.
1762 * data/lalr1.cc (b4_subtract): New.
1763 (b4_rhs_data): Use it.
1764
1765 2008-11-13 Akim Demaille <demaille@gostai.com>
1766
1767 symbol::token.
1768 This allows the user to get the type of a token returned by yylex.
1769
1770 * data/lalr1.cc (symbol::token): New.
1771 (yytoknum_): Define when %define lex_symbol, independently of
1772 %debug.
1773 (yytoken_number_): Move into...
1774 (symbol::token): here, since that's the only use.
1775 The other one is YYPRINT which was not officially supported
1776 by lalr1.cc, and anyway it did not work since YYPRINT uses this
1777 array under a different name (yytoknum).
1778
1779 2008-11-13 Akim Demaille <demaille@gostai.com>
1780
1781 YYERRCODE.
1782 * TODO (YYERRCODE): Mention the case of $undef.
1783
1784 2008-11-13 Akim Demaille <demaille@gostai.com>
1785
1786 TODO: YYPRINT.
1787 * TODO (YYPRINT): New.
1788
1789 2008-11-13 Akim Demaille <demaille@gostai.com>
1790
1791 Comment changes.
1792 * data/lalr1.cc, data/yacc.c: Fix the description of the
1793 yytranslate and yytoknum tables.
1794
1795 2008-11-13 Akim Demaille <demaille@gostai.com>
1796
1797 Define make_symbol in the header.
1798 To reach good performances these functions should be inlined (yet
1799 this is to measure precisely). To this end they must be available
1800 to the caller.
1801
1802 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
1803 location_type with the class name.
1804 Since will now be output in the header, declare "inline".
1805 No longer use b4_symbol_constructor_specializations, but
1806 b4_symbol_constructor_definitions in the header.
1807 Don't call it in the *.cc file.
1808
1809 2008-11-13 Akim Demaille <demaille@gostai.com>
1810
1811 Define yytranslate in the header for lex_symbol.
1812 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
1813 into the header file when using %define lex_symbol.
1814 (yytranslate_): Declare inline.
1815
1816 2008-11-13 Akim Demaille <demaille@gostai.com>
1817
1818 Define the constructors of symbol_type in
1819 b4_symbol_constructor_definitions.
1820 The constructors are called by the make_symbol functions, which a
1821 forthcoming patch will move elsewhere. Hence the interest of
1822 putting them together.
1823
1824 The stack_symbol_type does not need to be moved, it is used only
1825 by the parser.
1826
1827 * data/lalr1.cc: Move symbol_type and symbol_base_type
1828 constructors into...
1829 (b4_symbol_constructor_definitions): here.
1830 Adjust.
1831
1832 2008-11-13 Akim Demaille <demaille@gostai.com>
1833
1834 Make it easier to move the definition of yytranslate_.
1835 Forthcoming changes will make it possible to use yytranslate_
1836 from outside the parser implementation file.
1837
1838 * data/lalr1.cc (b4_yytranslate_definition): New.
1839 Use it.
1840
1841 2008-11-13 Akim Demaille <demaille@gostai.com>
1842
1843 Remove useless class specification.
1844 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1845 to refer to the class name to use a type defined by the class for
1846 arguments of member functions.
1847
1848 2008-11-13 Akim Demaille <demaille@gostai.com>
1849
1850 Finer input type for yytranslate.
1851 This patch is debatable: the tradition expects yylex to return an int
1852 which happens to correspond to token_number (which is an enum). This
1853 allows for instance to return characters (such as '*' etc.). But this
1854 goes against the stronger typing I am trying to have with the new
1855 lex interface which return a symbol_type. So in this case, feed
1856 yytranslate_ with a token_type.
1857
1858 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1859 expect a token_type.
1860
1861 2008-11-13 Akim Demaille <demaille@gostai.com>
1862
1863 Honor lex-params in %define lex_symbol mode.
1864 * data/lalr1.cc: Use b4_lex_param.
1865
1866 2008-11-13 Akim Demaille <demaille@gostai.com>
1867
1868 Simplify names.
1869 * src/output.c (symbol_definitions_output): Rename symbol
1870 attributes type_name and has_type_name as type and has_type.
1871 * data/lalr1.cc: Adjust uses.
1872
1873 2008-11-13 Akim Demaille <demaille@gostai.com>
1874
1875 Use b4_type_names for the union type.
1876 The union used to compute the size of the variant used to iterate
1877 over the type of all the symbols, with a lot of redundancy. Now
1878 iterate over the lists of symbols having the same type-name.
1879
1880 * data/lalr1.cc (b4_char_sizeof_): New.
1881 (b4_char_sizeof): Use it.
1882 Adjust to be called with a list of numbers instead of a single
1883 number.
1884 Adjust its caller for new-line issues.
1885
1886 2008-11-13 Akim Demaille <demaille@gostai.com>
1887
1888 Define the "identifier" of a symbol.
1889 Symbols may have several string representations, for instance if
1890 they have an alias. What I call its "id" is a string that can be
1891 used as an identifier. May not exist.
1892
1893 Currently the symbols which have the "tag_is_id" flag set are
1894 those that don't have an alias. Look harder for the id.
1895
1896 * src/output.c (is_identifier): Move to...
1897 * src/symtab.c (is_identifier): here.
1898 * src/symtab.h, src/symtab.c (symbol_id_get): New.
1899 * src/output.c (symbol_definitions_output): Use it to define "id"
1900 and "has_id".
1901 Remove the definition of "tag_is_id".
1902 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
1903 "tag_is_id" were used to produce code.
1904 We still use "tag" for documentation.
1905
1906 2008-11-11 Akim Demaille <demaille@gostai.com>
1907
1908 Locations are no longer required by lalr1.cc.
1909 * data/lalr1.cc (_b4_args, b4_args): New.
1910 Adjust all uses of locations to make them optional.
1911 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
1912 (AT_CHECK_NAMESPACE): Check the use of locations.
1913 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
1914 without locations with lalr1.cc.
1915 Test these cases.
1916 * tests/output.at: Check lalr1.cc with and without location
1917 support.
1918 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
1919 Don't use locations.
1920
1921 2008-11-11 Akim Demaille <demaille@gostai.com>
1922
1923 AT_FULL_COMPILE.
1924 * tests/local.at (AT_FULL_COMPILE): New.
1925 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
1926
1927 2008-11-11 Akim Demaille <demaille@gostai.com>
1928
1929 Support parens in calc++.
1930 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
1931 * examples/calc++/test (run): Check the expected output.
1932 Adjust callers.
1933 Check parens too.
1934
1935 2008-11-11 Akim Demaille <demaille@gostai.com>
1936
1937 Simplify lalr1.cc since %defines is mandatory.
1938 * data/lalr1.cc: Remove useless calls to b4_defines_if.
1939
1940 2008-11-11 Akim Demaille <demaille@gostai.com>
1941
1942 TODO: yyfmt.
1943 * TODO (yysyntax_error): New item.
1944
1945 2008-11-11 Akim Demaille <demaille@gostai.com>
1946
1947 Prefer M4 to CPP.
1948 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1949 YYERROR_VERBOSE.
1950
1951 2008-11-11 Akim Demaille <demaille@gostai.com>
1952
1953 Support i18n of the parse error messages.
1954 * TODO (lalr1.cc/I18n): Remove.
1955 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1956 error messages, as done in yacc.c.
1957 Stay within the yy* pseudo namespace.
1958
1959 2008-11-11 Akim Demaille <demaille@gostai.com>
1960
1961 More TODO.
1962 * TODO (single stack, yysyntax_error): New.
1963
1964 2008-11-11 Akim Demaille <demaille@gostai.com>
1965
1966 Make it possible to return a symbol_type from yylex.
1967 * data/lalr1.cc (b4_lex_symbol_if): New.
1968 (parse): When lex_symbol is defined, expected yylex to return the
1969 complete lookahead.
1970 * etc/bench.pl.in (generate_grammar_list): Extend to support this
1971 yylex interface.
1972 (bench_variant_parser): Exercise it.
1973
1974 2008-11-11 Akim Demaille <demaille@gostai.com>
1975
1976 Remove useless bench case.
1977 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
1978 no longer used.
1979
1980 2008-11-11 Akim Demaille <demaille@gostai.com>
1981
1982 Improve display of directives.
1983 * etc/bench.pl.in (parse_term): Don't add useless eol.
1984
1985 2008-11-11 Akim Demaille <demaille@gostai.com>
1986
1987 Use string_cast in the bench.
1988 * etc/bench.pl.in (generate_grammar_list): Define and use
1989 string_cast.
1990
1991 2008-11-11 Akim Demaille <demaille@gostai.com>
1992
1993 Replace yychar with a Boolean.
1994 * data/lalr1.cc (parse::yychar): Replace by...
1995 (parse::yyempty): this.
1996
1997 2008-11-11 Akim Demaille <demaille@gostai.com>
1998
1999 Factor the tables.
2000 * TODO: New item.
2001
2002 2008-11-11 Akim Demaille <demaille@gostai.com>
2003
2004 Let yytranslate handle the eof case.
2005 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2006 Adjust callers.
2007 No longer expect yychar to be equal to yyeof_, rather, test the
2008 lookahead's (translated) kind.
2009
2010 2008-11-11 Akim Demaille <demaille@gostai.com>
2011
2012 yychar cannot be empty in yyerrlab.
2013 * TODO (yychar == yyempty_): New.
2014 * data/lalr1.cc: Remove the handling of this case.
2015 This eases forthcoming changes related to yychar and yytranslate.
2016
2017 2008-11-11 Akim Demaille <demaille@gostai.com>
2018
2019 Bench: syntactic sugar for %define/#define.
2020 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2021 (&bench_push_parser, bench_variant_parser): Use this feature.
2022 (&eat): New.
2023 Use it.
2024
2025 2008-11-11 Akim Demaille <demaille@gostai.com>
2026
2027 Less memory pressure on the "list" bench.
2028 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2029 the values, to limit memory pressure.
2030
2031 2008-11-11 Akim Demaille <demaille@gostai.com>
2032
2033 Introduce make_symbol.
2034 make_symbol provides a means to construct a full symbol (kind,
2035 value, location) in a single shot. It is meant to be a Symbol
2036 constructor, parameterized by the symbol kind so that overloading
2037 would prevent incorrect kind/value pairs. Unfortunately
2038 parameterized constructors do not work well in C++ (unless the
2039 parameter also appears as an argument, which is not acceptable),
2040 hence the use of a function instead of a constructor.
2041
2042 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2043 (b4_symbol_constructor_declarations)
2044 (b4_symbol_constructor_specialization_)
2045 (b4_symbol_constructor_specializations)
2046 (b4_symbol_constructor_definition_)
2047 (b4_symbol_constructor_definitions): New.
2048 Use them where appropriate to generate declaration, declaration of
2049 the specializations, and implementations of the templated
2050 overloaded function "make_symbol".
2051 (variant::variant): Always define a default ctor.
2052 Also provide a copy ctor.
2053 (symbol_base_type, symbol_type): New ctor overloads for value-less
2054 symbols.
2055 (symbol_type): Now public, so that functions such as yylex can use
2056 it.
2057
2058 2008-11-11 Akim Demaille <demaille@gostai.com>
2059
2060 Inform m4 whether a tag is a valid id.
2061 * src/output.c (is_identifier): New.
2062 (symbol_definitions_output): Use it to define tag_is_id.
2063 But maybe this should be done at m4 level?
2064
2065 2008-11-11 Akim Demaille <demaille@gostai.com>
2066
2067 Test 214 was failing: it greps with a pattern containing [ ]*
2068 which obviously meant to catch spaces and tabs, but contained only
2069 spaces. Tabulations in sources are a nuisance, so to simplify the
2070 matter, get rid of all the tabulations in the Java sources. The
2071 other skeletons will be treated equally later.
2072
2073 * data/java.m4, data/lalr1.java: Untabify.
2074 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2075 tabulations are no longer generated.
2076
2077 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2078
2079 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2080 * configure.ac: Adjust usage.
2081 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2082 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2083 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2084
2085 2008-11-10 Di-an Jan <dianj@freeshell.org>
2086
2087 Workaround Java's ``code too large'' problem for parser tables
2088 in most cases, by using one function per initialization.
2089 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2090 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2091 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2092 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2093 (yytname_): Use b4_typed_parser_table.
2094 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2095 ``code too large'' error.
2096
2097 2008-11-10 Di-an Jan <dianj@freeshell.org>
2098
2099 * NEWS: Document them.
2100
2101 General Java skeleton improvements.
2102 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2103 using gcj < 4.3 in the testsuite, according to comments in
2104 gnulib/m4/javacomp.m4.
2105 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2106 location_type, position_type): Remove extraneous brackets from
2107 b4_percent_define_default.
2108 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2109 m4_define and m4_define_default.
2110 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2111 which marks the end of user code with appropriate syncline, like all
2112 the other skeletons.
2113 (b4_user_post_prologue): Add. Don't silently drop.
2114 (yylex): Remove.
2115 (parse): Inline yylex.
2116 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2117 (%{...%}): Fix typo of %code imports.
2118 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2119
2120 Support annotations on parser class with %define annotations.
2121 * data/lalr1.java (annotations): Add to parser class modifier.
2122 * doc/bison.texinfo (Java Parser Interface): Document
2123 %define annotations.
2124 (Java Declarations Summary): Document %define annotations.
2125 * tests/java.at (Java parser class modifiers): Test annotations.
2126
2127 Do not generate code for %error-verbose unless requested.
2128 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2129 Make private. Make conditional on %error-verbose.
2130 (getErrorVerbose, setErrorVerbose): New.
2131 (yytnamerr_): Make conditional on %error-verbose.
2132 (yysyntax_error): Make some code conditional on %error-verbose.
2133 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2134 about %error-verbose having no effect.
2135 (getErrorVerbose, setErrorVerbose): Document.
2136
2137 Move constants for token names to Lexer interface.
2138 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2139 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2140 (parse): Qualify EOF to Lexer.EOF.
2141 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2142 EOF and token names to Java Lexer Interface.
2143 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2144
2145 Make yyerror public.
2146 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2147 (yyerror): Change to public. Add Javadoc comments. Use longer
2148 parameter names. Make the body rather than the declarator
2149 conditional on %locations.
2150 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2151
2152 Allow user to add code to the constructor with %code init.
2153 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2154 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2155 Add %code init to the front of the constructor body.
2156 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2157 and %define init_throws.
2158 (Java Declarations Summary): Document %code init and
2159 %define init_throws.
2160 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2161 (Java constructor init and init_throws): Add tests.
2162
2163 2008-11-10 Akim Demaille <demaille@gostai.com>
2164
2165 Update TODO.
2166 * TODO (-D): is implemented.
2167 (associativity): Same precedence must have the same associativity.
2168 For instance, how can a * b / c be parsed if * is %left and / is
2169 %right?
2170 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2171
2172 2008-11-10 Akim Demaille <demaille@gostai.com>
2173
2174 Formatting changes.
2175
2176 2008-11-10 Akim Demaille <demaille@gostai.com>
2177
2178 More information about the symbols.
2179 * src/output.c (type_names_output): Document all the symbols,
2180 including those that don't have a type-name.
2181 (symbol_definitions_output): Define "is_token" and
2182 "has_type_name".
2183 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
2184 type-name, now that they are defined too in b4_type_names.
2185
2186 2008-11-10 Akim Demaille <demaille@gostai.com>
2187
2188 Regen.
2189
2190 2008-11-10 Akim Demaille <demaille@gostai.com>
2191
2192 Make parser::yytranslate static.
2193 Small speedup (1%) on the list grammar. And makes yytranslate_
2194 available in non member functions.
2195
2196 * data/lalr1.cc (yytranslate_): Does not need to be a instance
2197 function.
2198
2199 2008-11-10 Akim Demaille <demaille@gostai.com>
2200
2201 Avoid trailing spaces.
2202 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
2203 * data/lalr1.cc: Don't indent before rule and symbol actions, as
2204 they can be empty, and anyway this incorrectly indents the first
2205 action.
2206
2207 2008-11-10 Akim Demaille <demaille@gostai.com>
2208
2209 Comment changes.
2210
2211 2008-11-10 Akim Demaille <demaille@gostai.com>
2212
2213 Use "enum" for integral constants.
2214 This is just nicer to read, I observed no speedup.
2215
2216 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2217 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2218 (yyuser_token_number_max_, yyundef_token_): Move into...
2219 (yytranslate_): here.
2220
2221 2008-11-10 Akim Demaille <demaille@gostai.com>
2222
2223 Shortcuts in bench directives.
2224 * etc/bench.pl.in (parse_dirs): New.
2225 Use it.
2226 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2227 Create the benches in "benches/".
2228
2229 2008-11-10 Akim Demaille <demaille@gostai.com>
2230
2231 Formatting changes.
2232 * data/lalr1.cc: here.
2233
2234 2008-11-10 Akim Demaille <demaille@gostai.com>
2235
2236 Adjust verbose message to using emacs.
2237 * etc/bench.pl.in: Inform compilation-mode when we change the
2238 directory.
2239 (generate_grammar_list): Recognize %define "variant" in addition
2240 to %define variant.
2241
2242 2008-11-10 Akim Demaille <demaille@gostai.com>
2243
2244 Classify symbols by type-name.
2245 * src/uniqstr.h (UNIQSTR_CMP): New.
2246 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2247 (type_names_output): New.
2248 (muscles_output): Use it.
2249 * data/lalr1.cc (b4_symbol_action_): Remove.
2250 (b4_symbol_case_, b4_type_action_): New.
2251 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2252
2253 2008-11-10 Akim Demaille <demaille@gostai.com>
2254
2255 Change the handling of the symbols in the skeletons.
2256 Before we were using tables which lines were the symbols and which
2257 columns were things like number, tag, type-name etc. It is was
2258 difficult to extend: each time a column was added, all the numbers had
2259 to be updated (you asked for colon $2, not for "tag"). Also, it was
2260 hard to filter these tables when only a subset of the symbols (say the
2261 tokens, or the nterms, or the tokens that have and external number
2262 *and* a type-name) was of interest.
2263
2264 Now instead of monolithic tables, we define one macro per cell. For
2265 instance "b4_symbol(0, tag)" is a macro name which contents is
2266 self-decriptive. The macro "b4_symbol" provides easier access to
2267 these cells.
2268
2269 * src/output.c (type_names_output): Remove.
2270 (symbol_numbers_output, symbol_definitions_output): New.
2271 (muscles_output): Call them.
2272 (prepare_symbols): Define b4_symbols_number.
2273
2274 2008-11-10 Akim Demaille <demaille@gostai.com>
2275
2276 --trace=muscles
2277 * src/getargs.h, src/getargs.c (trace_muscle): New.
2278 (trace_types, trace_args): Support it.
2279 * src/output.c (output_skeleton): Use it.
2280
2281 2008-11-10 Akim Demaille <demaille@gostai.com>
2282
2283 muscles_output.
2284 * src/output.c (muscles_output): New, extracted from...
2285 (output_skeleton): here.
2286 Adjust.
2287
2288 2008-11-10 Akim Demaille <demaille@gostai.com>
2289
2290 Formatting changes.
2291
2292 2008-11-10 Akim Demaille <demaille@gostai.com>
2293
2294 Update the variant example.
2295 * examples/variant.yy: Formatting changes.
2296 One stage build.
2297
2298 2008-11-10 Akim Demaille <demaille@gostai.com>
2299
2300 Support constructor with an argument.
2301 This improves the "list" bench by 2%.
2302
2303 * data/lalr1.cc (variant::build): Add an overloaded version with
2304 an argument.
2305 * tests/c++.at (AT_CHECK_VARIANT): Check it.
2306
2307 2008-11-10 Akim Demaille <demaille@gostai.com>
2308
2309 Test variants.
2310 * tests/c++.at (AT_CHECK_VARIANTS): New.
2311 Use it with and without %define assert.
2312
2313 2008-11-10 Akim Demaille <demaille@gostai.com>
2314
2315 Add %precedence support.
2316 Unfortunately it is not possible to reuse the %prec directive. This
2317 is because to please POSIX, we do not require to end the rules with a
2318 semicolon. As a result,
2319
2320 foo: bar %prec baz
2321
2322 is ambiguous: either a rule which precedence is that of baz, or a rule,
2323 and then a declaration of the precedence of the token baz.
2324
2325 * doc/bison.texinfo: Document %precedence.
2326 (Precedence Only): New.
2327 * src/assoc.h, src/assoc.c (precedence_assoc): New.
2328 * src/conflicts.c (resolve_sr_conflict): Support it.
2329 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
2330 Parse it.
2331 * tests/calc.at: Use %precedence for NEG.
2332 * tests/conflicts.at (%precedence does not suffice)
2333 (%precedence suffices): New tests.
2334
2335 2008-11-09 Akim Demaille <demaille@gostai.com>
2336
2337 Make benches in a sub dirs.
2338 * etc/bench.pl.in ($dir): New.
2339 Use it.
2340 Check the use of constructors with an argument.
2341 (bench_variant_parser): Fix.
2342
2343 2008-11-09 Akim Demaille <demaille@gostai.com>
2344
2345 fix eof condition
2346
2347 2008-11-09 Akim Demaille <demaille@gostai.com>
2348
2349 Fix --help.
2350
2351 2008-11-09 Akim Demaille <demaille@gostai.com>
2352
2353 Require the generation of parse-gram.output.
2354 * src/Makefile.am (YACC): Pass --report=all.
2355
2356 2008-11-09 Akim Demaille <demaille@gostai.com>
2357
2358 Formatting changes.
2359
2360 2008-11-09 Akim Demaille <demaille@gostai.com>
2361
2362 Update TODO.
2363 * TODO: Remove obsolete items.
2364 Update others.
2365
2366 2008-11-09 Akim Demaille <demaille@gostai.com>
2367
2368 Enhance bench.pl.
2369 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
2370 (@token, $grammar, $bench): New.
2371 (generate_grammar_variant): Rename as...
2372 (generate_grammar_list): this.
2373 (generate_grammar): Adjust.
2374 (bench_grammar): Rename as...
2375 (bench): this.
2376 Use it in the various bench-marking routines.
2377 (-b, -g): New options.
2378
2379 2008-11-09 Akim Demaille <demaille@gostai.com>
2380
2381 Use a static hierarchy for symbols in the C++ parser.
2382 * data/lalr1.cc (symbol_base_type, symbol_type)
2383 (stack_symbol_type): Make it a static hierarchy.
2384 Adjust dependencies.
2385
2386 2008-11-09 Akim Demaille <demaille@gostai.com>
2387
2388 bench.pl -d, --directive.
2389 * etc/bench.pl.in (@directive): New.
2390 (&bench_grammar): Use it.
2391 (&bench_list_grammar): New, to provide access to the "variant"
2392 grammar.
2393 Use it.
2394 (getopts): Support -d, --directive.
2395
2396 2008-11-09 Akim Demaille <demaille@gostai.com>
2397
2398 Use inline for small operations.
2399 * data/lalr1.cc (symbol_base_type, symbol_type)
2400 (stack_symbol_type): Declare constructor and other operations as
2401 inline.
2402 (yy_destroy_): Inline.
2403
2404 2008-11-09 Akim Demaille <demaille@gostai.com>
2405
2406 Introduce a hierarchy for symbols.
2407 * data/lalr1.cc (symbol_base_type, symbol_type): New.
2408 (data_type): Rename as...
2409 (stack_symbol_type): this.
2410 Derive from symbol_base_type.
2411 (yy_symbol_value_print_): Merge into...
2412 (yy_symbol_print_): this.
2413 Rename as...
2414 (yy_print_): this.
2415 (yydestruct_): Rename as...
2416 (yy_destroy_): this.
2417 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
2418 (parser::parse): yyla is now of symbol_type.
2419 Use its type member instead of yytoken.
2420
2421 2008-11-09 Akim Demaille <demaille@gostai.com>
2422
2423 Rename data_type and stack_symbol_type.
2424 * data/lalr1.cc (data_type): Rename as...
2425 (stack_symbol_type): this.
2426
2427 2008-11-09 Akim Demaille <demaille@gostai.com>
2428
2429 Handle semantic value and location together.
2430 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
2431 yydata.value and yydata.location.
2432 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
2433 (YY_SYMBOL_PRINT): Now take semantic value and location as a
2434 single arg.
2435 Adjust all callers.
2436 (yydestruct_): New overload for a stack symbol.
2437
2438 2008-11-09 Akim Demaille <demaille@gostai.com>
2439
2440 Push a complete symbol, not connected parts.
2441 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
2442 state, value and location.
2443 Adjust callers.
2444
2445 2008-11-09 Akim Demaille <demaille@gostai.com>
2446
2447 Agregate yylval and yylloc.
2448 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
2449 (parser::yyla): this.
2450
2451 2008-11-09 Akim Demaille <demaille@gostai.com>
2452
2453 Rely on the state stack to display reduction traces.
2454 To display rhs symbols before a reduction, we used information
2455 about the rule reduced, which required the tables yyrhs and
2456 yyprhs. Now use rely only on the state stack to get the same
2457 information.
2458
2459 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
2460 Use them.
2461 (parser::yyrhs_, parser::yyprhs_): Remove.
2462 (parser::yy_reduce_print_): Use the state stack.
2463
2464 2008-11-09 Akim Demaille <demaille@gostai.com>
2465
2466 Fuse yyval and yyloc into yylhs.
2467 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
2468 yylhs.
2469 (parse): Replace yyval and yyloc with yylhs.value and
2470 yylhs.location.
2471 After a user action, compute yylhs.state earlier.
2472 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
2473 fresh error_token.
2474
2475 2008-11-09 Di-an Jan <dianj@freeshell.org>
2476
2477 Remove unused variable.
2478 * src/output.c (type_names_output): Remove unused variable sep.
2479
2480 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
2481
2482 Change tests/output.at quoting.
2483 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
2484 expanding arguments.
2485
2486 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2487
2488 Don't add a semicolon to actions for %skeleton or %language.
2489 It breaks Java test cases as reported by Akim Demaille.
2490 * src/scan-code.l: Implement.
2491
2492 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2493
2494 Clean up %skeleton and %language priority implementation.
2495 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2496 remove static qualifier because others will soon need to see it.
2497 (language_prio): Likewise.
2498 (getargs): Use command_line_prio rather than 0.
2499 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2500 enum fields.
2501 (skeleton_prio): Extern it.
2502 (language_prio): Extern it.
2503 * src/parse-gram.y: Use grammar_prio rather than 1.
2504
2505 2008-11-07 Akim Demaille <demaille@gostai.com>
2506
2507 Moving push traces into yypush_.
2508 * data/lalr1.cc (yypush_): Now takes a optional trace message.
2509 Adjust all uses.
2510
2511 2008-11-07 Akim Demaille <demaille@gostai.com>
2512
2513 The single-stack C++ parser is now the standard one.
2514 * data/lalr1.cc: Rename as...
2515 * data/lalr1-split.cc: this.
2516 * data/lalr1-fusion.cc: Rename as...
2517 * data/lalr1.cc: this.
2518 * etc/bench.pl.in: Adjust.
2519
2520 2008-11-07 Akim Demaille <demaille@gostai.com>
2521
2522 Avoid empty-if warnings.
2523 Reported by Quentin Hocquet.
2524
2525 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
2526 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
2527
2528 2008-11-07 Akim Demaille <demaille@gostai.com>
2529
2530 Pass command line location to skeleton_arg and language_argmatch.
2531 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2532 The location argument is now mandatory.
2533 Adjust all dependencies.
2534 (getargs): Use command_line_location.
2535
2536 2008-11-07 Akim Demaille <demaille@gostai.com>
2537
2538 -D, --define.
2539 * src/getargs.c (usage): Document -D.
2540 Fix help string for --locations.
2541 (command_line_location): New.
2542 (short_options, long_options, getargs): Support -D, --define.
2543 (getargs): Move -d support at the right place.
2544 * doc/bison.texinfo (Bison Options): Update.
2545 * tests/input.at (%define, --define): New.
2546
2547 2008-11-07 Akim Demaille <demaille@gostai.com>
2548
2549 Initialize the muscle table before parsing the command line.
2550 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2551 (getargs): Define file_name.
2552 * src/main.c (main): Initialize muscle_tab before calling
2553 getargs.
2554 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2555 its value is not available yet.
2556
2557 2008-11-07 Akim Demaille <demaille@gostai.com>
2558
2559 Locations without columns for command line arguments.
2560 * src/location.c (location_print): Don't display negative columns.
2561 * src/location.h: Document this.
2562
2563 2008-11-07 Akim Demaille <demaille@gostai.com>
2564
2565 Fix --help.
2566 * src/getargs.c (usage): Fix help string for -W.
2567
2568 2008-11-07 Akim Demaille <demaille@gostai.com>
2569
2570 Handle more general types of option arguments.
2571 * build-aux/cross-options.pl: The argument ends at the first
2572 space, not the first non-symbol character.
2573 Use @var for each word appearing the argument description.
2574
2575 2008-11-07 Akim Demaille <demaille@gostai.com>
2576
2577 Destroy the variants that remain on the stack in case of error.
2578 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
2579 destructor.
2580 Display the value only if yymsg is nonnull.
2581 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
2582
2583 2008-11-07 Akim Demaille <demaille@gostai.com>
2584
2585 Add "%define assert" to variants.
2586 This is used to help the user catch cases where some value gets
2587 ovewritten by a new one. This should not happen, as this will
2588 probably leak.
2589
2590 Unfortunately this uncovered a bug in the C++ parser itself: the
2591 lookahead value was not destroyed between two calls to yylex. For
2592 instance if the previous lookahead was a std::string, and then an int,
2593 then the value of the std::string was correctly taken (i.e., the
2594 lookahead was now an empty string), but std::string structure itself
2595 was not reclaimed.
2596
2597 This is now done in variant::build(other&) (which is used to take the
2598 value of the lookahead): other is not only stolen from its value, it
2599 is also destroyed. This incurs a new performance penalty of a few
2600 percent, and union becomes faster again.
2601
2602 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
2603 (b4_variant_if): New.
2604 (variant::built): New.
2605 Use it whereever the status of the variant changes.
2606 * etc/bench.pl.in: Check the penalty of %define assert.
2607
2608 2008-11-07 Akim Demaille <demaille@gostai.com>
2609
2610 Use "%define variant" in bench.pl.
2611 * etc/bench.pl.in: No longer use the pseudo directive %variants,
2612 just use %define variants.
2613
2614 2008-11-07 Akim Demaille <demaille@gostai.com>
2615
2616 Regen.
2617 * src/parse-gram.h, src/parse-gram.c: Regen.
2618
2619 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2620
2621 Fix user actions without a trailing semicolon.
2622 Reported by Sergei Steshenko at
2623 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2624 * THANKS (Sergei Steshenko): Add.
2625 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2626 * tests/regression.at (Fix user actions without a trailing semicolon):
2627 New test case.
2628
2629 2008-11-04 Akim Demaille <demaille@gostai.com>
2630
2631 Use b4_copyright_years.
2632 * data/yacc.c (b4_copyright_years): New.
2633 Fix its value according to the comments in the file.
2634 Use it and undefine it.
2635
2636 2008-11-04 Akim Demaille <demaille@gostai.com>
2637
2638 Formatting changes.
2639 * data/lalr1-fusion.cc, src/parse-gram.y: here.
2640
2641 2008-11-04 Akim Demaille <demaille@gostai.com>
2642
2643 Formatting changes.
2644 * data/lalr1-fusion.cc: here.
2645
2646 2008-11-04 Akim Demaille <demaille@gostai.com>
2647
2648 Use strict on bench.pl.
2649 * etc/bench.pl.in (&run, &generate_grammar): New.
2650 Rename the grammar generating functions for consistency.
2651 Change the interface so that the list of benches to run is passed
2652 as (optionless) arguments.
2653 (&compile): Use &run.
2654
2655 2008-11-04 Akim Demaille <demaille@gostai.com>
2656
2657 Remove spurious initial empty lines.
2658 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2659 * data/yacc.c: End the @output lines with an @.
2660
2661 2008-11-04 Akim Demaille <demaille@gostai.com>
2662
2663 Improve the display of sizes.
2664 * etc/bench.p.in: Higher precision.
2665 Sort by decreasing size.
2666
2667 2008-11-04 Akim Demaille <demaille@gostai.com>
2668
2669 Don't memcpy C++ structures.
2670 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
2671 arguments.
2672 (variant::build): New overload for
2673 copy-construction-that-destroys.
2674 (variant::swap): New.
2675 (parser::yypush_): Use it in variant mode.
2676
2677 2008-11-04 Akim Demaille <demaille@gostai.com>
2678
2679 Better defaults for bench.pl.
2680 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
2681 default values.
2682 Adjust &verbose uses.
2683 (-q, --quiet): New.
2684
2685 2008-11-04 Akim Demaille <demaille@gostai.com>
2686
2687 Make variant.yy more complex.
2688 std::list cannot be copied via memcpy, they are more demanding than
2689 std::string. Use one std::list to strengthen the test.
2690
2691 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
2692 Adjust.
2693 Create a list of strings, instead of a single large string.
2694
2695 2008-11-04 Akim Demaille <demaille@gostai.com>
2696
2697 bench.pl --bench.
2698 * etc/bench.pl.in (--bench, $bench): New.
2699
2700 2008-11-04 Akim Demaille <demaille@gostai.com>
2701
2702 Sort methods.
2703 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
2704 Define it after as().
2705
2706 2008-11-04 Akim Demaille <demaille@gostai.com>
2707
2708 Useless parens.
2709 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
2710
2711 2008-11-04 Akim Demaille <demaille@gostai.com>
2712
2713 Issue missing synclines after user actions.
2714 * data/c.m4 (b4_case): Issue synclines on the output file.
2715
2716 2008-11-04 Akim Demaille <demaille@gostai.com>
2717
2718 Remove trailing empty line.
2719 * data/lalr1-fusion.cc: Don't add an empty line after the user's
2720 epilogue.
2721
2722 2008-11-04 Akim Demaille <demaille@gostai.com>
2723
2724 Fix output of copyright years.
2725 * data/bison.m4 (b4_copyright): Fix the indentation of the
2726 copyright year paragraph.
2727 Use b4_copyright_years when no years are given.
2728 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
2729 (b4_copyright_years): New.
2730 Use it.
2731
2732 2008-11-04 Akim Demaille <demaille@gostai.com>
2733
2734 Avoid the spurious initial empty line.
2735 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
2736 the end of @output request to suppress the empty line that
2737 results.
2738
2739 2008-11-04 Akim Demaille <demaille@gostai.com>
2740
2741 Remove parser::rhs_number_type.
2742 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
2743 (yyrhs_): Use b4_table_define.
2744
2745 2008-11-04 Akim Demaille <demaille@gostai.com>
2746
2747 Fix iteration type.
2748 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
2749
2750 2008-11-04 Akim Demaille <demaille@gostai.com>
2751
2752 Factor the declaration of the integer tables.
2753 * data/lalr1-fusion.cc (b4_table_define): New.
2754 Use it.
2755
2756 2008-11-03 Akim Demaille <demaille@gostai.com>
2757
2758 Fix indentation of tables in lalr1.cc
2759 * data/lalr1-fusion.cc: Fix the indentation.
2760
2761 2008-11-03 Akim Demaille <demaille@gostai.com>
2762
2763 Destroy the lhs symbols after reduction.
2764 * data/lalr1-fusion.cc (parse): After the user action, when in
2765 variant mode, destroy the lhs symbols.
2766
2767 2008-11-03 Akim Demaille <demaille@gostai.com>
2768
2769 Simplify yysyntax_error_ use.
2770 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
2771 type, but make it unnamed in the declaration when it is not used.
2772
2773 2008-11-03 Akim Demaille <demaille@gostai.com>
2774
2775 Let yy::variant::build return an lvalue.
2776 * data/lalr1-fusion.cc (variant::build): Return a reference to the
2777 object.
2778
2779 2008-11-03 Akim Demaille <demaille@gostai.com>
2780
2781 Define yy::variant only when needed.
2782 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
2783 used.
2784
2785 2008-11-03 Akim Demaille <demaille@gostai.com>
2786
2787 Bench the three-stack lalr1.cc.
2788 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
2789 one-stack one.
2790
2791 2008-11-03 Akim Demaille <demaille@gostai.com>
2792
2793 Fail on parse error in calc++.
2794 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2795 status.
2796 * examples/calc++/test ($me, $number, $exit, run): New.
2797 Use them to propagate errors to the exit status.
2798
2799 2008-11-03 Akim Demaille <demaille@gostai.com>
2800
2801 Don't specify the skeleton twice in the example.
2802 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
2803 file does what is needed.
2804
2805 2008-11-03 Akim Demaille <demaille@gostai.com>
2806
2807 bench: Improve output.
2808 * etc/bench.pl.in (bench_grammar): Tune the printf format.
2809
2810 2008-11-03 Akim Demaille <demaille@gostai.com>
2811
2812 bench: check impact of %debug on variants.
2813 * etc/bench.pl.in (variant_grammar): Fix the computation of
2814 $variant.
2815 Generate a grammar file that can work with or without %debug.
2816 Do use the @directive.
2817 (bench_variant_parser): Check impact of %debug.
2818 (@directives): Rename all the occurrences to...
2819 (@directive): this, for consistency.
2820
2821 2008-11-03 Akim Demaille <demaille@gostai.com>
2822
2823 bench: report the size too.
2824 * etc/bench.pl.in ($iterations): Defaults to -3.
2825 (&bench_grammar): Require hireswallclock.
2826 Compute and display the size of the result.
2827 More comments.
2828
2829 2008-11-03 Akim Demaille <demaille@gostai.com>
2830
2831 bench: More use of the verbosity level.
2832 * etc/bench.pl.in ($verbose, &verbose): New.
2833 Use them.
2834 More POD documentation.
2835
2836 2008-11-03 Akim Demaille <demaille@gostai.com>
2837
2838 bench.pl: a command line interface
2839 * etc/bench.pl.in: More doc.
2840 Some fixes in the documentation.
2841 ($cflags, $iterations, &help, &getopt): New.
2842 Use them.
2843 (&variant_grammar): Let the number of stages be 10 times what is
2844 specified.
2845
2846 2008-11-03 Akim Demaille <demaille@gostai.com>
2847
2848 Bench the use of Boost.Variants.
2849 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2850 New.
2851 (&compile): Be ready to compile C++ parsers.
2852 (&bench_push_parser): Move debug information to the outermost
2853 level.
2854 * THANKS: Add Michiel De Wilde.
2855
2856 2008-11-03 Akim Demaille <demaille@gostai.com>
2857
2858 bench.pl: Pass directives as a list instead of as a string.
2859 * etc/bench.pl.in (&directives): New.
2860 (&triangular_grammar, &calc_grammar): Use it to format the Bison
2861 directives.
2862 (&triangular_grammar): Do use the directives (were ignored).
2863 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2864 directives.
2865
2866 2008-11-03 Akim Demaille <demaille@gostai.com>
2867
2868 Improve genericity of bench.pl.
2869 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2870 argument.
2871 (&bench_push_parser): New.
2872 Call it.
2873
2874 2008-11-03 Akim Demaille <demaille@gostai.com>
2875
2876 Add documentation to bench.pl.
2877 * etc/bench.pl.in: Comment changes.
2878
2879 2008-11-03 Akim Demaille <demaille@gostai.com>
2880
2881 Fuse the three stacks into a single one.
2882
2883 In order to make it easy to perform benchmarks to ensure that
2884 there are no performance loss, lalr1.cc is forked into
2885 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
2886 lalr1.cc.
2887
2888 Meanwhile, to make sure that lalr1-fusion.cc is correctly
2889 exercized by the test suite, the user must install a symbolic link
2890 from lalr1.cc to it.
2891
2892 Instead of having three stacks (state, value, location), use a
2893 stack of triples. This considerably simplifies the code (and it
2894 will be easier not to require locations as currently does the C++
2895 parser), and also gives a 10% speedup according to
2896 etc/bench (probably mainly since memory allocation is done once
2897 instead of three times).
2898
2899 Another motivation is to make it easier to destruct properly
2900 semantic values: now that they are bound to their state (hence
2901 symbol type) it will be easier to call the appropriate destructor.
2902
2903 These changes should probably benefit the C parser too.
2904
2905 * data/lalr1.cc: Copy as...
2906 * data/lalr1-fusion.cc: this new file.
2907 (b4_rhs_value, b4_rhs_location): New definitions overriding those
2908 from c++.m4.
2909 (state_stack_type, semantic_stack_type, location_stack_type)
2910 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
2911 (data_type, stack_type, yystack_): New.
2912 (YYLLOC_DEFAULT, yypush_): Adjust.
2913 (yyerror_range): Now based on data_type, not location_type.
2914
2915 2008-11-03 Akim Demaille <demaille@gostai.com>
2916
2917 Push the state, value, and location at the same time.
2918 This is needed to prepare a forthcoming patch that fuses the three
2919 stacks into one.
2920
2921 * data/lalr1.cc (parser::yypush_): New.
2922 (parser::yynewstate): Change the semantics: instead of arriving to
2923 this label when value and location have been pushed, but yystate
2924 is to be pushed on the state stack, now the three of them must
2925 have been pushed before. yystate still must be the new state.
2926 This allows to use yypush_ everywhere instead of individual
2927 handling of the stacks.
2928
2929 2008-11-03 Akim Demaille <demaille@gostai.com>
2930
2931 Prefer references to pointers.
2932 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
2933 definition to use references instead of pointers.
2934 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
2935 Take the value and location as references.
2936 Adjust callers.
2937
2938 2008-11-03 Akim Demaille <demaille@gostai.com>
2939
2940 stack::size instead of stack::height.
2941 * data/lalr1.cc (stack::height): Rename as...
2942 (stack::size): this.
2943 Fix the output type.
2944 Comment changes.
2945
2946 2008-11-03 Akim Demaille <demaille@gostai.com>
2947
2948 Use variants to support objects as semantic values.
2949 This patch was inspired by work by Michiel De Wilde. But he used
2950 Boost variants which (i) requires Boost on the user side, (ii) is
2951 slow, and (iii) has useless overhead (the parser knows the type of
2952 the semantic value there is no reason to duplicate this
2953 information as Boost.Variants do).
2954
2955 This implementation reserves a buffer large enough to store the
2956 largest objects. yy::variant implements this buffer. It was
2957 implemented with Quentin Hocquet.
2958
2959 * src/output.c (type_names_output): New.
2960 (output_skeleton): Invoke it.
2961 * data/c++.m4 (b4_variant_if): New.
2962 (b4_symbol_value): If needed, provide a definition for variants.
2963 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
2964 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
2965 (b4_char_sizeof, yy::variant): New.
2966 (parser::parse): If variants are requested, define
2967 parser::union_type, parser::variant, change the definition of
2968 semantic_type, construct $$ before running the user action instead
2969 of performing a default $$ = $1.
2970 * examples/variant.yy: New.
2971 Based on an example by Michiel De Wilde.
2972
2973 2008-11-03 Akim Demaille <demaille@gostai.com>
2974
2975 Parameterize the extraction of semantic values.
2976 To make future changes easier, no longer rely on ".TYPE" being the
2977 way to get a semantic value.
2978
2979 * data/c.m4 (b4_symbol_value): New.
2980 Use it.
2981 * data/c++.m4, data/yacc.c: Use it.
2982 * data/glr.c: Use b4_symbol_value.
2983 (b4_rhs_data): New.
2984 Use it.
2985
2986 2008-11-03 Akim Demaille <demaille@gostai.com>
2987
2988 Prepare easier M4 changes.
2989 * data/lalr1.cc: Use escaped [] instead of literals to prepare
2990 future changes.
2991
2992 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2993
2994 Initiate further development.
2995 * NEWS: Create an empty section for new entries.
2996 * gnulib: Update submodule to HEAD.
2997
2998 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2999
3000 * NEWS: Version 2.4.
3001
3002 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3003
3004 Prepare for next release.
3005 * NEWS: Briefly mention changes since 2.3b.
3006 * README: Say GNU m4 1.4.6, which we've been requiring in release
3007 announcements already, not 1.4.3, which breaks the build.
3008
3009 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3010
3011 Say %language is experimental.
3012 We're thinking of extending it's effect on output file naming. See the
3013 thread at
3014 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3015 * NEWS: Say it's experimental.
3016 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3017 recommend it over %skeleton for now.
3018 (Bison Options): Likewise.
3019 (C++ Bison Interface): Use %skeleton not %language.
3020 (Calc++ Parser): Use %skeleton not %language.
3021 * src/getargs.c (usage): Say it's experimental.
3022
3023 2008-11-01 Di-an Jan <dianj@freeshell.org>
3024 Paolo Bonzini <bonzini@gnu.org>
3025
3026 Support all Java parser class modifiers.
3027 * data/java.m4 (b4_percent_define_get3): New.
3028 (b4_final_if, b4_strictfp_if): New.
3029 * data/lalr1.java (final, strictfp, extends, implements): Support.
3030 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3031 documentation.
3032 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3033 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3034 (AT_CHECK_JAVA_GREP): New.
3035 (Java parser class modifiers): New test.
3036 (Java parser class extends and implements): New test.
3037
3038 Model exception propagation better with throws and lex_throws.
3039 * data/java.m4 (b4_list2): New.
3040 (throws): Change default.
3041 * data/lalr1.java (yyaction): Add throws.
3042 (parse): Add lex_throws in addition to throws.
3043 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3044 * tests/java.at (Java throws specifications): New test.
3045
3046 Improve documentation for Java parsers.
3047 * doc/bison.texinfo (Java Parsers): Add subsections.
3048 Don't quote first argument of %define.
3049 (Java Bison Interface): Document output files. Move documentation
3050 of parser class and merge into Java Parser Interface. Document
3051 features that error out. Document directives with no effect.
3052 Move note about Javadoc higher.
3053 (Java Semantic Values): Explicitly mention stype.
3054 Document that generic types cannot be used.
3055 (Java Location Values): Use @deftypeivar. Document constructors.
3056 Correct return value for toString.
3057 (Java Parser Interface): List undocumented constants/fields.
3058 Move documentation of fields added by %parse-param closer to list
3059 of members. Document that token names are added as fields.
3060 Document constructors accurately. Remove error method.
3061 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3062 Interface. Describe %code lexer and yylex accutately.
3063 Remove documentation that does not match the code.
3064 (Java Action Features): New.
3065 (Java Differences): Add reference. Add item on semantic values.
3066 Add note about @{ ... @}. Clarify %% epilogue placement.
3067 (Java Declarations Summary): New.
3068
3069 Fix Java skeleton.
3070 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3071 (b4_remove_comma): Quote test argument.
3072 (b4_identification): Remove "bison" field.
3073 * tests/java.at (Java parser class and package names): New test.
3074 (Java %parse-param and %lex-param): New test.
3075 (Java stype, position_class and location_class): New test.
3076
3077 2008-10-31 Di-an Jan <dianj@freeshell.org>
3078
3079 * data/lalr1.jave: Update copyright years.
3080 (YYParser): Correct name of "generated from" file in Javadoc:
3081 use b4_file_name instead of @ofile@.
3082 (Location constructor): Correct Javadoc parameter name.
3083 (yylloc): Add missing opening m4 quote after b4_location_if.
3084 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3085 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3086 (YYParser constructor): Correct Javadoc parameter name.
3087
3088 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3089
3090 Always put auxiliary code files in the same dir as other output files.
3091 * src/files.c (compute_file_name_parts): When the user specifies
3092 --output but not --file-prefix, extract the directory prefix from the
3093 file prefix not from the grammar file name. This affects the location
3094 of files like location.hh generated by the C++ skeleton. The includes
3095 in the other output files require this fix.
3096 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3097 for expected output files.
3098 (Output files): Add a test for the above.
3099
3100 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3101
3102 * gnulib: Update submodule to HEAD.
3103
3104 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3105
3106 Update copyright year.
3107 * src/files.c: Here.
3108
3109 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3110
3111 Don't overwrite the input file.
3112 * src/files.c (output_file_name_check): Fatal error if using input file
3113 for output.
3114 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3115 argument.
3116 (Conflicting output files): Add test.
3117
3118 2008-10-28 Akim Demaille <demaille@gostai.com>
3119
3120 Space changes.
3121 * data/lalr1.cc: Formatting changes.
3122
3123 2008-10-28 Akim Demaille <demaille@gostai.com>
3124
3125 Don't define debugging functions when !YYDEBUG.
3126 * data/lalr1.cc (debug_stream, set_debug_stream)
3127 (debug_level_type, debug_level, set_debug_level): Don't
3128 declare them when YYDEBUG is not defined.
3129 The implementation are already YYDEBUG-aware.
3130
3131 2008-10-28 Akim Demaille <demaille@gostai.com>
3132
3133 Prefer "continue" for empty loop bodies.
3134 * etc/bench.pl.in: Use "continue" instead of {}.
3135
3136 2008-10-28 Akim Demaille <demaille@gostai.com>
3137
3138 Space and comments changes.
3139 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3140 * data/c.m4, data/lalr1.cc: Space changes.
3141
3142 2008-10-28 Akim Demaille <demaille@gostai.com>
3143
3144 Make gnulib a submodule.
3145 * gnulib: New.
3146 * .gitmodules (gnulib): New.
3147
3148 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3149
3150 Fix yyerror_range for user-defined location type in C++. Reported by
3151 Georg Sauthoff at
3152 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3153 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3154 * THANKS (Georg Sauthoff): Add.
3155
3156 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3157
3158 Update several administrative files mainly to facilitate releasing.
3159 * HACKING (Administrivia): Make the git-merge-changelog notes more
3160 helpful.
3161 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3162 (Release Procedure): Update for git and add numerous details that were
3163 previously missing.
3164 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3165 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3166 that announcements don't claim we bootstrapped with whatever bison
3167 happened to be in PATH. Add flex as a bootstrap tool.
3168 * Makefile.maint: Remove, previously replaced by maint.mk.
3169 * Makefile.cfg: Remove, and migrate settings to...
3170 * cfg.mk: ... here for the sake of `make announcement'.
3171 * bootstrap.conf (gnulib_modules): Add announce-gen.
3172 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3173 Berry.
3174
3175 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3176
3177 Small but important bugfixes for the Java skeleton.
3178 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3179 (yy_symbol_print): Call toString on yyvaluep.
3180
3181 2008-08-29 Akim Demaille <demaille@gostai.com>
3182
3183 Clarify UPDATED use.
3184 * doc/bison.texinfo: It refers to the last edition of this file,
3185 not to the release date of Bison.
3186 Reported by Joel E. Denny.
3187
3188 2008-08-29 Akim Demaille <demaille@gostai.com>
3189
3190 * README: Update FAQ pointer.
3191 Reported by Joel E. Denny.
3192
3193 2008-08-27 Eric Blake <ebb9@byu.net>
3194
3195 Resync m4sugar from autoconf.
3196 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3197 (m4_init): Adjust to latest m4.git changes.
3198 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3199 effects.
3200 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3201 (_m4_list_cmp): Reduce side effects.
3202
3203 2008-08-27 Akim Demaille <demaille@gostai.com>
3204
3205 Check yyerrok in calc.at.
3206 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3207 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3208 expected.
3209
3210 2008-08-27 Akim Demaille <demaille@gostai.com>
3211
3212 Support yyerrok in lalr1.cc.
3213 YYBACKUP is still to import back into lalr1.cc.
3214 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3215
3216 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3217
3218 For maintainer-check*, don't recompile for a $(VERSION) update.
3219 * cfg.mk: New file.
3220 (_is-dist-target): Override the one in GNUmakefile.
3221 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3222
3223 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3224
3225 Update for recent change to gnulib.
3226 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3227 string.h now.
3228
3229 2008-08-15 Eric Blake <ebb9@byu.net>
3230
3231 Remaining m4sugar merge from autoconf.
3232 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3233 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3234 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3235 * src/output.c (output_skeleton): Tell m4 how to find it.
3236
3237 Partial m4sugar merge from autoconf: m4_map.
3238 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3239 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3240 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3241 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3242 for empty list.
3243 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3244 Likewise.
3245 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3246 declares it.
3247
3248 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3249
3250 Keep .version and PACKAGE_VERSION in sync.
3251 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3252 dependency, and add comments justifying this in more detail. Discussed
3253 starting at
3254 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3255
3256 2008-08-06 Eric Blake <ebb9@byu.net>
3257
3258 Partial m4sugar merge from autoconf: m4_shiftn.
3259 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3260 (m4_shift2, m4_shift3): New macros.
3261 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3262 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3263 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3264 * data/java.m4 (b4_remove_comma): Likewise.
3265
3266 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3267 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3268 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3269 (m4_init): Consolidate wrapped text into single m4_wrap.
3270 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3271 in wrapped text.
3272
3273 2008-08-05 Eric Blake <ebb9@byu.net>
3274
3275 Partial m4sugar merge from autoconf: builtins, version.m4.
3276 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3277 (m4_prepend): Remove, as it is unused and inherently quadratic,
3278 whereas m4_append is linear in newer m4.
3279 (m4_mkstemp): New builtin.
3280 (m4_symbols): Make rename conditional.
3281 (m4_version_prereq): Ensure fatal error if used in bison, which
3282 intentionally lacks version.m4.
3283
3284 Fix comments in m4sugar.
3285 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3286
3287 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3288
3289 Update for recent .gitignore fix in Gnulib.
3290 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3291 anchored .gitignore entries.
3292
3293 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3294
3295 Set gnu or gnits strictness.
3296 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3297 development and gnits strictness for releases. Based on Eric Blake's
3298 suggestion at
3299 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3300
3301 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3302
3303 * NEWS: Clarify documentation of %language.
3304
3305 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3306
3307 Support usage of git-merge-changelog.
3308 * .gitattributes: New.
3309 * HACKING: Document usage of git-merge-changelog.
3310 * bootstrap: Install git-merge-changelog entries in .git/config
3311 if appropriate.
3312
3313 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3314
3315 Remove remaining dependence on CVS Id keyword.
3316 * ChangeLog: For the sake of people still using CVS, don't use dollars
3317 when mentioning Id.
3318 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3319 unusual anyway.
3320 * data/xslt/xml2dot.xsl: Likewise.
3321 * data/xslt/xml2text.xsl: Likewise.
3322 * data/xslt/xml2xhtml.xsl: Likewise.
3323 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3324 * doc/Makefile.am (neutralize): Remove, no longer needed.
3325 (.x.1): Don't use neutralize.
3326 (edit): Don't substitute for ID.
3327 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3328
3329 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3330
3331 Fix dependence on computed configure variables.
3332 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3333 $(top_srcdir)/configure.ac so that changes to computed variables, such
3334 as PACKAGE_VERSION, are seen.
3335 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3336
3337 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3338
3339 Update copyright dates for recent changes.
3340 * Makefile.am: Here.
3341 * src/Makefile.am: Here.
3342 * src/reduce.c: Here.
3343 * tests/reduce.at: Here.
3344
3345 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3346
3347 Use git-version-gen for version names between releases.
3348 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3349 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3350 * .prev-version: New.
3351 * .version.in: Remove.
3352 * ChangeLog: Remove the Id previously used for capturing the CVS
3353 revision.
3354 * GNUmakefile: Remove, now copied from Gnulib.
3355 * Makefile.am: Add code suggested by comments in
3356 build-aux/git-version-gen.
3357 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3358 .prev-version, and .version.
3359 * NEWS (2.3b+): Rename to...
3360 (?.?): ... this because we're dropping the "+" version naming scheme,
3361 but, in general, we still can't be sure of our next release name.
3362 * bootstrap: Add a quick hack to remove from .gitignore the
3363 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3364 entry. This should really be fixed in gnulib instead.
3365 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3366 * configure.ac (AC_INIT): Set version name by invoking
3367 build-aux/git-version-gen.
3368 (AC_CONFIG_FILES): Remove .version, now generated by
3369 build-aux/git-version-gen.
3370 * maint.mk: New, copied from coreutils.
3371 * doc/.cvsignore (bison.1): Add.
3372 * doc/.gitignore (/bison.1): Add.
3373 * doc/bison.1: Remove, generated.
3374 * src/.cvsignore (revision.c): Remove.
3375 * src/.gitignore (/revision.c): Remove.
3376 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3377 (BUILT_SOURCES): Remove revision.c.
3378 (revision.c): Remove.
3379 * src/getargs.c (version): Don't print revision after the VERSION.
3380 * src/revision.h: Remove.
3381
3382 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3383
3384 Fix untranslatable composition of sentences. Reported by Goran
3385 Uddeborg at
3386 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3387 * THANKS (Goran Uddeborg): Add.
3388 * src/reduce.c (reduce_print): Report the number of nonterminals and
3389 rules useless in the grammar in separate sentences.
3390 * tests/reduce.at (Useless Rules): Update output.
3391 (Reduced Automaton): Likewise.
3392 (Underivable Rules): Likewise.
3393 (Empty Language): Likewise.
3394
3395 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3396
3397 Fix some .gitignore and .cvsignore problems.
3398 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3399 (insert_vc_ignore): ... this new function, which prepends `/' to all
3400 .gitignore entries before passing them to insert_sorted_if_absent.
3401 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3402 .cvsignore files are maintained even though Bison developers run
3403 bootstrap while using Git.
3404 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3405 unneeded by Bison.
3406 (gnulib): Add.
3407 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3408 unneeded. Reported by Eric Blake.
3409 * lib/.gitignore (/*~): Add.
3410 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3411 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3412 Blake.
3413 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3414
3415 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3416
3417 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3418 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3419 * bootstrap.conf (gnulib_modules): Add unsetenv.
3420 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3421 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3422 (/setenv.m4): Add.
3423 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3424 the first argument because it may become position-dependent, and unset
3425 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3426 Add comments explaining these issues in more detail.
3427
3428 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3429
3430 Add .gitignore everywhere based on .cvsignore.
3431 * .gitignore: New.
3432 * build-aux/.gitignore: New.
3433 * data/.gitignore: New.
3434 * doc/.gitignore: New.
3435 * etc/.gitignore: New.
3436 * examples/.gitignore: New.
3437 * examples/calc++/.gitignore: New.
3438 * lib/.gitignore: New.
3439 * m4/.gitignore: New.
3440 * po/.gitignore: New.
3441 * runtime-po/.gitignore: New.
3442 * src/.gitignore: New.
3443 * tests/.gitignore: New.
3444
3445 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3446
3447 * NEWS (2.3b+): New section, empty for now.
3448 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3449
3450 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3451
3452 * NEWS (2.3b): Update release date since there has been a delay in
3453 getting the announcements and tarballs out.
3454
3455 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3456
3457 * NEWS: Version 2.3b.
3458 * configure.ac (AC_INIT): Likewise.
3459 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3460
3461 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3462
3463 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3464 been doing it for years.
3465 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3466 (Release Procedure): Add FIXME about make alpha being unmaintained.
3467
3468 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3469
3470 * data/yacc.c: Reformat m4 a little for readability.
3471 * src/lalr.c (build_relations): Correct comment.
3472
3473 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3474
3475 DJGPP specific issue.
3476 * djgpp/config.sed: Fixes required to run configure scripts generated
3477 by autoconf 2.62.
3478
3479 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3480
3481 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3482 coordinator@translationproject.org.
3483
3484 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3485
3486 * THANKS: Add Eric Blake.
3487
3488 2008-04-23 Eric Blake <ebb9@byu.net>
3489
3490 Revert prior patch, by working around autoconf regression.
3491 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3492 ("Output file name: ("): Uncomment test.
3493 ("Output file name: )"): Likewise.
3494 Based on an idea from Noah Misch.
3495
3496 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3497
3498 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3499 2.61. Reported by Juan Manuel Guerrero at
3500 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3501 * tests/output.at ("Output file name: ("): Comment out test case for
3502 now.
3503 ("Output file name: )"): Likewise.
3504
3505 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3506
3507 * GNUmakefile: Update git-version-gen invocation so make dist
3508 succeeds.
3509
3510 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3511
3512 Update to the current gnulib CVS repository, and fix trigraph handling
3513 in Bison.
3514 * bootstrap: Update gnulib CVS repository URL.
3515 (symlink_to_dir): Encapsulate the code that guarantees the destination
3516 directory exists into...
3517 (check_dst_dir): ... this new function, and...
3518 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3519 fail when copying files into lib/uniwidth/.
3520 * src/output.c (prepare_symbols): When writing yytname muscles, where
3521 symbol names will be encoded in C-string literals, tell quotearg to
3522 escape trigraphs. This used to be the default in gnulib.
3523 * tests/regression.at (Token definitions): Because of the change in
3524 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3525 escapes trigraphs in symbol names. Thus, yytname no longer has
3526 trigraphs unnecessarily doubly escaped. Update test case output.
3527 Extend test case to be sure Bison's own error messages will no longer
3528 have trigraphs in symbol names unnecessarily escaped once.
3529
3530 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3531
3532 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3533 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3534 * .cvsignore: Add .version.
3535 * .version.in: New.
3536 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3537 * configure.ac (AC_CONFIG_FILES): Add .version.
3538 * build-aux/.cvsignore: Add git-version-gen.
3539
3540 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3541
3542 * NEWS (2.3a+): Mention that -g now takes an argument.
3543 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3544 consistency. Update the -g and -x entries now that they take
3545 arguments. Use brackets to indicate optional arguments.
3546 * src/getargs.c (usage): Explain the relationship between arguments of
3547 long and short options more completely. Document --defines and -d
3548 separately since the former takes an argument but, for POSIX Yacc, the
3549 latter does not.
3550 (short_options): Let -W take an optional argument like --warnings.
3551 (getargs): Sort cases.
3552
3553 2008-02-28 Akim Demaille <demaille@gostai.com>
3554
3555 * doc/bison.texinfo: Fix a few typos.
3556
3557 2008-02-28 Akim Demaille <akim@epita.fr>
3558
3559 * doc/bison.texinfo (Bison Options): Document -W.
3560 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3561
3562 2008-02-28 Akim Demaille <akim@epita.fr>
3563
3564 * src/getargs.c (short_options): Split and sort for readability.
3565 -g and -x take optional arguments, just like their long options.
3566 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3567 understand.
3568 Fix the handling of $opt which resulted in all the argument to be
3569 considered as optional.
3570
3571 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3572
3573 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3574 say its interface is experimental.
3575 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3576 Java.
3577 (Bison Options): In the -L and --language entry, mention Java.
3578 (Java Bison Interface): Say the interface is experimental.
3579 * src/getargs.c (usage): Mention -L and --language.
3580
3581 * NEWS (2.3a+): Say the push parsing interface is experimental.
3582 * doc/bison.texinfo (Push Decl): Likewise.
3583 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3584 (Push Parser Function): Likewise.
3585 (Pull Parser Function): Likewise.
3586 (Parser Create Function): Likewise.
3587 (Parser Delete Function): Likewise.
3588 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3589 yypull_parse, and yypush_parse entries.
3590
3591 * NEWS (2.3a+): Mention XML support, and say the schema is
3592 experimental.
3593 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3594 * src/getargs.c (usage): Say the XML schema is experimental.
3595
3596 * NEWS (2.3a+): Say option instead of flag.
3597
3598 2008-02-21 Wojciech Polak <polak@gnu.org>
3599
3600 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3601 text.
3602
3603 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3604
3605 Fix impure push parser compile error reported by Bob Rossi at
3606 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3607 * data/yacc.c: Clean up whitespace in the output a little.
3608 (yypstate_allocated): Define for impure push parsers regardless of
3609 whether the pull interface is also requested.
3610 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3611 check impure push parsers without the pull interface.
3612
3613 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3614 yyerror takes arguments specified by %parse-param while yypstate_new
3615 does not.
3616 * doc/bison.texinfo (Parser Create Function): Document that
3617 yypstate_new returns 0 for multiple impure parser instances.
3618 * tests/push.at (Push Parsing: Multiple impure instances): Update
3619 expected stderr output.
3620
3621 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3622
3623 * runtime-po/POTFILES.in (push.c): Remove.
3624
3625 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3626
3627 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3628 * data/push.c: Rename to...
3629 * data/yacc.c: ... this, overwriting it.
3630 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3631 `%push-pull-parser' -> `%define api.push_pull "both"'.
3632 Remove old yacc.c tests, and update push.c tests to yacc.c.
3633
3634 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3635
3636 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3637 `"%code top" blocks' instead of `%code "top" blocks'.
3638 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3639 Clean up whitespace in the output a little.
3640
3641 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3642
3643 Fix documentation problems reported by Tim Josling at
3644 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3645 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3646 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3647 integers. Explain the effect of literal string aliases on error
3648 messages. Copy token 0 documentation from the C++ skeleton
3649 documentation.
3650
3651 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3652
3653 Accept a token number in a %left, %right, or %nonassoc for POSIX
3654 conformance. Reported by Tim Josling at
3655 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3656 * NEWS (2.3a+): Mention.
3657 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3658 and code numbers are treated by precedence declarations.
3659 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3660 of symbols.1.
3661 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3662 of symbol.
3663 (symbol.prec): New, just like symbol but allows INT.
3664 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3665 longer holds.
3666 * tests/regression.at (Token number in precedence declaration): New
3667 test case.
3668
3669 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3670
3671 DJGPP specific issues.
3672 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3673 be changed. Copyright timestamp adjusted.
3674 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3675 be changed. Copyright timestamp adjusted.
3676 * djgpp/config.site: Copyright timestamp adjusted.
3677 * djgpp/config_h.sed: Copyright timestamp adjusted.
3678 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3679 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3680 filename translation list.
3681 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3682 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3683 files shall be created. Before trying to use the temp dir where the
3684 environment variable points to check that the dir really exists. If
3685 not default to the cwd as temp dir. Copyright timestamp adjusted.
3686 * djgpp/subpipe.h: Copyright timestamp adjusted.
3687 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3688
3689 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3690
3691 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3692
3693 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3694
3695 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3696 Problem reported by Claudio Saavedra in
3697 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3698
3699 2008-01-05 Wojciech Polak <polak@gnu.org>
3700
3701 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3702 document's title with the input grammar file name.
3703
3704 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3705
3706 Automate regression testing of the XML/XSLT implementation. Discussed
3707 starting at
3708 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3709 * configure.ac (XSLTPROC): New substitution.
3710 * Makefile.am (maintainer-xml-check): New phony target invoking...
3711 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3712 invoking make maintainer-check with BISON_TEST_XML=1.
3713 * tests/atlocal.in (XSLTPROC): New.
3714 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3715 not to report reachable memory when Bison is expected to have a
3716 non-zero exit status and (2) to compare XML/XSLT output with --graph
3717 and --report=all output for every working grammar when
3718 BISON_TEST_XML=1.
3719 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3720 (AT_BISON_CHECK_XML): New.
3721 (AT_QUELL_VALGRIND): New.
3722 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3723 (AT_CHECK): ... don't redefine this since this was the old way to
3724 quell Valgrind.
3725 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3726 AT_BISON_CHECK invocations.
3727 * tests/c++.at: Likewise.
3728 * tests/calc.at: Likewise.
3729 * tests/conflicts.at: Likewise.
3730 * tests/cxx-type.at: Likewise.
3731 * tests/existing.at: Likewise.
3732 * tests/glr-regression.at: Likewise.
3733 * tests/headers.at: Likewise.
3734 * tests/input.at: Likewise.
3735 * tests/java.at: Likewise.
3736 * tests/output.at: Likewise.
3737 * tests/push.at: Likewise.
3738 * tests/reduce.at: Likewise.
3739 * tests/regression.at: Likewise.
3740 * tests/sets.at: Likewise.
3741 * tests/skeletons.at: Likewise.
3742 * tests/synclines.at: Likewise.
3743 * tests/torture.at: Likewise.
3744 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3745 tends to hang xsltproc.
3746 (Big horizontal): Likewise.
3747
3748 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3749
3750 In XML output, remove redundant class attribute on symbol element.
3751 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3752 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3753 look up a symbol to determine whether it's a nonterminal or terminal.
3754 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3755 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3756
3757 Add prec/assoc information to XML output.
3758 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3759 %prec, add a percent_prec attribute.
3760 * src/print-xml.c (print_grammar): For each terminal that has a
3761 precedence or associativity, add a prec or assoc attribute.
3762 (xml_indent): New.
3763 (xml_puts): Use xml_indent.
3764 (xml_printf): Use xml_indent.
3765 * src/print-xml.h (xml_indent): Prototype.
3766
3767 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3768 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3769
3770 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3771
3772 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3773 (bison:ruleByNumber): ... this for clarity.
3774 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3775 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3776 (xsl:template match="reduction"): Update.
3777 (xsl:template match="item"): Update.
3778 (xsl:template match="reduction"): Update.
3779
3780 In the XML output, don't print the list of rules where symbols appear.
3781 Compute it in XSLT instead. Discussed at
3782 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3783 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3784 (bison:ruleByRhs): New.
3785 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3786 bison:ruleByRhs.
3787 (xsl:template match="terminal/rule"): Remove.
3788 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3789 bison:ruleByRhs.
3790 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3791 Remove.
3792 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3793 bison:ruleByRhs and mode="number-link" for rule template.
3794 (xsl:template match="terminal/rule"): Remove.
3795 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3796 bison:ruleByRhs and mode="number-link" for rule template.
3797 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3798 Rewrite as...
3799 (xsl:template match="rule" mode="number-link"): ... this.
3800 * src/print-xml.c (print_grammar): Don't print the list of rules.
3801
3802 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3803
3804 Don't let --report affect XML output; always print all information.
3805 Discussed at
3806 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3807 * src/conflicts.c (log_resolution): Implement.
3808 * src/print-xml.c (print_core): Implement.
3809 (print_state): Implement.
3810 (print_xml): Implement.
3811
3812 * NEWS (2.3a+): Fix quotes.
3813 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3814 don't let %verbose clear the list specified by --report.
3815
3816 2007-11-26 Akim Demaille <akim@epita.fr>
3817
3818 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3819
3820 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3821
3822 In the XML output, list useless and unused symbols and rules with the
3823 useful ones and add a "usefulness" attribute. Discussed starting at
3824 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3825 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3826 (grammar_rules_print_xml): Print all rules instead of just those
3827 useful in the grammar, and add a "usefulness" attribute.
3828 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3829 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3830 (print_grammar): Print all nonterminals instead of just useful ones,
3831 and add a "usefulness" attribute to nonterminals and terminals.
3832 (print_xml): Don't print a separate "reductions" or
3833 "rules-useless-in-parser" element.
3834 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3835 (reduce_xml): Remove.
3836 (reduce_token_unused_in_grammar): New.
3837 (reduce_nonterminal_useless_in_grammar): New.
3838 * src/reduce.h (reduce_xml): Remove prototype.
3839 (reduce_token_unused_in_grammar): Add prototype.
3840 (reduce_nonterminal_useless_in_grammar): Add prototype.
3841 * data/xslt/xml2text.xsl: Update for XML changes.
3842 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3843 * tests/reduce.at (Useless Terminals): Update output.
3844 (Useless Rules): Update output.
3845 (Reduced Automaton): Update output.
3846
3847 Say "Terminals unused in grammar" instead of "Unused terminals".
3848 * NEWS (2.3a+): Update.
3849 * doc/bison.texinfo (Understanding): Update example output.
3850 * src/reduce.c (reduce_output): Implement.
3851 * data/xslt/xml2text.xsl: Implement.
3852 * data/xslt/xml2xhtml.xsl: Implement.
3853
3854 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3855
3856 Accept --report-file=FILE to override the default `.output' filename.
3857 * NEWS (2.3a+): Mention.
3858 * doc/bison.texinfo (Bison Options): Add an entry.
3859 * src/files.c (compute_output_file_names): Don't override
3860 spec_verbose_file if already set.
3861 * src/getargs.c (usage): Document --report-file.
3862 (REPORT_FILE_OPTION): New anonymous enum member.
3863 (long_options): Add entry for it.
3864 (getargs): Add case for it setting spec_verbose_file.
3865
3866 * build-aux/cross-options.pl: Don't record a short option just because
3867 there's an arg.
3868 * doc/.cvsignore: Add yacc.1.
3869
3870 2007-11-14 Akim Demaille <akim@epita.fr>
3871
3872 * doc/yacc.1.in: New.
3873 * configure.ac, doc/Makefile.am: Adjust.
3874 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3875 config.h symbol.
3876 Use AC_SUBST for assignments too.
3877 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3878
3879 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3880
3881 * src/gram.c: Remove comments that duplicate comments in gram.h.
3882
3883 When reporting useless rules and nonterminals, say "useless in grammar"
3884 instead of "useless", and say "useless in parser" instead of "never
3885 reduced". Discussed starting at
3886 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3887 * NEWS (2.3a+): Mention this change.
3888 * data/xslt/xml2text.xsl: Update output text and expected input XML
3889 element names to match changes below.
3890 * data/xslt/xml2xhtml.xsl: Likewise.
3891 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3892 Contents: "Rules useless in parser due to conflicts".
3893 * doc/bison.texinfo (Decl Summary): Reword a little.
3894 (Understanding): Update example output for changes below.
3895 * src/gram.c: (rule_useful_p): Rename to...
3896 (rule_useful_in_grammar_p): ... this.
3897 (rule_useless_p): Rename to...
3898 (rule_useless_in_grammar_p): ... this.
3899 (rule_never_reduced_p): Rename to...
3900 (rule_useless_in_parser_p): ... this.
3901 (grammar_rules_print): Update for renames.
3902 (grammar_rules_print_xml): Update for renames.
3903 (grammar_rules_never_reduced_report): Rename to...
3904 (grammar_rules_useless_report): ... this since it is used for either
3905 kind of useless rule.
3906 * src/gram.h: Reword comments and update function names in prototypes.
3907 * src/main.c (main): Say "rule useless in parser due to conflicts".
3908 * src/print-xml.c (print_rules_never_reduced): Rename to...
3909 (print_rules_useless_in_parser): ... this, and rename output XML
3910 element "rules-never-reduced" to "rules-useless-in-parser".
3911 (print_xml): Update for rename.
3912 * src/print.c (print_results): Say "Rules useless in parser due to
3913 conflicts".
3914 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3915 (nonterminals_reduce): Say "nonterminal useless in grammar".
3916 (reduce_output): Say "Nonterminals useless in grammar".
3917 Say "Rules useless in grammar".
3918 (reduce_xml): Rename output XML element "useless" to
3919 "useless-in-grammar".
3920 (reduce_print): Don't report the count of grammatically useless rules
3921 as "rules never reduced" just because %yacc is specified.
3922 In the correct report of this count, say nonterminal(s) and rule(s)
3923 "useless in grammar".
3924 * tests/conflicts.at (S/R in initial): Update expected output.
3925 (Defaulted Conflicted Reduction): Likewise.
3926 (Unreachable States After Conflict Resolution): Likewise.
3927 * tests/existing.at (GNU pic Grammar): Likewise.
3928 * tests/reduce.at (Useless Nonterminals): Likewise.
3929 (Useless Rules): Likewise.
3930 (Reduced Automaton): Likewise.
3931 (Underivable Rules): Likewise.
3932 (Empty Language): Likewise.
3933
3934 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3935
3936 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3937 here document and before the EOF so that BSD's implementation of Bourne
3938 shell doesn't parse the delimiter as part of the here document.
3939 * doc/.cvsignore: Add cross-options.texi.
3940 * src/getargs.c (usage): Add a blank line after the warning categories.
3941
3942 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3943
3944 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3945
3946 2007-11-05 Akim Demaille <akim@epita.fr>
3947
3948 Remove Id: from bison.1.
3949 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3950 (perl -0777 -pi -e 's/\.PP\nId): New.
3951 (.x.1): Use it to ignore the version control revision.
3952
3953 2007-11-05 Akim Demaille <demaille@gostai.com>
3954
3955 * build-aux/Makefile.am: Ship cross-options.pl.
3956 * doc/Makefile.am: Always refer to cross-options.texi with
3957 $(srcdir).
3958 (MAINTAINERCLEANFILES): Add it.
3959
3960 2007-11-04 Akim Demaille <demaille@gostai.com>
3961
3962 Generate the long/short option cross-table.
3963 * build-aux/cross-options.pl: New.
3964 * doc/Makefile.am (cross-options.texi): New.
3965 * doc/bison.texinfo: Use it.
3966
3967 2007-11-04 Akim Demaille <demaille@gostai.com>
3968
3969 Generate bison.1 using help2man.
3970 * doc/common.x, doc/bison.x: New.
3971 * doc/Makefile.am (bison.1, .x.1): New.
3972 The code is taken from autoconf-2.61/man/Makefile.am.
3973 * configure.ac: Look for help2man.
3974
3975 2007-11-04 Akim Demaille <demaille@gostai.com>
3976
3977 Complete --help.
3978 * src/getargs.c (usage): Document -W, make it clear that -d,
3979 -g and -x have optional arguments.
3980
3981 2007-11-04 Akim Demaille <demaille@gostai.com>
3982
3983 Find sha1sum when named gsha1sum.
3984 * bootstrap (find_tool): New.
3985 ($SHA1SUM): New.
3986
3987 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3988
3989 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3990 at
3991 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3992 * NEWS (2.3a+): Mention.
3993 * data/bison.m4 (b4_pure_if): Don't define it here.
3994 * data/c.m4 (b4_identification): Depend on individual skeletons to
3995 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3996 values of the %define variables api.pure or api.push_pull. Define
3997 YYPURE, YYPUSH, and YYPULL accordingly.
3998 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3999 glr.cc has already defined b4_pure_flag.
4000 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4001 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4002 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4003 * doc/bison.texinfo (Pure Decl): Update.
4004 (Push Decl): Update.
4005 (Decl Summary): Add api.pure to %define entry.
4006 In %pure-parser entry, say it's deprecated and reference %define.
4007 (Pure Calling): Update.
4008 (Error Reporting): Update.
4009 (C++ Scanner Interface): Update.
4010 (How Can I Reset the Parser): Update.
4011 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4012 reference %define.
4013 * src/getargs.c (pure_parser): Remove global variable.
4014 * src/getargs.h (pure_parser): Remove extern.
4015 * src/output.c (prepare): Don't define pure_flag muscle.
4016 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4017 wrapper around `%define api.pure'.
4018 * tests/calc.at (Simple LALR Calculator): Update.
4019 (Simple GLR Calculator): Update.
4020 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4021 Update.
4022 (GLR: Resolve ambiguity, pure, locations): Update.
4023 (GLR: Merge conflicting parses, pure, no locations): Update.
4024 (GLR: Merge conflicting parses, pure, locations): Update.
4025 * tests/glr-regression.at (Uninitialized location when reporting
4026 ambiguity): Update
4027 * tests/input.at (Unused %define api.pure): New test case.
4028 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4029 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4030 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4031
4032 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4033
4034 %define push_pull -> %define api.push_pull. Discussed starting at
4035 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4036 * data/push.c: Expect the new name.
4037 * data/yacc.c: Likewise.
4038 * doc/bison.texinfo (Push Decl): Update.
4039 (Decl Summary): Update %define entry.
4040 (Push Parser Function): Update.
4041 (Pull Parser Function): Update.
4042 (Parser Create Function): Update.
4043 (Parser Delete Function): Update.
4044 * tests/calc.at (Simple LALR Calculator): Update.
4045 * tests/input.at (%define enum variables): Update.
4046 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4047 (Push Parsing: Multiple impure instances): Update.
4048 (Push Parsing: Unsupported Skeletons): Update.
4049 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4050 (Exploding the Stack Size with Malloc): Update.
4051
4052 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4053 other entries some.
4054
4055 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4056
4057 For the XML output's terminal element, rename @number to @token-number,
4058 and add @symbol-number. In the nonterminal element, rename @number to
4059 @symbol-number. Discussed starting at
4060 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4061 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4062 renames.
4063 (xsl:template match="nonterminal"): Likewise.
4064 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4065 (xsl:template match="nonterminal"): Likewise.
4066 * src/print-xml.c (print_grammar): Implement.
4067
4068 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4069
4070 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4071 2007-10-11 change, the child elements here are items not rules.
4072 (xsl:template match="item"): New.
4073 (xsl:template match="rule"): Update for new reduced itemset.
4074 (xsl:template match="point"): Remove.
4075 (xsl:template match="empty"): For consistency with --graph, don't
4076 output "/* empty */".
4077 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4078 line-wrap, don't pass a negative value as first-line-length since this
4079 won't work with the following changes.
4080 (xsl:template name="line-wrap"): Simplify slightly.
4081 (xsl:template name="ws-search"): Eliminate recursion.
4082 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4083 set next to an item whose dot is not at the end of the RHS even if it
4084 happens to be associated with the same rule.
4085
4086 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4087
4088 Add %define lr.keep_unreachable_states.
4089 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4090 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4091 * src/main.c (main): Implement it.
4092 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4093 Extend to test it, and fix a typo.
4094
4095 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4096
4097 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4098 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4099 the example .output text.
4100 * tests/regression.at (Extra lookahead sets in report): Improve wording
4101 of comments.
4102
4103 2007-10-17 Wojciech Polak <polak@gnu.org>
4104
4105 * src/print-xml.c (print_grammar): Renamed
4106 <terminal> and <nonterminal> attributes:
4107 "type" to "number" and "symbol" to "name".
4108 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4109 Use new attribute names.
4110 (xsl:template match="nonterminal"): Likewise.
4111 * data/xslt/xml2xhtml.xsl: Likewise.
4112
4113 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4114
4115 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4116 (Option Cross Key): Likewise.
4117
4118 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4119 next to an item whose dot is not at the end of the RHS even if it
4120 happens to be associated with the same rule.
4121 * src/print.c (print_core): Likewise.
4122 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4123 (Resolved SR Conflicts): Update output.
4124 * tests/regression.at (Extra lookahead sets in report): New test case.
4125
4126 2007-10-11 Wojciech Polak <polak@gnu.org>
4127
4128 * src/print-xml.c (print_core): Remove item set
4129 redundancy.
4130 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4131 Improve processing time. Suggested by Joel E. Denny.
4132 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4133 Write xsl:param "required" attribute as comment.
4134 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4135 (xsl:template match="rule"): Support new reduced itemset.
4136 (xsl:template match="point"): Remove.
4137 * data/xslt/xml2xhtml.xsl: Likewise.
4138
4139 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4140
4141 * src/getargs.c (version): Update copyright year.
4142
4143 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4144
4145 Make xml2dot.xsl and --graph produce the same output.
4146 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4147 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4148 escaped later.
4149 (xsl:template name="output-node"): Use the new escape template instead
4150 of the string-replace template directly.
4151 (xsl:template name="output-edge"): Likewise.
4152 (xsl:template name="escape"): New, escapes backslashes and newlines in
4153 addition to quotation marks.
4154 * src/graphviz.c (start_graph, output_node, output_edge): Add
4155 whitespace to output for legibility.
4156
4157 Make xml2text.xsl and --report produce the same output, and remove the
4158 XML "conflicts" element since a conflict summary is easily extracted
4159 from the automaton.
4160 * data/xslt/bison.xsl: New.
4161 (xsl:template match="state" mode="bison:count-conflicts): New.
4162 * data/xslt/xml2text.xsl: Import bison.xsl.
4163 (xsl:template match="bison-xml-report"): Instead of styling the
4164 "conflicts" element, style the "automaton" element with mode
4165 "conflicts". Unlike the former, the latter lists S/R and R/R
4166 conflicts for a state on the same line.
4167 (xsl:template match="conflicts"): Remove.
4168 (xsl:template match="conflict"): Remove.
4169 (xsl:template match="terminal"): Line-wrap the list of rules in which
4170 the terminal is used.
4171 (xsl:template match="nonterminal"): Likewise for nonterminals.
4172 (xsl:template match="automaton" mode="conflicts"): New.
4173 (xsl:template match="state" mode="conflicts"): New.
4174 (xsl:template name="line-wrap"): New.
4175 (xsl:template name="ws-search"): New.
4176 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4177 (xsl:template match="bison-xml-report"): Instead of styling the
4178 "conflicts" element, style the "automaton" element with mode
4179 "conflicts."
4180 (xsl:template match="conflicts"): Remove.
4181 (xsl:template match="conflict"): Remove.
4182 (xsl:template match="automaton" mode="conflicts"): New.
4183 (xsl:template match="state" mode="conflicts): New.
4184 * src/conflicts.c (conflicts_output_xml): Remove.
4185 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4186 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4187 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4188 the corresponding XSLT is easier. Also, never wrap between a word and
4189 the comma that follows it.
4190
4191 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4192
4193 Improve C++ namespace support. Discussed starting at
4194 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4195 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4196 b4_namespace_close): New macros that interpret the %define variable
4197 "namespace" so its value can contain "::" to indicate nested
4198 namespaces.
4199 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4200 the above macros.
4201 * data/lalr1.cc (b4_namespace): Likewise.
4202 * data/location.cc (b4_namespace): Likewise.
4203 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4204 inside a new table in the general %define entry. Document `%define
4205 namespace' there as well. Point the %name-prefix entry to it since it
4206 explains it more completely in the case of C++.
4207 (C++ Bison Interface): Mention `%define namespace' instead of
4208 %name-prefix.
4209 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4210 entry suffices.
4211 * tests/c++.at (Relative namespace references): New test case.
4212 (Absolute namespace references): New test case.
4213 (Syntactically invalid namespace references): New test case.
4214 * tests/input.at (C++ namespace reference errors): New test case.
4215
4216 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4217
4218 Add syncline support and location accessor to internal %define
4219 interfaces.
4220 * data/bison.m4 (b4_percent_define_get_loc): New.
4221 (b4_percent_define_get_syncline): New.
4222 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4223 (b4_percent_define_default): Record defining location as line 1 rather
4224 than 0 for the sake of synchronizing #line's, and define
4225 b4_percent_define_syncline(VARIABLE).
4226 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4227 * src/muscle_tab.c (muscle_syncline_grow): New.
4228 (muscle_code_grow): Use muscle_syncline_grow.
4229 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4230 define b4_percent_define_syncline(VARIABLE).
4231 (muscle_percent_define_get_loc): New.
4232 (muscle_percent_define_get_syncline): New.
4233 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4234 remove some unused variables.
4235 (muscle_percent_define_default): Record defining location as line 1
4236 rather than 0 for the sake of synchronizing #line's, and define
4237 b4_percent_define_syncline(VARIABLE).
4238 (muscle_percent_define_check_values): Use
4239 muscle_percent_define_get_loc.
4240 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4241 (muscle_percent_define_get_syncline): Prototype.
4242 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4243 defaults): Update output for location change.
4244 (Complaining during macro argument expansion): Extend to test
4245 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4246
4247 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4248
4249 Fix some error-reporting macro bugs.
4250 * data/bison.m4 (b4_cat): New.
4251 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4252 to stdout so they don't become arguments to other macros. Update
4253 comments and add examples.
4254 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4255 add examples.
4256 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4257 after printing the error directive so that M4 doesn't report subsequent
4258 problems that are induced by this problem.
4259 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4260 instead of just in them. Recognize @\n in both places. Both expand to
4261 the empty string. Needed by b4_cat.
4262 * tests/skeletons.at (Complaining during macro argument expansion):
4263 New test case.
4264 (Fatal errors make M4 exit immediately): New test case.
4265
4266 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4267
4268 Implement --print-datadir.
4269 * src/getargs.c (usage): Mention.
4270 (PRINT_DATADIR_OPTION): New anonymous enum member.
4271 (long_options): Add entry for it.
4272 (getargs): Add case for it calling compute_pkgdatadir.
4273 * src/output.c (output_skeleton): Encapsulate data directory
4274 computation from here...
4275 (prepare): ... and from here...
4276 (compute_pkgdatadir): ... into this new function.
4277 * src/output.h (compute_pkgdatadir): Prototype.
4278
4279 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4280
4281 * src/print-xml.c (escape_bufs): New static global variable
4282 replacing...
4283 (xml_escape_n): ... the static local variable buf here.
4284 (print_xml): Free memory for escape_bufs.
4285 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4286
4287 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4288
4289 Replace `%push-parser' and `%push-pull-parser' with
4290 `%define push_pull "push"' and `%define push_pull "both"'.
4291 `%define push_pull "pull"' is the default.
4292 * doc/bison.texinfo (Push Decl, Push Parser Function,
4293 Pull Parser Function, Parser Create Function, Parser Delete Function):
4294 Update declarations.
4295 (Decl Summary, Table of Symbols): Replace %push-parser and
4296 %push-pull-parser entries with a %define push_pull entry.
4297 * data/bison.m4 (b4_percent_define_check_values): New macro.
4298 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4299 definitions...
4300 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4301 definitions...
4302 * data/push.c: ... to here and compute them from the value of the
4303 %define variable push_pull.
4304 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4305 parsing requests here...
4306 * data/yacc.c: ... hack this to switch to push.c any time
4307 b4_use_push_pull_flag or the %define variable push_pull is set. This
4308 will go away when we mv push.c yacc.c.
4309 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4310 push parsing is not supported since unused %define variables are
4311 reported anyway.
4312 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4313 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4314 comments for consistency with b4_percent_define_check_values.
4315 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4316 muscles.
4317 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4318 Remove.
4319 (prologue_declaration): Remove %push-parser and %push-pull-parser
4320 rules.
4321 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4322 * tests/calc.at: Update declarations.
4323 * tests/input.at (%define enum variables): New test case.
4324 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4325 declaration.
4326 (Push Parsing: Multiple impure instances): Update declaration.
4327 (Push Parsing: Unsupported Skeletons): New test case.
4328 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4329 declaration.
4330 (Exploding the Stack Size with Malloc): Update declaration.
4331
4332 2007-09-24 Wojciech Polak <polak@gnu.org>
4333
4334 Add XSLT transformations.
4335
4336 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4337 * data/xslt/xml2text.xsl: Transform XML into plain text.
4338 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4339 * data/Makefile.am (xsltdir): New variable.
4340 (dist_xslt_DATA): Add xslt/*.xsl files.
4341
4342 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4343
4344 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4345 Problem reported by Wojciech Polak.
4346 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4347 (xml_printf): Undo change I made on 21 September; that is,
4348 indent 2 spaces, not 1.
4349
4350 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4351
4352 Pacify ./configure --enable-gcc-warnings.
4353 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4354 `char const *' instead of `char *'.
4355 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4356 local variable `sep'.
4357
4358 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4359
4360 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4361 elsewhere.
4362 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4363 (xml_printf): Indent just 1 space for level.
4364 (e_char, xlate_char): Remove.
4365 (xml_escape_string): Rewrite to avoid undefined behavior (used
4366 storage that was freed from the stack).
4367 (xml_escape_n): Don't bother checking for subscript error.
4368
4369 2007-09-21 Wojciech Polak <polak@gnu.org>
4370
4371 Add Bison XML Automaton Report.
4372
4373 Add support for an -x option to generate an XML report.
4374 It is not documented yet.
4375 * src/print-xml.c: New file.
4376 * src/print-xml.h: Likewise.
4377 * lib/timevar.def (TV_XML): New var.
4378 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4379 * src/conflicts.c: Include print-xml.h.
4380 (solved_conflicts_xml_obstack): New var.
4381 (log_resolution, conflicts_solve, conflicts_free):
4382 Add support for XML report.
4383 (conflicts_output_val): New function.
4384 * src/conflicts.h (conflicts_output_val): New decl.
4385 * src/files.c (spec_xml_file): New var.
4386 (compute_output_file_names, output_file_names_free): Add XML support.
4387 * src/files.h (spec_xml_file): New decl.
4388 * src/getargs.c (xml_flag): New var.
4389 (usage, short_options, long_options, getargs): Add XML support.
4390 * src/getargs.h (xml_flag): New decl.
4391 * src/gram.c: Include print-xml.h.
4392 (rule_lhs_print_xml, rule_rhs_print_xml):
4393 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4394 New functions.
4395 * src/gram.h: Declare external ones.
4396 * src/main.c: Include print-xml.h.
4397 (main): Add XML support.
4398 * src/reduce.c: Include print-xml.h.
4399 (reduce_xml): New function.
4400 * src/reduce.h: Declare it.
4401 * src/state.c: Include print-xml.h.
4402 (state_new): Add XML support.
4403 (state_rule_lookahead_tokens_print_xml): New function.
4404 * src/state.h: Declare it.
4405 (struct state): New member solved_conflicts_xml.
4406 * src/symtab.c (symbol_class_get_string): New function.
4407 * src/symtab.h: Declare it.
4408
4409 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4410
4411 * GNUmakefile: Switch to coreutils's version.
4412 * bootstrap: Likewise.
4413 * Makefile.cfg: Adjust to new GNUmakefile.
4414 * README-hacking: Likewise.
4415
4416 Import from gnulib:
4417
4418 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4419 Bruno Haible <bruno@clisp.org>
4420
4421 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4422 and is a script that invokes bison. Tighten the code. Add comments.
4423
4424 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4425
4426 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4427 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4428 * doc/bison.texinfo (Decl Summary): Fix.
4429 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4430 * tests/input.at (Boolean %define variables): Update output.
4431 * tests/skeletons.at (%define boolean variables: invalid skeleton
4432 defaults): Rename to...
4433 (%define Boolean variables: invalid skeleton defaults): ... this and
4434 update output.
4435
4436 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4437
4438 In impure push mode, don't allow more than one yypstate to be allocated
4439 since multiple impure parsers would corrupt yynerrs.
4440 * data/push.c (yypstate_allocated): New static global variable
4441 initialized to 0.
4442 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4443 exhaustion if yypstate_allocated is 1, but still return 2.
4444 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4445 already 1. Otherwise, set it to 1.
4446 (yypstate_delete): Set it to 0.
4447 * tests/push.at (Push Parsing: Multiple impure instances): New test
4448 case.
4449
4450 2007-08-17 Bob Rossi <bob@brasko.net>
4451
4452 * doc/bison.texinfo (Push Decl): Document the push parser.
4453 (Table of Symbols): Ditto.
4454 (Pure Decl): Ditto.
4455 (Decl Summary): Ditto.
4456 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4457 Parser Create Function, Parser Delete Function):
4458 Add new push parser symbols.
4459 (Table of Symbols): Document push-parser, push-pull-parser,
4460 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4461
4462 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4463
4464 Update to GPLv3.
4465 * doc/gpl-3.0.texi: New file.
4466 * doc/gpl.texi: Remove.
4467 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4468 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4469 * README-hacking, TODO, bootstrap, bootstrap.conf:
4470 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4471 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4472 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4473 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4474 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4475 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4476 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4477 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4478 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4479 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4480 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4481 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4482 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4483 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4484 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4485 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4486 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4487 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4488 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4489 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4490 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4491 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4492 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4493 * src/complain.c, src/complain.h, src/conflicts.c:
4494 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4495 * src/files.h, src/flex-scanner.h, src/getargs.c:
4496 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4497 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4498 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4499 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4500 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4501 * src/print.c, src/print.h, src/print_graph.c:
4502 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4503 * src/reduce.h, src/relation.c, src/relation.h:
4504 * src/revision.h, src/scan-code.h, src/scan-code.l:
4505 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4506 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4507 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4508 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4509 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4510 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4511 * tests/existing.at, tests/glr-regression.at:
4512 * tests/headers.at, tests/input.at, tests/java.at:
4513 * tests/local.at, tests/output.at, tests/push.at:
4514 * tests/reduce.at, tests/regression.at, tests/sets.at:
4515 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4516 * tests/torture.at:
4517 Update to GPLv3.
4518
4519 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4520
4521 Get rid of broken %no-parser, -n, and --no-parser implementation and
4522 documentation.
4523 * TODO: Don't mention them.
4524 * doc/bison.1: Likewise.
4525 * doc/bison.texinfo (Decl Summary): Likewise.
4526 (Bison Options): Likewise.
4527 (Option Cross Key): Likewise.
4528 * src/getargs.c (no_parser_flag): Remove global variable.
4529 (usage): Don't print description of -n and --no-parser.
4530 (long_options): Remove --no-parser entry here.
4531 (getargs): Remove -n case in the switch here.
4532 * src/getargs.h (no_parser_flag): Remove extern.
4533 * tests/regression.at (Web2c Actions): Remove comment that mentions
4534 --no-parser.
4535
4536 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4537
4538 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4539 name user variables starting with `yy'. Just pass NULL instead of a
4540 dummy local &yylval to yypush_parse.
4541 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4542 starting with `yy'.
4543
4544 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4545
4546 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4547 true since it's then always used regardless of whether yyoverflow is
4548 defined. Reported by Christian Burger at
4549 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4550 * THANKS: Add Christian Burger.
4551
4552 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4553 node names: say "Decl Summary" not "Bison Declaration Summary".
4554
4555 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4556
4557 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4558 determine whether this function has already complained about an invalid
4559 value for a %define boolean variable, don't check whether Bison has
4560 ever examined the value. As written, the check was a tautology.
4561 Instead, record and check for this complaint using a separate muscle.
4562
4563 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4564
4565 Fix push parsing memory leak reported by Brandon Lucia at
4566 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4567 * THANKS: Add Brandon Lucia.
4568 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4569 but the parse never completed and thus freed it.
4570 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4571 * tests/testsuite.at: Include push.at.
4572 * test/push.at: New.
4573 (Push Parsing: Memory Leak for Early Deletion): New test case.
4574
4575 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4576
4577 Improve handling of multiple S/R conflicts in the same state and of S/R
4578 conflicts involving multiple reductions.
4579 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4580 set for a state here or Bison will abort if it is reassigned on a
4581 later conflicted reduction in the same state.
4582 Similarly, don't finalize and assign the solved conflicts report here
4583 or it will be lost if it is reassigned on a later conflicted reduction
4584 in the same state.
4585 (set_conflicts): Instead, assign them both here after all S/R conflicts
4586 in the state have been fully examined.
4587 * src/print.c (shift_set): Rename to...
4588 (no_reduce_set): ... this.
4589 (print_reductions): Update for rename, and add %nonassoc error action
4590 tokens to no_reduce_set so that, when printing the first remaining
4591 reduction on an error action token, the reduction is enclosed in
4592 brackets.
4593 (print_results): Update for rename.
4594 * tests/conflicts.at (Solved conflicts report for multiple reductions
4595 in a state): New test case.
4596 (%nonassoc error actions for multiple reductions in a state): New test
4597 case.
4598
4599 * src/main.c (main): Don't depend on C99 features.
4600
4601 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4602
4603 * build-aux/.cvsignore: Add compile.
4604 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4605 uniwidth.
4606
4607 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4608
4609 * bootstrap (slurp): Create target directories that don't exist.
4610 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4611
4612 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4613
4614 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4615 than item number.
4616 * closure.c (closure): Likewise.
4617 * state.h (reductions): Comment sorting of rules.
4618 (state): Comment sorting of items.
4619
4620 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4621
4622 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4623 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4624 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4625 definition in order to avoid Gnulib headers since we don't use config.h
4626 here.
4627 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4628 rather than AT_DATA so that config.h is included.
4629
4630 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4631
4632 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4633 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4634 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4635 and so that YYFPRINTF is guaranteed to be defined here.
4636
4637 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4638
4639 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4640 with...
4641 (muscle_percent_define_check_values): ... this more helpful function.
4642 Again, it's not used yet, but it will be.
4643 * src/muscle_tab.h: Likewise.
4644
4645 Improve some comments in parser table construction.
4646 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4647 (generate_states): Don't mention ruleset, which is internal to closure.
4648 * src/closure.c (closure): Explain sorting of core and itemset, which
4649 is required for this function to behave correctly.
4650 * src/closure.h (closure): Mention sorting.
4651
4652 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4653
4654 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4655 move the check for disabled transitions to an aver since conflict
4656 resolution hasn't happened yet.
4657
4658 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4659 labels a state as inconsistent just because it has error transitions.
4660 The original form of this check appeared in revision 1.1 of lalr.c,
4661 which was committed on 1991-12-21. Now (at least), changing the
4662 consistency label on such a state appears to have no useful effect in
4663 any of the places it is examined, which I enumerate below. The key
4664 point to understanding each item in this enumeration is that a state
4665 with an error transition is labelled consistent in the first place only
4666 if it has no rules, so the check cannot matter for states that have
4667 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4668 to try to identify its conflicts, and a state must have *rules* to have
4669 conflicts. (2) Labelling a state as inconsistent will affect how
4670 action_row sets the default *rule* for the state. (3) Labelling a
4671 state as inconsistent will cause build_relations to add lookback edges
4672 to *rules* in that state.
4673 * src/state.h (struct state): Word the comment for member consistent
4674 more carefully.
4675
4676 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4677
4678 Don't depend on C99 features.
4679 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4680 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4681 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4682 * src/state.c (state_mark_reachable_states): Fix for-loop.
4683 (state_remove_unreachable_states): Fix for-loop.
4684
4685 Don't widen struct state with member reachable just to temporarily
4686 record reachability. Instead, use a local bitset.
4687 * src/state.h (struct state): Remove member.
4688 * src/state.c (state_new): Don't initialize it.
4689 (state_mark_reachable_states): Rename to...
4690 (state_record_reachable_states): ... this, and use bitset.
4691 (state_remove_unreachable_states): Use bitset.
4692
4693 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4694
4695 * src/Makefile.am (yacc): Quote target action commands properly so
4696 that the yacc script isn't corrupt. Reported by Hans Aberg at
4697 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4698
4699 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4700 the case of pure parsers. Reported by Frans Englich at
4701 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4702 * THANKS: Add Frans Englich.
4703
4704 * NEWS (2.3a+): In the %code entry, reference section `Bison
4705 Declaration Summary' from the manual now since the %code summary has
4706 moved there.
4707 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4708 in the rules section must be terminated by semicolons.
4709
4710 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4711
4712 Extend the front-end API for %define variables to more completely
4713 mirror the back-end. This will be useful in the future.
4714 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4715 Update comments to mention the new front-end counterparts of these
4716 macros.
4717 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4718 for muscle_string_decode and muscle_location_decode.
4719 (muscle_string_decode): New static function.
4720 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4721 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4722 functions.
4723 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4724 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4725 implementation more closely.
4726 (muscle_percent_define_invalid_value): New function.
4727 * src/muscle_tab.h (muscle_percent_define_get,
4728 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4729 Prototype.
4730
4731 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4732
4733 * NEWS (2.3a+): Mention yesterday's state-removal change.
4734 (2.3a): Remove the %language entry, which was added after 2.3a.
4735 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4736 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4737 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4738 tests/existing.at: Update copyright date.
4739
4740 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4741
4742 If conflict resolution makes states unreachable, remove those states,
4743 report rules that are then unused, and don't report conflicts in those
4744 states.
4745 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4746 New global function.
4747 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4748 function.
4749 * src/main.c (main): After conflict resolution, remove the unreachable
4750 states and update all data structures that reference states by number.
4751 * src/state.c (state_new): Initialize each state's reachable member to
4752 false.
4753 (state_mark_reachable_states): New static function.
4754 (state_remove_unreachable_states): New global function.
4755 * src/state.h (struct state): Add member bool reachable.
4756 (state_remove_unreachable_states): Prototype.
4757 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4758 New test case.
4759 * tests/existing.at (GNU pic Grammar): Update test case output now that
4760 an unused rule is discovered.
4761
4762 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4763
4764 Minor code cleanup in parser table construction.
4765 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4766 (new_itemsets, save_reductions): Update for rename to nitemset.
4767 * src/closure.c (nritemset): Rename to...
4768 (nitemset): ... this since the "r" appears to meaningless and isn't
4769 used in the comments.
4770 (closure): Update for rename.
4771 * src/closure.h (nritemset): Update extern to...
4772 (nitemset): ... this.
4773 * src/lalr.c (LA): Fix a typo in comments.
4774 * src/print.c (print_core): Update for rename to nitemset.
4775 * src/print_graph.c (print_graph): Likewise.
4776 * src/state.h: Fix some typos in header comments.
4777
4778 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4779
4780 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4781 still sticks to ASCII. Sorry!
4782
4783 * README-hacking: New file, taken mostly from coreutils, with changes
4784 for Bison. Contains much of the contents of:
4785 * README-cvs: Remove.
4786 * bootstrap: Sync from gnulib.
4787 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4788 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4789
4790 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4791
4792 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4793 Setzer.
4794 (Java Differences): Fix some typos.
4795 * THANKS: Add Sebastian Setzer.
4796
4797 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4798
4799 * data/java.m4 (b4_single_class_if): Remove.
4800 (b4_abstract_if): Look at "%define abstract".
4801 (b4_lexer_if): New.
4802 (b4_union_name): Rename...
4803 (b4_yystype): ... to this. Map to "%define stype".
4804 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4805 b4_maybe_throws): Fix quoting.
4806 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4807 * data/lalr1.java (Lexer interface): Always define.
4808 (Lexer interface within parser class): Remove.
4809 (YYLexer class): New, used when "%code lexer" is present.
4810 (constructor): When "%code lexer" is used, pass %lex-param
4811 to the lexer constructor.
4812 (yylex, yyparse): Remove %lex-param from method invocations
4813 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4814
4815 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4816 abstract". Rename "%define union_name" to "%define stype".
4817 Rename method names according to previous patch.
4818 (Java Scanner Interface): Describe "%code lexer" instead of
4819 "%pure-parser" and "%define single_class".
4820 (Java Differences): Mention "%code lexer".
4821
4822 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4823 Include scanner here, using macros from tests/local.at.
4824 (AT_DATA_CALC_Y): Remove final argument.
4825 (_AT_CHECK_JAVA_CALC): Likewise.
4826 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4827 of %locations and %error-verbose.
4828 (main): Test with and without %lex-param.
4829 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4830 (AT_BISON_OPTION_POPDEFS): Pop it.
4831
4832 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4833
4834 DJGPP spefic issue. Inhibit the use of disallowed characters for
4835 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4836 and concern testsuite case 46.
4837 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4838 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4839 * djgpp/config.bat: Inhibit the use of disallowed characters.
4840
4841 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4842
4843 Miscellaneous %define and %code cleanup.
4844 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4845 values are interpreted.
4846 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4847 documentation a little more.
4848 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4849 muscle_percent_define_insert, muscle_percent_code_grow): New
4850 functions/macros.
4851 * src/muscle_tab.h (muscle_percent_define_insert,
4852 muscle_percent_code_grow): Prototype.
4853 * src/parse-gram.y (prologue_declaration): Use
4854 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4855 %define and %code directives.
4856
4857 Make it easy to share %define boolean variables between the front-end
4858 and back-end. Though not used yet, this will be useful in the future.
4859 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4860 Bison uses of names rather than just skeleton uses of names.
4861 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4862 b4_percent_define_skeleton_variables(VARIABLE) to
4863 b4_percent_define_bison_variables(VARIABLE).
4864 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4865 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4866 b4_percent_code_bison_qualifiers(QUALIFIER).
4867 (b4_check_user_names_wrap): Update for renames.
4868 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4869 muscle_percent_define_default): New functions mimicking
4870 b4_percent_define_flag_if and b4_percent_define_default.
4871
4872 For %define variables, report locations for invalid values and
4873 redefinitions.
4874 * data/bison.m4 (b4_percent_define_flag_if): Read
4875 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4876 value for VARIABLE.
4877 (b4_percent_define_default): Save a special location in
4878 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4879 must later be reported as invalid.
4880 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4881 functions.
4882 (muscle_percent_define_insert): Record the location of VARIABLE in
4883 muscle percent_define_loc(VARIABLE), and use it to report the previous
4884 location for a redefinition.
4885 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4886 (muscle_percent_define_default): Update like b4_percent_define_default.
4887 (muscle_grow_user_name_list): Rename to...
4888 (muscle_user_name_list_grow): ... this for consistency and use
4889 muscle_location_grow.
4890 * src/muscle_tab.h (muscle_location_grow): Prototype.
4891 * tests/input.at (%define errors): Update expected output.
4892 * tests/skeletons.at (%define boolean variables: invalid skeleton
4893 defaults): New test case.
4894
4895 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4896
4897 * src/print.c (lookahead_set, state_default_rule): Remove.
4898 (print_reductions): Replace state_default_rule invocation with
4899 equivalent use of yydefact, which was computed in token_actions in
4900 tables.c.
4901 (print_results): Don't allocate lookahead_set.
4902
4903 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4904
4905 * data/lalr1.java: Prefix all private members with yy.
4906
4907 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4908
4909 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4910 Sebastien Fricker at
4911 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4912 * THANKS: Add Sebastien Fricker.
4913 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4914 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4915 accept a variable number of arguments.
4916
4917 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4918
4919 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4920
4921 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4922
4923 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4924 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4925 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4926
4927 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4928
4929 Undo my 2007-02-07 change, switching back to the c-strcase module
4930 introduced in the 2007-02-03 change. Bruno Haible reported that
4931 the 2007-02-07 change would be dangerous in Turkish if we add a
4932 language whose name contains "i", since "i" is not lowercase "I"
4933 in Turkish.
4934 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4935 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4936 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4937 * m4/.cvsignore: Remove strcase.m4.
4938 * src/getargs.c: Revert 2007-02-07 change, as follows.
4939 Include c-strcase.h.
4940 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4941
4942 2007-02-11 Bruno Haible <bruno@clisp.org>
4943
4944 Enable the Java related testsuite tests when the only Java compiler
4945 found is a gcj < 4.3. Discussed at
4946 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4947 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4948
4949 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4950
4951 * data/Makefile.am: Update copyright date.
4952 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4953 yypstate_new returns NULL.
4954 (yypstate_new): Return NULL if malloc does.
4955 * src/reader.c (packgram): Move translation of rule actions from the
4956 beginning of packgram to...
4957 (check_and_convert_grammar): ... here right before packgram is invoked
4958 so it's easier to write more complete comments, and remove redundant
4959 code.
4960
4961 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4962
4963 As in semantic actions, make @$ in %initial-action, %destructor, and
4964 %printer imply %locations.
4965 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4966 scanning @$.
4967 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4968 (@$ in %initial-action implies %locations,
4969 @$ in %destructor implies %locations,
4970 @$ in %printer implies %locations): ... these new test cases.
4971
4972 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4973
4974 Undo most of the 2007-02-03 change, switching to the strcase module
4975 now that gnulib strcase has been fixed.
4976 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4977 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4978 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4979 * m4/.cvsignore: Add strcase.m4.
4980 * src/getargs.c: Revert 2007-02-03 change, as follows.
4981 Don't include c-strcase.h.
4982 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4983 strcasecmp has "unspecified behavior" outside the POSIX locale,
4984 but it works fine in practice if at least one argument is ASCII,
4985 as is the case in Bison.
4986
4987 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4988
4989 * tests/java.at: Skip tests if only one of javac/java is present.
4990 Reported by Joel E. Denny.
4991 * tests/atlocal.in: Adjust copyright years.
4992
4993 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4994
4995 * data/lalr1.java (Stack): Work around old verifiers that disallow
4996 access to the private fields of an inner class, from the outer class.
4997 We can make Stack's fields public because user code doesn't have access
4998 to the instance of Stack used by parse(). Reported by Paul Eggert.
4999
5000 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5001
5002 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5003 the right spot for these files?
5004 * bootstrap.conf (gnulib_modules): Add c-strcase.
5005 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5006 c-strncasecmp.c.
5007 * src/getargs.c: Include c-strcase.h.
5008 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5009 to avoid unspecified behavior.
5010
5011 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5012
5013 * doc/bison.texinfo (Decl Summary): Correct typo.
5014
5015 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5016
5017 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5018 Complain if the value does not match empty, "true" or "false".
5019 * data/c++.m4: Adjust default definitions of %define variables.
5020 * data/java.m4: Adjust default definitions of %define variables.
5021 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5022 to above behavior.
5023 * tests/input.at (Boolean %define variables): Test new behavior.
5024
5025 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5026
5027 * NEWS: Mention java.
5028 * TODO: Remove things that are done.
5029 * bootstrap.conf: Add javacomp-script and javaexec-script.
5030 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5031
5032 * data/Makefile.am: Add new files.
5033 * data/java-skel.m4: New.
5034 * data/java.m4: New.
5035 * data/lalr1.java: New.
5036
5037 * doc/bison.texinfo: Put "A Complete C++ Example" under
5038 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5039 under Other Languages.
5040
5041 * src/getargs.c (valid_languages): Add Java.
5042 * src/getargs.h (struct bison_language): Update size of string fields.
5043
5044 * tests/Makefile.am: Add java.at.
5045 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5046 * tests/java.at: New.
5047 * tests/testsuite.at: Include it.
5048
5049 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5050
5051 Clean up.
5052 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5053 at_directive_argv arguments so these no longer have to be global
5054 variables. Also, update the implementation for the following changes.
5055 (fail_for_at_directive_too_many_args,
5056 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5057 (at_directive_name): Remove as at_directive_argv[0] will be used for
5058 this now.
5059 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5060 for the directive name.
5061 (at_directive_argc, at_directive_argv): Make these local within
5062 skel_lex instead of global.
5063 (INITIAL): Update directive start action for above changes.
5064 (SC_AT_DIRECTIVE_ARG): Rename to...
5065 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5066 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5067 (scan_skel): Move yylex_destroy to...
5068 (skel_scanner_free): ... here.
5069 * tests/skeletons.at (installed skeleton file name): Rename to...
5070 (installed skeleton file names): ... this.
5071
5072 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5073
5074 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5075 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5076 Summary" not "Directives".
5077 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5078 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5079 since the former is now the more complete one.
5080 (Prologue Alternatives): Likewise and do the same for %defines.
5081 (Table of Symbols): Add summary of %code, add summary of %define, and
5082 move full %code documentation to...
5083 (Decl Summary): ... here for consistency with other entries in these
5084 sections.
5085 Move %define entry in order to keep this list alphabetized.
5086 Reword %define entry a little to put less emphasis on the skeleton
5087 concept, which most users shouldn't have to think about.
5088
5089 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5090
5091 Adjust to recent gnulib changes.
5092 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5093 Add string.h, string_.h, unistd_.h, wchar_.h.
5094 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5095 * src/system.h: Don't include <stpcpy.h>; this is now done by
5096 <string.h>.
5097
5098 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5099
5100 Simplify implementation of unqualified %code, implement macros for
5101 uniform treatment of boolean %define flags. Document %define.
5102 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5103 b4_percent_code_ifdef): New.
5104 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5105 * data/c++.m4: Define default value for global_tokens_and_yystype.
5106 * data/glr.cc: Likewise.
5107 * data/location.cc: Use b4_percent_define_flag_if.
5108
5109 * doc/bison.texinfo (Decl Summary): Document %define.
5110
5111 * src/parse-gram.y (Unqualified %code): Change muscle name to
5112 b4_percent_code().
5113 (content.opt): Default to empty.
5114
5115 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5116
5117 Implement support for relative and absolute skeleton file names.
5118 Discussed starting at
5119 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5120 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5121 (Bison Options): Document in --skeleton entry.
5122 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5123 full_skeleton can't necessarily hold all of pkgdatadir.
5124 If the specified skeleton file name contains a `/', don't prepend
5125 pkgdatadir.
5126 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5127 file name contains a `/', prepend the grammar file directory.
5128 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5129 * skeletons.at: New file.
5130 (relative skeleton file names): New test case.
5131 (installed skeleton file names): New test case.
5132 * tests/testsuite.at: Include skeletons.at.
5133
5134 * bootstrap: Update copyright to 2007.
5135
5136 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5137
5138 * bootstrap: Remove occurrences of .#bootmp from the files.
5139
5140 2007-01-17 Akim Demaille <akim@epita.fr>
5141
5142 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5143 nonterminals.
5144 Use per-type %printer.
5145
5146 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5147
5148 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5149 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5150 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5151 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5152 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5153 tests/glr-regression.at, tests/input.at, tests/local.at,
5154 tests/output.at, tests/torture.at: Update copyright to 2007.
5155
5156 2007-01-16 Akim Demaille <akim@epita.fr>
5157
5158 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5159 error code.
5160 (Calc++ Scanner): Exit with failure if we can't open the input
5161 file.
5162 Accept "-" standing for stdin.
5163 (Calc++ Top Level): Print the result only if the parsing was
5164 successful.
5165
5166 2007-01-16 Akim Demaille <akim@epita.fr>
5167
5168 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5169
5170 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5171 and Joel E. Denny <jdenny@ces.clemson.edu>
5172
5173 Clean up %define and %code implementation in M4 some. Most
5174 importantly, rename all related macros to be in the b4_percent_define
5175 and b4_percent_code namespaces. Also, complete support for `.' in
5176 %define variable names and %code qualifiers.
5177 * data/bison.m4 (b4_check_user_names): Check for special
5178 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5179 m4_foreach loops.
5180 (b4_get_percent_define, b4_get_percent_code): Rename to...
5181 (b4_percent_define_get, b4_percent_code_get): ... these.
5182 Extend documentation with examples.
5183 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5184 b4_percent_define_skeleton_variables and
5185 b4_percent_code_skeleton_qualifiers.
5186 Expect any value for the %define variable `foo' to be stored in the
5187 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5188 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5189 expect any unqualified %code blocks to be stored in a macro named
5190 `b4_percent_code_unqualified'.
5191 Use m4_indir so that %define variable names and %code qualifiers can
5192 contain `.', which is allowed by the grammar parser.
5193 (b4_percent_define_default): New macro to set a default value for a
5194 %define variable.
5195 (m4_wrap): Update wrapped code, and fix some underquoting.
5196 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5197 Expect grammar uses of %define variables and %code qualifiers to be
5198 defined in b4_percent_define_user_variables and
5199 b4_percent_code_user_qualifiers.
5200 * data/c++.m4: Use b4_percent_define_default rather than
5201 m4_define_default. Fix some underquoting. Skeleton usage of %define
5202 variable define_location_comparison now implies skeleton usage of
5203 %define variable filename_type.
5204 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5205 data/push.c, data/yacc.c: Update macro names.
5206 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5207 muscle names.
5208
5209 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5210
5211 DJGPP specific issues.
5212
5213 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5214 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5215
5216 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5217
5218 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5219 run parsers in all tests so that Valgrind is invoked during
5220 maintainer-check-valgrind.
5221 (Duplicate representation of merged trees): Free all semantic values.
5222 (Duplicated user destructor for lookahead): Likewise.
5223
5224 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5225
5226 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5227 command-line prefix.
5228 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5229 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5230 miss Valgrind messages.
5231 (Exploding the Stack Size with Malloc): Likewise.
5232
5233 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5234
5235 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5236 locals. Reported by Juan Manuel Guerrero at
5237 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5238 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5239 Fix some indentation also.
5240 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5241 explaining this issue.
5242
5243 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5244 and Joel E. Denny <jdenny@ces.clemson.edu>
5245
5246 Simplify union and prologue handling, and escape union and lex/parse
5247 params with digraphs.
5248 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5249 values to the empty string since these are no longer guaranteed
5250 initialized by the front-end.
5251 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5252 braces around b4_user_stype since this is no longer done by the
5253 front-end.
5254 * src/files.c, src/files.h (pre_prologue_obstack,
5255 post_prologue_obstack): Remove.
5256 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5257 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5258 with digraphs. This fixes lex params and parse params.
5259 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5260 * src/output.c (prepare): Remove muscle insertion of the prologues.
5261 (output): Remove freeing of pre_prologue_obstack and
5262 post_prologue_obstack.
5263 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5264 than prologue_augment for prologue parsing so you don't need prologue
5265 obstacks.
5266 (grammar_declaration): For %union RHS, use `braceless' instead of
5267 "{...}" so that braces are already stripped and code is escaped with
5268 digraphs.
5269 * src/reader.c (prologue_augment): Remove.
5270 (reader): Remove initialization of pre_prologue_obstack and
5271 post_prologue_obstack.
5272 * src/reader.h (prologue_augment): Remove.
5273
5274 * data/c.m4: Remove stray parenthesis.
5275
5276 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5277
5278 Remove quotes from variables names in %define directives and from
5279 qualifiers in %code directives, and restrict the characters that are
5280 allowed in them to M4-friendly ones. For %define, continue to support
5281 the quoted form as a deprecated feature. Discussed starting at
5282 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5283 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5284 %code.
5285 * doc/bison.texinfo (Prologue Alternatives): Update.
5286 (Decl Summary): In %defines entry, update mention of `%code requires'
5287 and `%code provides'.
5288 (C++ Location Values): Update %define uses.
5289 (Calc++ Parser Interface): Likewise.
5290 (Calc++ Parser): Likewise, and update `%code requires' uses.
5291 (Table of Symbols): Update %code documentation.
5292 * src/parse-gram.y (prologue_declaration): For %define variables, use
5293 `variable' instead of `STRING'.
5294 (grammar_declaration): For %code qualifiers, use `ID' instead of
5295 `STRING'.
5296 (variable): New nonterminal that takes an `ID' or a `STRING'.
5297 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5298 and %define uses.
5299 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5300 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5301 (%define errors): Update %define uses.
5302
5303 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5304
5305 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5306 instead of muscle_insert for %define values so that M4-special
5307 characters are replaced with digraphs.
5308 * tests/input.at (%define errors): Extend to check weird values.
5309
5310 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5311
5312 Instead of having skeletons declare all valid %define variables and
5313 %code qualifiers, provide macros that retrieve the associated values
5314 and build these lists automatically. Thus Bison will now warn when a
5315 variable or qualifier is not used by the skeleton in the current
5316 invocation regardless of whether it might sometimes be used by that
5317 skeleton in other invocations. Also, move all %define value macros to
5318 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5319 form, which is replaced by %code.
5320 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5321 (b4_check_user_names): ... this, and change the series of valid name
5322 arguments to a single list argument for names used in the skeleton
5323 similar to the existing list argument for names used in the grammar.
5324 Warn instead of complaining.
5325 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5326 values and %code code, to format %code code properly, and to build
5327 lists of all %define variables and %code qualifiers used in the
5328 skeleton: b4_skeleton_percent_define_variables and
5329 b4_skeleton_percent_code_qualifiers.
5330 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5331 Remove, and...
5332 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5333 the skeleton names lists can finish building first. In place of
5334 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5335 expect the lists b4_user_percent_define_variables and
5336 b4_user_percent_code_qualifiers.
5337 * data/c++.m4: Where setting default values for b4_parser_class_name,
5338 b4_location_type, b4_filename_type, b4_namespace, and
5339 b4_define_location_comparison, update their names to the
5340 b4_percent_define_ namespace.
5341 * data/glr.c: Don't use b4_check_percent_define_variables and
5342 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5343 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5344 (b4_parser_class_name, b4_namespace): Define these using
5345 b4_get_percent_define for parser_class_name and namespace.
5346 * data/location.cc: Use b4_get_percent_define.
5347 * data/push.c: Don't use b4_check_percent_define_variables and
5348 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5349 * data/yacc.c: Likewise, and don't call m4_exit in
5350 b4_use_push_for_pull_if or m4_wrap code will never execute.
5351 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5352 Rename to...
5353 (muscle_grow_user_name_list): ... this for consistency with the
5354 terminology used in bison.m4.
5355 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5356 %define variable names, and rename muscle used_percent_define_variables
5357 to user_percent_define_variables.
5358 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5359 user_percent_code_qualifiers.
5360 (content): Remove.
5361 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5362 {CODE} form is no longer accepted.
5363 * tests/input.at (Reject bad %code qualifiers): Rename to...
5364 (Reject unused %code qualifiers): ... this, and update test output.
5365 (%define error): Update test output.
5366
5367 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5368
5369 Check for unrecognized %define variables similar to checking for
5370 unrecognized %code qualifiers. Check for redefined %define variables.
5371 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5372 generalizes...
5373 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5374 (b4_check_percent_define_variables): New, also wraps it.
5375 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5376 variables using b4_check_percent_define_variables.
5377 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5378 all those exercised in the test suite and all those listed in the
5379 `Default values' section of c++.m4. Are there others?
5380 * data/push.c, data/yacc.c: Declare no valid %define variables.
5381 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5382 similar to muscle_find, but it works even when the muscle stores a
5383 const value.
5384 (muscle_grow_used_name_list): New function for constructing the used
5385 name list muscles that b4_check_for_unrecognized_names requires.
5386 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5387 %define'd more than once. Define the b4_used_percent_define_variables
5388 muscle with muscle_grow_used_name_list.
5389 (grammar_declaration): Abbreviate %code code with
5390 muscle_grow_used_name_list.
5391 * tests/input.at (%define errors): New.
5392
5393 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5394
5395 Provide warn_at, complain_at, and fatal_at function callbacks to the
5396 skeletons, and use this for %code qualifier complaints.
5397 * data/bison.m4 (b4_error_at): New, invoked by...
5398 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5399 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5400 @fatal_at(...@) directives.
5401 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5402 qualifiers in b4_used_percent_code_qualifiers and to use
5403 b4_complain_at.
5404 * src/location.c, src/location.h (boundary_set_from_string): New global
5405 function.
5406 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5407 function.
5408 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5409 to b4_used_percent_code_qualifiers.
5410 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5411 function.
5412 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5413 (lineno): Rename to...
5414 (out_lineno): ... this so I don't misunderstand it again.
5415 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5416 here; these newlines are in the input but not the output file.
5417 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5418 (at_directive_perform): ... this new static function, and add handling
5419 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5420 directives.
5421 * tests/input.at (Reject bad %code qualifiers): Update test output with
5422 locations and extend.
5423
5424 * tests/output.at (Output file name: [, Output file name: ]): Remove
5425 bogus comment about these tests failing.
5426
5427 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5428
5429 Clean up b4_check_percent_code_qualifiers a little.
5430 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5431 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5432 documentation and add examples.
5433 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5434 qualifiers here.
5435
5436 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5437
5438 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5439 unreliable -- especially when they're hidden inside another macro.
5440 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5441 data/c.m4: Remove m4_divert(-1).
5442 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5443 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5444 m4_divert_push(0) and m4_divert_pop(0).
5445 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5446 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5447 pushed and popped by m4sugar, should be first on the stack.
5448
5449 Provide warn, complain, and fatal function callbacks to the skeletons.
5450 This provides more flexibility than m4_fatal, improves the error
5451 message format, and captures messages for translation. Discussed
5452 starting at
5453 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5454 * data/bison.m4 (b4_error): New, invoked by...
5455 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5456 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5457 directives. Because these M4 macros might be called when the current
5458 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5459 the previous removal of uses of m4_divert, which caused trouble.
5460 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5461 m4_fatal to report unrecognized %code qualifiers.
5462 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5463 push parser requests.
5464 * data/glr.c: Use b4_complain instead of m4_fatal to report
5465 non-deterministic push parser requests.
5466 Update @output usage to @output(...@) form.
5467 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5468 report missing %defines. Update @output usage to @output(...@) form.
5469 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5470 @output(...@) form.
5471 * src/main.c (main): Invoke skel_scanner_free.
5472 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5473 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5474 obstack_for_string from flex-scanner.h.
5475 (YY_DECL): Use to declare skel_lex static.
5476 (decode_at_digraphs): Remove; now handled in the new
5477 SC_AT_DIRECTIVE_ARG start condition.
5478 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5479 functions.
5480 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5481 at_directive_argv): New static globals.
5482 (INITIAL): Use fail_for_invalid_at.
5483 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5484 recognize the start of a generalized `@directive(...@)' form and
5485 start...
5486 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5487 directive args (using the new obstack_for_string), to decode the
5488 contained @ diagraphs, and to perform the directive. It recognizes
5489 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5490 @output(...@).
5491 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5492 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5493 `@,'.
5494 (scan_skel): Initialize obstack_for_string on the first call.
5495 (skel_scanner_free): New function to free obstack_for_string.
5496 * tests/input.at (Reject bad %code qualifiers): Update test output.
5497
5498 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5499
5500 Consolidate the 4 prologue alternative directives (%code, %requires,
5501 %provides, and %code-top) into a single %code directive with an
5502 optional qualifier field. Discussed at
5503 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5504 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5505 alternatives.
5506 * doc/bison.texinfo (Prologue Alternatives): Update.
5507 (Decl Summary): Update to %code "requires" and %code "provides".
5508 (Calc++ Parser): Update to %code "requires".
5509 (Table of Symbols): Remove entries for %requires, %provides, and
5510 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5511 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5512 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5513 which are skeleton-specific.
5514 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5515 declare what %code qualifiers it supports and to complain if any other
5516 qualifiers were used in the grammar.
5517 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5518 and b4_user_code([b4_percent_code_provides]) in place of
5519 b4_user_requires and b4_user_provides.
5520 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5521 Add b4_user_code([b4_percent_code_top]) and
5522 b4_user_code([b4_percent_code]).
5523 Invoke b4_check_percent_code_qualifiers.
5524 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5525 PERCENT_REQUIRES): Remove.
5526 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5527 %requires. Rewrite the %code RHS as the unqualified form defining the
5528 muscle b4_percent_code. Add another RHS for the qualified %code form,
5529 which defines muscles of the form b4_percent_code_QUALIFIER and the
5530 b4_used_percent_code_qualifiers muscle.
5531 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5532 PERCENT_REQUIRES): Remove.
5533 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5534 %code "requires" and %code "provides".
5535 * tests/input.at (Reject bad %code qualifiers): New.
5536
5537 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5538
5539 Use the new code_props interface for destructors and printers.
5540 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5541 printer_location members, and change the type of the destructor and
5542 printer members to code_props.
5543 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5544 symbol_printer_get, semantic_type_destructor_set,
5545 semantic_type_printer_set, default_tagged_destructor_set,
5546 default_tagless_destructor_set, default_tagged_printer_set,
5547 default_tagless_printer_set): Use code_props in arguments and return
5548 types in place of char const * and location.
5549 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5550 since the locations are now contained in the return of
5551 symbol_destructor_get and symbol_printer_get.
5552 * src/output.c (symbol_destructors_output, symbol_printers_output):
5553 Replace with...
5554 (symbol_code_props_output): ... this to eliminate duplicate code.
5555 (output_skeleton): Update to use symbol_code_props_output.
5556 * src/reader.c (symbol_should_be_used): Update use of
5557 symbol_destructor_get.
5558 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5559 Update uses of the various _destructor_set and _printer_set functions.
5560 * src/symtab.c: (default_tagged_destructor_location,
5561 default_tagless_destructor_location, default_tagged_printer_location,
5562 default_tagless_printer_location): Remove since we...
5563 (default_tagged_destructor, default_tagless_destructor,
5564 default_tagged_printer, default_tagless_printer): ... change the type
5565 of these to code_props.
5566 (symbol_new, semantic_type_new, symbol_destructor_set,
5567 semantic_type_destructor_set, symbol_destructor_get,
5568 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5569 symbol_check_alias_consistency, default_tagged_destructor_set,
5570 default_tagless_destructor_set, default_tagged_printer_set,
5571 default_tagless_printer_set): Update.
5572 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5573 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5574 code_props members.
5575 (symbol_print): Use SYMBOL_CODE_PRINT.
5576
5577 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5578
5579 Use the new code_props interface for rule actions.
5580 * src/symlist.h (symbol_list): Replace action, action_location, and
5581 used members with a code_props action_props member.
5582 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5583 grammar_midrule_action, grammar_current_rule_merge_set,
5584 grammar_current_rule_symbol_append, packgram): Update.
5585 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5586 * src/scan-code.l (handle_action_dollar): Update.
5587 (translate_rule_action): Remove, no longer used.
5588 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5589
5590 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5591
5592 Use the new code_props interface in parse-gram.y.
5593 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5594 Update all uses of translate_* functions to use the new code_props
5595 interface and to use gram_scanner_last_string_free and
5596 code_scanner_last_string_free where possible.
5597 (grammar_declaration): symbol_list_destructor_set and
5598 symbol_list_printer_set now perform the translation, so don't do it
5599 here. Use gram_scanner_last_string_free where possible.
5600 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5601 translate_code): Remove, no longer used.
5602 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5603 symbol_list_printer_set): Perform code translation here rather than
5604 depending on the caller to do so.
5605
5606 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5607 * src/scan-gram.h (gram_last_string): Remove declaration.
5608 * src/scan-gram.l (last_string): Declare it static.
5609
5610 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5611
5612 Encapsulate code properties and related functionality for the various
5613 destructors, printers, and actions into a code_props structure and
5614 interface. This patch merely implements code_props in scan-code.h and
5615 scan-code.l. Future patches will rewrite other modules to use it.
5616 Discussed starting at
5617 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5618 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5619 consistently initialize const structs that have an empty location
5620 field.
5621 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5622 to ensure consistency.
5623 * src/scan-code.h (code_props): New structure.
5624 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5625 function, macro, and const global variable for initializing a
5626 code_props with no code.
5627 (code_props_plain_init, code_props_symbol_action_init,
5628 code_props_rule_action_init, code_props_translate_code): The rest of
5629 the new code_props functional interface. Among other things, the init
5630 functions set the code_props kind field so that
5631 code_props_translate_code will know whether to behave like
5632 translate_symbol_action, translate_rule_action, or translate_code.
5633 These old translate functions must remain until all other modules are
5634 updated to use the new code_props interface.
5635 (code_scanner_last_string_free): New function similar to
5636 gram_scanner_last_string_free.
5637 (code_scanner_free): Add documentation.
5638 * src/scan-code.l: Implement the new interface.
5639 (code_lex): Make it static, add a code_props* argument, and remove the
5640 rule argument.
5641 (last_string): New static global similar to the one in scan-gram.l.
5642 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5643 instead of rule.
5644 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5645 code_props since Bison may one day use this information for destructors
5646 and printers.
5647 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5648 (handle_action_dollar): Use symbol_list_n_get and set used flag
5649 directly since symbol_list_n_used_set is removed.
5650 (translate_action): Add a code_props* argument and remove the rule,
5651 action, and location arguments. Pass the code_props* on to code_lex.
5652 (translate_rule_action, translate_symbol_action, translate_code):
5653 Rewrite as wrappers around the new code_props interface.
5654 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5655 it would eventually need to break the encapsulation of code_props.
5656
5657 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5658
5659 * etc/.cvsignore: New.
5660
5661 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5662
5663 Add maintainer-push-check to run maintainer-check using push parsing in
5664 place of pull parsing where available.
5665 * Makefile.am (maintainer-push-check): New.
5666 * data/bison.m4 (b4_use_push_for_pull_if): New.
5667 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5668 appropriately based on their existing values.
5669 (yypush_parse): Don't print push-parser-specific diagnostics if push
5670 parsing is being used in place of pull parsing.
5671 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5672 push.c.
5673 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5674 variable, and insert b4_use_push_for_pull_flag into muscles.
5675 * tests/Makefile.am (maintainer-push-check): New.
5676
5677 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5678
5679 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5680 (whether successful or failed) so that yypush_parse can be invoked
5681 again to start a new parse using the same yypstate.
5682 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5683 check multiple yypull_parse invocations on the same yypstate. For pull
5684 mode, extend to check multiple yyparse invocations.
5685 (Exploding the Stack Size with Alloca): Extend to try with
5686 %push-pull-parser.
5687 (Exploding the Stack Size with Malloc): Likewise.
5688
5689 * tests/calc.at (Simple LALR Calculator): Don't specify
5690 %skeleton "push.c" since %push-pull-parser implies that now.
5691 * tests/headers.at (export YYLTYPE): Don't check for the push
5692 declarations. Otherwise, this test case can't be used to see if push
5693 mode can truly emulate pull mode.
5694 * tests/input.at (Torturing the Scanner): Likewise.
5695 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5696 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5697 AT_YACC_IF, which now includes the case of push mode since %skeleton
5698 need not be used for push mode. This will be more intuitive once
5699 push.c is renamed to yacc.c.
5700
5701 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5702
5703 For push mode, convert yyparse from a macro to a function, invoke yylex
5704 instead of passing a yylexp argument to yypull_parse, and don't
5705 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5706 Discussed starting at
5707 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5708 * data/bison.m4 (b4_pull_if): New.
5709 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5710 * data/push.c: Improve M4 quoting a little.
5711 (b4_generate_macro_args, b4_parenthesize): Remove.
5712 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5713 any time a pull parser is requested.
5714 Don't #define this as a wrapper around yypull_parse. Instead, when
5715 both push and pull are requested, make it a function that does that
5716 same thing.
5717 (yypull_parse): If there's a b4_prefix, #define this to
5718 b4_prefix[pull_parse] when both push and pull are requested.
5719 Don't define this as a function unless both push and pull are
5720 requested.
5721 Remove the yylexp argument and hard-code yylex invocation instead.
5722 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5723 %push-parser.
5724 * src/getargs.c (pull_parser): New global initialized to true.
5725 * getargs.h (pull_parser): extern it.
5726 * src/output.c (prepare): Insert pull_flag muscle.
5727 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5728 (prologue_declaration): Set both push_parser and pull_parser = true for
5729 %push-pull-parser. Set push_parser = true and pull_parser = false for
5730 %push-parser.
5731 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5732 %push-parser since there's no backward-compatibility concern here.
5733 Scan %push-pull-parser.
5734 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5735 instead of %push-parser.
5736 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5737 prototype it in the module that calls yyparse.
5738 * tests/input.at (Torturing the Scanner): Likewise.
5739 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5740
5741 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5742
5743 Update etc/bench.pl. Optimize push mode a little (the yyn change
5744 deserves most of the credit).
5745 * Makefile.am (SUBDIRS): Add etc subdirectory.
5746 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5747 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5748 yytoken, yyval, and yyloc declarations to...
5749 (yyparse or yypush_parse): ... here to improve performance. For
5750 yypush_parse invocations after the first, be sure to assign yyn its old
5751 value again.
5752 (yypstate_new): Don't bother initializing the yyresult field since the
5753 initial value isn't used.
5754 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5755 remove the #define that, in push mode, set it to yyps->NAME.
5756 * etc/Makefile.am: New.
5757 * etc/bench.pl: Remove and build it instead from...
5758 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5759 "tests/bison" from the build directory by default rather than just
5760 invoking "bison" from $PATH.
5761 (calc_grammar): Update push parser code: don't declare yylval globally,
5762 don't define yyparse_wrapper, and don't #define yyparse.
5763 (bench_grammar): Update to check all working combinations of yacc.c,
5764 push.c, impure, pure, pull, and push.
5765
5766 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5767
5768 For push mode, add pull wrappers around yypush_parse.
5769 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5770 (yypull_parse): New function wrapping yypush_parse.
5771 (yyparse): New #define wrapping yypull_parse.
5772 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5773 is declared.
5774 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5775 prototype yylex in the module that calls yyparse, and don't prototype
5776 yyparse there. Otherwise, the yyparse expansion won't compile.
5777 * tests/input.at (Torturing the Scanner): Likewise.
5778
5779 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5780
5781 Enable push parsers to operate in impure mode. Thus, %push-parser no
5782 longer implies %pure-parser. The point of this change is to move
5783 towards being able to test the push parser code by running the entire
5784 test suite as if %push-parser had been declared.
5785 * data/push.c (yypush_parse): For impure mode, remove the
5786 yypushed_char, yypushed_val, and yypushed_loc arguments.
5787 Instead, declare these as local variables initialized to the global
5788 yychar, yylval, and yylloc.
5789 For the first yypush_parse invocation only, restore the initial values
5790 of these global variables when it's time to read a token since they
5791 have been overwritten.
5792 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5793 %push-parser.
5794 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5795 %pure-parser along with %push-parser since this test case was designed
5796 for pure push parsers.
5797 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5798 (AT_YACC_OR_PUSH_IF): New.
5799 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5800 add a note that it's still wrong for some cases (as it has been for a
5801 while).
5802 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5803 %push-parser no longer implies %pure-parser.
5804
5805 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5806
5807 Remove some unnecessary differences between the pull parser code and
5808 the push parser code. This patch enables yynerrs in push mode.
5809 * data/push.c: Reformat M4 a little.
5810 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5811 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5812 because push mode is on. Instead, if pure mode is on, move yynerrs
5813 to...
5814 (b4_declare_parser_state_variables): ... here.
5815 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5816 to yyps->NAME so it can be used in yypush_parse.
5817 (yypush_parse): Don't omit uses of yynerrs in push mode.
5818
5819 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5820
5821 Fix bug such that the first pushed token's value and location are
5822 sometimes overwritten (sometimes by %initial-action) before being used.
5823 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5824 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5825 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5826 more closely mimic the pull parser logic.
5827 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5828 time to read a token, which is after any initialization of yylval and
5829 yylloc.
5830 (gottoken): Rename label to...
5831 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5832 user namespace.
5833
5834 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5835
5836 Rearrange initialization of the parser state variables so that the
5837 skeleton doesn't have to have a copy for pull mode and another for push
5838 mode. This patch also fixes at least a bug such that yylloc was not
5839 initialized (with b4_location_initial_line and
5840 b4_location_initial_column) upon calling yypush_parse. However, that
5841 initialization now overwrites the first token's location;
5842 %initial-action assigning @$ already did the same thing, and both bugs
5843 will be fixed in a later patch.
5844 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5845 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5846 yyss, yyvs, yyls, and yystacksize.
5847 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5848 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5849 yylsp.
5850 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5851 yyps->NAME so it can be used in yypush_parse.
5852 (yyparse or yypush_parse): For yypush_parse, don't print the
5853 "Starting parse" diagnostic for invocations after the first.
5854 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5855 yypush_parse, only do it for the first invocation.
5856 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5857 initialization to occur in yypush_parse but only on the first
5858 invocation.
5859
5860 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5861
5862 * data/push.c: Add CPP guards around push parser declarations in both
5863 the header and the code file.
5864 In the code file, move the push parser declarations to the same place
5865 they appear in the header file.
5866 Clean up the M4 some, especially the inconsistent underquoting in
5867 some b4_c_function_def and b4_c_function_decl uses.
5868
5869 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5870
5871 Encapsulate the push parser state variables into an M4 macro so the
5872 push skeleton doesn't have to list them again for pull mode's yyparse.
5873 For push mode, remove yypush_parse's local equivalents of these
5874 variables to eliminate unnecessary copying between the two sets at
5875 run-time. This patch also fixes at least a bug related to multiple
5876 %initial-action invocations in push mode.
5877 * data/push.c (b4_declare_parser_variables): Rename to...
5878 (b4_declare_scanner_communication_variables): ... this for clarity and
5879 update both uses.
5880 (b4_declare_yyparse_variables): Remove and move its contents to the one
5881 spot where it was invoked.
5882 (b4_declare_parser_state_variables): New macro containing the parser
5883 state variables required by push mode.
5884 (struct yypstate): Replace all fields but yynew with
5885 b4_declare_parser_state_variables.
5886 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5887 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5888 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5889 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5890 parser state variable declarations with
5891 b4_declare_parser_state_variables.
5892 Don't initialize parser state variables when calling yypush_parse since
5893 yypstate_new already does that.
5894 Invoke the user's initial action only upon the first yypush_parse
5895 invocation.
5896 Remove all code that copies between the local parser state variables
5897 and the yypstate.
5898
5899 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5900
5901 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5902 prevent a name collision in a future patch where these names will
5903 sometimes be #define'd.
5904 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5905 since it no longer has the same name as the existing argument.
5906 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5907
5908 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5909 and Joel E. Denny <jdenny@ces.clemson.edu>
5910
5911 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5912 that the argument is case-insensitive, and there's no `=' here.
5913 For the %skeleton entry, mention that %language is better.
5914 (Bison Options): Likewise for --language and --skeleton. Move the
5915 --skeleton entry so that the `Tuning the parser' section is sorted
5916 alphabetically on long options.
5917 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5918 %language directive in detail here; cross-reference the %language
5919 documentation instead.
5920 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5921 `%require "2.3b"' so that the example is always up-to-date.
5922 (Table of Symbols): Add entries for %language and %skeleton.
5923 * examples/extexi (normalize): Instead of replacing every %require
5924 argument with the current Bison version, just substitute for
5925 `@value{VERSION}'. This guarantees that we're testing what actually
5926 appears in the documentation.
5927 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5928 rather than `@VERSION@'.
5929
5930 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5931
5932 * NEWS: Reword the %language news a bit, and put it earlier.
5933
5934 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5935 Rewrite to simplify the logic.
5936 (language_argmatch): Likewise.
5937 (program_name): We now own this var.
5938 * src/getargs.h (struct bison_language): Use char[] rather than
5939 const char *.
5940
5941 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5942 Java is supported.
5943 * src/complain.c (program_name): Remove decl; no longer needed.
5944 * src/main.c (program_name): Remove; now belongs to getargs.
5945
5946 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5947
5948 * NEWS: Document %language.
5949
5950 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5951
5952 * data/c-skel.m4, data/c++-skel.m4: New files.
5953 * data/glr.c: Complain on push parsers.
5954
5955 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5956 over %skeleton.
5957 (Decl Summary): Document %language and %skeleton.
5958 (Command line): Document -L.
5959
5960 * examples/extexi: Rewrite %require directive.
5961 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5962
5963 * src/files.c (compute_exts_from_gc): Look in language structure
5964 for .y extension.
5965 (compute_file_name_parts): Check whether .tab should be added.
5966 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5967 (language, skeleton_arg, language_argmatch): New.
5968 (long_options): Add --language.
5969 (getargs): Use skeleton_arg, add -L/--language.
5970 * src/getargs.h: Include location.h.
5971 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5972 * src/output.c (prepare): Pick default skeleton from struct language.
5973 Don't dispatch C skeletons here.
5974 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5975 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5976 * src/scan-gram.l ("%language"): New rule.
5977
5978 * tests/calc.at: Test %skeleton and %language.
5979 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5980 (AT_GLR_IF): Look for %skeleton "glr.cc".
5981 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5982 (AT_YACC_IF): Reject %language.
5983
5984 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5985
5986 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5987 since it wasn't used; only the typedef name 'semantic_type' is needed.
5988 Also, omit trailing white space.
5989
5990 * bootstrap: Sync from coreutils.
5991 (gnulib_extra_files): Add build-aux/announce.gen.
5992 (slurp): Adjust .gitignore files like .cvsignore files.
5993 * build-aux/announce-gen: Remove from CVS, since bootstrap
5994 now creates this.
5995
5996 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5997
5998 Make %push-parser imply %pure-parser. This fixes several bugs; see
5999 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6000 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6001 pure_parser = true.
6002 * data/push.c: Don't bother testing b4_push_if when deciding whether
6003 to expand b4_declare_parser_variables globally.
6004 (yypush_parse): Likewise in here.
6005
6006 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6007 (yy_reduce_print): Reformat M4 for readability.
6008
6009 2006-12-15 Bob Rossi <bob@brasko.net>
6010 and Joel Denny <jdenny@ces.clemson.edu>
6011
6012 * data/push.c (yypstate): Add typedef, and update all uses of
6013 struct yypstate to just yypstate.
6014 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6015
6016 2006-12-14 Bob Rossi <bob@brasko.net>
6017
6018 * data/push.c (yypush_parse): Declare prototype regardless of
6019 %locations option.
6020
6021 2006-12-14 Bob Rossi <bob@brasko.net>
6022
6023 * data/push.c (yyparse): Remove the prototype and the #define when in
6024 push-parser mode.
6025
6026 2006-12-13 Bob Rossi <bob@brasko.net>
6027
6028 * data/push.c (yypstate_init): Rename to...
6029 (yypstate_new): ... this and use b4_c_function_def.
6030 (yypstate_delete): New.
6031 (yypush_parse): Change parameters yynval and yynlloc to be const.
6032 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6033 yypstate_delete functions.
6034
6035 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6036
6037 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6038 strange test case titles. Reported by Bob Rossi.
6039
6040 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6041
6042 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6043 of potential ambiguities in GLR grammers.
6044
6045 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6046
6047 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6048 `bison ', use m4_index instead of m4_substr since chopping up a string
6049 containing M4-special characters causes problems here.
6050
6051 Fix a couple of bugs related to special characters in user-specified
6052 file names, and make it easier for skeletons to compute output file
6053 names with the same file name prefix as Bison-computed output file
6054 names.
6055 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6056 b4_parser_file_name and b4_spec_defines_file instead of
6057 @output_parser_name@ and @output_header_name@, which are now redundant.
6058 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6059 b4_parser_file_name, b4_spec_defines_file, and the new
6060 @basename(FILENAME@) instead of @output_parser_name@ and
6061 @output_header_name@, which inappropriately escaped the file names as
6062 C string literals.
6063 * src/files.c (all_but_ext): Remove static qualifier.
6064 (compute_output_file_names): Move `free (all_but_ext)' to...
6065 (output_file_names_free): ... here since all_but_ext is needed later.
6066 * src/files.h (all_but_ext): Extern.
6067 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6068 exactly what MUSCLE_INSERT_STRING used to do.
6069 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6070 characters are escaped properly.
6071 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6072 all_but_ext.
6073 For pkgdatadir muscle, maintain previous functionality by using
6074 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6075 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6076 digraphs would never be expanded. Hopefully no one has M4-special
6077 characters in his Bison installation path.
6078 * src/scan-skel.l: Don't parse @output_header_name@ and
6079 @output_parser_name@ anymore since they're now redundant.
6080 In @output, use decode_at_digraphs.
6081 Parse a new @basename command that invokes last_component.
6082 (decode_at_digraphs): New.
6083 (BASE_QPUTS): Remove unused.
6084 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6085 (Output file name): New tests.
6086
6087 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6088
6089 Warn about output files that are generated by the skeletons and that
6090 conflict with other output files.
6091 * data/glr.c: Don't generate the header file here when glr.cc does.
6092 * src/files.c (file_names, file_names_count): New static globals.
6093 (compute_output_file_names): Invoke output_file_name_check for files
6094 not generated by the skeletons and remove existing checks.
6095 (output_file_name_check): New function that warns about conflicting
6096 output file names.
6097 (output_file_names_free): Free file_names.
6098 * src/files.h (output_file_name_check): Declare.
6099 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6100 the skeletons.
6101 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6102 (Conflicting output files): New tests.
6103
6104 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6105
6106 * doc/bison.texinfo: Fix a couple of typos.
6107
6108 2006-12-08 Bob Rossi <bob@brasko.net>
6109
6110 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6111 Rename to...
6112 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6113 update all uses.
6114 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6115 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6116 local pv.
6117 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6118 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6119
6120 2006-12-07 Bob Rossi <bob@brasko.net>
6121 and Joel Denny <jdenny@ces.clemson.edu>
6122
6123 * data/push.c (yypvarsinit): Change return type from void* to struct
6124 yypvars*. No longer cast to void* on return.
6125 (struct yypvars): Remove yylen since it need not be remembered between
6126 yypushparse invocations.
6127 (yypushparse): Don't copy between yylen and pv->yylen.
6128
6129 2006-12-05 Bob Rossi <bob@brasko.net>
6130
6131 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6132 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6133 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6134 (struct yypvars): Remove b4_declare_parser_variables.
6135 (yypvarsinit): Remove init code for removed variables.
6136 (global scope): Do not declare b4_declare_parser_variables if
6137 push or pure mode.
6138 (yypushparse): Add b4_declare_parser_variables.
6139 Init new local variables, and remove init code for removed
6140 yypvars variables.
6141 (yyparse): Delete.
6142 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6143 and yyparse for other modes.
6144 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6145 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6146 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6147 (AT_PURE_LEX_IF): True if pure or push parser.
6148
6149 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6150
6151 Document Yacc prologue alternatives and default %destructor's and
6152 %printer's as experimental. Don't mention Java yet. Discussed at
6153 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6154 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6155 (2.3a): Annotate this entry to say the old forms of these features were
6156 also experimental.
6157 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6158 Table of Symbols): Say they're experimental. Comment out any mention
6159 of Java (we'll want this back eventually).
6160
6161 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6162
6163 Support a file name argument to %defines. Deprecate `=' in
6164 %file-prefix, %name-prefix, and %output. Discussed at
6165 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6166 * NEWS (2.3a+): Mention.
6167 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6168 form of %defines, and remove `=' from entries for %file-prefix,
6169 %name-prefix, and %output.
6170 * src/parse-gram.y (prologue_declaration): Implement.
6171 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6172 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6173 all but one occurrence of %name-prefix.
6174 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6175 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6176 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6177 occurrence of each of %file-prefix and %output. Add check for %defines
6178 with argument.
6179 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6180 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6181 Remove the `=' from %output.
6182
6183 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6184
6185 Don't escape $ in test case titles since Autoconf 2.61 now does that
6186 correctly.
6187 * tests/actions.at (Default %printer and %destructor are not for error
6188 or $undefined): Here.
6189 (Default %printer and %destructor are not for $accept): Here.
6190 * tests/input.at (Invalid $n and @n): Here.
6191
6192 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6193
6194 Rename <!> to <>. Discussed starting at
6195 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6196 * NEWS (2.3a+): Update.
6197 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6198 Update.
6199 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6200 * src/scan-gram.l (INITIAL): Implement.
6201 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6202 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6203 comment.
6204 * tests/actions.at (Default tagless %printer and %destructor,
6205 Default tagged and per-type %printer and %destructor,
6206 Default %printer and %destructor are not for error or $undefined,
6207 Default %printer and %destructor are not for $accept,
6208 Default %printer and %destructor for mid-rule values): Update.
6209 * tests/input.at (Default %printer and %destructor redeclared,
6210 Unused values with default %destructor): Update.
6211
6212 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6213
6214 Don't let %prec take a nonterminal.
6215 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6216 token.
6217 * tests/input.at (%prec takes a token): New test checking that %prec
6218 won't take a nonterminal.
6219
6220 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6221
6222 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6223 it was double-quoted.
6224 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6225 grammar is maintained with Bison's highest standards.
6226 * src/getargs.c: Fix some typos in Doxygen comments.
6227
6228 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6229
6230 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6231 later. Reported by Paul Eggert in
6232 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6233 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6234 * src/scan-code.l (translate_action): Don't bother invoking
6235 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6236 (code_scanner_free): Instead of invoking
6237 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6238 which frees more.
6239 * src/scan-gram.l (gram_scanner_free): Likewise.
6240 * src/scan-skel.l (scan_skel): Likewise.
6241
6242 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6243
6244 * src/files.c (tr): Change return type to void.
6245 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6246 has been called previously for the same key.
6247 (muscle_find): Return storage instead of value so that
6248 --enable-gcc-warnings doesn't produce warnings that the return discards
6249 const. aver that the value and storage are the same since storage
6250 could potentially be NULL when value is not.
6251 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6252 same as 0.
6253
6254 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6255
6256 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6257 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6258 us a slightly cleaner distribution, and also works.
6259 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6260 gnulib changes.
6261
6262 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6263 and Paul Eggert <eggert@cs.ucla.edu>
6264
6265 Don't let Bison leak memory except when it complains.
6266 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6267 (spec_defines_file, dir_prefix): Now char *, not const char *,
6268 since they are freed.
6269 * src/files.c: Likewise.
6270 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6271 Likewise.
6272 (tr): Now operates in-place. All uses changed.
6273 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6274 values.
6275 (compute_file_name_parts, compute_output_file_names): Don't store
6276 read-only data in variables that will be freed.
6277 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6278 src_extension, and header_extension.
6279 (output_file_names_free): New public function to free
6280 spec_verbose_file, spec_graph_file, spec_defines_file,
6281 parser_file_name, and dir_prefix.
6282 * src/getargs.c (getargs): Don't store read-only data in variables that
6283 will be freed.
6284 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6285 (which previously existed but was unused), and quotearg_free.
6286 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6287 * src/muscle_tab.c: Likewise.
6288 (muscle_entry): Make the value char const *,
6289 and add a new storage member that is char * and can be freed.
6290 (muscle_entry_free): New private function.
6291 (muscle_init): Use it instead of free.
6292 (muscle_insert, muscle_grow): Update and use new storage member.
6293 (muscle_code_grow): Free the string passed to muscle_grow
6294 since it's not needed anymore.
6295 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6296 add a new `char *code' member.
6297 ("{...}"): Declare semantic type as code.
6298 * src/scan-code.h (translate_rule_action):
6299 (translate_symbol_action, translate_code, translate_action): Return
6300 `char const *' rather than `char *' since external code should not free
6301 these strings.
6302 * src/scan-code.l: Likewise.
6303 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6304 which is "{...}" in the parser.
6305 * tests/Makefile.am (maintainer-check-valgrind): Set
6306 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6307 Valgrind.
6308 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6309 complain.
6310 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6311 expecting a non-zero exit status sets --leak-check=summary and
6312 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6313 this case, and we don't want to hear about it.
6314
6315 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6316
6317 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6318 instead of from the template, to simplify configuration a bit.
6319 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6320 and m4/wint_t.m4, as they are needed with the latest gnulib.
6321
6322 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6323
6324 Disable unset/unused mid-rule value warnings by default, and recognize
6325 --warnings=midrule-values to enable them. Discussed starting at
6326 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6327 * NEWS (2.3a+): Mention.
6328 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6329 warnings): Add entry for midrule-values subargument.
6330 * src/reader.c (symbol_should_be_used): Don't return true just because
6331 the value is a set/used mid-rule value unless
6332 --warnings=midrule-values was specified.
6333 * tests/input.at (Unused values, Unused values before symbol
6334 declarations): Run tests with and without --warnings=midrule-values.
6335
6336 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6337 than LIST_FREE directly.
6338
6339 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6340
6341 Finish implementing --warnings=error, which should not be implied by
6342 --warnings=all (or by its synonyms -W and --warnings without
6343 subarguments).
6344 * src/complain.c (set_warning_issued): New function to report that
6345 warnings are being treated as errors and to record an error if so.
6346 Invoke...
6347 (warn_at, warn): ... here.
6348 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6349 "error - warnings are errors" does not appear above "all - all of the
6350 above".
6351 (getargs): For -W and --warnings without subarguments, don't let
6352 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6353 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6354
6355 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6356
6357 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6358 empty subargument list. For example: `bison --warnings= parser.y'.
6359
6360 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6361
6362 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6363 the parser header file so that gcc doesn't warn.
6364
6365 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6366
6367 Split the default %destructor/%printer into two kinds: <*> and <!>.
6368 Discussed starting at
6369 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6370 * NEWS (2.3a+): Mention.
6371 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6372 previous change today related to mid-rules.
6373 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6374 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6375 (TYPE_TAG_ANY): Add as <*>.
6376 (TYPE_TAG_NONE): Add as <!>.
6377 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6378 for <*> and <!>.
6379 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6380 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6381 * src/symlist.c (symbol_list_default_new): Split into tagged and
6382 tagless versions.
6383 (symbol_list_destructor_set, symbol_list_printer_set): Split
6384 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6385 SYMLIST_DEFAULT_TAGLESS.
6386 * src/symlist.h: Update symbol_list_default*_new prototypes.
6387 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6388 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6389 * src/symtab.c (default_destructor, default_destructor_location,
6390 default_printer, default_printer_location): Split each into tagged and
6391 tagless versions.
6392 (symbol_destructor_get, symbol_destructor_location_get,
6393 symbol_printer_get, symbol_printer_location_get): Implement tagged
6394 default and tagless default cases.
6395 (default_destructor_set, default_printer_set): Split each into tagged
6396 and tagless versions.
6397 * src/symtab.h: Update prototypes.
6398 * tests/actions.at (Default %printer and %destructor): Rename to...
6399 (Default tagless %printer and %destructor): ... this, and extend.
6400 (Per-type %printer and %destructor): Rename to...
6401 (Default tagged and per-type %printer and %destructor): ... this, and
6402 extend.
6403 (Default %printer and %destructor for user-defined end token): Extend.
6404 (Default %printer and %destructor are not for error or $undefined):
6405 Update.
6406 (Default %printer and %destructor are not for $accept): Update.
6407 (Default %printer and %destructor for mid-rule values): Extend.
6408 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6409 (Unused values with default %destructor): Extend.
6410
6411 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6412
6413 Don't apply the default %destructor/%printer to an unreferenced midrule
6414 value. Mentioned at
6415 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6416 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6417 like $@n instead of just @n so that the default %destructor/%printer
6418 logic doesn't see them as user-defined symbols.
6419 (symbol_is_dummy): Check for both forms of the name.
6420 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6421 name for which the midrule value is referenced in any action.
6422 * tests/actions.at (Default %printer and %destructor for mid-rule
6423 values): New test.
6424 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6425 for change to dummy symbol names.
6426
6427 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6428
6429 Warn about unset midrule $$ if the corresponding $n is used.
6430 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6431 $n usage.
6432 (packgram): Before invoking grammar_rule_check on any rule, make sure
6433 all actions have already been scanned in order to set `used' flags.
6434 Otherwise, checking that a midrule's $$ is set will not always work
6435 properly because the midrule check must forward-reference the midrule's
6436 parent rule.
6437 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6438 warning.
6439
6440 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6441
6442 More improvements to the documentation of the prologue alternatives:
6443 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6444 Bison manual.
6445 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6446 some text to clarify the relative importance of the new directives and
6447 to show how these directives may be viewed as code labels.
6448
6449 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6450
6451 Similar to the recently removed %before-header, add %code-top as the
6452 alternative to the pre-prologue. Mentioned at
6453 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6454 Also, let the prologue alternatives appear in the grammar section.
6455 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6456 (prologue_declaration): Move the existing prologue alternatives to...
6457 (grammar_declaration): ... here and add %code-top.
6458 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6459
6460 Clean up and extend documentation for the prologue alternatives.
6461 * NEWS (2.3a+): Describe prologue alternatives.
6462 * doc/bison.texinfo (Prologue): Move discussion of prologue
6463 alternatives to...
6464 (Prologue Alternatives): ... this new section, and extend it to discuss
6465 all 4 directives in detail.
6466 (Table of Symbols): Clean up discussion of prologue alternatives and
6467 add %code-top.
6468
6469 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6470
6471 DJGPP specific issues.
6472
6473 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6474 config.bat accordingly.
6475 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6476 * djgpp/config.site: Likewise.
6477
6478 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6479
6480 Replace %*-header with %provides, %requires, %code. See discussion at
6481 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6482
6483 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6484 (b4_user_start_header): Remove.
6485 * data/glr.c: Use new macros instead of b4_*start_header
6486 and b4_*end_header.
6487 * data/glr.cc: Likewise.
6488 * data/lalr1.cc: Likewise.
6489 * data/push.c: Likewise.
6490 * data/yacc.c: Likewise.
6491
6492 * doc/bison.texinfo: Remove %before-header, rename
6493 %{start,end,after}-header to %requires, %provides, %code.
6494
6495 * src/parse-gram.y: Likewise (also rename token names accordingly).
6496 * src/scan-gram.l: Likewise.
6497 * tests/actions.at: Likewise.
6498
6499 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6500
6501 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6502 Problem reported by Joel E. Denny.
6503
6504 2006-10-14 Jim Meyering <jim@meyering.net>
6505
6506 (Sync from coreutils.)
6507 Work also when the working directory (with e.g. coreutils sources)
6508 is version controlled with git, rather than CVS.
6509 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6510 rather than CVS.
6511 In messages and comments, say e.g., "checked-out sources",
6512 rather than "CVS sources".
6513 (version_controlled_file): New function. Work for git as well as
6514 for CVS. Don't use grep's -q option.
6515 (slurp): Call it here, in place of CVS-specific code.
6516
6517 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6518
6519 Fix testsuite for ./configure --enable-gcc-warnings:
6520 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6521 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6522 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6523 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6524 * test/regression.at (Diagnostic that expects two alternatives):
6525 Likewise.
6526
6527 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6528
6529 * bootstrap.conf (gnulib_modules): Add config-h.
6530 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6531 worry about HAVE_CONFIG_H.
6532 * lib/abitset.c: Likewise.
6533 * lib/bitset.c: Likewise.
6534 * lib/bitset_stats.c: Likewise.
6535 * lib/bitsetv-print.c: Likewise.
6536 * lib/bitsetv.c: Likewise.
6537 * lib/ebitset.c: Likewise.
6538 * lib/get-errno.c: Likewise.
6539 * lib/lbitset.c: Likewise.
6540 * lib/subpipe.c: Likewise.
6541 * lib/timevar.c: Likewise.
6542 * lib/vbitset.c: Likewise.
6543 * lib/bitset.c: Include "bitset.h" first, to test interface.
6544 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6545 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6546 * lib/bitsetv.c: Include "bitsetv.h" first.
6547 * lib/get-errno.c: Include "get-errno.h" first.
6548 * m4/.cvsignore: Add config-h.m4.
6549 * tests/actions.at (Default %printer and %destructor for ...):
6550 Adjust expected line numbers in output to reflect removal of #if
6551 HAVE_CONFIG_H lines.
6552 * tests/glr-regression.at (Missed %merge type warnings when ...):
6553 Likewise.
6554 * tests/regression.at (Braced code in declaration in rules section):
6555 Likewise.
6556 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6557 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6558 Include <config.h> unconditionally.
6559
6560 * bootstrap: Sync from coreutils, as follows:
6561
6562 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6563
6564 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6565 variable was sometimes used without being initialized. This
6566 messed up the installation of the INSTALL file in some cases.
6567
6568 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6569
6570 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6571 --copy. Inspired by a suggestion from Bruno Haible.
6572
6573 2006-10-03 Jim Meyering <jim@meyering.net>
6574
6575 * bootstrap: Undo last change to this file, since now gnulib-tool
6576 sticks with the automake default in generating dependencies.
6577
6578 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6579
6580 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6581 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6582
6583 * doc/bison.1: Add copyright notice.
6584
6585 * data/glr.c: Don't include <stdarg.h>; not used.
6586
6587 * NEWS: The -g and --graph options now output graphs in Graphviz
6588 DOT format, not VCG format.
6589 * doc/bison.1: Likewise.
6590 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6591 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6592 of this change in
6593 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6594 * TODO: Remove Graphviz entry.
6595 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6596 remove vcg.c, vcg.h, vcg_defaults.h.
6597 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6598 * src/graphviz.c, src/graphviz.h: New files.
6599 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6600 * src/files.h: Make comment more generic.
6601 * src/main.c (main): Likewise.
6602 * src/print_graph.h: Likewise.
6603 * src/getargs.c (usage): Make usage description more generic.
6604 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6605 (static_graph, fgraph): Remove. All uses changed to pass
6606 arguments instead of sharing a static var.
6607 (print_core, print_actions, print_state, print_graph):
6608 Output graphviz format rather than VCG format.
6609 * tests/.cvsignore: Remove *.vcg; add *.dot.
6610 * tests/output.at: Expect *.dot files, not *.vcg files.
6611
6612 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6613 accommodates the 2006-10-08 change.
6614
6615 2006-10-11 Bob Rossi <bob@brasko.net>
6616
6617 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6618 (b4_yyssa, b4_yyerror_range): New macros.
6619 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6620 (yypvarsinit): Remove init of removed fields.
6621 (yypushparse): Remove use of removed fields; use new macros instead.
6622
6623 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6624
6625 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6626 in a push parser. Reindent slightly to match yacc.c better.
6627
6628 2006-10-11 Bob Rossi <bob@brasko.net>
6629
6630 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6631 yymsg_alloc fields.
6632 (yypvarsinit, yypushparse): Remove init of removed fields.
6633 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6634
6635 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6636
6637 * THANKS: Add Paolo Bonzini and Bob Rossi.
6638
6639 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6640
6641 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6642 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6643 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6644 b4_define_user_cde and uses): Remove.
6645 (b4_comment, b4_prefix, b4_sync_start): New.
6646 * data/bison.m4: New file, with most of the content removed from c.m4.
6647 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6648 * src/output.c (output_skeleton): Pass bison.m4.
6649 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6650 only if specified.
6651
6652 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6653
6654 Fix test failure reported by Tom Lane in
6655 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6656 and try to make such failures easier to catch in the future.
6657 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6658 that's now the caller's responsibility.
6659 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6660 Set yychar = YYEOF if it's negative.
6661 * tests/actions.at (yylex): Abort if asked to read past EOF.
6662 * tests/conflicts.at (yylex): Likewise.
6663 * tests/cxx-type.at (yylex): Likewise.
6664 * tests/glr-regression.at (yylex): Likewise.
6665 * tests/input.at (yylex): Likewise.
6666 * tests/regression.at (yylex): Likewise.
6667 * tests/torture.at (yylex): Likewise.
6668
6669 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6670
6671 Fix problems with translating English-language diagnostics.
6672 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6673 respect to bison-runtime pot generation. The YY_ stuff
6674 wasn't being captured.
6675 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6676 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6677 * runtime-po/POTFILES.in: Add data/push.c.
6678
6679 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6680
6681 Merge bootstrap changes from coreutils.
6682
6683 2006-09-28 Jim Meyering <jim@meyering.net>
6684
6685 Automatically generated dependencies are important even
6686 when all of the sources in a directory come from gnulib.
6687 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6688 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6689
6690 2006-09-23 Jim Meyering <jim@meyering.net>
6691
6692 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6693
6694 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6695
6696 * bootstrap: Add support for --force.
6697 (usage): New function. Describe usage less tersely.
6698 (CVS_only_file): New var.
6699
6700 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6701
6702 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6703 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6704 Adjust white space and comments to match GNU style better.
6705
6706 2006-09-20 Bob Rossi <bob@brasko.net>
6707
6708 * data/push.c (yyresult_get): Remove function.
6709 (YYPUSH_MORE): Add #define.
6710 (yypushparse): Modify return value.
6711
6712 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6713
6714 * stamp-h.in: Remove; no longer needed.
6715 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6716 Remove config.h, config.hin, intl (no longer created).
6717 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6718 stamp-h1.
6719
6720 Sync bootstrap from coreutils, as follows:
6721
6722 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6723
6724 * bootstrap (symlink_to_gnulib): New function.
6725 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6726 to copies-of-gnulib.
6727 (cp_mark_as_generated, slurp, gnulib_files):
6728 Avoid making a copy if it's the same as the old version.
6729 (gnulib_files): Add support for this variable (used by Bison).
6730
6731 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6732
6733 * src/getargs.c (usage): Rework to use conventions similar to
6734 coreutils, to make translation a bit easier and the code a bit
6735 smaller. Problem reported by Tim Van Holder.
6736
6737 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6738
6739 Use some of gnulib's new modules, taken from coreutils.
6740
6741 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6742 * bootstrap.conf: New file.
6743 (gnulib_modules): Add configmake, inttypes, unistd.
6744 (XGETTEXT_OPTIONS): Add complain, complain_at,
6745 fatal, fatal_at, warn, warn_at, unexpected_end.
6746 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6747 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6748 (gl_EARLY): Add.
6749 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6750 (gl_INIT): Add
6751 (GNULIB_AUTOCONF_SNIPPET): Remove.
6752 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6753 the pickiest.
6754 * lib/.cvsignore: Add inttypes_.h.
6755 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6756 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6757 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6758 no-longer-necessary initializations.
6759 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6760 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6761 use the unistd module.
6762 * src/system.h: Likewise.
6763 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6764 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6765 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6766 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6767 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6768 * src/system.h: Include inttypes.h unconditionally, now that we
6769 use the inttypes module. Don't bother to include stdint.h, since
6770 inttypes.h now does that for us.
6771 (LOCALEDIR): Remove, now that we use the configmake module.
6772 * src/getargs.c: Include configmake.h.
6773 * src/main.c: Likewise.
6774 * src/output.c: Likewise.
6775 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6776 not from $abs_top_builddir, since config.h moved.
6777
6778
6779 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6780 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6781
6782 * src/parse-gram.y (symbol_declaration): Don't put statements
6783 before declarations; it's not portable to C89.
6784 * src/scan-code.l (handle_action_at): Likewise.
6785
6786 * src/scan-code.l: Always initialize braces_level; the old code
6787 left it uninitialized and therefore had undefined behavior.
6788
6789 Don't attempt to redefine 'assert', since it runs afoul of
6790 systems where standard headers (mistakenly) include <assert.h>.
6791 Instead, define and use our own alternative, called 'aver'.
6792 * src/reader.c: Don't include assert.h, since we no longer
6793 use assert.
6794 * src/scan-code.l: Likewise.
6795 * src/system.h (assert): Remove, replacing with....
6796 (aver): New function, taking a bool arg. All uses changed.
6797 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6798 not merely an integer.
6799
6800 2006-09-15 Bob Rossi <bob@brasko.net>
6801
6802 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6803 * data/c.m4 (YYPUSH): New.
6804 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6805 * src/getargs.c (push_parser): New var.
6806 * src/getargs.h (push_parser): New declaration.
6807 * src/output.c (prepare): Add macro insertion of `push_flag'.
6808 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6809 (prologue_declaration): Parse %push-parser.
6810 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6811 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6812 list of removed lines from the traces observed.
6813 (AT_CHECK_CALC_LALR): Added push parser tests.
6814
6815 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6816
6817 * NEWS: Version 2.3a.
6818 * configure.ac (AC_INIT): Likewise.
6819
6820 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6821 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6822 due to header ordering dependencies. I don't know why the #define
6823 was there.
6824
6825 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6826 runtime cost when YYDEBUG is not defined, and so that some tests
6827 that used to fail now work. Problem and initial suggestion by
6828 Paolo Bonzini.
6829 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6830 * data/glr.cc (b4_parser_class_name):
6831 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6832 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6833 (yydebug_) [YYDEBUG]: New member.
6834 (yycdebug_): Now defined only if YYDEBUG.
6835 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6836 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6837 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6838 if YYYDEBUG.
6839 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6840 Define only if YYDEBUG.
6841 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6842 set_debug_level.
6843 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6844 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6845 AT_CHECK_CALC_GLR_CC that are working now.
6846
6847 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6848
6849 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6850 We don't need them in glr.cc, and glr.c defines them.
6851 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6852 assumes that defining it to anything is the same as defining
6853 it to 1. Problem reported by Paolo Bonzini.
6854
6855 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6856
6857 * data/c.m4 (b4_null, b4_case): Define.
6858 * src/output.c (prepare_symbols): Use b4_null.
6859 (user_actions_output): Use b4_case.
6860
6861 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6862
6863 * data/glr.c (b4_shared_declarations): Put start-header first,
6864 before any #includes that we generate, so that feature-test
6865 macros work. Problem reported by Michael Deutschmann in
6866 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6867 * data/lalr1.cc: Likewise.
6868 * doc/bison.texinfo (Prologue): Document that feature-test macros
6869 should be defined before any Bison declarations.
6870 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6871 that depend on location.hh after, not before, Bison decls, since
6872 we now include location.hh after the first user prologue.
6873
6874 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6875 Sander Brandenburg in
6876 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6877 Also, fix minor white space and comment issues.
6878 (Prologue): Mention that it's better to define feature-test macros
6879 before Bison declarations. Problem reported by Michael Deutschmann.
6880
6881 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6882 by Jim Meyering.
6883 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6884 This adjusts to recent gnulib changes.
6885
6886 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6887
6888 Finish implementation of per-type %destructor/%printer. Discussed
6889 starting at
6890 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6891 and
6892 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6893 * NEWS (2.3+): Add a description of this feature to the default
6894 %destructor/%printer description.
6895 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6896 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6897 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6898 list node contains a semantic type.
6899 * src/symtab.c, src/symtab.h: Extend with a table that associates
6900 semantic types with their %destructor's and %printer's.
6901 (semantic_type_from_uniqstr, semantic_type_get,
6902 semantic_type_destructor_set, semantic_type_printer_set): New functions
6903 composing the public interface of that table.
6904 (symbol_destructor_get, symbol_destructor_location_get,
6905 symbol_printer_get, symbol_printer_location_get): If there's no
6906 per-symbol %destructor/%printer, look up the per-type before trying
6907 the default.
6908 * tests/actions.at (Per-type %printer and %destructor): New test case.
6909 * tests/input.at (Default %printer and %destructor redeclared):
6910 Extend to check that multiple occurrences of %symbol-default in a
6911 single %destructor/%printer declaration is an error.
6912 (Per-type %printer and %destructor redeclared, Unused values with
6913 per-type %destructor): New test cases.
6914
6915 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6916
6917 Require default %destructor/%printer to be declared using
6918 %symbol-default instead of an empty symbol list, and start working on
6919 new per-type %destructor/%printer. Discussed at
6920 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6921 * NEWS (2.3+): Add %symbol-default to example.
6922 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6923 (Table of Symbols): Add entry for %symbol-default.
6924 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6925 (generic_symlist, generic_symlist_item): New nonterminals for creating
6926 a list in which each item is a symbol, semantic type, or
6927 %symbol-default.
6928 (grammar_declaration): Use generic_symlist in %destructor and %printer
6929 declarations instead of symbols.1 or an empty list.
6930 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6931 for changes to symbol_list.
6932 * src/reader.c: Update for changes to symbol_list.
6933 * src/scan-code.l: Likewise.
6934 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6935 * src/symlist.c, src/symlist.h: Extend such that a list node may
6936 represent a semantic type or a %symbol-default in addition to just an
6937 ordinary symbol. Add switched functions for setting %destructor's and
6938 %printer's.
6939 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6940 %destructor/%printer declarations.
6941
6942 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6943
6944 Whether the default %destructor/%printer applies to a particular symbol
6945 isn't a question of whether the user *declares* that symbol (in %token,
6946 for example). It's a question of whether the user by any means
6947 *defines* the symbol at all (by simply using a char token, for
6948 example). $end is defined by Bison whereas any other token with token
6949 number 0 is defined by the user. The error token is always defined by
6950 Bison regardless of whether the user declares it with %token, but we
6951 may one day let the user define error as a nonterminal instead.
6952 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6953 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6954 the meaning of "user-defined".
6955 * tests/actions.at (Default %printer and %destructor for user-declared
6956 end token): Rename to...
6957 (Default %printer and %destructor for user-defined end token): ...
6958 this.
6959
6960 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6961 computation of whether to apply the default, don't maintain a list of
6962 every Bison-defined symbol. Instead, just check for a first character
6963 of '$', which a user symbol cannot have, and check for the error token.
6964
6965 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6966
6967 Don't apply the default %destructor or %printer to the error token,
6968 $undefined, or $accept. This change fits the general rule that the
6969 default %destructor and %printer are only for user-declared symbols,
6970 and it solves several difficulties that are described in the new test
6971 cases listed below.
6972 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6973 * tests/actions.at (Default %printer and %destructor are not for error
6974 or $undefined, Default %printer and %destructor are not for $accept):
6975 New test cases.
6976
6977 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6978
6979 Allow %start after the first rule.
6980 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6981 when parsing the first rule.
6982 (check_and_convert_grammar): Search for it here after all grammar
6983 declarations have been parsed. Skip midrules, which have dummy LHS
6984 nonterminals.
6985 * src/symtab.c (symbol_is_dummy): New function.
6986 * src/symtab.h (symbol_is_dummy): Declare it.
6987 * tests/input.at (%start after first rule): New test.
6988
6989 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6990
6991 Redo some of the previous commit: add back the ability to use
6992 non-aliased/undeclared string literals since it might be useful to
6993 those declaring %token-table.
6994 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6995 commit: don't worry about complaints from symbols_pack.
6996 * src/symtab.c (symbol_new, symbol_class_set,
6997 symbol_check_alias_consistency): Undo changes in previous commit: count
6998 each string literal as a new symbol and token, assign it a symbol
6999 number, and don't complain about non-aliased string literals.
7000 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7001 and token counts but does still set aliased tokens to the same number,
7002 symbol_pack_processor now leaves empty slots in the symbols array.
7003 Remove those slots.
7004 * tests/regression.at (Undeclared string literal): Remove test case
7005 added in previous commit since non-aliased string literals are allowed
7006 again.
7007 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7008 remove unnecessary string literal declarations.
7009 * tests/sets.at (Firsts): Likewise.
7010
7011 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7012
7013 Don't allow an undeclared string literal, but allow a string literal to
7014 be used before its declaration.
7015 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7016 symbols_pack complained.
7017 * src/symtab.c (symbol_new): Don't count a string literal as a new
7018 symbol.
7019 (symbol_class_set): Don't count a string literal as a new token, and
7020 don't assign it a symbol number since symbol_make_alias does that.
7021 (symbol_make_alias): It's not necessary to decrement the symbol and
7022 token counts anymore. Don't assume that an alias declaration occurs
7023 before any uses of the identifier or string, and thus don't assert that
7024 one of them has the highest symbol number so far.
7025 (symbol_check_alias_consistency): Complain if there's a string literal
7026 that wasn't declared as an alias.
7027 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7028 symbol_pack asserts that every token has been assigned a symbol number
7029 although undeclared string literals have not.
7030 * tests/regression.at (String alias declared after use, Undeclared
7031 string literal): New test cases.
7032 (Characters Escapes, Web2c Actions): Declare string literals as
7033 aliases.
7034 * tests/sets.at (Firsts): Likewise.
7035
7036 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7037
7038 In the grammar scanner, STRING_FINISH unclosed constructs and return
7039 them to the parser in order to improve error messages.
7040 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7041 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7042 * tests/input.at (Unclosed constructs): New test case.
7043 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7044 seen.
7045
7046 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7047 unused global.
7048
7049 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7050
7051 Handle string aliases for character tokens correctly.
7052 * src/symtab.c (symbol_user_token_number_set): If the token has an
7053 alias, check and set its alias's user token number instead of its own,
7054 which is set to indicate the alias. Previously, every occurrence of
7055 the character token in the grammar overwrote that alias indicator with
7056 the character code.
7057 * tests/input.at (String aliases for character tokens): New test.
7058
7059 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7060
7061 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7062
7063 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7064
7065 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7066 to prevent failures when building on older platforms.
7067 Check for autopoint failure.
7068 Set XGETTEXT_OPTIONS to values that check for C format strings,
7069 so that translators are warned about them (this also helps
7070 prevent core dumps).
7071
7072 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7073 function, since it simplifies our code a bit.
7074
7075 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7076 rather than -W, so we don't get bogus warnings about sign comparisons.
7077 Add -Wpointer-arith, since that warning is useful (it reports code
7078 that does not conform to C89 and that some compilers reject).
7079 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7080 since it's no longer needed.
7081
7082 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7083
7084 Clean up scanners a bit.
7085 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7086 definitions so gcc won't warn when obstack_for_string is unused.
7087 * src/scan-code.l: config.h and system.h are already #include'd by
7088 scan-code-c.c, so get rid of them here.
7089 * src/scan-gram.l: Likewise.
7090 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7091 definitions rather than duplicating the rest of it.
7092 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7093
7094 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7095
7096 Suppress signed/unsigned comparison warnings for yycheck.
7097 * data/c.m4 (b4_safest_int_type): New macro.
7098 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7099 a signed int type, cast it to b4_safest_int_type first.
7100 * data/yacc.c: Likewise.
7101 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7102 also overwritten.
7103
7104 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7105
7106 * doc/bison.texinfo: Fix some typos.
7107
7108 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7109
7110 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7111 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7112
7113 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7114 the latest gnulib does this a different way.
7115 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7116 translation was patched, so stop omitting it.
7117
7118 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7119
7120 Enable declaration of default %printer/%destructor. Make the parser
7121 use these for all user-declared grammar symbols for which the user does
7122 not declare a specific %printer/%destructor. Thus, the parser uses it
7123 for token 0 if the user declares it but not if Bison generates it as
7124 $end. Discussed starting at
7125 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7126 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7127 and
7128 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7129 * NEWS (2.3+): Mention.
7130 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7131 declare a %destructor for a mid-rule's semantic value. It's just
7132 impossible to declare one specific to it.
7133 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7134 code. Describe default %destructor form.
7135 * src/parse-gram.y (grammar_declaration): Parse default
7136 %printer/%destructor declarations.
7137 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7138 and symbol_destructor_location_get rather than accessing the destructor
7139 and destructor_location members of struct symbol.
7140 (symbol_printers_output): Likewise but for %printer's.
7141 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7142 again.
7143 * src/symtab.c (default_destructor, default_destructor_location,
7144 default_printer, default_printer_location): New static global
7145 variables to record the default %destructor and %printer.
7146 (symbol_destructor_get, symbol_destructor_location_get,
7147 symbol_printer_get, symbol_printer_location_get): New functions to
7148 compute the appropriate %destructor and %printer for a symbol.
7149 (default_destructor_set, default_printer_set): New functions to set the
7150 default %destructor and %printer.
7151 * src/symtab.h: Prototype all those new functions.
7152 * tests/actions.at (Default %printer and %destructor): New test to
7153 check that the right %printer and %destructor are called, that they're
7154 not called for $end, and that $$ and @$ work correctly.
7155 (Default %printer and %destructor for user-declared end token): New
7156 test to check that the default %printer and %destructor are called for
7157 a user-declared end token.
7158 * tests/input.at (Default %printer and %destructor redeclared, Unused
7159 values with default %destructor): New tests to check related grammar
7160 warnings and errors.
7161
7162 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7163
7164 Clean up handling of %destructor for the end token (token 0).
7165 Discussed starting at
7166 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7167 and
7168 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7169
7170 Make the skeletons consistent in how they pop the end token and invoke
7171 its %destructor.
7172 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7173 state, which has token number 0, since this would invoke the
7174 %destructor for the end token.
7175 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7176 until after shifting the end token, or else it won't be popped.
7177 * data/yacc.c (yyparse): Likewise.
7178
7179 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7180 it's the end token. Upon termination, destroy an unshifted lookahead
7181 even when it's the end token.
7182 * data/lalr1.cc (yy::parser::parse): Likewise.
7183 * data/yacc.c (yyparse): Likewise.
7184
7185 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7186 value warnings for the end token when the user gives the end token a
7187 %destructor.
7188
7189 * tests/actions.at (Printers and Destructors): Test all the above.
7190
7191 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7192
7193 Update to latest gnulib and gettext versions.
7194 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7195 Add fopen-safer.
7196 (gnulib_files): Add m4/warning.m4. Don't worry about files
7197 overwritten by autopoint.
7198 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7199 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7200 rejects them.
7201 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7202 so that we can remove the intl files at a better time.
7203 (intl_files_to_remove): Remove aclocal.m4, since it gets
7204 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7205 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7206 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7207 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7208 Remove datarootdir hack; no longer needed.
7209 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7210 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7211 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7212 strdup.h.
7213 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7214 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7215
7216 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7217
7218 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7219 it with --assume-autoconf='latest-stable'.
7220
7221 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7222
7223 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7224 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7225 YYSTYPE' and `{'.
7226 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7227 those from muscle_tab.c since the old ones are misleading.
7228
7229 2006-07-13 Akim Demaille <akim@epita.fr>
7230
7231 Support %define "KEY" {VALUE}.
7232 * src/scan-code.h, src/scan-code.l (translate_action)
7233 (translate_rule_action, translate_symbol_action, translate_code):
7234 Return char *, not const char *.
7235 * src/parse-gram.y (declaration): Rename as...
7236 (prologue_declaration): this.
7237 (string_content): Remove this nonterminal, use STRING.
7238 (braceless, content, content.opt): New nonterminal.
7239 Use them.
7240 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7241 as value.
7242 * src/scan-gram.l (getargs.h): Don't include it.
7243
7244 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7245
7246 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7247 rather than a for-loop that declares a local bool variable. This
7248 should work around a compatibility problem with a Cray x1e C++
7249 compiler reported by Hung Nguyen in
7250 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7251 The for-loop was introduced in the 2004-11-17 change but I don't
7252 know why it was needed.
7253
7254 2006-07-12 Akim Demaille <akim@epita.fr>
7255
7256 * data/c.m4: Comment changes.
7257
7258 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7259
7260 * src/complain.c (error_message, ERROR_MESSAGE): New.
7261 To factor...
7262 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7263 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7264
7265 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7266
7267 * NEWS: Instead of %union, you can define and use your own union type
7268 YYSTYPE if your grammar contains at least one <type> tag.
7269 Your YYSTYPE need not be a macro; it can be a typedef.
7270 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7271 (Union Decl, Decl Summary): Document this.
7272 * data/glr.c (YYSTYPE): Implement this.
7273 * data/glr.cc (YYSTYPE): Likewise.
7274 * data/lalr1.cc (YYSTYPE): Likewise.
7275 * data/yacc.c (YYSTYPE): Likewise.
7276 * src/output.c (prepare): Output tag_seen_flag.
7277 * src/parse-gram.y (declaration, grammar_declaration):
7278 Use 'union_seen' rather than 'typed' to determine whether
7279 %union has been seen, since grammars can now be typed without
7280 %union.
7281 (symbol_declaration, type.opt, symbol_def):
7282 Keep track of whether a tag has been seen.
7283 * src/reader.c (union_seen, tag_seen): New vars.
7284 (typed): remove.
7285 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7286 * src/scan-code.l (untyped_var_seen): New variable.
7287 (handle_action_dollar): Adjust to above changes.
7288 (handle_action_dollar, handle_action_at):
7289 Improve overflow checking for outlandish numbers.
7290 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7291 avoid new diagnostics generated by above changes.
7292 * tests/regression.at (YYSTYPE typedef): Add test to check
7293 for type tags without %union.
7294
7295 * src/symlist.c (symbol_list_length): Return int, not unsigned
7296 int, since callers expect int. This may need to get revisited
7297 once we have proper integer overflow checking.
7298
7299 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7300 object is now static.
7301
7302 * src/getargs.c (flags_argmatch): Return void, not int,
7303 to pacify ./configure --enable-gcc-warnings.
7304
7305 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7306 since last_string is already defined to FLEX_PREFIX (last_string).
7307
7308 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7309
7310 Implement --warnings/-W.
7311 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7312 replaced by...
7313 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7314 Adjust callers.
7315 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7316 (warnings_args, warnings_types): New.
7317 (getargs, short_options, long_options): Accept -W/--warnings.
7318 Sort the options by alphabetical order, upper case letter right
7319 before its lower case.
7320
7321 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7322
7323 Change %merge result type clash warnings to errors. Discussed at
7324 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7325 * src/reader.c (record_merge_function_type): Use complain_at.
7326 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7327 declared later): Update test case results.
7328
7329 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7330
7331 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7332 to be in alphabetical order.
7333 (trace_args): Spelling fixes.
7334
7335 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7336
7337 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7338 so they don't collide with user-defined macros.
7339 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7340 this was never guaranteed, and now that we're using gnulib stdint,
7341 which defines int_fast16_t to long int, the problem is exposed.
7342
7343 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7344
7345 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7346 need the full POSIX semantics (and weren't implementing them
7347 anyway).
7348
7349 Adjust to Autoconf 2.60 and today's gnulib.
7350 * bootstrap (gnulib_modules): Add stdint.
7351 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7352 no longer copies it.
7353 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7354 since stdint needs the former and wcwidth (which is now required
7355 by mbswidth) needs the latter.
7356 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7357 work around a compatibility glitch between gettext 0.14.6 and
7358 Autoconf 2.60.
7359 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7360 Do not check for uintptr_t, since new stdint module does the right
7361 thing.
7362 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7363 Add stdint.h, stdint_.h, wcwidth.h.
7364 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7365 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7366 stdint.m4, wchar_t.m4, wcwidth.m4.
7367 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7368 usual order for ../lib/*.h files.
7369 (file_name_split): Use last_component, not base_name, to adjust
7370 to gnulib changes.
7371 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7372 for ../lib/*.h files.
7373 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7374 Define unconditionally, since we now assume the stdint module.
7375 * src/scan-skel.l: Include <dirname.h>.
7376 (BASE_QPUTS): Use last_component, not base_name.
7377 * src/system.h: Include <unlocked-io.h> in the usual order
7378 for ../lib/*.h files. Include <stdint.h> unconditionally,
7379 since we now use the stdint module.
7380 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7381 HAVE_UINTPTR_T, since we now use the stdint module.
7382 (base_name): Remove decl, since files now include <dirname.h>
7383 to get the decl.
7384
7385 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7386
7387 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7388 New, default to 1.
7389 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7390 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7391 default.
7392 * tests/calc.at: Adjust.
7393
7394 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7395
7396 * data/c.m4 (b4_basename): New.
7397 (b4_syncline): Also output the location of its invocation (from
7398 the skeleton).
7399 (b4_user_action, b4_define_user_action, b4_user_actions)
7400 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7401 (b4_user_stype): New.
7402 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7403
7404 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7405
7406 In the grammar file, the first column is 1 not 0 on the first line as
7407 on every other line.
7408 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7409 * tests/input.at (Torturing the Scanner): Update output.
7410
7411 * src/scan-gram.l (scanner_cursor): Declare it static.
7412
7413 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7414
7415 In warnings, say "previous declaration" rather than "first
7416 declaration".
7417 * src/symtab.c (redeclaration): Do that here.
7418 * src/reader.c (record_merge_function_type): In the case of a result
7419 type clash, report the previous declaration rather than the very first
7420 one in the grammar file.
7421 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7422 declared later): Add a third declaration to check this behavior.
7423 * tests/input.at (Incompatible Aliases): Update output.
7424
7425 2006-06-27 Akim Demaille <akim@epita.fr>
7426
7427 * doc/Doxyfile.in: New.
7428 * doc/Makefile.am: Use it.
7429 * src/lalr.h, src/symtab.h: Initial doxygenation.
7430
7431 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7432
7433 Don't miss %merge result type warnings just because the LHS types are
7434 declared after the %merge. This continues the effort of the previous
7435 patch.
7436 * src/reader.c (get_merge_function): Don't set the merger type yet.
7437 (record_merge_function_type): New function for setting the merger type
7438 and checking for clashes.
7439 (grammar_current_rule_merge_set): Set the location of the %merge for
7440 the current rule.
7441 (packgram): Invoke record_merge_function_type for each rule now that
7442 all symbol type declarations have been parsed.
7443 * src/reader.h (merger_list.type_declaration_location): New member
7444 storing the location of the first %merge from which the type for this
7445 merging function was derived.
7446 * src/symlist.h (symbol_list.merger_declaration_location): New member
7447 storing the location of a rule's %merge, if any.
7448 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7449 declared later): New test to catch the error fixed by the above patch.
7450
7451 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7452
7453 Get action warnings (grammar_rule_check) right even when symbol
7454 declarations appear after the rules. Discussed at
7455 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7456 and
7457 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7458 Don't mistake the type of $$ in a midrule to be that of its parent
7459 rule's $$.
7460 * src/reader.c (grammar_current_rule_end): Don't invoke
7461 grammar_rule_check yet since not all symbol declarations may have been
7462 parsed yet.
7463 (grammar_midrule_action): Likewise.
7464 Don't record whether the midrule's $$ has been used yet since actions
7465 haven't been translated yet.
7466 Record the midrule's parent rule and its RHS index within the parent
7467 rule.
7468 (grammar_current_rule_action_append): Don't translate the action yet
7469 since not all symbol declarations may have been parsed yet and, thus,
7470 warnings about types for $$, $n, @$, and @n can't be reported yet.
7471 (packgram): Translate the action and invoke grammar_rule_check now that
7472 all symbol declarations have been parsed.
7473 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7474 after parsing the entire grammar file, the symbol list here in the case
7475 of a midrule is actually the midrule's empty RHS, so reference its
7476 parent rule's RHS where necessary.
7477 On the other hand, now that you can already know it's a midrule, you
7478 aren't forced to think $$ has the same type as its parent rule's $$.
7479 (handle_action_at): In the case of a midrule, reference the parent rule
7480 where necessary.
7481 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7482 members.
7483 (symbol_list_length): Now that this is invoked after all rules have
7484 been parsed, a NULL symbol (rather than a NULL symbol list node)
7485 terminates a rule. symbol_list_print already does this correctly.
7486 * src/symlist.h (symbol_list.midrule_parent_rule,
7487 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7488 remember their relationships with their parents.
7489 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7490 fixed by the above patch.
7491 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7492 implementing...
7493 (Unused values): ... this old test case and...
7494 (Unused values before symbol declarations): ... this new test case.
7495 This one is the same as `Unused values' except that all symbol
7496 declarations appear after the rules in order to catch the rest of the
7497 errors fixed by the above patch.
7498
7499 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7500
7501 More cleanup.
7502 * src/reader.c (current_rule): Declare it static since it's no longer
7503 used outside this file.
7504 (grammar_current_rule_action_append): Remove redundant arguments from
7505 translate_rule_action invocation.
7506 * src/reader.h (current_rule): Remove this unused extern.
7507 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7508 * src/scan-code.l (translate_rule_action): Likewise.
7509
7510 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7511
7512 Clean up yesterday's patch.
7513 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7514 to...
7515 * src/reader.c (grammar_current_rule_action_append): ... here for
7516 consistency with grammar_current_rule_symbol_append.
7517 * tests/regression.at (Braced code in declaration in rules section):
7518 Make yyerror and yylex static as usual.
7519
7520 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7521
7522 Fix bug that mistakes braced code in a declaration in the rules section
7523 to be a rule action. Mentioned at
7524 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7525 * src/scan-gram.l: Move midrule action detection from the start of the
7526 scanning of any braced code to...
7527 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7528 action. For readability, use $2 and @2 rather than the equivalent
7529 global variables.
7530 * tests/regression.at (Braced code in declaration in rules section):
7531 New test to catch the error fixed by the above patch.
7532
7533 Work on code readability some.
7534 * src/scan-code.l (current_rule): Get rid of this misleading and
7535 redundant declaration: it's actually extern'ed in reader.h.
7536 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7537 translate_action): Add a rule argument and use it instead of the global
7538 current_rule.
7539 (translate_rule_action): This already receives current_rule through an
7540 argument, so pass it on to translate_action instead of assigning
7541 current_rule to current_rule.
7542 (translate_symbol_action, translate_code): Pass rule = NULL to
7543 translate_action.
7544
7545 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7546
7547 Rename %before-definitions to %start-header and %after-definitions to
7548 %end-header. Don't use these declarations to separate pre-prologue
7549 blocks from post-prologue blocks. Add new order-independent
7550 declarations %before-header and %after-header as alternatives to the
7551 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7552 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7553 * NEWS (2.3+): Update for these changes.
7554 * data/glr.c (b4_before_definitions): Update to...
7555 (b4_start_header): ... this.
7556 (b4_after_definitions): Update to...
7557 (b4_end_header): ... this.
7558 * data/glr.cc: Likewise.
7559 * data/lalr1.cc: Likewise.
7560 * data/yacc.c: Likewise.
7561 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7562 prologue blocks with %*-header declarations.
7563 (Calc++ Parser): Likewise.
7564 (Decl Summary): Update names.
7565 (Table of Symbols): Update description.
7566 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7567 (PERCENT_END_HEADER): ... this.
7568 (PERCENT_BEFORE_DEFINITIONS): Update to...
7569 (PERCENT_START_HEADER): ... this.
7570 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7571 (declaration): Update token names and m4 macro names.
7572 When parsing %end-header and %start-header, invoke translate_code
7573 before muscle_code_grow, and no longer set global booleans to remember
7574 whether these declarations have been seen.
7575 Parse new %after-header and %before-header.
7576 * src/reader.c (before_definitions, after_definitions): Remove.
7577 (prologue_augment): Accept a new bool argument to specify whether to
7578 augment the pre-prologue or post-prologue.
7579 * src/reader.h (before_definitions, after_definitions): Remove these
7580 extern's.
7581 (prologue_augment): Add new bool argument.
7582 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7583 (PERCENT_END_HEADER): ... this.
7584 (PERCENT_BEFORE_DEFINITIONS): Update to...
7585 (PERCENT_START_HEADER): ... this.
7586 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7587 * tests/actions.at (Printers and Destructors): Update names.
7588
7589 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7590
7591 Add comparison operators for C++ location classes. Discussed at
7592 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7593 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7594 declaration indicating whether filename_type has an operator==. If
7595 filename_type is `std::string', it defaults to `1', `0' otherwise.
7596 * data/location.cc: Iff b4_define_location_comparison is `1', add
7597 operator== and operator!= for class position and for class location.
7598
7599 Some minor fixes.
7600 * src/scan-action.l: Remove unused file.
7601 * src/symtab.c (symbol_printer_set): Use printer_location not
7602 destructor_location.
7603 * src/symtab.h (struct symbol): Replace incorrect source comment for
7604 printer members.
7605 * tests/input.at (Incompatible Aliases): Update output with correct
7606 printer location.
7607
7608 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7609
7610 Don't put the pre-prologue in the header file. For the yacc.c code
7611 file and the glr.c header and code files, move the pre-prologue before
7612 the token definitions. Add new %before-definitions and
7613 %after-definitions to declare code that will go in both the header file
7614 and code file. Discussed at
7615 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7616 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7617 and
7618 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7619 * NEWS (2.3+): Describe these changes.
7620 * data/glr.c (b4_pre_prologue): Move from within to before...
7621 (b4_shared_declarations): ... this.
7622 Add new b4_before_definitions before b4_token_enums.
7623 Add new b4_after_definitions at the end.
7624 * data/glr.cc (b4_pre_prologue): Replace with...
7625 (b4_before_definitions): ... this in the header file.
7626 (b4_after_definitions): New near the end of the header file.
7627 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7628 code file right before including the header file.
7629 (b4_before_definitions): New in the previous position of
7630 b4_pre_prologue in the header file.
7631 (b4_after_definitions): New near the end of the header file.
7632 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7633 (b4_token_enums_defines): In the code file, move to right before
7634 YYSTYPE for consistency with the header file.
7635 (b4_before_definitions): New right before b4_token_enums_defines in
7636 both the header and code file.
7637 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7638 header and code file.
7639 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7640 of prologues for %union dependencies.
7641 (Decl Summary): In %defines description, mention the effect of
7642 %before-definitions and %after-definitions on the header file.
7643 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7644 than in the pre-prologue so that make check succeeds.
7645 (Table of Symbols): Add entries for %before-definitions and
7646 %after-definitions.
7647 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7648 %before-definitions.
7649 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7650 (declaration): Parse those declarations and append to
7651 b4_before_definitions and b4_after_definitions, respectively.
7652 * src/reader.c (before_definitions, after_definitions): New bools to
7653 track whether those declarations have been seen.
7654 (prologue_augment): Add to the post-prologue if %union,
7655 %before-definitions, or %after-definitions has been seen.
7656 * src/reader.h (before_definitions, after_definitions): New extern's.
7657 * src/scan-gram.l: Scan the new declarations.
7658 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7659 prologue block in a %before-definitions or a %after-definitions based
7660 on whether the %union is declared.
7661 * tests/regression.at (Early token definitions with --yacc, Early token
7662 definitions without --yacc): Move tests for token definitions into the
7663 post-prologue since token names are no longer defined in the
7664 pre-prologue.
7665
7666 2006-06-20 Akim Demaille <akim@epita.fr>
7667
7668 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7669 (symbol_get): Use it.
7670 * src/parse-gram.y: Use it.
7671
7672 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7673
7674 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7675 build succeeds when configured with --enable-gcc-warnings.
7676
7677 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7678
7679 * src/parse-gram.y (char_name): New function.
7680 (CHAR, STRING, string_content): For %printer, properly escape.
7681 (ID): Prefer fputs to fprintf.
7682 (id): Reindent to be consistent with other rules.
7683 Properly quote char.
7684
7685 The Translation Project changed its way of publishing translations
7686 to maintainers. I haven't received any responses to my request
7687 for supporting the old way, or for documenting the new way. I
7688 have modified 'bootstrap' to use screen scraping
7689 (in this case, HTML scraping). This is unreliable and inelegant,
7690 but I don't see any better way. Yuck.
7691 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7692 (get_translations): New function, which uses HTML scraping to
7693 deduce locations of latest translations.
7694 Use this function to grab both bison and bison-runtime .po files.
7695 Don't bother priming the pump for the runtime-po domain any more,
7696 as it's now translated better than bison is.
7697
7698 2006-06-19 Akim Demaille <akim@epita.fr>
7699
7700 * src/scan-gram.l: No longer "parse" things after `%union' until
7701 `{'. Rather, return a single "%union" token.
7702 No longer make symbols: return strings, and leave the conversion
7703 to symbols to the parser.
7704 (SC_PRE_CODE, token_type): Remove.
7705 * src/parse-gram.y (%union): New field `character'.
7706 Sort tokens.
7707 (CHAR): New token.
7708 (ID, ID_COLON): Now that the scanner no longer makes them
7709 identifiers, adjust all uses to invoke symbol_get.
7710 (id_colon): New, wraps the conversion from string to symbol.
7711 (%union): Accept a possible union_name.
7712 (symbol): Now can be a char.
7713 * data/c.m4 (b4_union_name): Leave a default value.
7714 * data/glr.c, data/yacc.c: Use it.
7715
7716 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7717
7718 For associating token numbers with token names for "yacc.c", don't use
7719 #define statements unless `--yacc' is specified; always use enum
7720 yytokentype. Most important discussions start at:
7721 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7722 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7723 and
7724 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7725 * NEWS (2.3+): Mention.
7726 * data/c.m4 (b4_yacc_if): New.
7727 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7728 token #define's.
7729 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7730 on token name definitions.
7731 * src/getargs.c (usage): Capitalize `Yacc' in English.
7732 * src/output.c (prepare): Define b4_yacc_flag.
7733 * tests/regression.at (Early token definitions): Test that tokens names
7734 are defined before the pre-prologue not just before the post-prologue.
7735 Remove this test case and copy to...
7736 (Early token definitions with --yacc): ... this to test #define's.
7737 (Early token definitions without --yacc): ... and this to test enums.
7738
7739 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7740
7741 * NEWS: Reword the post-2.3 change to not be so optimistic about
7742 removing the old "look-ahead" spelling.
7743 Update previous look-ahead/lookahead change reports.
7744 * REFERENCES: look-ahead -> lookahead (since that's
7745 what he actually wrote).
7746 * doc/refcard.tex: look ahead -> lookahead,
7747 look-ahead -> lookahead
7748
7749 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7750
7751 For consistency, use `lookahead' instead of `look-ahead' or
7752 `look_ahead'. Discussed starting at
7753 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7754 and then at
7755 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7756 * NEWS: For the next release, note the change to `--report'.
7757 * TODO, doc/bison.1: Update English.
7758 * doc/bison.texinfo: Update English.
7759 (Understanding Your Parser, Bison Options): Document as
7760 `--report=lookahead' rather than `--report=look-ahead'.
7761 * src/conflicts.c: Update English in comments.
7762 (lookahead_set): Rename from look_ahead_set.
7763 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7764 (resolve_sr_conflict): Rename local look_ahead_tokens to
7765 lookahead_tokens, and update other uses.
7766 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7767 count_rr_conflicts, conflicts_free): Update uses.
7768 * src/getargs.c (report_args): Move "lookahead" before alternate
7769 spellings.
7770 (report_types): Update uses.
7771 (usage): For `--report' usage description, state `lookahead' spelling
7772 rather than `look-ahead'.
7773 * src/getargs.h (report.report_lookahead_tokens): Rename from
7774 report_look_ahead_tokens.
7775 * src/lalr.c: Update English in comments.
7776 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7777 (state_lookahead_tokens_count): Rename from
7778 state_look_ahead_tokens_count.
7779 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7780 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7781 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7782 Update other uses.
7783 Update English in output.
7784 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7785 * src/print.c: Update English in comments.
7786 (lookahead_set): Rename from look_ahead_set.
7787 (print_reduction): Rename argument lookahead_token from
7788 look_ahead_token.
7789 (print_core, state_default_rule, print_reductions, print_results):
7790 Update uses.
7791 * src/print_graph.c: Update English in comments.
7792 (print_core): Update uses.
7793 * src/state.c: Update English in comments.
7794 (reductions_new): Update uses.
7795 (state_rule_lookahead_tokens_print): Rename from
7796 state_rule_look_ahead_tokens_print, and update other uses.
7797 * src/state.h: Update English in comments.
7798 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7799 (state_rule_lookahead_tokens_print): Rename from
7800 state_rule_look_ahead_tokens_print.
7801 * src/tables.c: Update English in comments.
7802 (conflict_row, action_row): Update uses.
7803 * tests/glr-regression.at
7804 (Incorrect lookahead during deterministic GLR,
7805 Incorrect lookahead during nondeterministic GLR): Rename
7806 print_look_ahead to print_lookahead.
7807 * tests/torture.at: Update English in comments.
7808 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7809 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7810 (Many lookahead tokens): Update uses.
7811 * data/glr.c: Update English in comments.
7812 * lalr1.cc: Likewise.
7813 * yacc.c: Likewise.
7814 * src/conflicts.h: Likewise.
7815 * src/lalr.h: Likewise.
7816 * src/main.c: Likewise.
7817 * src/output.c: Likewise.
7818 * src/parse-gram.c: Likewise.
7819 * src/tables.h: Likewise.
7820 * tests/calc.at: Likewise.
7821
7822 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7823
7824 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7825
7826 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7827
7828 * TODO: Add request from Nelson H. F. Beebe to be able to install
7829 Bison without installing the yacc script.
7830
7831 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7832
7833 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7834 and yytext if they're already #define'd.
7835 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7836 * src/scan-code-c.c: ... here.
7837 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7838 <config.h>.
7839
7840 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7841
7842 Get Bison to build again when configured with --enable-gcc-warnings.
7843 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7844 missing #include's.
7845 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7846 loc argument as it shadows a global.
7847 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7848 invocation.
7849
7850 * src/.cvsignore: Add scan-code.c.
7851
7852 2006-06-07 Akim Demaille <akim@epita.fr>
7853
7854 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7855 to...
7856 * src/scan-code.l: here.
7857 * tests/input.at (Torturing the Scanner): Fix another location
7858 error.
7859
7860 2006-06-07 Akim Demaille <akim@epita.fr>
7861
7862 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7863
7864 2006-06-06 Akim Demaille <akim@epita.fr>
7865
7866 Extract the parsing of user actions from the grammar scanner.
7867 As a consequence, the relation between the grammar scanner and
7868 parser is much simpler. We can also split "composite tokens" back
7869 into simple tokens.
7870 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7871 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7872 rename as...
7873 * src/location.h, src/location.c (add_column_width)
7874 (location_compute): these.
7875 Fix the column count: the initial column is 0.
7876 (location_print): Be robust to ending column being 0.
7877 * src/location.h (boundary_set): New.
7878 * src/main.c: Adjust to scanner_free being renamed as
7879 gram_scanner_free.
7880 * src/output.c: Include scan-code.h.
7881 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7882 Use boundary_set.
7883 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7884 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7885 which is now, again, a separate token.
7886 Adjust all dependencies.
7887 Whereever actions with $ and @ are used, use translate_code.
7888 (action): Remove this nonterminal which is now useless.
7889 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7890 (grammar_current_rule_action_append): Use translate_code.
7891 (packgram): Bound check ruleno, itemno, and rule_length.
7892 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7893 (last_string, last_braced_code_loc, max_left_semantic_context)
7894 (scanner_initialize, scanner_free, scanner_last_string_free)
7895 (gram_out, gram_lineno, YY_DECL_): Move to...
7896 * src/scan-gram.h: this new file.
7897 (YY_DECL): Rename as...
7898 (GRAM_DECL): this.
7899 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7900 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7901 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7902 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7903 Move these declarations, and...
7904 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7905 these to...
7906 * src/flex-scanner.h: this new file.
7907 * src/scan-gram.l (rule_length, rule_length_overflow)
7908 (increment_rule_length): Remove.
7909 (last_braced_code_loc): Rename as...
7910 (gram_last_braced_code_loc): this.
7911 Adjust to the changes of the parser.
7912 Move all the handling of $ and @ into...
7913 * src/scan-code.l: here.
7914 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7915 (handle_action_dollar, handle_action_at): Move to...
7916 * src/scan-code.l: here.
7917 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7918 scan-code.h, scan-code-c.c, scan-gram.h.
7919 (EXTRA_bison_SOURCES): Add scan-code.l.
7920 (BUILT_SOURCES): Add scan-code.c.
7921 (yacc): Be robust to white spaces.
7922
7923 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7924 * tests/regression.at: Adjust the column numbers.
7925 * tests/regression.at: Adjust the error message.
7926
7927 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7928
7929 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7930 Use Akim's wording from
7931 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7932
7933 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7934
7935 Between Bison releases, manually append `+' to the previous Bison
7936 release number, and use that as a signal to automatically print the
7937 ChangeLog's CVS Id keyword from --version. Discussed starting at
7938 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7939 * ChangeLog: Add Id header.
7940 * configure.ac (AC_INIT): Append `+' to `2.3'.
7941 * src/.cvsignore: Add revision.c.
7942 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7943 (BUILT_SOURCES): Add revision.c.
7944 (revision.c): New target rule. This file defines a new global variable
7945 named revision. It initializes it with either the Id from ChangeLog
7946 or, if VERSION doesn't contain `+', with the empty string.
7947 * src/getargs.c (version): Print the value of revision.
7948 * src/revision.h: Extern revision.
7949
7950 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7951
7952 * NEWS: Version 2.3.
7953 * configure.ac (AC_INIT): Likewise.
7954
7955 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7956
7957 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7958 with no arguments, not as an object-like macro. This is for
7959 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7960 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7961 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7962 Document this.
7963
7964 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7965
7966 * src/getargs.c (usage): Back out yesterday's modification of the
7967 --help output so that we don't have to wait for translation before
7968 releasing 2.3.
7969
7970 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7971
7972 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7973 Problem reported by Akim Demaille.
7974
7975 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7976
7977 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7978
7979 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7980
7981 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7982 generated source code. Problem reported by Frans Englich in
7983 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7984
7985 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7986
7987 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7988 shell, not within 'make', so that 'make' by an ordinary builder
7989 (using GNU make) does not worry about configuring gzip. This also
7990 works around a bug reported independently by Keith Thompson and by
7991 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7992 stderr rather than stdout, messing up the build logs.
7993
7994 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7995
7996 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7997 to make sure that YYID will never be unused. This fixes a 'make
7998 maintainer-check' failure caused by the recent changes to the 'Trivial
7999 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8000 not used.
8001 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8002
8003 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8004
8005 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8006 state before an empty RHS is always resolved here. Only the location
8007 of that state is guaranteed to be resolved, and that's enough. This
8008 fixes the remaining bug reported by Derek M. Jones in
8009 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8010 * tests/glr-regression.at (Uninitialized location when reporting
8011 ambiguity): Test the above case.
8012 Also, the embedded comments in this test case claim it checks the case
8013 of an empty RHS that has inherited the initial location. However, the
8014 corresponding LHS was already resolved, so yyresolveLocations didn't
8015 actually have reason to modify it. Fix this by forcing
8016 nondeterministic operation at the beginning of the parse.
8017
8018 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8019
8020 * data/c.m4 (b4_yy_symbol_print_generate):
8021 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8022 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8023 of the bugs reported today by Derek M Jones in
8024 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8025 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8026 defined to be a type name without parens or brackets.
8027 (Location Type): Similarly for YYLTYPE.
8028 * tests/regression.at (Trivial grammars): Put in a test for this
8029 bug that will be caught by 'make maintainer-check' (though not,
8030 alas, by 'make check' unless your compiler is picky).
8031
8032 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8033
8034 * NEWS: Version 2.2.
8035 * configure.ac (AC_INIT): Likewise.
8036
8037 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8038
8039 * data/glr.c (yyreportTree): Make room in yystates for the state
8040 preceding the RHS. This fixes the segmentation fault reported by Derek
8041 M. Jones in
8042 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8043 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8044 to the user. Reported for yyreportTree by Derek M. Jones later in the
8045 same thread.
8046 * THANKS: Add Derek M. Jones.
8047 Update my email address.
8048 Fix typo in Steve Murphy's name.
8049
8050 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8051
8052 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8053 checking against YYLAST that caused the parser to miss a potential
8054 alternative in its diagnostic.
8055 Problem reported by Maria Jose Moron Fernandez in
8056 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8057 * data/lalr1.cc (yysyntax_error_): Likewise.
8058 * data/yacc.c (yysyntax_error): Likewise.
8059 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8060 tokens, in case we run into an older C compiler.
8061 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8062 Use them to check for the off-by-one error fixed above.
8063
8064 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8065 YYSIZE_T, not size_t.
8066 * tests/regression.at (Trivial grammars): New test, to catch
8067 the error fixed by the above patch.
8068
8069 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8070
8071 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8072 scheme.
8073 Reported by Steve Murphy.
8074
8075 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8076
8077 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8078 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8079
8080 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8081
8082 Implement --trace=m4.
8083 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8084 * src/output.c (output_skeleton): When set, pass -dV to m4.
8085
8086 Factor the handling of flags in m4.
8087 * src/output.c (prepare): Rename the muscle names debug, defines,
8088 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8089 * data/c.m4: Adjust.
8090 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8091 Use b4_define_flag_if to define other b4_FLAG_if macros.
8092 (b4_location_if): As a consequence, rename as...
8093 (b4_locations_if): this, for consistency.
8094 Adjust all the skeletons.
8095
8096 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8097
8098 * etc/bench.pm: Shorten bench names.
8099
8100 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8101
8102 * src/output.h, src/output.c (error_verbose): Move to...
8103 * src/getargs.h, src/getargs.c: here.
8104 Sort the flags.
8105 Adjust dependencies.
8106
8107 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8108
8109 * data/c.m4 (b4_copyright): Put the special exception for Bison
8110 skeletons here, so we don't have to put it in each skeleton. All
8111 uses changed. Suggested by Akim Demaille. Also, wrap the
8112 copyright notice, in case it is longer than 80 columns. Replace
8113 comma by newline after title.
8114
8115 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8116
8117 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8118 incompatibility, not a bug. Mention that it wasn't fixed as of
8119 flex 2.5.33.
8120
8121 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8122
8123 * examples/extexi: Enforce the precedence of concatenation over
8124 >>.
8125 Reported by Tommy Nordgren.
8126
8127 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8128
8129 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8130 with the member "token".
8131 Reported by Martin Nylin.
8132
8133 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8134
8135 * data/glr.c: Switch to Bison 2.2 special-exception language in
8136 the copyright notice. Use more-regular format for titles and
8137 copyright notices.
8138 * data/glr.cc: Likewise.
8139 * data/location.cc: Likewise.
8140 * data/yacc.cc: Likewise.
8141 * doc/bison.texinfo (Conditions): Document this.
8142 * NEWS: likewise. Upgrade version to 2.2.
8143
8144 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8145
8146 * data/glr.cc: Remove dead code.
8147
8148 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8149
8150 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8151 that variable and the line breaks the bootstrap. Problem reported
8152 by Juan M. Guerrero.
8153
8154 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8155
8156 * doc/bison.texinfo (Multiple start-symbols): New.
8157
8158 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8159
8160 * etc/README, etc/bench.pl: New.
8161
8162 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8163
8164 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8165 rule.
8166 Reported by Mickael Labau.
8167 * tests/input.at (Torturing the Scanner): Test it.
8168
8169 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8170
8171 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8172 Problem reported by Bob Rossi.
8173
8174 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8175
8176 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8177 and didn't really work.
8178 For the index, use @ifnotinfo, not @iftex.
8179 Minor cleanups of spacing and terminology.
8180
8181 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8182
8183 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8184 of AT_NAME_PREFIX when %name-prefix is not used.
8185
8186 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8187
8188 Apply --prefix to C++ skeletons too: they change the namespace.
8189 The test suite already exercize these cases.
8190 * data/c++.m4 (b4_namespace): New.
8191 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8192 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8193 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8194 * doc/bison.texinfo: Document it.
8195 (Option Cross Key): Use @multitable in all formats. It looks
8196 nicer, even in TeX outputs.
8197 (Rules): Use the same code whatever the output type is.
8198 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8199 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8200 * tests/calc.at: Use it, instead of hard coding `yy'.
8201
8202 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8203
8204 * TODO: Remove dead items.
8205
8206 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8207
8208 * doc/FAQ: Remove, merged into...
8209 * doc/bison.texinfo (FAQ): this.
8210 * doc/Makefile.am (EXTRA_DIST): Adjust.
8211
8212 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8213
8214 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8215 even if empty.
8216 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8217 * doc/bison.texinfo (Calc++ Scanner): Use it.
8218
8219 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8220
8221 Fix two nits reported by twlevo, plus one more that I discovered.
8222
8223 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8224 this is the usual Bison style.
8225 * src/location.h (location_print): Likewise.
8226
8227 * src/reader.h (token_name): Likewise.
8228
8229 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8230
8231 Fix some nits reported by twlevo.
8232 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8233 and "POSIX". Use more-modern syntax for URLs. Mention C++
8234 and ask for Java. Don't hardwire OS version numbers. Add
8235 copyright notice.
8236 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8237 * src/conflicts.c (solved_conflicts_obstack): Now static.
8238
8239 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8240
8241 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8242 page. Say "you can use it" not "you may use it" as on the web page;
8243 we're describing capabilities not granting permission.
8244
8245 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8246
8247 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8248 shadowing warnings. Use usual patter for iterating through RHS.
8249 * tests/glr-regression.at
8250 (Uninitialized location when reporting ambiguity):
8251 Modify yylex so that it uses its argument, rather than trying
8252 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8253 const char -> char const.
8254
8255 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8256 Don't use tabs inside commands; it messes up 'ps'.
8257 Problem reported by twlevo.
8258
8259 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8260
8261 * tests/glr-regression.at (Uninitialized location when reporting
8262 ambiguity): New test case.
8263 * data/glr.c (yyresolveLocations): New function, which uses
8264 YYLLOC_DEFAULT.
8265 (yyresolveValue): Invoke yyresolveLocations before reporting an
8266 ambiguity.
8267 * doc/bison.texinfo (Default Action for Locations): Note
8268 YYLLOC_DEFAULT's usage for ambiguity locations.
8269 (GLR Semantic Actions): Cross-reference those notes.
8270
8271 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8272
8273 * tests/glr-regression.at (Leaked semantic values when reporting
8274 ambiguity): Remove unnecessary union and type declarations.
8275 (Leaked lookahead after nondeterministic parse syntax error): New test
8276 case.
8277 * data/glr.c (yyparse): Check for zero stacks remaining before
8278 attempting to shift the lookahead so that you don't lose it.
8279
8280 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8281
8282 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8283 * tests/glr-regression.at (Leaked semantic values when reporting
8284 ambiguity): New test case.
8285 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8286 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8287 now unnecessary yystackp parameter.
8288 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8289 destructors can be called.
8290
8291 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8292 in existing testcases.
8293
8294 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8295
8296 Don't leak semantic values for parent RHS when a user action cuts the
8297 parser, and clean up related code a bit.
8298 * tests/glr-regression.at (Leaked merged semantic value if user action
8299 cuts parse): Rename to...
8300 (Leaked semantic values if user action cuts parse): ... this. Add check
8301 for leaked parent RHS values.
8302 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8303 between an unresolved state (non-empty chain of semantic options) and
8304 an incomplete one (signaled by an empty chain).
8305 (yyresolveStates): Document the interface. Move all manipulation of a
8306 successfully or unsuccessfully resolved yyGLRState to...
8307 (yyresolveValue): ... here so that yyresolveValue always leaves a
8308 yyGLRState with consistent data and thus is easier to understand.
8309 Remove the yyvalp and yylocp parameters since they are always just
8310 taken from the yys parameter. When reporting a discarded merged value
8311 in debugging output, note that it is incompletely merged. Document the
8312 interface.
8313 (yyresolveAction): If resolving any of the RHS states fails, destroy
8314 them all rather than leaking them. Thus, as long as user actions are
8315 written to clean up the RHS correctly, yyresolveAction always cleans up
8316 the RHS of a semantic option. Document the interface.
8317
8318 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8319
8320 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8321 led to a segmentation fault in GNU Pascal. Problem reported
8322 by Waldek Hebisch.
8323
8324 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8325
8326 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8327 mid-rule action inside a nonterminal symbol in order to declare a
8328 destructor for its semantic value.
8329
8330 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8331
8332 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8333 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8334 __cplusplus && ! defined _STDLIB_H && !
8335 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8336 defined free))]: Include <stdlib.h> rather than rolling our own
8337 declarations of malloc and free, to avoid problems with
8338 incompatible declarations (using 'throw') C++'s stdlib.h. This
8339 should fix Debian bug 340012
8340 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8341 reported by Guillaume Melquiond.
8342
8343 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8344
8345 * NEWS: Clarify symbols versus types in unused-value warnings.
8346
8347 * configure.ac (AC_INIT): Bump version number.
8348
8349 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8350
8351 * NEWS: Version 2.1a.
8352 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8353 since C99 requires this.
8354
8355 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8356
8357 * m4/c-working.m4: New file.
8358 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8359
8360 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8361
8362 * Makefile.maint: Merge from coreutils.
8363
8364 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8365
8366 More portability fixes for problems summarized by Nelson H. F. Beebe.
8367
8368 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8369 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8370 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8371 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8372 messes up because C++ code is compiled in 32-bit mode but linked
8373 in 64-bit mode.
8374
8375 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8376
8377 More portability fixes for problems summarized by Nelson H. F. Beebe.
8378
8379 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8380 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8381
8382 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8383 nodist_PROGRAMS, since we don't need to actually compile the
8384 example if we're just doing a plain 'make'. This avoids bothering
8385 the installer unnecessarily about problems due to weird C++
8386 compilers.
8387
8388 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8389
8390 More portability fixes for problems summarized by Nelson H. F. Beebe.
8391
8392 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8393 than #include "...", and compile with -I'.'. The old method was
8394 not portable, according to Posix and the C standard, and it does
8395 not work with Sun C 5.7, where previous #line directives affect
8396 the working directory used in later #include "..." directives.
8397
8398 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8399
8400 Various DJGGP specific issues in /djgpp
8401
8402 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8403
8404 More portability fixes for problems summarized by Nelson H. F. Beebe.
8405
8406 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8407 '#include <map>' works and that you can apply ++ to iterators.
8408
8409 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8410
8411 Work around portability problems summarized by Nelson H. F. Beebe in
8412 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8413
8414 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8415 that '#include <string>' works.
8416
8417 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8418 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8419 "warning: sorry: semantics of inline function static data `const
8420 unsigned char translate_table[262]' are wrong (you'll wind up with
8421 multiple copies)".
8422
8423 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8424 or, xor to not_, and_, or_, and xor_, respectively. This works
8425 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8426 random system header somewhere that includes the equivalent of
8427 <iso646.h>.
8428
8429 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8430 -E" works; it apparently doesn't work with PathScale EKO Compiler
8431 Suite Version 2.0.
8432
8433 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8434
8435 During deterministic GLR operation, user actions should be able to
8436 influence the parse by changing yychar. To make this easier to fix and
8437 to make glr.c easier to evolve in general, don't maintain yytoken in
8438 parallel with yychar; just compute yytoken when needed.
8439 * tests/glr-regression.at (Incorrect lookahead during deterministic
8440 GLR): Check that setting yychar in a user action has the intended
8441 effect.
8442 * data/glr.c (yyGLRStack): Remove yytokenp member.
8443 (yyclearin): Don't set *yytokenp.
8444 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8445 yychar rather than *yytokenp to determine the current lookahead.
8446 Compute yytoken locally when needed.
8447 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8448 point to.
8449
8450 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8451 after `--report' documentation.
8452
8453 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8454
8455 * src/parse-gram.y (grammar_declaration): Location of printer
8456 symbol is @1, not list->location. Bug reported by twlevo.
8457 * tests/input.at (Incompatible Aliases): Adjust to above change.
8458
8459 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8460
8461 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8462 all the test at once. This makes the output easier to read in the
8463 normal case.
8464
8465 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8466 got from <http://bro-ids.org/download.html>. The bug is that
8467 when two actions appeared in succession, the second one was
8468 scanned before the first one was added to the grammar rule
8469 as a midrule action. Bison then output the incorrect warning
8470 "parse.y:905.17-906.36: warning: unused value: $3".
8471 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8472 associated with a value.
8473 (rhs): Don't invoke grammar_current_rule_action_append.
8474 (action): Invoke it here instead.
8475 * src/reader.c (grammar_midrule_action): Now extern.
8476 (grammar_current_rule_action_append): Don't invoke
8477 grammar_midrule_action; that is now the scanner's job.
8478 * src/reader.h (last_string, last_braced_code_loc):
8479 (grammar_midrule_action): New decls.
8480 * src/scan-gram.l (last_string): Now extern, sigh.
8481 (last_braced_code_loc): New extern variable.
8482 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8483 rule already has an action.
8484 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8485 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8486 Add some tests to check that the above changes fixed the bug.
8487
8488 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8489
8490 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8491 All used changed. Check whether the symbol has a destructor,
8492 not whether it is typed.
8493 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8494 that the values are still reported as unused. All line numbers
8495 adjusted.
8496
8497 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8498
8499 Work around a bug in bro 0.8, which underparenthesizes its
8500 definition of YYLLOC_DEFAULT.
8501 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8502 their arguments.
8503 * data/lalr1.cc: Likewise.
8504 * data/yacc.cc: Likewise.
8505
8506 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8507
8508 Work around a bug in Pike 7.0, and give the Pike folks a
8509 better way to override the usual int widths.
8510 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8511 user can override the types.
8512 (short): #undef, to work around a bug in Pike 7.0.
8513 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8514 (union yyalloc.yyss): Use yytype_int16 rather than short.
8515 All uses changed.
8516 (yysigned_char): Remove.
8517 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8518 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8519 * tests/regression.at (Web2c Actions): Adjust to above changes.
8520
8521 * src/reader.c (check_and_convert_grammar): New function.
8522 (reader): Close the input file even if something went wrong during
8523 parsing. Minor file descriptor leak reported by twlevo.
8524
8525 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8526 to pacify gcc -Wswitch-default.
8527 * src/scan-gram.l (adjust_location): Use a default: break; case
8528 to pacify gcc -Wswitch-default.
8529 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8530 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8531 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8532 Move these decls to scan-skel.l, since they don't need to be
8533 visible elsewhere.
8534 * src/scan-skel.l: Accept the above decls.
8535 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8536 is used.
8537
8538 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8539
8540 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8541 since we don't want to insist on a version number at the start
8542 of the changelog every time.
8543 * Makefile.maint: Sync from coreutils a bit better.
8544 (sc_trailing_blank): Renamed from sc_trailing_space.
8545 All uses changed.
8546 (sc_no_if_have_config_h, sc_require_config_h):
8547 (sc_prohibit_assert_without_use): New rules.
8548 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8549 (sc_dd_max_sym_length): Fix leading spaces in rule.
8550 (sc_system_h_headers): Prefix with @.
8551 (sc_useless_cpp_parens, m4-check): Output line numbers.
8552 (changelog-check): Allow version only in head.
8553 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8554 satisfy new Makefile.maint rule.
8555 * data/glr.c: Likewise.
8556 * data/glr.cc: Likewise.
8557 * data/lalr1.cc: Likewise.
8558 * data/yacc.c: Likewise.
8559 * lib/ebitsetv.c: Likewise.
8560 * lib/lbitset.c: Likewise.
8561 * lib/subpipe.c: Likewise.
8562 * lib/timevar.c: Likewise.
8563 * src/system.h: Likewise.
8564 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8565 * djgpp/Makefile.maint: Add copyright notice.
8566 * djgpp/README.in: Likewise.
8567 * djgpp/config.bat: Likewise.
8568 * djgpp/config.site: Likewise.
8569 * djgpp/config_h.sed: Likewise.
8570 * djgpp/djunpack.bat: Likewise.
8571 * djgpp/config.sed: Fix copyright notice to match standard format.
8572 * djgpp/subpipe.h: Likewise.
8573 * lib/bitsetv-print.c: Likewise.
8574 * lib/bitsetv.c: Likewise.
8575 * lib/subpipe.h: Likewise.
8576 * lib/timevar.c: Likewise.
8577 * lib/timevar.h: Likewise.
8578 * djgpp/subpipe.c: Use standard recipe for config.h.
8579 * lib/abitset.c: Likewise.
8580 * lib/bitset.c: Likewise.
8581 * lib/bitset_stats.c: Likewise.
8582 * lib/bitsetv-print.c: Likewise.
8583 * lib/bitsetv.c: Likewise.
8584 * lib/ebitsetv.c: Likewise.
8585 * lib/get-errno.c: Likewise.
8586 * lib/lbitset.c: Likewise.
8587 * lib/subpipe.c: Likewise.
8588 * lib/timevar.c: Likewise.
8589 * lib/vbitset.c: Likewise.
8590 * tests/local.at: Likewise.
8591 * src/scan-gram.l: Don't include verify.h, since system.h does
8592 that for us.
8593 * .x-sc_require_config_h: New file.
8594 * .x-sc_unmarked_diagnostics: New file.
8595
8596 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8597
8598 Be a bit more systematic about using 'abort'.
8599 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8600 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8601 Put 'default: abort ();' before some other case, to satisfy older
8602 pedantic compilers.
8603 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8604 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8605 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8606 * src/conflicts.c (resolve_sr_conflict): Likewise.
8607 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8608 (get_decision_str, get_orientation_str, get_node_alignment_str):
8609 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8610 (get_linestyle_str, get_arrowstyle_str): Likewise.
8611 * src/conflicts.c (resolve_sr_conflict):
8612 Use a default case rather than one for the one remaining enum
8613 value, to catch invalid enum values as well.
8614 * src/lalr.c (set_goto_map, map_goto):
8615 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8616 * src/nullable.c (nullable_compute, token_definitions_output):
8617 Likewise.
8618 * src/reader.c (packgram, reader): Likewise.
8619 * src/state.c (transitions_to, state_new, state_reduction_find):
8620 Likewise.
8621 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8622 (symbol_pack): Likewise.
8623 * src/tables.c (conflict_row, pack_vector): Likewise.
8624 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8625 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8626 * src/system.h: Don't include <assert.h>.
8627 (assert): New macro.
8628
8629 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8630 (Destructor Decl, Parser Function, Pure Calling):
8631 Describe rules for braces inside C code more carefully.
8632
8633 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8634
8635 Fix some porting glitches found by Nelson H. F. Beebe.
8636 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8637 compilers that don't understand that abort () does not return.
8638 * src/state.c (transitions_to): Likewise.
8639 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8640 that '#include <cstdlib>' works.
8641 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8642 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8643 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8644 for the benefit of some pre-C99 compilers.
8645
8646 * bootstrap: Undo changes to gnulib files that autoreconf made.
8647
8648 Minor fixups to get 'make maintainer-check' to work.
8649 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8650 with the new verify.h implementation.
8651 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8652 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8653 * data/yacc.c (YYUSE): Likewise.
8654 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8655 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8656 * src/parse-gram.y (declaration): Don't pass a string constant
8657 to a function that expects char *, since GCC might complain
8658 about the constant value.
8659 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8660 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8661 before #defining them.
8662 * tests/glr-regression.at
8663 (Incorrectly initialized location for empty right-hand side in GLR):
8664 In yyerror, use the msg arg.
8665 (Corrupted semantic options if user action cuts parse):
8666 (Incorrect lookahead during deterministic GLR):
8667 (Incorrect lookahead during nondeterministic GLR):
8668 Don't name a local var 'index'; it shadows string.h's 'index'.
8669
8670 2006-01-19 Akim Demaille <akim@epita.fr>
8671
8672 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8673 location, not just parts of it.
8674
8675 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8676
8677 * NEWS: Document the fact that multiple %unions are now allowed.
8678 * doc/bison.texinfo (Union Decl): Likewise.
8679 * TODO: This feature is now implemented, so remove it from
8680 the wishlist.
8681
8682 * Makefile.maint: Merge with coreutils Makefile.maint.
8683 (CVS_LIST): Use build-aux version if available.
8684 (VERSION_REGEXP): New macro.
8685 (syntax-check-rules): Add sc_no_if_have_config_h,
8686 sc_prohibit_assert_without_use, sc_require_config_h,
8687 sc_useless_cpp_parens.
8688 (sc_obsolete_symbols): Check for O_NDELAY.
8689 (sc_dd_max_sym_length): Track coreutils.
8690 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8691 (sc_useless_cpp_parens): New rule.
8692 (news-date-check): Look for version or today's date.
8693 (changelog-check): Don't require version number near head.
8694 (copyright-check): Use current year instead of hardwiring 2005.
8695 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8696 (announcement): Add --gpg-key-ID.
8697
8698 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8699 with "file system".
8700
8701 Avoid undefined behavior that addressed just before the start of an
8702 array. Problem reported by twlevo.
8703 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8704 * src/lalr.c (build_relations): Rely on new sentinel.
8705 * src/gram.c (gram_free): Adjust to new sentinel.
8706
8707 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8708
8709 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8710 yylookaheadNeeds. All uses updated.
8711 (yysplitStack): Rename local yynewLookaheadStatuses to
8712 yynewLookaheadNeeds.
8713 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8714 GLR): In comments, change `lookahead status' to `lookahead need'.
8715
8716 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8717
8718 * data/glr.c (yysplitStack): A little stylistic rewrite.
8719
8720 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8721
8722 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8723
8724 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8725
8726 * doc/bison.texinfo: Fix some typos.
8727 (GLR Semantic Actions): New subsection discussing special
8728 considerations because GLR semantic actions might be deferred.
8729 (Actions): Mention look-ahead usage of yylval.
8730 (Actions and Locations): Mention look-ahead usage of yylloc.
8731 (Special Features for Use in Actions): Add YYEOF entry and mention it
8732 in the yychar entry.
8733 In the yychar entry, remove mention of the local yychar case (pure
8734 parser) since this is irrelevant information when writing semantic
8735 actions and since it's already discussed in `Table of Symbols' where
8736 yychar is otherwise described as an external variable.
8737 In the yychar entry, don't call it the `current' look-ahead since it
8738 isn't when semantic actions are deferred.
8739 In the yychar and yyclearin entries, add note about deferred semantic
8740 actions.
8741 Add yylloc and yylval entries discussing look-ahead usage.
8742 (Look-Ahead Tokens): When discussing yychar, don't call it the
8743 `current' look-ahead, and do mention yylval and yylloc.
8744 (Error Recovery): Cross-reference `Action Features' when mentioning
8745 yyclearin.
8746 (Table of Symbols): In the yychar entry, don't call it the `current'
8747 look-ahead.
8748 In the yylloc and yylval entries, mention look-ahead usage.
8749
8750 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8751
8752 * tests/glr-regression.at: Update copyright year to 2006.
8753
8754 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8755
8756 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8757 use during nondeterministic operation to track which stacks have
8758 actually needed the current lookahead.
8759 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8760 Allocate, deallocate, resize, and otherwise shuffle space for
8761 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8762 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8763 appropriately during nondeterministic operation.
8764 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8765 members to store the current lookahead to be used by the deferred
8766 user action.
8767 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8768 from which the RHS is taken. Set the lookahead members of the new
8769 yySemanticOption according to the lookahead status for stack yyk.
8770 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8771 yyaddDeferredAction.
8772 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8773 members of yySemanticOption before invoking yyuserAction, and then set
8774 them back to their current values afterward.
8775 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8776 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8777 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8778 titles for consistency.
8779 (Leaked merged semantic value if user action cuts parse): In order to
8780 suppress lint warnings, use arguments in merge function, and assign
8781 char value < 128 in main.
8782 (Incorrect lookahead during deterministic GLR): New test case.
8783 (Incorrect lookahead during nondeterministic GLR): New test case.
8784
8785 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8786
8787 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8788 !yyvaluep as signal that no semantic value is available to print.
8789 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8790 to print a semantic value.
8791
8792 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8793
8794 * tests/glr-regression.at: For consistency with my newer test cases,
8795 don't thank myself.
8796
8797 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8798
8799 * data/glr.c (yyresolveValue): When merging semantic options, if at
8800 least one user action succeeds but a later one cuts the parse, then
8801 destroy the semantic value before returning rather than leaking it.
8802 (yyresolveStates): If a user action cuts the parse and thus
8803 yyresolveValue fails, ignore the (unset) semantic value rather than
8804 corrupting the yyGLRState, and empty the semantic options list since
8805 the user actions should have called all necessary destructors.
8806 Simplify code with YYCHK.
8807 * tests/glr-regression.at (Corrupted semantic options if user action
8808 cuts parse): New test case.
8809 (Undesirable destructors if user action cuts parse): New test case.
8810 Before applying any of this patch, this test case never actually failed
8811 for me... but only because the corrupted semantic options usually
8812 masked this bug.
8813 (Leaked merged semantic value if user action cuts parse): New test
8814 case.
8815
8816 2006-01-05 Akim Demaille <akim@epita.fr>
8817
8818 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8819
8820 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8821
8822 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8823 _MSC_VER. Problem reported by Cenzato Marco.
8824 (b4_c_function_def): Use it.
8825 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8826 b4_c_modern.
8827 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8828 than rolling our own.
8829
8830 2006-01-04 Akim Demaille <akim@epita.fr>
8831
8832 Also warn about non-used mid-rule values.
8833 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8834 member.
8835 (symbol_list_new): Adjust.
8836 * src/reader.c (symbol_typed_p): New.
8837 (grammar_rule_check): Use it.
8838 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8839 Check its rule.
8840 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8841 Use it.
8842 * tests/actions.at (Exotic Dollars): Adjust.
8843
8844 2006-01-04 Akim Demaille <akim@epita.fr>
8845
8846 * src/reader.c (grammar_midrule_action): If $$ is set in a
8847 mid-rule, move the `used' bit to its lhs.
8848 * tests/input.at (Unused values): New.
8849 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8850
8851 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8852
8853 * doc/bison.texinfo (Bison Options): Say more accurately what
8854 --yacc does.
8855 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8856 about declarations in the grammar when in Yacc mode, as POSIX does
8857 not require a diagnostic when the grammar uses extensions.
8858
8859 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8860
8861 Warn about dubious constructions like "%token T T".
8862 Reported by twlevo.
8863 * src/symtab.h (struct symbol.declared): New member.
8864 * src/symtab.c (symbol_new): Initialize it to false.
8865 (symbol_class_set): New arg DECLARING, specifying whether
8866 this is a declaration that we want to warn about, if there
8867 is more than one of them. All uses changed.
8868
8869 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8870 Allow multiple %union directives, whose contents concatenate.
8871 * src/parse-gram.y (grammar_declaration): Likewise.
8872 Use muscle_code_grow, so that we don't need stype_line any more.
8873 All uses changed.
8874
8875 * src/muscle_tab.c (muscle_grow): Fix comment.
8876
8877 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8878 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8879 Update copyright year to 2006.
8880
8881 2006-01-03 Akim Demaille <akim@epita.fr>
8882
8883 Have glr.cc pass (some of) the calc.at tests.
8884 * data/glr.cc (b4_parse_param_orig): New.
8885 (b4_parse_param): Improve its definition, and bound it more
8886 clearly in the skeleton.
8887 (b4_epilogue): Append, instead of prepending, in order to keep
8888 #line consistency.
8889 Simplify the generation of auxiliary functions: locations and
8890 purity are mandated.
8891 (b4_global_tokens_and_yystype): Honor it.
8892 * data/location.cc (c++.m4): Don't include it.
8893 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8894 and AT_SKEL_CC_IF.
8895 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8896 AT_LALR1_CC_IF.
8897 Be sure to initialize the first position's filename.
8898 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8899 mandated anyway.
8900 (AT_CHECK_CALC_GLR_CC): New.
8901 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8902
8903 2006-01-02 Akim Demaille <akim@epita.fr>
8904
8905 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8906 c.m4.
8907 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8908 * data/glr.cc: Do not include stack.hh.
8909
8910 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8911
8912 * data/glr.c: Reformat whitespace with tabs.
8913 (b4_lpure_formals): Remove this unused m4 macro.
8914 * tests/cxx-type.at: Reformat whitespace with tabs.
8915 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8916 since it's a member. Rename type to isNterm for clarity.
8917
8918 2005-12-29 Akim <akim@sulaco.local>
8919
8920 Let glr.cc catch up with symbol_value_print.
8921 * data/glr.cc (b4_yysymprint_generate): Replace by...
8922 (b4_yy_symbol_print_generate): this.
8923 (yy_symbol_print, yy_symbol_value_print): Declare them.
8924
8925 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8926
8927 * src/location.h (boundary): Note that a line or column equal
8928 to INT_MAX indicates an overflow.
8929 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8930 (rule_length_overflow, increment_rule_length, add_column_width):
8931 New functions.
8932 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8933 (<SC_BRACED_CODE>"}"):
8934 Use increment_rule_length rather than incrementing it by hand.
8935 (adjust_location, handle_syncline): Diagnose overflow.
8936 (handle_action_dollar, handle_action_at):
8937 Fix bug with monstrosities like $-2147483648.
8938 Remove now-unnecessary checks.
8939 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8940 (convert_ucn_to_byte): Verify assumptions.
8941 (handle_syncline): New arg LOC. All callers changed.
8942 Don't store through a value derived from char const * pointer.
8943
8944 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8945 GCC warnings.
8946
8947 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8948
8949 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8950 Remove unnecessary forward static decls.
8951
8952 2005-12-27 Akim Demaille <akim@epita.fr>
8953
8954 * src/reader.c (grammar_current_rule_check): Also check that $$
8955 is used.
8956 Take the rule to check as argument, hence rename as...
8957 (grammar_rule_check): this.
8958 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8959 Rename as...
8960 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8961 (grammar_midrule_action, grammar_symbol_append): Now static.
8962 * tests/torture.at (input): Don't rely on the default action
8963 being always performed.
8964 * tests/calc.at: "Set" $$ even when the action is "cut" with
8965 YYERROR or other.
8966 * tests/actions.at (Exotic Dollars): Instead of using unused
8967 values, check that the warning is issued.
8968
8969 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8970
8971 * NEWS: Improve wording for unused-value warnings.
8972
8973 2005-12-22 Akim Demaille <akim@epita.fr>
8974
8975 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8976 (b4_yysymprint_generate): Rename as...
8977 (b4_yy_symbol_print_generate): this.
8978 Generate yy_symbol_print instead of yysymprint.
8979 Generate also yy_symbol_value_print, and use it.
8980
8981 2005-12-22 Akim Demaille <akim@epita.fr>
8982
8983 * NEWS: Warn about unused values.
8984 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8985 a `used' member.
8986 (symbol_list_n_get, symbol_list_n_used_set): New.
8987 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8988 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8989 * src/reader.c (grammar_current_rule_check): Check that values are
8990 used.
8991 * src/symtab.c (symbol_print): Accept 0.
8992 * tests/existing.at: Remove the type information.
8993 Empty the actions.
8994 Remove useless actions (beware of mid-rule actions: perl -000
8995 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8996 * tests/actions.at (Exotic Dollars): Use unused values.
8997 * tests/calc.at: Likewise.
8998 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8999 Likewise.
9000
9001 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9002 rule_useful_p.
9003
9004 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9005
9006 Undo 2005-12-01 tentative license wording change. The wording is
9007 still being reviewed by the lawyers, and we don't want to wait for
9008 them before publishing a test release. For now, revert to the
9009 previous wording.
9010 * NEWS: Undo 2005-12-01 change.
9011 * data/glr.c: Revert to previous license wording.
9012 * data/glr.cc: Likewise.
9013 * data/lalr1.cc: Likewise.
9014 * data/location.cc: Likewise.
9015 * data/yacc.c: Likewise.
9016
9017 * NEWS: Reword %destructor vs YYABORT etc.
9018 * data/glr.c: Use American spacing, for consistency.
9019 * data/glr.cc: Likewise.
9020 * data/lalr1.cc: Likewise.
9021 * data/yacc.c: Likewise.
9022 * data/yacc.c: Reformat comments slightly.
9023 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9024 for consistency. Fix some spelling errors and reword recently-included
9025 text slightly.
9026 * tests/cxx-type.at: Cast results of malloc, for C++.
9027
9028 2005-12-21 Joel E. Denny <address@hidden>
9029
9030 * tests/cxx-type.at: Construct a tree, count the parents of shared
9031 nodes, and free each node once and only once. Previously, the memory
9032 for semantic values was leaked instead.
9033
9034 2005-12-21 Joel E. Denny <address@hidden>
9035
9036 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9037 (yylval, yylloc): If pure, #define to yystackp->yyval and
9038 yystackp->yyloc similar to yychar and yynerrs.
9039 (yyparse): If pure, remove local yylval and yylloc. Add local
9040 yystackp to accommodate pure definitions of yylval and yylloc.
9041 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9042 yylvalp and yyllocp to &yylval and &yylloc.
9043 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9044 namespace. Previously, nerrs and char were missing, but lval and lloc
9045 weren't necessary.
9046 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9047 yylvalp and yyllocp parameters since, if pure, these are now always
9048 accessible through yystackp. If not pure, they are still accessible
9049 globally.
9050 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9051 `if (YYID (N))' to pacify lint.
9052
9053 2005-12-21 Akim Demaille <akim@epita.fr>
9054
9055 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9056 destroy the RHS symbols of a rule.
9057 * data/yacc.c (yylen): Initialize to 0.
9058 Keep its value to the number of items to possibly shift.
9059 In particular, a regular successful parse that ends on YYFINAL by
9060 a (internal) YYACCEPT must not have yylen != 0.
9061 (yyerrorlab, yyreturn): Pop the RHS.
9062 Reorder a bit to emphasize the `shifting' bits of code.
9063 (YYPOPSTACK): Now accept a number of items to pop.
9064 * data/lalr1.cc: Likewise.
9065 * data/glr.c: Formatting changes.
9066 Use goto instead of fall through.
9067 * doc/bison.texinfo (Destructor Decl): Complete.
9068
9069 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9070
9071 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9072 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9073 * djgpp/config.bat: Replace every occurence of the file name
9074 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9075 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9076 * djgpp/config.sed: Replace every occurence of the file name
9077 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9078 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9079 * djgpp/djunpack.bat: DJGPP specific file.
9080 * djgpp/fnchange.lst: DJGPP specific file.
9081 * djgpp/README.in: Add new information about how to unpack the bison
9082 source on MSDOS and other systems which have 8.3 file name restrictions
9083 using djunpack.bat and fnchange.lst.
9084
9085 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9086
9087 * bootstrap (build_cvs_prefix): Remove; unused.
9088 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9089 when getting gnulib.
9090
9091 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9092
9093 * data/glr.c: Reorder typedef declarations for structs to match order
9094 of struct declarations.
9095 Rename yystack everywhere to yystackp except in yyparse where it's not
9096 a pointer.
9097 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9098 consistency.
9099 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9100 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9101 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9102 lint.
9103
9104 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9105
9106 * tests/sets.at (Accept): Fix typos in regular expression used to
9107 sed out the final state number.
9108
9109 Work around portability problem on Solaris 10: flex-generated
9110 files include <stdio.h> before <config.h>, which messes up
9111 because the latter defines __EXTENSIONS__. Address the problem
9112 by creating two new little files that include <config.h> first,
9113 then include the flex-generated files. Rewrite everyone else
9114 to include <config.h> first, as well.
9115 * lib/timevar.c: Always include "config.h".
9116 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9117 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9118 (EXTRA_bison_SOURCES): New macro.
9119 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9120 * src/system.h: Don't include config.h.
9121 * src/LR0.c: Include <config.h> first.
9122 * src/assoc.c: Likewise.
9123 * src/closure.c: Likewise.
9124 * src/complain.c: Likewise.
9125 * src/conflicts.c: Likewise.
9126 * src/derives.c: Likewise.
9127 * src/files.c: Likewise.
9128 * src/getargs.c: Likewise.
9129 * src/gram.c: Likewise.
9130 * src/lalr.c: Likewise.
9131 * src/location.c: Likewise.
9132 * src/main.c: Likewise.
9133 * src/muscle_tab.c: Likewise.
9134 * src/nullable.c: Likewise.
9135 * src/output.c: Likewise.
9136 * src/parse-gram.y: Likewise.
9137 * src/print.c: Likewise.
9138 * src/print_graph.c: Likewise.
9139 * src/reader.c: Likewise.
9140 * src/reduce.c: Likewise.
9141 * src/relation.c: Likewise.
9142 * src/state.c: Likewise.
9143 * src/symlist.c: Likewise.
9144 * src/symtab.c: Likewise.
9145 * src/tables.c: Likewise.
9146 * src/uniqstr.c: Likewise.
9147 * src/vcg.c: Likewise.
9148
9149 * src/parse-gram.y: Fix minor problems uncovered by lint.
9150 (current_lhs, current_lhs_location): Now static.
9151 (current_assoc): Remove unused variable.
9152
9153 Cleanups so that Bison-generated parsers have less lint.
9154 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9155 Prepend /*ARGSUSED*/, for lint's sake.
9156 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9157 definition if 'lint' is defined.
9158 (YYID): New macro (or function, if lint).
9159 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9160 * data/yacc.c: Likewise.
9161 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9162 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9163 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9164 is C++ only.
9165 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9166 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9167 Use YYID(0) rather than 0, for lint.
9168 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9169 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9170
9171 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9172
9173 * tests/glr-regression.at
9174 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9175 Close memory leak reported by twlevo.
9176
9177 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9178
9179 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9180 all stacks.
9181 (yyparse): Iterate another stack in order to call user destructors.
9182 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9183 New test case.
9184 (Duplicated user destructor for lookahead): This test now is expected
9185 to succeed.
9186
9187 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9188
9189 * NEWS: Document the following change.
9190 * data/yacc.c: Say "parser skeleton" rather than "file", since
9191 it's no longer just a file.
9192 * data/glr.c: Grant a special exception for C GLR parsers, that
9193 reads like the already-existing exception for C LALR(1) parsers.
9194 * data/glr.cc: Likewise.
9195 * data/lalr1.cc: Likewise.
9196 * data/location.cc: Likewise.
9197 * data/yacc.c: Reword the "written by" statement to clarify that
9198 it was the parser skeleton, not the entire output file.
9199 * data/glr.c: Written by Paul Hilfinger.
9200 * data/glr.cc: Written by Akim Demaille.
9201 * data/lalr1.cc: Likewise.
9202
9203 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9204
9205 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9206 Fix typos in previous change that broke 'make check'.
9207 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9208 supported in C.
9209 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9210 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9211 We can revert this once things settle down.
9212
9213 * src/conflicts.c (conflicts_print): Don't print file name twice
9214 when %expect fails because there were no conflicts.
9215 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9216 change.
9217 * tests/conflicts.at (%expect not enough, %expect too much):
9218 (%expect with reduce conflicts): Adjust to new behavior.
9219
9220 2005-11-18 Akim Demaille <akim@epita.fr>
9221
9222 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9223 errors.
9224 * NEWS: Document this.
9225 * doc/bison.texinfo (Expect Decl): Likewise.
9226
9227 2005-11-16 Akim Demaille <akim@epita.fr>
9228
9229 Generalize the display of semantic values and locations in traces.
9230 * data/glr.c (yy_reduce_print): Fix indices (again).
9231 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9232 literal integers.
9233 * data/lalr1.cc (yyreduce_print): Rename as...
9234 (yy_reduce_print): this.
9235 Display values and locations.
9236 * data/yacc.c (yy_reduce_print): Likewise.
9237 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9238 (yysymprint): Move higher to be visible from yy_reduce_print).
9239 (yyparse): Adjust.
9240 * tests/calc.at: Adjust the expected length of the traces.
9241
9242 2005-11-14 Akim Demaille <akim@epita.fr>
9243
9244 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9245 from 1 to N, while values and location start at 0.
9246 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9247
9248 2005-11-14 Akim Demaille <akim@epita.fr>
9249
9250 * data/glr.c (yy_reduce_print): Fix the $ number.
9251
9252 2005-11-14 Akim Demaille <akim@epita.fr>
9253
9254 "Use" parse parameters.
9255 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9256 * data/glr.c, data/glr.cc: Use them.
9257 * data/glr.c (YYUSE): Have a C++ definition that supports
9258 non-pointer types.
9259
9260 2005-11-14 Akim Demaille <akim@epita.fr>
9261
9262 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9263
9264 2005-11-14 Akim Demaille <akim@epita.fr>
9265
9266 * data/glr.cc: New.
9267 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9268
9269 2005-11-12 Akim Demaille <akim@epita.fr>
9270
9271 Let position and location be PODs.
9272 * data/location.cc (position::initialize, location::initialize): New.
9273 (position::position, location::location): Define only if
9274 b4_location_constructors is defined.
9275 * data/lalr1.cc (b4_location_constructors): Define it for backward
9276 compatibility.
9277 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9278
9279 2005-11-12 Akim Demaille <akim@epita.fr>
9280
9281 * data/lalr1.cc: Move the body of the ctor and dtor into the
9282 parser file (instead of the header).
9283 Wrap the implementations in a "namespace yy".
9284
9285 2005-11-12 Akim Demaille <akim@epita.fr>
9286
9287 Have glr.c include its header file when created.
9288 * data/glr.c (b4_shared_declarations): New.
9289 Output them verbatim in the parser if !%defines, otherwise
9290 output then in the header file, and include it instead.
9291
9292 2005-11-11 Akim Demaille <akim@epita.fr>
9293
9294 * data/glr.c: Comment changes.
9295
9296 2005-11-11 Akim Demaille <akim@epita.fr>
9297
9298 When yydebug, report semantic and location values for reductions.
9299 * data/glr.c (yy_reduce_print): Report the semantic values and the
9300 locations.
9301 (YY_REDUCE_PRINT): Adjust.
9302 (yyglrReduce): Use them.
9303 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9304 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9305 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9306 traces.
9307
9308 2005-11-10 Akim Demaille <akim@epita.fr>
9309
9310 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9311 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9312 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9313
9314 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9315
9316 * m4/cxx.m4, examples/Makefile.am: Don't build
9317 examples/calc++ if no C++ compiler is available. (trivial change)
9318
9319 2005-11-09 Akim Demaille <akim@epita.fr>
9320
9321 * src/scan-skel.l: Use a couple of asserts.
9322
9323 2005-11-03 Akim Demaille <akim@epita.fr>
9324
9325 In some (weird) cases, the final state number is incorrect.
9326 Reported by Alexandre Duret-Lutz.
9327 * src/LR0.c (state_list_append): Remove the computation of
9328 final_state.
9329 (save_reductions): Do it here.
9330 (get_state): Alpha conversion.
9331 (generate_states): Use a for loop.
9332 * src/gram.h (item_number_is_rule_number)
9333 (item_number_is_symbol_number): New.
9334 * src/state.c: Use assert.
9335 * src/system.h: Include assert.h.
9336 * tests/sets.at (Accept): New.
9337
9338 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9339
9340 * data/glr.c (yyfill): Adjust comment.
9341 (yyresolveAction): Initialize default location properly
9342 for empty right-hand sides.
9343 (yydoAction): Ditto.
9344 Add comment explaining apparently dead code.
9345 * tests/glr-regression.at
9346 (Incorrectly initialized location for empty right-hand side in GLR):
9347 New test.
9348
9349 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9350
9351 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9352 gnulib when interrupted. This fixes some race conditions and
9353 works around some portability problems (one noted by Paul
9354 Hilfinger).
9355
9356 2005-10-22 Akim <akim@epita.fr>
9357
9358 * Makefile.cfg: Adjust to config -> build-aux.
9359 Reported by twledo.
9360
9361 2005-10-21 Akim Demaille <akim@epita.fr>
9362
9363 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9364 the %parse-params.
9365 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9366 * data/yacc.c (b4_Pure_if): Rename as...
9367 (b4_yacc_pure_if): this.
9368 (YY_SYMBOL_PRINT, yyparse): Adjust.
9369 * doc/bison.texinfo: Formatting changes.
9370
9371 2005-10-21 Akim Demaille <akim@epita.fr>
9372
9373 Finish the transition config -> build-aux.
9374 * configure.ac, Makefile.am: Use build-aux.
9375 * config/prev-version, config/announce-gen, config/Makefile.am:
9376 Move to...
9377 * build-aux/prev-version, build-aux/announce-gen,
9378 * build-aux/Makefile.am: here.
9379
9380 2005-10-14 Akim Demaille <akim@epita.fr>
9381
9382 * examples/calc++/test: Use set -x only when VERBOSE.
9383
9384 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9385
9386 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9387 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9388
9389 2005-10-13 Akim Demaille <akim@epita.fr>
9390
9391 * src/scan-skel.l: Output the base name parts of the parser and
9392 header file names.
9393 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9394 additional checks.
9395 Use this to exercise C++ outputs in subdirs.
9396 Reported by Oleg Smolsky.
9397
9398 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9399
9400 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9401 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9402 Problem reported by John P. Hartmann.
9403 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9404 already defined it.
9405
9406 2005-10-12 Akim Demaille <akim@epita.fr>
9407
9408 * src/parse-gram.y (version_check): Exit 63 to please missing
9409 (stands for "version mismatch).
9410 * tests/input.at, doc/bison.texinfo: Adjust.
9411
9412 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9413
9414 Work around portability problems with Visual Age C compiler
9415 (xlc and xlC_r) reported by John P. Hartmann.
9416 * data/location.cc (initial_column, initial_line): Remove.
9417 All uses replaced by 0 and 1.
9418 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9419 that xlc complains about.
9420 * src/scan-skel.l (skel_wrap): Likewise.
9421 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9422 as __STDC__.
9423 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9424 __STDC_VERSION__. Use it everywhere instead of looking at
9425 __STDC__ and __cplusplus.
9426
9427 2005-10-10 Akim Demaille <akim@epita.fr>
9428
9429 * examples/calc++/test: Be quiet unless VERBOSE.
9430
9431 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9432
9433 * data/c.m4 (yydestruct, yysymprint):
9434 Use YYUSE instead of casting to void.
9435 * data/glr.c (YYUSE): New macro.
9436 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9437 Use it instead of rolling our own.
9438 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9439 (YYCHK1):
9440 Use /*CONSTCOND*/ to suppress lint warnings.
9441 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9442 (YY_STACK_PRINT): Use 'false' not '0'.
9443 (YYUSE): New macro.
9444 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9445 * data/yacc.c (YYUSE): New macro.
9446 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9447 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9448 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9449
9450
9451 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9452 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9453
9454 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9455
9456 Undo the parts of the unlocked-I/O change that substituted
9457 putc or puts for printf. This might hurt performance a bit,
9458 but some people prefer the printf style.
9459 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9460 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9461 All uses replaced by YYFPRINTF and YYDPRINTF.
9462 * data/yacc.c: Likewise.
9463 * lib/bitset.c (bitset_print): Likewise.
9464 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9465 putc and puts.
9466 * lib/lbitset.c (debug_lbitset): Likewise.
9467 * src/closure.c (print_firsts, print_fderives): Likewise.
9468 * src/gram.c (grammar_dump): Likewise.
9469 * src/lalr.c (look_ahead_tokens_print): Likewise.
9470 * src/output.c (escaped_output): Likewise.
9471 (user_actions_output): Break apart two printfs.
9472 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9473 * src/reduce.c (reduce_print): Likewise.
9474 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9475 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9476
9477 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9478 Use assignments rather than casts-to-void to suppress
9479 unused-variable warnings. This pacifies 'lint'.
9480 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9481 unused-variable warnings.
9482
9483 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9484
9485 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9486
9487 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9488
9489 Use unlocked I/O for a minor performance improvement on hosts like
9490 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9491 is to use the gnlib unlocked-io module, and to prefer putc and
9492 puts to printf when either will work (since the latter doesn't
9493 come in an unlocked flavor).
9494 * bootstrap (gnulib_modules): Add unlocked-io.
9495 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9496 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9497 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9498 and similarly for puts and putc and printf.
9499 * data/yacc.c: Likewise.
9500 * lib/bitset.c (bitset_print): Likewise.
9501 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9502 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9503 to printf.
9504 * lib/lbitset.c (debug_lbitset): Likewise.
9505 * src/closure.c (print_firsts, print_fderives): Likewise.
9506 * src/gram.c (grammar_dump): Likewise.
9507 * src/lalr.c (look_ahead_tokens_print): Likewise.
9508 * src/output.c (escaped_output): Likewise.
9509 (user_actions_output): Coalesce two printfs.
9510 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9511 * src/reduce.c (reduce_print): Likewise.
9512 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9513 * src/system.h: Include unlocked-io.h rather than stdio.h.
9514
9515 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9516 this confuses xgettext.
9517
9518 2005-10-02 Akim Demaille <akim@epita.fr>
9519
9520 * bootstrap (gnulib_modules): Add strverscmp.
9521 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9522 * m4/.cvsignore: Add strverscmp.m4.
9523 * src/parse-gram.y (%require): New token, new rule.
9524 (version_check): New.
9525 * src/scan-gram.l (%require): Adjust.
9526 * tests/input.at (AT_REQUIRE): New.
9527 Use it.
9528 * doc/bison.texinfo (Require Decl): New.
9529 (Calc++ Parser): Use %require.
9530
9531 2005-10-02 Akim Demaille <akim@epita.fr>
9532
9533 * data/location.cc: New.
9534
9535 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9536 Akim Demaille <akim@epita.fr>
9537
9538 Make sure -odir/foo.cc creates dir/location.hh etc.
9539 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9540 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9541 (spec_defines_file): Now const.
9542 (dir_prefix): New.
9543 (short_base_name): Remove.
9544 * src/files.c: Adjust.
9545 (dirname.h): Include.
9546 (base_name): Don't prototype it.
9547 (finput): Remove, duplicates gram_in.
9548 (full_base_name, short_base_name): Replace by...
9549 (all_but_ext, all_but_tab_ext): these.
9550 (compute_base_names): Rename as...
9551 (compute_file_name_parts): this.
9552 Update to compute the new variables, including dir_prefix.
9553 Adjust dependencies.
9554 * src/output.c (prepare): Output them.
9555 * src/reader.c: Adjust to use gram_in, not finput.
9556 * src/scan-skel.l (@dir_prefix@): New.
9557
9558 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9559
9560 * lib/subpipe.c: New function end_of_output_subpipe() added
9561 to allow support for non-posix systems. This is a no-op function
9562 for posix systems.
9563
9564 * lib/subpipe.h: New function end_of_output_subpipe() added
9565 to allow support for non-posix systems. This is a no-op function
9566 for posix systems.
9567
9568 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9569 handle the lack of pipe/fork functionality on non-posix systems.
9570
9571 * djgpp/Makefile.maint: DJGPP specific file.
9572
9573 * djgpp/README.in: DJGPP specific file.
9574
9575 * djgpp/config.bat: DJGPP specific configuration file.
9576
9577 * djgpp/config.sed: DJGPP specific configuration file.
9578
9579 * djgpp/config.site: DJGPP specific configuration file.
9580
9581 * djgpp/config_h.sed: DJGPP specific configuration file.
9582
9583 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9584
9585 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9586
9587 2005-10-02 Akim Demaille <akim@epita.fr>
9588
9589 * data/location.cc: New, extract from...
9590 * data/lalr1.cc: here.
9591 (location.hh): Include it after the user prologue, in case the
9592 filename type is defined by the user.
9593 Forward declation location and position before the pre-prologue.
9594 (yyresult_): Rename as...
9595 (yyresult): this, it's a local variable, not an attribute.
9596 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9597
9598 2005-10-01 Akim Demaille <akim@epita.fr>
9599
9600 * examples/extexi: Restore the #line generation.
9601
9602 2005-09-30 Akim Demaille <akim@epita.fr>,
9603 Alexandre Duret-Lutz <adl@gnu.org>
9604
9605 Move the token type and YYSTYPE in the parser class.
9606 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9607 (parser::token): New, from the moved free definition of tokens.
9608 (parser::semantic_value): Now a full definition instead of an
9609 indirection to YYSTYPE.
9610 (b4_post_prologue): No longer included in the header file, but
9611 in the implementation file.
9612 * doc/bison.texi (C+ Language Interface): Update.
9613 * src/parse-gram.y: Support unary %define.
9614 * tests/actions.at: Define global_tokens_and_yystype for backward
9615 compatibility until we update the tests.
9616 * tests/calc.at: Idem.
9617 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9618 to simplify the code.
9619
9620 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9621
9622 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9623 Ah, the good old days! Problem reported by Peter Klein.
9624 * bootstrap (gnulib_modules): Add strerror, strtoul.
9625 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9626 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9627
9628 2005-09-29 Akim Demaille <akim@epita.fr>
9629
9630 * data/c.m4 (b4_error_verbose_if): New.
9631 * data/lalr1.cc: Use it.
9632 (YYERROR_VERBOSE_IF): Remove.
9633 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9634 parser members, replaced by...
9635 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9636 local variables.
9637 (yysyntax_error_): Takes the state number as argument.
9638 (yyreduce_print_): Use the argument yyrule, not the former
9639 attribute yyn_.
9640
9641 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9642
9643 * bootstrap (gnulib_modules): Add verify.
9644 * lib/.cvsignore: Add verify.h.
9645 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9646 * src/system.h (verify): Remove.
9647 Include verify.h instead.
9648 * src/tables.c (tables_generate): Use new API for 'verify'.
9649
9650 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9651
9652 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9653 local variables whose names begin with 'yy'.
9654 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9655 Trivial changes from Joel E. Denny.
9656
9657 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9658 it itself.
9659 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9660 don't use alloca any more.
9661
9662 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9663 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9664 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9665 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9666 to match yacc.c, to test more hosts.
9667
9668 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9669
9670 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9671 doesn't affect behavior.
9672 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9673 Solaris, AIX, MSC.
9674 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9675 This works a bit better with glibc, if user code has already included
9676 stdlib.h.
9677 * doc/bison.texinfo (Bison Parser): Document that users can't
9678 arbitrarily use malloc and free for other purposes. Document
9679 that <alloca.h> and <malloc.h> might be included.
9680 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9681 user must declare alloca.
9682
9683 * HACKING (release): Forwarn the Translation Project about
9684 stable releses.
9685
9686 2005-09-20 Akim Demaille <akim@epita.fr>
9687
9688 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9689
9690 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9691
9692 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9693 (YYSTACK_ALLOC_MAXIMUM): Use it.
9694 (yysyntax_error): New function.
9695 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9696 multiple syntax errors are reported, and alloca is being used.
9697 Instead, reallocate buffers twice as big each time, so that
9698 we waste at most half the allocated memory. Start with a small
9699 (128-byte) buffer that will suffice in most cases anyway.
9700 Use yysyntax_error to do most of the work.
9701
9702 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9703 yynerrs is the number of errors reported, not the number of
9704 errors encountered.
9705
9706 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9707 Mark it as expected to fail.
9708 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9709 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9710 Don't start user-code symbols with "yy", to avoid name space problems.
9711
9712 2005-09-19 Akim Demaille <akim@epita.fr>
9713
9714 Remove the traits, failed experiment.
9715 It never proved useful, and anyway because of the current
9716 definition, it was not possible to have several specialization of
9717 this traits, making it useless.
9718 * data/lalr1.cc (yy:traits): Remove.
9719 Inline its definitions in the parser class.
9720
9721 2005-09-19 Akim Demaille <akim@epita.fr>
9722
9723 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9724 least Mac OSX with a /usr/local install of gettext.
9725
9726 2005-09-19 Akim Demaille <akim@epita.fr>
9727
9728 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9729 and yytoken for similarity with the other skeletons.
9730
9731 2005-09-19 Akim Demaille <akim@epita.fr>
9732
9733 * NEWS, configure.ac: update version number to 2.1a.
9734
9735 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9736
9737 * NEWS: Version 2.1.
9738
9739 * NEWS: Remove notice of yytname change, since it was never in an
9740 official release.
9741 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9742 diagnostic.
9743 * src/output.c (prepare): Likewise.
9744 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9745 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9746 is not defined. This is an awful hack, but it's enough for now.
9747 All callers changed.
9748 * tests/glr-regression-at (make_value): Args are const pointers now,
9749 to avoid GCC warning.
9750 (Duplicated user destructor for lookahead): New test. Currently
9751 skipped. It fails on my host but I'm not sure it'll always fail.
9752
9753 2005-09-16 Akim Demaille <akim@epita.fr>
9754
9755 * src/symtab.h (struct symbol): Declare the printer and destructor
9756 as const, to avoid accidental calls to free.
9757 (symbol_destructor_set, symbol_printer_set): Adjust.
9758 * src/symtab.c: Adjust.
9759
9760 2005-09-16 Akim Demaille <akim@epita.fr>
9761
9762 * data/c.m4 (b4_token_enums): New.
9763 (b4_token_defines): Rename as...
9764 (b4_token_enums_defines): this.
9765 (b4_token_defines): New, output only the #defines.
9766 * data/yacc.c, data/glr.c: Adjust.
9767 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9768 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9769 as default values.
9770
9771 2005-09-16 Akim Demaille <akim@epita.fr>
9772
9773 * data/lalr1.cc (yylex_): Remove, inline its code.
9774 (yyreport_syntax_error_): Remove, replaced by...
9775 (yysyntax_error_): this which returns a string and leaves to the
9776 caller the call to the users' error function.
9777 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9778 Move from members of the parser object...
9779 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9780 to local variables of the parse function.
9781
9782 2005-09-16 Akim Demaille <akim@epita.fr>
9783
9784 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9785 since it's in Bison's name space.
9786
9787 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9788
9789 * data/glr.c (yyresolveValue): Add default case to pacify
9790 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9791
9792 * NEWS: Document when yyparse started to return 2.
9793 * doc/bison.texinfo (Parser Function): Document when yyparse
9794 returns 2.
9795
9796 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9797 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9798 changed.
9799 (class position): file_name -> filename (reverting). All uses changed.
9800
9801 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9802
9803 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9804 do anything if $@ exists. This reverts part of the 2005-07-07
9805 patch.
9806
9807 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9808
9809 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9810 contains obsolete information and isn't worth distributing as a
9811 separate file anyway.
9812 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9813 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9814 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9815 (yyparse): Abort if user code uses longjmp to throw an unexpected
9816 value.
9817
9818 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9819
9820 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9821 Suggested by twlevo@xs4all.nl.
9822
9823 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9824 This avoids a diagnostic from gcc -Wswitch-enum.
9825 Problem reported by twlevo@xs4all.nl.
9826
9827 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9828 standards. Use "file name" or "file" or "name", depending on
9829 the context.
9830 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9831 not to hack/foo.tab.c.
9832 (Calc++ Top Level): 2nd arg of main is not const.
9833 * data/glr.c: b4_filename -> b4_file_name.
9834 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9835 All uses changed.
9836 (class position): filename -> file_name. All uses changed.
9837 * data/yacc.c: b4_filename -> b4_file_name.
9838 * lib/bitset.h: filename -> file_name in local vars.
9839 * lib/bitset_stats.c: Likewise.
9840 * src/files.c: Likewise.
9841 * src/scan-skel.l ("@output ".*\n): Likewise.
9842 * src/files.c (file_name_split): Renamed from filename_split.
9843 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9844
9845 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9846
9847 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9848 to accommodate latest gnulib.
9849
9850 * tests/glr-regression.at (Duplicate representation of merged trees):
9851 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9852
9853 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9854 needed.
9855
9856 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9857
9858 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9859 All uses changed. Invoke user destructor after an error during a
9860 split parse (trivial change from Joel E. Denny).
9861
9862 * tests/glr-regression.at
9863 (User destructor after an error during a split parse): New test case.
9864 Problem reported by Joel E. Denny in:
9865 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9866
9867 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9868
9869 * README-cvs: Give URLs for recommended tools.
9870 Mention Gzip version problem, and bootstrapping issues.
9871 Remove troubleshooting section, as it's somewhat obsolete.
9872
9873 * bootstrap (no_cache): New var, to accommodate different wget
9874 variants. Use it instead of '-C off'. Problem reported by
9875 twlevo@xs4all.nl.
9876
9877 * data/glr.c (yydestroyStackItem): New function.
9878 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9879 debugging information. Problem reported by Joel E. Denny.
9880
9881 2005-08-25 Akim Demaille <akim@epita.fr>
9882
9883 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9884
9885 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9886
9887 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9888 Don't invoke destructor on unresolved entries.
9889 * tests/glr-regression.at
9890 (User destructor for unresolved GLR semantic value): New test case.
9891 Problem reported by Joel E. Denny in:
9892 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9893
9894 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9895
9896 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9897 Add strnlen.c.
9898 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9899 lib-prefix.m4, po.m4.
9900
9901 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9902 in yydestruct diagnostic, since it might not be an error.
9903 Problem reported by Joel Denny near end of
9904 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9905 * data/lalr1.cc (yyerturn): Likewise.
9906 * data/yacc.c (yyreturn): Likewise.
9907 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9908
9909 * src/files.c: Remove obsolete FIXME comment.
9910
9911 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9912 with the other templates, and to fix bogus run-on messages such
9913 as the one reported at the end of
9914 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9915 All callers changed to avoid the newline.
9916 (yyprocessOneStack): Output two lines rather than one, to accommodate
9917 the above change. This changes the debug output format slightly.
9918
9919 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9920 reported by Joel E. Denny in
9921 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9922 (trivial change).
9923 * tests/glr-regression.at (Duplicate representation of merged trees):
9924 New test, from Joel E. Denny in:
9925 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9926 * THANKS: Add Joel E. Denny.
9927
9928 * configure.ac (AC_INIT): Bump to 2.0c.
9929
9930 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9931
9932 * NEWS: Version 2.0b.
9933
9934 * Makefile.am (SUBDIRS): Put examples before tests, so that
9935 "make check" doesn't finish with "All 1 tests passed".
9936
9937 * tests/regression.at (Token definitions): Don't rely on
9938 AT_PARSER_CHECK for data that contains backslashes. It currently
9939 uses 'echo', and 'echo' isn't portable if its argument contains
9940 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9941 that the byte '\0xff' is not printable in the C locale; it is,
9942 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9943 not printable, so use '\0x81' to test.
9944
9945 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9946 version of GCC, since the macro is used with non-GCC compilers.
9947
9948 Fix core dump reported by Pablo De Napoli in
9949 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9950 * tests/regression.at (Invalid inputs with {}): New test.
9951 * src/parse-gram.y (token_name): Translate type before using
9952 it as an index.
9953
9954 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9955 the user's name space. All uses changed to __attribute__
9956 ((__unused__)).
9957 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9958 Add __attribute__ ((__noreturn__)).
9959
9960 * etc/clcommit: Remove. We weren't using it, and it failed
9961 "make maintainer-distcheck".
9962 * Makefile.maint: Merge from coreutils.
9963 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9964 (syntax-check-rules): Change list of rules as described below.
9965 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9966 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9967 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9968 (sc_trailing_space): New rules.
9969 (sc_xalloc_h_in_src): Remove.
9970 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9971 (sc_space_tab, sc_error_exit_success, sc_changelog):
9972 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9973 (makefile-check, po-check, author_mark_check):
9974 (makefile_path_separator_check, copyright-check):
9975 Use grep -n, to make it easier to find violations.
9976 Use CVS_LIST and CVS_LIST_EXCEPT.
9977 (header_regexp, h_re): Remove.
9978 (dd_c): New macro.
9979 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9980 (my-distcheck): Use more-modern GCC flags.
9981 (signatures, %.asc): Remove.
9982 (rel-files, announcement): Remove signatures.
9983 Restore old updating code, even though we don't use it, so
9984 that we're the same as coreutils.
9985 (alpha, beta, major): Depend on news-date-check.
9986 Make the upload commands.
9987
9988 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9989 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9990 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9991 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9992 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9993 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9994 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9995 * tests/sets.at: Likewise.
9996
9997 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9998 we comment out the Autoconf version number.
9999 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10000 it's error-prone and "make maintainer-distcheck" rejects it.
10001
10002 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10003 Indent calls to "error" to pacify "make maintainer-distcheck",
10004 when the calls are not intended to be translated.
10005 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10006
10007 * src/Makefile.am (DEFS): Use +=, to pacify
10008 "make maintainer-distcheck".
10009 (bison_SOURCES): Add scan-skel.h.
10010 (sc_tight_scope): New rule, from coreutils.
10011
10012 * src/files.c (src_extension, header_extension):
10013 Now static, not extern.
10014 * src/getargs.c (short_options): Likewise.
10015 * src/muscle_tab.c (muscle_table): Likewise.
10016 * src/parse-gram.y (current_class, current_type, current_prec):
10017 Likewise.
10018 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10019 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10020 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10021 void, to avoid warning when NLS is disabled.
10022 * src/output.c: Include scan-skel.h.
10023 (scan_skel): Remove decl, since scan-skel.h does this.
10024 (output_skeleton):
10025 Indent calls to "error" to pacify "make maintainer-distcheck".
10026 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10027 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10028 "make maintainer-distcheck".
10029 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10030 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10031 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10032 (skel_lex_destroy, scan_skel): Move these decls to...
10033 * src/scan-skel.h: New file.
10034 * src/uniqstr.c (uniqstr_assert):
10035 Indent calls to "error" to pacify "make maintainer-distcheck".
10036
10037 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10038 not @VAR@.
10039
10040 * tests/torture.at: Revamp to avoid misuse of atoi that
10041 "make maintainer-distcheck" complained about.
10042
10043 * examples/extexi (message): Don't print a message more than once,
10044 and omit line-number decoration that makes Emacs compile think
10045 that informative messages are worth worrying about.
10046
10047 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10048
10049 * configure.ac: Update version number.
10050
10051 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10052 accidentally.
10053 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10054 autogenerated by the maintainer.
10055 * examples/calc++/.cvsignore: Add *.yy.
10056
10057 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10058 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10059 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10060
10061 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10062
10063 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10064 from maintainer-distcheck about casting the argument of 'free'.
10065
10066 * NEWS: Mention recent yytname changes.
10067 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10068
10069 * bootstrap: For translations that have not yet been upgraded to
10070 the new runtime-po domain, prime the pump by extracting the
10071 relevant strings from the obsolete translations. This code can be
10072 removed once the bison-runtime domain has been translated by each
10073 team.
10074
10075 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10076 now that token names are already quoted.
10077
10078 Fix problem reported by Anthony Heading.
10079 * data/glr.c (YYTOKEN_TABLE): New macro.
10080 (yytname): Define if YYTOKEN_TABLE.
10081 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10082 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10083 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10084 * src/output.c (prepare_symbols): Output token_table_flag.
10085
10086 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10087
10088 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10089 again if the first call fails.
10090
10091 * data/glr.c (yytnamerr): New function.
10092 (yyreportSyntaxError): Use it to dequote most string literals.
10093 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10094 with other skeletons. All uses changed.
10095 (yytnameerr_): New function.
10096 (yyreport_syntax_error): Use it to dequote most string literals.
10097 * data/yacc.c (yytnamerr): New function.
10098 (yyerrlab): Use it to decode most string literals.
10099 * doc/bison.texinfo (Decl Summary, Calling Convention):
10100 Clarify quoting convention of yytname.
10101 * src/output.c (prepare_symbols): Quote all names. This undoes
10102 the 2005-04-17 change, which is now accomplished (mostly) via
10103 changes in the parsers as described above.
10104 * tests/regression.at (Token definitions, Web2c Actions):
10105 Undo most 2005-04-17 change here, too.
10106
10107 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10108
10109 Fix more problems reported by twlevo@xs4all.nl.
10110 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10111 remove trailing spaces. This loses the exit status of ./types,
10112 and isn't needed since ./types shouldn't be emitting trailing
10113 spaces.
10114 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10115 as the stack isn't valid in that case.
10116
10117 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10118 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10119 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10120 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10121 is used.
10122 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10123 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10124 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10125 Likewise.
10126
10127 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10128 overly-picky compilers that reject 'char *foo = "bar";'.
10129
10130 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10131 to FILE * parameter, not to stderr. This fixes a typo introduced
10132 in the 2005-07-12 change.
10133
10134 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10135 warnings from GCC 4.
10136
10137 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10138 (yyglrShiftDefer, yysplitStack):
10139 Remove unused parameters b4_pure_formals. All uses changed.
10140 (yyglrShift): Remove unused parameters b4_user_formals.
10141 All uses changed.
10142 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10143
10144 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10145
10146 Destructor cleanups and regularization among the three skeletons.
10147 * NEWS: Document the behavior changes.
10148 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10149 stack before failing, as the cleanup code will do it for us now.
10150 * data/lalr1.cc (yyerrlab): Likewise.
10151 * data/glr.c (yyparse): Pop everything off the stack before
10152 freeing it, so that destructors get called properly.
10153 * data/lalr1.cc (yyreturn): Likewise.
10154 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10155 This is more consistent.
10156 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10157 why destructors might be called. 1.875 -> 2.1.
10158 (Destructor Decl, Decl Summary, Table of Symbols):
10159 Some English-language cleanups for %destructor.
10160 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10161 Add output line for destructor of start symbol.
10162 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10163 because of that same extra output line.
10164
10165 * NEWS: Document minor wording changes in diagnostics of
10166 Bison-generated parsers.
10167 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10168 Remove unused formals. All uses changed.
10169 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10170 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10171 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10172 Rename yyoverflowab to yyexhaustedlab.
10173 When memory exhaustion occurs during syntax-error reporting,
10174 report it separately rather than in a single diagnostic; this
10175 eases translation.
10176 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10177 (Memory Exhausted): Renamed from Parser Stack Overflow.
10178 Revamp wording slightly to prefer "memory exhaustion".
10179 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10180
10181 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10182
10183 Add i18n support to the GLR skeleton. Partially fix the C++
10184 skeleton; a C++ expert needs to finish this. Remove debugging
10185 msgids; there's little point to having them translated, since they
10186 can be understood only by someone who can read the
10187 (English-language) source code.
10188
10189 Generate runtime-po/bison-runtime.pot automatically, so that we
10190 don't have to worry about garbage getting in that file. We'll
10191 make sure after the next official release that old msgids don't
10192 get lost. See
10193 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10194
10195 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10196 Now auto-generated.
10197 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10198 Fix typos in explanations of the runtime file.
10199 * bootstrap: Change gettext keyword from YYI18N to YY_.
10200 Use standard Makefile.in.in in runtime-po, since we'll arrange
10201 for backward-compatible bison-runtime.po files in a different way.
10202 * data/glr.c (YY_): New macro, from yacc.c.
10203 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10204 Translate messages intended for users.
10205 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10206 the wording in the other skeletons. We don't know that the memory
10207 is virtual.
10208 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10209 Use same method that yacc.c uses.
10210 Don't translate debugging messages.
10211 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10212 it doesn't work (yet), and requires C++ expertise to fix.
10213 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10214 Move defn to a more logical place, to be consistent with other
10215 skeletons.
10216 Don't translate debugging messages.
10217 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10218 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10219 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10220 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10221
10222 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10223 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10224 void, not int.
10225 * tests/glr-regression.at (Badly Collapsed GLR States):
10226 Likewise.
10227 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10228 yylex should return 0 at EOF rather than aborting.
10229
10230 Improve tests for stack overflow in GLR parser.
10231 Problem reported by twlevo@xs4all.nl.
10232 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10233 All uses removed.
10234 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10235 can handle the problem.
10236 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10237 (yyparse): New local variable yyresult to record the result.
10238 Use result of setjmp to set it, rather than storing itinto
10239 struct.
10240 (yyDone): Remove label.
10241 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10242 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10243 if YYABORT is used).
10244 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10245 yyparse status; put status > 1 into diagnostic.
10246 Check that status==2 works.
10247 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10248 Use exit status 3 for failure to open (which shouldn't happen).
10249
10250 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10251
10252 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10253 1 on syntax error; just let yyparse do its thing.
10254 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10255 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10256 (Exploding the Stack Size with Alloca):
10257 (Exploding the Stack Size with Malloc):
10258 Expect exit status 2, not 1, since the parser is supposed to blow
10259 its stack. Problem reported by twlevo@xs4all.nl.
10260
10261 * data/glr.c (yyparse): Don't assume that the initial calls
10262 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10263 Print a stack-overflow message and fail instead.
10264 Initialize the line-number information before creating the stack,
10265 so that the stack-overflow message can report line zero safely.
10266
10267 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10268
10269 Fix problems reported by twlevo@xs4all.nl.
10270 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10271 (yyuserMerge): Provide a default case if b4_mergers is empty.
10272 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10273 * tests/glr-regression.at
10274 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10275 Add casts to pacify C++ compilers.
10276 * tests/glr-regression.at (Improper merging of GLR delayed action
10277 sets): Declare yylex before using it.
10278 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10279 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10280 test for valgrind; valgrind is independent of g++.
10281 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10282 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10283 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10284 Use a destructor, so that we can expand the stack. Change
10285 YYSTYPE to char * so that we can free it. Cast result of malloc.
10286
10287 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10288
10289 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10290 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10291
10292 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10293
10294 * PACKAGING: New file, suggested by Bruno Haible and taken from
10295 similar wording in gettext's PACKAGING file.
10296 * NEWS: Mention PACKAGING.
10297 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10298
10299 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10300
10301 * NEWS: Document recent i18n improvements.
10302 * bootstrap: Get runtime translations into runtime-po.
10303 Create runtime-po files automatically, if possible.
10304 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10305 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10306 does not infringe on the user's name space.
10307 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10308 * doc/bison.texinfo (Internationalization): Revamp the English
10309 and Texinfo syntax a bit, to try to make it clearer.
10310 (Bison Options, Option Cross Key): Mention --print-localedir.
10311 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10312 YYENABLE_NLS. Quote a bit more.
10313 * runtime-po/.cvsignore: New file.
10314 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10315 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10316 * runtime-po/quot.sed: Likewise.
10317 * runtime-po/boldquot.sed: Likewise.
10318 * runtime-po/en@quot.header: Likewise.
10319 * runtime-po/en@boldquot.header: Likewise.
10320 * runtime-po/insert-header.sin: Likewise.
10321 * runtime-po/remove-potcdate.sin: Likewise.
10322 * runtime-po/Makevars: Likewise.
10323 * runtime-po/LINGUAS: Likewise.
10324 * runtime-po/de.po: Likewise; we will rely on the translation project
10325 to maintain this, so "bootstrap" should get it.
10326 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10327 its value.
10328 * src/main.c (main): Bind the bison-runtime domain, too.
10329
10330 2005-07-12 Bruno Haible <bruno@clisp.org>
10331
10332 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10333 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10334 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10335 * runtime-po: New directory.
10336 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10337 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10338 * runtime-po/Rules-quot: New file, copied from po/.
10339 * runtime-po/quot.sed: Likewise.
10340 * runtime-po/boldquot.sed: Likewise.
10341 * runtime-po/en@quot.header: Likewise.
10342 * runtime-po/en@boldquot.header: Likewise.
10343 * runtime-po/insert-header.sin: Likewise.
10344 * runtime-po/remove-potcdate.sin: Likewise.
10345 * runtime-po/Makevars: New file.
10346 * runtime-po/POTFILES.in: New file.
10347 * runtime-po/LINGUAS: New file.
10348 * runtime-po/bison-runtime.pot: New file.
10349 * runtime-po/de.po: New file.
10350 * m4/bison.m4: New file.
10351 * Makefile.am (SUBDIRS): Add runtime-po.
10352 (aclocaldir, aclocal_DATA): New variables.
10353 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10354 Define aclocaldir.
10355 * src/getargs.c (usage): Document --print-localedir option.
10356 (PRINT_LOCALEDIR_OPTION): New enum item.
10357 (long_options): Add --print-localedir option.
10358 (getargs): Handle --print-localedir option.
10359 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10360 (Internationalization): New section.
10361
10362 2005-07-12 Akim Demaille <akim@epita.fr>
10363
10364 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10365 for consistency with the rest of the code.
10366 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10367 Add separators.
10368
10369 2005-07-12 Akim Demaille <akim@epita.fr>
10370
10371 * src/parse-gram.y: Use %printer instead of YYPRINT.
10372
10373 2005-07-12 Akim Demaille <akim@epita.fr>
10374
10375 * src/symtab.h, src/symtab.c (symbol_print): New.
10376 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10377 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10378
10379 2005-07-12 Akim Demaille <akim@epita.fr>
10380
10381 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10382 b4_at_dollar and b4_dollar_dollar.
10383
10384 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10385
10386 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10387 and Pennello's paper.
10388
10389 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10390
10391 * data/yacc.c (yyparse): Undo previous patch. Instead,
10392 set yylsp[0] and yyvsp[0] only if the initial action
10393 sets yylloc and yylval, respectively.
10394
10395 * data/yacc.c (yyparse): In the initial action, set
10396 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10397 This avoids the use of undefined variables if the initial
10398 action does not set yylloc and/or yylval.
10399
10400 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10401
10402 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10403 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10404 Remove from CVS. These files are automatically generated.
10405 * examples/extexi: Clarify that this file is now part of Bison,
10406 not GNU M4, and that it works with any POSIX-compatible Awk.
10407 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10408 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10409 so that we also get calc++-parser.yy. Geneate it.
10410 Use $(AWK), not gawk, since any conforming Awk will do.
10411 Put comment before action, since older 'make' can't handle comment
10412 in action.
10413 $(BUILT_SOURCES): List all built sources, not just some of them.
10414 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10415 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10416 $($(calc_sources_generated)): Remove unnecessary test for existence
10417 of target. (This had a shell syntax error anyway; a stray "x".)
10418 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10419 calc++-parser.yy.
10420 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10421
10422 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10423 implied by the other modules.
10424
10425 2005-07-06 Akim Demaille <akim@epita.fr>
10426
10427 Bind examples/calc++ to the package.
10428 * examples/calc++/Makefile: Remove, replaced by...
10429 * examples/calc++/Makefile.am: ... this new file.
10430 * examples/calc++/test: Remove input.
10431 * examples/calc++/compile: Remove.
10432 * examples/Makefile.am: New.
10433 * configure.ac, Makefile.am: Adjust.
10434 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10435
10436 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10437
10438 * data/glr.c (yyFail): Drastically simplify; since the format argument
10439 never had any % directives, we can simply pass it to yyerror.
10440 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10441 be modified later, as that is the usual style in glr.c.
10442 Problems reported by Paul Hilfinger.
10443
10444 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10445 and size overflow errors.
10446 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10447 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10448 (YYSIZEMAX): New macro.
10449 (yystpcpy): New function, taken from yacc.c.
10450 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10451 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10452 so that we don't have to maintain their signatures.
10453 (yyFail): Check for buffer overflow, by using vsnprintf rather
10454 than vsprintf. Allocate a bigger buffer if possible.
10455 Report an error if buffer allocation fails.
10456 (yyStackOverflow): New function.
10457 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10458 the initialization was successful. It might fail if storage was
10459 exhausted.
10460 (yyexpandGLRStack): Add more checks for storage allocation failure.
10461 Use yyStackOverflow to report failures.
10462 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10463 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10464 Don't assume stack number fits in int.
10465 (yysplitStack): Check for storage allocation failure.
10466 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10467 can print diagnostics on storage allocation failure. All callers
10468 changed.
10469 (yyresolveValue): Use yybool for boolean.
10470 (yyreportSyntaxError): Check for size-calculation overflow.
10471 This code is taken from yacc.c.
10472 (yyparse): Check for storage allocation errors when allocating
10473 the initial stack.
10474
10475 2005-07-05 Akim Demaille <akim@epita.fr>
10476
10477 Extract calc++ from the documentation.
10478 * doc/bison.texinfo (Calc++): Add the extraction marks.
10479 * examples/extexi: New, from the aborted GNU Programming 2E.
10480 Separate the different paragraph of a file with empty lines.
10481 * examples/Makefile: Use it to extract the whole calc++ example.
10482
10483 2005-06-24 Akim Demaille <akim@epita.fr>
10484
10485 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10486 class typedefs.
10487
10488 2005-06-22 Akim Demaille <akim@epita.fr>
10489
10490 * doc/bison.texinfo (C++ Language Interface): First stab.
10491 (C++ Parsers): Remove.
10492
10493 2005-06-22 Akim Demaille <akim@epita.fr>
10494
10495 * data/lalr1.cc (yylex_): Honor %lex-param.
10496
10497 2005-06-22 Akim Demaille <akim@epita.fr>
10498
10499 Start a set of simple examples.
10500 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10501 * examples/calc++/calc++-driver.hh,
10502 * examples/calc++/calc++-parser.yy,
10503 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10504 * examples/calc++/compile, examples/calc++/test: New.
10505
10506 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10507
10508 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10509 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10510 which stems from the 2005-05-27 patch.
10511
10512 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10513
10514 * data/glr.c: Modify treatment of unused parameters to permit use
10515 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10516
10517 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10518
10519 Fix infringement on user name space reported by Janos Zoltan Szabo.
10520 * data/yacc.c (yyparse): strlen -> yystrlen.
10521
10522 2005-05-30 Akim Demaille <akim@epita.fr>
10523
10524 * data/lalr1.cc (_): New.
10525 Translate the various messages.
10526
10527 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10528
10529 Fix infringement on user name space reported by Bruno Haible.
10530 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10531 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10532 the user's name space.
10533 (alloca): Include <stdlib.h> to get it, if it's not built in.
10534 (YYMALLOC, YYFREE): Define only if needed.
10535 (malloc, free): Declare, but only if needed, as this infringes on
10536 the user name space.
10537
10538 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10539
10540 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10541 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10542 with %d format.
10543 * lib/ebitset.c (min, max): Undef before defining.
10544 * lib/vbitset.c (min, max): Likewise.
10545 * lib/subpipe.c (create_subpipe): Save local variables in case
10546 vfork clobbers them.
10547
10548 2005-05-24 Bruno Haible <bruno@clisp.org>
10549
10550 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10551 error message syntax used by gcc-4.0.
10552
10553 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10554
10555 * README: Mention m4 1.4.3. Remove obsolete advice about
10556 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10557
10558 * bootstrap: Remove workaround for problem I encountered with
10559 gettext 0.14.1; it seems to be fixed now.
10560
10561 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10562
10563 * NEWS: Version 2.0a.
10564
10565 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10566 the previous change.
10567
10568 Various maintainer cleanups.
10569 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10570 conftest*, for benefit of CVS commands run at the same time as
10571 "configure". Add build-aux, since "bootstrap" now creates it and
10572 its subfiles.
10573 * Makefile.cfg (move_if_change): Remove.
10574 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10575 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10576 (po_repo, do-po-update, po-update, wget_files, get-targets):
10577 (config.guess-url_prefix, config.sub-url_prefix):
10578 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10579 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10580 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10581 Remove.
10582 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10583 this is now the recommended name.
10584 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10585 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10586 ylwrap. These files now go into build-aux.
10587 * config/move-if-change: Remove.
10588 * config/prev-version.txt: Bump from 1.75 to 2.0.
10589
10590 * bootstrap: Add stdio-safer, unistd-safer modules.
10591 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10592 we don't need it).
10593 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10594 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10595 * lib/subpipe.c: Include "unistd-safer.h".
10596 (create_subpipe): Make sure all the newly-created
10597 file descriptors are > 2, so that diagnostics don't
10598 get sent down them (which might cause Bison to hang, in theory).
10599 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10600 * src/files.c (xfopen): Use fopen_safer, not fopen.
10601
10602 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10603 yesterday's yacc.c fix.
10604
10605 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10606
10607 * data/glr.c, data/lalr1.cc: Update copyright date.
10608
10609 Fix a destructor bug reported by Wolfgang Spraul in
10610 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10611 * data/yacc.c (yyabortlab): Don't call destructor, and
10612 don't set yychar to EMPTY.
10613 (yyoverflowlab): Don't call destructor.
10614 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10615 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10616 since we no longer output the message "discarding lookahead token
10617 end of input ()".
10618
10619 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10620
10621 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10622 fix a small glitch in debugging output.
10623 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10624 after YY_SYMBOL_PRINT where needed.
10625
10626 (struct yyGLRState): Add some comments.
10627 (struct yySemanticOption): Add some comments.
10628 (union yyGLRStackItem): Add comment.
10629
10630 (yymergeOptionSets): Correct this to properly perform the union,
10631 avoiding infinite reported by Michael Rosien.
10632 Update comment.
10633
10634 * tests/glr-regression.at: Add test for GLR merging error reported
10635 by M. Rosien.
10636
10637 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10638
10639 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10640 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10641 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10642 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10643 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10644 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10645 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10646 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10647 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10648 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10649 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10650 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10651 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10652 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10653 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10654 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10655 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10656 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10657 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10658 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10659 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10660 src/output.h, src/parse-gram.c, src/parse-gram.h,
10661 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10662 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10663 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10664 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10665 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10666 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10667 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10668 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10669 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10670 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10671 tests/reduce.at, tests/regression.at, tests/sets.at,
10672 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10673 Update FSF postal mail address.
10674
10675 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10676
10677 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10678 Problem reported by Ralf Menzel.
10679
10680 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10681
10682 * tests/actions.at: Test that stack overflow invokes destructors.
10683 From Marcus Holland-Moritz.
10684 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10685 from here....
10686 (yyreturn): to here. That way, destructors are called properly
10687 even if the stack overflows, or the user calls YYACCEPT or
10688 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10689 (yyoverflowlab): Destroy the lookahead.
10690
10691 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10692
10693 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10694
10695 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10696
10697 * NEWS: Bison-generated C parsers no longer quote literal strings
10698 associated with tokens.
10699 * src/output.c (prepare_symbols): Don't escape strings,
10700 since users don't want to see C escapes.
10701 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10702 in diagnostics.
10703 * tests/input.at (Torturing the Scanner): Likewise.
10704 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10705
10706 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10707
10708 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10709 the data size is known to be too small and we can't increase it.
10710 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10711
10712 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10713
10714 * src/parse-gram.y: Include quotearg.h.
10715 (string_as_id): Quote $1 before using it as a key, since the
10716 lexer no longer quotes it for us.
10717 (string_content): Don't strip quotes, since lexer no longer
10718 quotes it for us.
10719 * src/scan-gram.l: Include quotearg.h.
10720 ("\""): Omit quote.
10721 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10722 a key, since the rest of the lexer doesn't quote it.
10723 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10724 * tests/regression.at (Token definitions): Check for backslashes
10725 in token strings.
10726
10727 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10728 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10729 (yyparse): Revamp code to generate long syntax error message, to
10730 make it easier to translate, and to avoid problems with arithmetic
10731 overflow. Change "virtual memory" to "memory" in diagnostic, since
10732 we don't know whether the memory is virtual.
10733
10734 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10735
10736 * NEWS: Bison-generated C parsers now use the _ macro to
10737 translate strings.
10738 * data/yacc.c (_) [!defined _]: New macro.
10739 All English strings wrapped inside this macro.
10740 * doc/bison.texinfo (Bison Parser): Document _.
10741 * po/POTFILES.in: Include src/parse-gram.c, since it now
10742 includes translateable strings that parse-gram.y doesn't.
10743
10744 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10745
10746 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10747 reverting the 2004-10-11 change to this function.
10748 (symbol_check_alias_consistency): Don't call symbol_type_set
10749 if the type name is already correct.
10750 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10751
10752 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10753
10754 * tests/regression.at (Token definitions): Don't use a token named
10755 c, as that generates a "#define c ..." that runs afoul of buggy
10756 stdlib.h that uses the identifier c as a member of struct
10757 drand48_data. Problem reported by Horst Wente.
10758
10759 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10760
10761 * bootstrap: Change translation URL from
10762 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10763 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10764 redirection glitches. Problem reported by twlevo@xs4all.nl.
10765
10766 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10767
10768 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10769 after operands; POSIX says this isn't portable for the c99 command.
10770
10771 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10772
10773 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10774 immediately if a data overrun has occurred; this may help us track
10775 down what may be a spurious failure on MacOS.
10776
10777 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10778
10779 Respond to problems reported by twlevo@xs4all.nl.
10780
10781 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10782
10783 * src/vcg.h: Comment fix.
10784 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10785 (G_CMAX): Change to -1 instead of INT_MAX.
10786
10787 * data/yacc.c (yyparse): Omit spaces before #line.
10788
10789 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10790
10791 * src/tables.c (state_number_to_vector_number): Put it inside an
10792 "#if 0", since it's not currently used. Problem reported by
10793 Roland McGrath.
10794
10795 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10796
10797 * src/output.c (escaped_output): Renamed from
10798 escaped_file_name_output, since we now use it for symbol tags as
10799 well. All uses changed.
10800 (symbol_destructors_output, symbol_printers_output):
10801 Escape symbol tags too.
10802 Problem reported by Matyas Forstner in
10803 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10804
10805 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10806 not needed.
10807 * src/output.c (user_actions_output, token_definitions_output,
10808 symbol_destructors_output, symbol_printers_output): Likewise.
10809 * src/reader.c (prologue_augment): Likewise.
10810 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10811
10812 * src/vcg.c (output_edge): Don't quote linestyle arg.
10813 Problem reported by twlevo@xs4all.nl.
10814
10815 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10816
10817 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10818 example, reported by Derek M Jones. Also, make the example even
10819 more outrageous, to better illustrate how bad the problem is.
10820
10821 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10822
10823 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10824 putsym. Typo reported by Sebastian Piping.
10825
10826 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10827
10828 * doc/bison.texinfo (Language and Grammar): some -> same
10829 (Epilogue): int he -> in the
10830 Typos reported by Sebastian Piping via Justin Pence.
10831
10832 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10833
10834 * tests/glr-regression.at (Improper handling of embedded actions
10835 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10836 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10837 with dollar signs in test names.
10838 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10839 for a similar reason.
10840
10841 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10842
10843 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10844 wants to redefine G_VIEW.
10845
10846 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10847
10848 * src/vcg.c (get_view_str): Remove case for normal_view.
10849 Problem reported by twlevo@xs4all.nl.
10850
10851 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10852
10853 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10854 Problem reported by twlevo@xs4all.nl.
10855
10856 * doc/bison.texinfo: Change @dircategory from "GNU programming
10857 tools" to "Software development". Requested by Richard Stallman
10858 via Karl Berry.
10859
10860 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10861
10862 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10863 Problem reported by twlevo@xs4all.nl.
10864
10865 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10866
10867 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10868 keyword; it's not needed with modern compilers, and it doesn't
10869 affect correctness with older compilers. Suggested by
10870 twlevo@xs4all.nl.
10871
10872 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10873
10874 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10875 gcc -Wswitch-default.
10876 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10877 * data/yacc.c (yyparse): Likewise.
10878
10879 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10880
10881 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10882 already. Let config.h define any nonstandard values.
10883
10884 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10885
10886 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10887 for the benefit of slower hosts. Problem reported by
10888 Nelson H. F. Beebe.
10889
10890 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10891
10892 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10893 being defined and not used.
10894 * data/lalr1.cc (yyparse): Likewise.
10895 Use "if (false)" rather than "if (0)".
10896
10897 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10898
10899 * TODO: Mention that we should allow NUL bytes in tokens.
10900
10901 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10902
10903 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10904 Problem reported by Hans Aberg.
10905
10906 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10907
10908 * src/getargs.c (version): Happy new year; update overall
10909 program copyright date from 2004 to 2005.
10910
10911 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10912 Problem reported by Hans Aberg.
10913 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10914 (Output file names.): Add a test for the case when standard output
10915 is closed.
10916
10917 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10918
10919 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10920 to fix an oversight in the Bison 2.0 manual.
10921
10922 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10923
10924 * NEWS: Version 2.0. Reformat the existing news items since
10925 1.875, so that related items are grouped together.
10926 * configure.ac (AC_INIT): Bump version to 2.0.
10927 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10928
10929 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10930 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10931 otherwise, we're not testing alloca. Unfortunately there's no
10932 simple way to consult HAVE_ALLOCA here.
10933
10934 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10935 for yymsg, too.
10936
10937 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10938 hand. This avoids a warning about comparing int to size_t when
10939 GCC warnings are enabled.
10940
10941 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10942
10943 * NEWS: Bison-generated parsers no longer default to using the
10944 alloca function (when available) to extend the parser stack, due
10945 to widespread problems in unchecked stack-overflow detection.
10946 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10947 responsibility to set it to a positive value. This lets the user
10948 specify a value that is not a preprocessor constant.
10949 * data/yacc.c (YYMAXDEPTH): Likewise.
10950 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10951 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10952 to be a compile-time constant. However, explain the constraints on it.
10953 Also, explain the constraints on YYINITDEPTH.
10954 (Table of Symbols): Explain that alloca is no longer the default.
10955 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10956 to 1.
10957
10958 * doc/bison.texinfo (Location Default Action): Mention that n must
10959 be zero when k is zero. Suggested by Frank Heckenbach.
10960
10961 2004-12-22 Akim Demaille <akim@epita.fr>
10962
10963 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10964 (parser::state_type, parser::semantic_type, parser::location_type):
10965 Private, not public.
10966 (parser::parse): Return ints, not bool.
10967 Returning a bool introduces a problem: 0 corresponds to false, and
10968 it seems weird to return false on success. Returning true changes
10969 the conventions for yyparse.
10970 Alternatively we could return void and send an exception.
10971 There is no clear consensus (yet?).
10972 (state_stack, semantic_stack, location_stack): Rename as...
10973 (state_stack_type, semantic_stack_type, location_stack_type): these.
10974 Private, not public.
10975 * tests/c++.at: New.
10976 * tests/testsuite.at, tests/Makefile.am: Adjust.
10977
10978 2004-12-21 Akim Demaille <akim@epita.fr>
10979
10980 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10981
10982 2004-12-21 Akim Demaille <akim@epita.fr>
10983
10984 Don't impose std::string for filenames.
10985
10986 * data/lalr1.cc (b4_filename_type): New.
10987 (position::filename): Use it.
10988 (parser.hh): Move the inclusion of stack.hh and location.hh below
10989 the user code, so that needed headers for the filename type can be
10990 included first.
10991 Forward declare them before the user code.
10992 * tests/Makefile.am (check-local, installcheck-local): Pass
10993 TESTSUITEFLAGS to the TESTSUITE.
10994
10995 2004-12-20 Akim Demaille <akim@epita.fr>
10996
10997 Use more STL like names: my_class instead of MyClass.
10998
10999 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11000 (SemanticStack, SemanticType, StateStack, StateType)
11001 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11002 (Parser::value): Rename as...
11003 (location_stack, location_type, rhs_number_type, semantic_stack)
11004 (semantic_type, state_stack, state_type, token_number_type, stack)
11005 (slice, traits, parser::yylloc, parser::yylval): these.
11006
11007 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11008
11009 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11010
11011 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11012 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11013
11014 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11015
11016 Remove uses of 'short int' and 'unsigned short int'. This raises
11017 some arbitrary limits. It uses more memory but nowadays that's
11018 not much of an issue.
11019
11020 This change does not affect the generated parsers; that's a different
11021 task, as some users will want to conserve memory there.
11022
11023 Ideally we should use size_t to represent all object counts, and
11024 something like ptrdiff_t to represent signed differences of object
11025 counts; but that will require more code-cleanup than I have the
11026 time to do right now.
11027
11028 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11029 Use size_t, not int or short int, to count objects.
11030 * src/closure.c (nritemset, closure): Likewise.
11031 * src/closure.h (nritemset, closure): Likewise.
11032 * src/nullable.c (nullable_compute): Likewise.
11033 * src/print.c (print_core): Likewise.
11034 * src/print_graph.c (print_core): Likewise.
11035 * src/state.c (state_compare, state_hash): Likewise.
11036 * src/state.h (struct state): Likewise.
11037 * src/tables.c (default_goto, goto_actions): Likewise.
11038
11039 * src/gram.h (rule_number, rule): Use int, not short int.
11040 * src/output.c (prepare_rules): Likewise.
11041 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11042 errs, reductions): Likewise.
11043 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11044 Likewise.
11045 * src/tables.c (vector_number, tally, action_number,
11046 ACTION_NUMBER_MINIMUM): Likewise.
11047 * src/output.c (muscle_insert_short_int_table): Remove.
11048
11049 2004-12-17 Akim Demaille <akim@epita.fr>
11050
11051 * data/lalr1.cc: Extensive Doxygenation.
11052 (error_): Rename as...
11053 (error): this, since it is visible to the user.
11054 Adjust callers.
11055 (Parser::message): Now an automatic variable from...
11056 (Parser::yyreport_syntax_error_): here.
11057 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11058 Parser::error.
11059 * tests/input.at: Escape $.
11060
11061 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11062
11063 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11064 Parenthesize rhs to avoid obscure problems with mistakes like
11065 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11066 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11067 b4_rhs_location): Likewise.
11068 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11069 b4_rhs_location): Likewise.
11070
11071 2004-12-16 Akim Demaille <akim@epita.fr>
11072
11073 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11074 yacc.c: be sure to stay within yycheck_.
11075 * tests/actions.at: Re-enable C++ tests.
11076
11077 2004-12-16 Akim Demaille <akim@epita.fr>
11078
11079 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11080 real.
11081
11082 2004-12-16 Akim Demaille <akim@epita.fr>
11083
11084 Use #define to handle the %name-prefix.
11085
11086 * data/glr.c, data/yacc.c: Comment changes.
11087 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11088 so that one can refer to yylex in the parser file, and have it
11089 renamed, as is the case with other skeletons.
11090
11091 2004-12-16 Akim Demaille <akim@epita.fr>
11092
11093 Move lalr1.cc internals into yy*.
11094
11095 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11096 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11097 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11098 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11099 (empty_, final_, terror_, errcode_, ntokens_)
11100 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11101 (looka_, ilooka_, error_range_, nerrs_):
11102 Rename as...
11103 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11104 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11105 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11106 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11107 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11108 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11109 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11110 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11111 these.
11112
11113 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11114
11115 Fix some problems reported by twlevo at xs4all.
11116 * src/symtab.c (symbol_new): Report an error if the input grammar
11117 contains too many symbols. This is better than calling abort() later.
11118 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11119 (struct node, struct graph):
11120 Rename member expand to stretch. All uses changed.
11121 (struct graph): Remove member layoutalgorithm. All uses removed.
11122 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11123 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11124 All uses changed.
11125 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11126
11127 2004-12-15 Akim Demaille <akim@epita.fr>
11128
11129 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11130 Add more Doxygen comments.
11131 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11132 (report_syntax_error_, translate_): Rename as...
11133 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11134 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11135
11136 2004-12-15 Akim Demaille <akim@epita.fr>
11137
11138 * data/lalr1.cc (lex_): Rename as...
11139 (yylex_): this.
11140 Move the trace here.
11141 Take the %name-prefix into account.
11142 Reported by Alexandre Duret-Lutz.
11143
11144 2004-12-15 Akim Demaille <akim@epita.fr>
11145
11146 Simplify the C++ parser constructor.
11147
11148 * data/lalr1.cc (debug_): Rename as...
11149 (yydebug_): so that the parser's internals are always in the yy*
11150 pseudo namespace.
11151 Adjust uses.
11152 (b4_parse_param_decl): Remove the leading comma as it is now only
11153 called as unique argument list.
11154 (Parser::Parser): Remove the constructor accepting a location and
11155 an initial debugging level.
11156 Remove from the other ctor the argument for the debugging level.
11157 (debug_level_type, debug_level, set_debug_level): New.
11158
11159 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11160 constructor calls.
11161
11162 2004-12-15 Akim Demaille <akim@epita.fr>
11163
11164 Remove b4_root related material: failure experiment
11165 (which goal was to allow to derive from a class).
11166
11167 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11168 definitions and uses.
11169
11170 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11171
11172 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11173 not 2, since it's not portable to subtract 1 from the start of an
11174 array. The new item 0 is never set or used. All uses changed.
11175
11176 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11177 the default definition of YYLLOC_DEFAULT. Problem reported
11178 by Frank Heckenbach.
11179
11180 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11181
11182 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11183 the normal case and one for the error case. Just use the
11184 first one uniformly. Problem reported by Frank Heckenbach.
11185 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11186 use exactly the same macro in both places.
11187 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11188 so that the normal-case YYRHSLOC works for the error case too.
11189 All uses changed.
11190 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11191 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11192 * doc/bison.texinfo (Location Default Action): Don't claim that
11193 we have an array of locations. Use the same macro for both glr
11194 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11195 the index is 0.
11196
11197 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11198
11199 * HACKING: Update email addresses to send announcements to.
11200
11201 * configure.ac (AC_INIT): Bump version to 1.875f.
11202
11203 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11204
11205 * NEWS: Version 1.875e.
11206 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11207
11208 * src/scan-skel.l: Include "complain.h", for "fatal".
11209
11210 * src/relation.h (relation_print, relation_digraph):
11211 Relation sizes are of type relation_node, not size_t (this is
11212 merely a doc fix, since the two types are equivalent).
11213 (relation_transpose): Relation sizes are of type relation_node,
11214 not int.
11215 * src/relation.c: Likewise.
11216 (top, infinity): Now of type relation_node, not int.
11217 (traverse, relation_transpose): Use relation_node, not int.
11218
11219 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11220 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11221 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11222
11223 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11224 specifying whether the test should be skipped. Use it tp
11225 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11226 fail on some hosts, and should be skipped.
11227
11228 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11229
11230 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11231 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11232 unless otherwise specified below.
11233
11234 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11235 to allocate kernel_base, kernel_items, kernel_size, since
11236 they needn't be initialized to 0.
11237 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11238 * src/closure.c (new_closure): Likewise, for itemset.
11239 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11240 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11241 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11242 (build_relations): Likewise for edge, states1, includes.
11243 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11244 * src/reader.c (packgram): Likewise, for ritem, rules.
11245 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11246 * src/relation.c (relation_digraph): Likewise for VERTICES.
11247 (relation_transpose): Likewise for new_R, end_R.
11248 * src/symtab.c (symbols_token_translations_init): Likewise for
11249 token_translations.
11250 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11251 (token_actions): Likewise for yydefact, actrow, conflrow,
11252 conflict_list.
11253 (save_column): Likewise for froms[symno], tos[symno].
11254 (goto_actions): Likewise for state_count.
11255 (pack_table): Likewise for base, pos, check.
11256 (tables_generate): Likewise for width.
11257
11258 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11259 for initial core. Just have a separate core, so we needn't worry
11260 about whether kernel_size and kernel_base are initialized.
11261
11262 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11263 kernel_size, kernel_items): Remove unnecessary initialization.
11264 * src/conflicts.c (conflicts): Likewise.
11265 * src/derives.c (derives): Likewise.
11266 * src/muscle_tablc (muscle_insert): Likewise.
11267 * src/relation.c (relation_digraph): Likewise.
11268 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11269 conflrow, conflict_table, conflict_list, table, check):
11270 Likewise.
11271
11272 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11273 This is because all callers pass unsigned int.
11274 * src/closure.h (new_closure): Likewise.
11275
11276 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11277 (build_relations): Initialize includes[i] in all cases.
11278 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11279 and rules[ruleno].precsym. Initialize members in order.
11280 * src/relation.c (relation_transpose): Always initialize new_R[i]
11281 and end_R[i].
11282 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11283
11284 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11285 conflict_list[0] was always 0, but now it isn't initialized.
11286
11287 * src/table.c (table_grow): When conflict_table grew, the grown
11288 area wasn't cleared. Fix this.
11289
11290 * lib/.cvsignore: Add strdup.c, strdup.h.
11291 * m4/.cvsignore: Add strdup.m4.
11292
11293 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11294
11295 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11296 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11297 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11298 ngotos + 1 without checking for overflow.
11299 (build_relations): Use END_NODE, not -1, to denote end of edges.
11300 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11301 build_relations): Use goto_number, not int, for goto numbers.
11302 * src/tables.c (save_column, default_goto): Likewise.
11303
11304 2004-11-23 Akim Demaille <akim@epita.fr>
11305
11306 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11307 of #defining from yystype.
11308 Don't typedef yystype, C++ does not need it.
11309 This lets it possible to forward declare it as union.
11310
11311 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11312
11313 * bootstrap (gnulib_modules): Add extensions.
11314 Problem reported by Jim Meyering.
11315
11316 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11317
11318 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11319 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11320 src/system.h, src/tables.c: XFREE -> free, to accommodate
11321 recent change to gnulib xalloc.h.
11322 Problem reported by Jim Meyering.
11323
11324 2004-11-17 Akim Demaille <akim@epita.fr>
11325
11326 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11327
11328 2004-11-17 Akim Demaille <akim@epita.fr>,
11329 Alexandre Duret-Lutz <adl@gnu.org>
11330
11331 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11332 changes.
11333 (YYCDEBUG): Adjust.
11334 Use it instead of cdebug_.
11335 (Parser::debug_stream, Parser::set_debug_stream): New.
11336 (Parser::symprint_): Define cdebug_ for temporary backward
11337 compatibility.
11338 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11339 debug_stream ().
11340
11341 2004-11-17 Akim Demaille <akim@epita.fr>
11342
11343 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11344 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11345 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11346 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11347
11348 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11349
11350 * data/glr.c (yyloc_default): Remove; not used.
11351 Problem reported by Frank Heckenbach.
11352
11353 2004-10-25 Akim Demaille <akim@epita.fr>
11354
11355 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11356 Introduce another definition to address simple location arrays.
11357 (yyGLRStack): New member: yyerror_range.
11358 (yyrecoverSyntaxError, yyparse): Update it.
11359 (yyrecoverSyntaxError): Use it when shifting the error token to
11360 have an accurate range, equivalent to the one computed by both
11361 yacc.c and lalr1.cc.
11362 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11363 that column numbers start at column 0, as per GNU Coding
11364 Standards, the others tests, and the doc.
11365 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11366 Adjust to the above change (first column is 0).
11367 And adjust the location of the "<error>", now covering the whole
11368 line.
11369
11370 2004-10-22 Akim Demaille <akim@epita.fr>
11371 and Paul Eggert <eggert@cs.ucla.edu>
11372
11373 Remove some arbitrary limits on goto numbers and relations.
11374 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11375 initial values, since they're never used.
11376 (set_goto_map): ngotos is now unsigned, so test for overflow
11377 by seeing whether it wraps around to zero.
11378 * src/lalr.h (goto_number): Now size_t, not short int.
11379 (GOTO_NUMBER_MAXIMUM): Remove.
11380 * src/relation.c (relation_print, traverse, relation_transpose):
11381 Check for END_NODE rather than looking at sign.
11382 * src/relation.h (END_NODE): New macro.
11383 (relation_node): Now size_t, not short int.
11384
11385 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11386
11387 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11388 keyword, not an identifier. Problem reported by Baron Schwartz in
11389 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11390
11391 2004-10-11 Akim Demaille <akim@epita.fr>
11392
11393 * src/symtab.c (symbol_check_alias_consistency): Also check
11394 type names, destructors, and printers.
11395 Reported by Alexandre Duret-Lutz.
11396 Recode the handling of associativity and precedence in terms
11397 of symbol_precedence_set.
11398 Accept no redeclaration at all, not even equal to the previous
11399 value.
11400 (redeclaration): New.
11401 Use it to factor redeclaration complaints.
11402 (symbol_make_alias): Don't set the type of the alias, let
11403 symbol_check_alias_consistency do it as for other features.
11404 * src/symtab.h (symbol): Add new member prec_location, and
11405 type_location.
11406 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11407 * tests/input.at (Incompatible Aliases): New.
11408
11409 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11410
11411 .cvsignore fixes to accommodate gnulib changes,
11412 and the practice of naming build directories "_build".
11413 * .cvsignore: Add "_*". Sort.
11414 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11415 * m4/.cvsignore: Add "*_gl.m4".
11416
11417 2004-10-06 Akim Demaille <akim@epita.fr>
11418
11419 * src/parse-gram.y (add_param): Fix the truncation of trailing
11420 spaces.
11421
11422 2004-10-05 Akim Demaille <akim@epita.fr>
11423
11424 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11425 whether the reducion was empty or not. This leaves room to
11426 improve the use of YYLLOC_DEFAULT in such a case.
11427 lalr1.cc is still experimental, so changing this is acceptable.
11428 And finally, there are probably not many users who changed the
11429 handling of locations in GLR, so changing is admissible too.
11430
11431 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11432 empty reduction, set @$ to an empty location ending the previously
11433 stacked symbol.
11434 Adjust uses to make sure the code is triggered on empty
11435 reductions.
11436 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11437 expected output: empty reductions have empty locations.
11438
11439 2004-09-29 Akim Demaille <akim@epita.fr>
11440
11441 * data/lalr1.cc: Move towards a more standard C++ coding style
11442 for templates: Class < T > -> Class<T>.
11443
11444 2004-09-29 Akim Demaille <akim@epita.fr>
11445
11446 * data/lalr1.cc: Reinstall the former ctor, for sake of
11447 compatibility, but warn it will be removed.
11448 Move towards a more standard C++ coding style (i.e., type *var ->
11449 type* var).
11450
11451 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11452
11453 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11454 since it's less likely to work if NULs are involved in the future.
11455
11456 2004-09-27 Akim Demaille <akim@epita.fr>
11457
11458 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11459
11460 2004-09-27 Akim Demaille <akim@epita.fr>
11461
11462 * data/lalr1.cc (b4_parse_param_decl_1): New.
11463 (b4_parse_param_decl): Use it to have different names between attribute
11464 and argument names.
11465 (b4_cc_constructor_call): Likewise.
11466
11467 2004-09-24 Akim Demaille <akim@epita.fr>
11468
11469 * src/parse-gram.y (add_param): Strip the leading and trailing
11470 blanks from a formal argument declaration.
11471 (YY_LOCATION_PRINT): New.
11472
11473 2004-09-24 Akim Demaille <akim@epita.fr>
11474
11475 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11476 after the location.
11477
11478 2004-09-24 Akim Demaille <akim@epita.fr>
11479
11480 * doc/bison.texinfo (Table of Symbols): Sort.
11481
11482 2004-09-21 Akim Demaille <akim@epita.fr>
11483
11484 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11485 the useless parentheses.
11486 Suggested by Paul Eggert.
11487
11488 2004-09-20 Akim Demaille <akim@epita.fr>
11489
11490 Let the initial-action act on the look-ahead, and use it for the
11491 "initial push" (corresponding to an hypothetical beginning-of-file).
11492 And let lalr1.cc honor %initial-action.
11493
11494 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11495 example.
11496 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11497 (Parser::Parser): Remove the ctor that used to initialize it.
11498 (Parser::parse): Like in the other skeletons, issue the "starting
11499 parse" message before any action.
11500 Honor %initial-action.
11501 Initialize the stacks with the lookahead.
11502 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11503 look-ahead.
11504 Push them in the stacks.
11505 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11506
11507 2004-09-20 Akim Demaille <akim@epita.fr>
11508
11509 * doc/bison.texinfo (Initial Action Decl): New.
11510
11511 2004-09-20 Akim Demaille <akim@epita.fr>
11512
11513 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11514 clearer criterion to define it.
11515 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11516 When reducing on an empty RHS, use the latest stacked location as
11517 location.
11518 yylloc is not always available.
11519 * data/glr.c: Likewise.
11520 Also, honor initial-actions.
11521
11522 2004-09-20 Akim Demaille <akim@epita.fr>
11523
11524 * data/yacc.c (YY_LOCATION_PRINT): New.
11525 Define when we know YYLTYPE's structure, i.e., when the default
11526 YYLLOC_DEFAULT is used.
11527 * data/c.m4 (b4_yysymprint_generate): Use it.
11528 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11529 value of the result.
11530 (error_start_): Replace with...
11531 (error_range_): this location array.
11532 This allows to replace code relying on the implementation of
11533 locations by portable code.
11534 * data/yacc.c (yylerrsp): Replace with...
11535 (yyerror_range): this.
11536 Every time a token is popped, update yyerror_range[0], to have an
11537 accurate location for the error token.
11538 * data/glr.c (YY_LOCATION_PRINT): New.
11539 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11540 deference a pointer.
11541 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11542 report the location in %printers.
11543
11544 * src/scan-skel.l: Instead of abort, report error messages to ease
11545 understanding skeleton scanning failures.
11546
11547 2004-09-16 Akim Demaille <akim@epita.fr>
11548
11549 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11550 (iterator, const_iterator): these, to be more in the C++ spirit.
11551 Also, return reverse iterators so that when displaying the stack
11552 we display its bottom first.
11553 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11554 from yacc.c.
11555 We should probably use vector here though.
11556
11557 2004-09-16 Akim Demaille <akim@epita.fr>
11558
11559 Have more complete shift traces.
11560
11561 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11562 to report Shifts instead of ad hoc YYDPRINTF invocations,
11563 including for the error token.
11564 * data/lalr1.cc (symprint_): Output the location.
11565 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11566 output the location within the %printer.
11567 Activate GLR tests, at least to make sure they compile properly.
11568 They still don't pass though.
11569 * tests/calc.at: Adjust expect verbose output, since now "Entering
11570 state..." is on a different line than the "Shifting" message.
11571
11572 2004-09-08 Akim Demaille <akim@epita.fr>
11573
11574 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11575 Bison directive from the Bison file to the invocation of this
11576 macro, so that these directives are passed to
11577 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11578 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11579 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11580 the extra Bison directives instead of the whole series.
11581 Change the grammar so that there are recoverable errors, and
11582 unrecoverable errors. Now we can have the parser give up before
11583 consuming the whole input. As a result we now can observe that
11584 the lookahead is freed when needed.
11585 Change the parser source to parse argv[1] instead of a hard coded
11586 string.
11587 Simplify yylex, and give a value and location to EOF.
11588 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11589 passed directives already coded in the file.
11590 Add some tests to check the location of "error".
11591 For some tests, the C++ parser is correct, and not yacc.c.
11592 For other tests, they provide different, but unsatisfying, values,
11593 so keep the C++ value so that at least one parser is "correct"
11594 according to the test suite.
11595 (Actions after errors): Remove, this is subsumed by the
11596 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11597
11598 2004-09-06 Akim Demaille <akim@epita.fr>
11599
11600 * data/lalr1.cc: Adjust the indentation of the labels.
11601 (Parser::pop): New.
11602 Use it.
11603
11604 2004-09-06 Akim Demaille <akim@epita.fr>
11605
11606 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11607 argument, an informative message.
11608 Call YY_SYMBOL_PRINT.
11609 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11610 * data/lalr1.cc (destruct_): Likewise.
11611 In addition, no longer depend on b4_yysymprint_generate and
11612 b4_yydestruct_generate to generate these functions, do it "by
11613 hand".
11614
11615 2004-09-03 Akim Demaille <akim@epita.fr>
11616
11617 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11618 invoked, yydestruct the lookahead.
11619 * tests/calc.at (Calculator $1): Update the expected lengths of
11620 traces: there is an added line for the discarded lookahead.
11621 * doc/bison.texinfo (Destructor Decl): Some rewording.
11622 Define "discarded" symbols.
11623
11624 2004-09-02 Akim Demaille <akim@epita.fr>
11625
11626 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11627
11628 2004-09-02 Akim Demaille <akim@epita.fr>
11629
11630 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11631 (YYDSYMPRINTF): Rename as...
11632 (YY_SYMBOL_PRINT): this.
11633 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11634 two.
11635 Use it instead of direct symprint_ calls.
11636 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11637 one.
11638
11639 2004-09-02 Akim Demaille <akim@epita.fr>
11640
11641 * data/lalr1.cc (b4_yysymprint_generate): New.
11642 (symprint_): New member function, defined when YYDEBUG.
11643 Use it consistently instead of token/nterm debugging output by
11644 hand.
11645 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11646 %printer calls to use cdebug_ when using lalr1.cc.
11647
11648 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11649
11650 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11651 with #ifdef YYDEBUG.
11652
11653 2004-08-26 Akim Demaille <akim@epita.fr>
11654
11655 * doc/bison.texinfo (Implementing Loops): Rename as...
11656 (Implementing Gotos/Loops): this.
11657
11658 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11659
11660 Adjust to latest gnulib.
11661 * bootstrap (gnulib_modules): Add xalloc-die.
11662 Set LC_ALL=C so that file names sort consistently.
11663 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11664 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11665 uintmax_t.m4, ulonglong.m4.
11666 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11667 po.m4 since we are now using _gl.m4 instead.
11668
11669 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11670
11671 * src/scan-action.l: Remove. Scanning of semantic actions is
11672 handled in scan-gram.l.
11673
11674 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11675
11676 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11677
11678 * src/location.h (struct): The file member is a uniqstr.
11679 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11680
11681 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11682
11683 Fix bug with non-%union parsers that have printers or destructors,
11684 which led to a Bison core dump. Reported by Peter Fales in
11685 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11686
11687 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11688 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11689 not to our own type.
11690 * src/output.c (symbol_destructors_output, symbol_printers_output):
11691 Don't assume %union.
11692 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11693 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11694 UNION-FLAG. All callers changed.
11695 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11696 Use type char, not unsigned int, when declaring an array of char;
11697 this lets us remove a cast.
11698 (Printers and Destructors): Add non-%union test cases.
11699
11700 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11701
11702 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11703 GLR writeups. E.g., avoid frenchspacing and the future tense,
11704 change "lookahead" to "look-ahead", and change "wrt" to "with
11705 respect to".
11706
11707 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11708
11709 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11710 New sections, split off from the GLR Parsers section. Put the new
11711 Simple GLR Parser near the start of the GLR section, for clarity.
11712 Rewrite connective text.
11713
11714 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11715
11716 * doc/bison.texinfo (Simple GLR Parsers): New section.
11717
11718 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11719
11720 * NEWS, TODO, doc/bison.texinfo:
11721 Use "look-ahead" instead of "lookahead", to be consistent.
11722 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11723 while we're fixing "look-ahead".
11724 * src/conflicts.c (shift_set): Renamed from shiftset.
11725 (look_ahead_set): Renamed from lookaheadset.
11726 * src/print.c: Likewise.
11727 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11728 name for "lookahead".
11729 (report_types, usage): Likewise.
11730 * src/getargs.h (report_look_ahead_tokens): Renamed from
11731 report_lookaheads.
11732 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11733 compute_lookaheads.
11734 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11735 (look_ahead_tokens_print): Renamed from lookaheads_print.
11736 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11737 state_rule_lookaheads_print.
11738 * src/state.h: Likewise.
11739 (reductions.look_ahead_tokens): Renamed from lookaheads.
11740 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11741 AT_DATA_LOOKAHEADS_GRAMMAR.
11742
11743 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11744
11745 * README: Update location of patched M4 distribution.
11746
11747 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11748
11749 Don't assume the C++ compiler takes the same arguments as the C compiler
11750 (trivial change).
11751 * configure.ac (O0CXXFLAGS): New var.
11752 * tests/atlocal.in (CXXFLAGS): Use it.
11753
11754 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11755
11756 Fix some "make check" problems with C++ reported by
11757 Albert Chin-A-Young for Tru64 C++ in this thread:
11758 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11759
11760 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11761 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11762 Output to a .cc file for C++, not to a .c file.
11763 * tests/calc.at (AT_CHECK_CALC): Likewise.
11764 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11765 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11766
11767 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11768
11769 * tests/calc.at, tests/actions.at: Workaround for SGI
11770 C++ compiler. (trivial change)
11771
11772 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11773
11774 Spent a few hours checking out which prerequisite versions the
11775 current sources actually require. I went all the way back to
11776 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11777 a seemingly endless set of combinations of versions more recent
11778 than that. The bottom line is that the current sources require
11779 fairly recent versions of the build tools, and it'll be some work
11780 to change this.
11781 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11782 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11783 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11784 Add comments explaining why those particular versions are
11785 currently needed.
11786
11787 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11788 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11789 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11790
11791 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11792 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11793
11794 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11795
11796 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11797 0.11.5. Suggested by Bruno Haible.
11798 * bootstrap: Remove gettext version checking.
11799
11800 * doc/bison.texinfo (Decl Summary): Also mention that %union
11801 can depend on prerequisite types. Problem reported by Tim
11802 Van Holder.
11803
11804 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11805
11806 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11807 * README-alpha: Don't tell people not to package this.
11808
11809 * bootstrap: Don't assume $(...) works; use `...` instead.
11810 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11811 gettext better.
11812
11813 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11814 put into the -d output file, and mention what to do if YYSTYPE is
11815 defined as a macro.
11816
11817 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11818
11819 Undo change made earlier today: it caused autopoint to not bring
11820 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11821 autopoint's.
11822
11823 * bootstrap: Check that gettext version matches what's in
11824 configure.ac. Warn users to ignore robots.txt ERROR 404.
11825 * bootstrap: Undo today's earlier change (logged below).
11826 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11827
11828 The gettext version checking is causing more trouble than it's
11829 curing; remove it. Problem reported by Paul Hilfinger.
11830
11831 * bootstrap: Issue a warning that one can expect a message
11832 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11833 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11834
11835 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11836
11837 Ensure that the C++ compiler used for testing actually works on a
11838 simple test program; if not, skip the C++-related tests. Problem
11839 reported by Vin Shelton in:
11840 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11841
11842 * m4/cxx.m4: New file.
11843 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11844 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11845 * tests/local.at (AT_COMPILE_CXX): Use it.
11846
11847 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11848
11849 * data/glr.c (yylloc): Output this macro even if locations are not
11850 being generated, as the GLR parser needs it even in that case.
11851 Problem reported by Troy A. Johnson
11852 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11853
11854 * configure.ac (AC_INIT): Update to 1.875e.
11855
11856 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11857
11858 * NEWS: Version 1.875d.
11859 * configure.ac (AC_INIT): Likewise.
11860 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11861
11862 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11863 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11864 lalr1.cc runs afoul of the first, and the last two are no longer
11865 supported by GCC 3.4.0.
11866 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11867 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11868
11869 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11870
11871 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11872 unsigned int, for compatibility with latest gnulib hash module.
11873 * src/state.c (state_hash, state_hasher): Likewise.
11874 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11875 * src/uniqstr.c (hash_uniqstr): Likewise.
11876
11877 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11878
11879 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11880
11881 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11882 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11883 character and string literals.
11884 (unexpected_end): New function.
11885 (unexpected_eof): Use it.
11886 (unexpected_newline): New function.
11887 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11888 actions.
11889
11890 * NEWS: Document %expect-rr.
11891
11892 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11893 Fix typo by replacing $1 with $option.
11894 Remove more 'intl'-related files.
11895 Don't DEFUN AM_INTL_SUBDIR twice.
11896
11897 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11898 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11899 strtoul.c.
11900 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11901 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11902 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11903 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11904 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11905 * src/.cvsignore: Add *.output.
11906
11907 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11908 gets copied to the output file.
11909
11910 2004-04-28 Paul Eggert <eggert@twinsun.com>
11911
11912 Get files from the gnulib and po repositories, instead of relying
11913 on them being in our CVS. Upgrade to latest versions of gnulib
11914 and Automake.
11915
11916 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11917 * bootstrap: Bootstrap from gnulib and po repositories.
11918 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11919 * README-cvs: Document these changes. Remove version numbers from
11920 mentions of build tools, since they change so often. Mention Flex.
11921
11922 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11923 (gl_USE_SYSTEM_EXTENSIONS): Add.
11924 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11925 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11926 does this for us.
11927 (AC_ISC_POSIX): Remove; we no longer support this
11928 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11929 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11930 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11931 Do not check for C89 headers, except for locale.h which is used
11932 by the Yacc library and must port to K&R hosts.
11933 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11934 Do not check for C89 functions, except for setlocale which is
11935 used by the Yacc library.
11936 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11937 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11938 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11939 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11940 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11941 AM_GNU_GETTEXT): Remove; now done by:
11942 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11943 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11944 for us.
11945
11946 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11947 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11948 Define to empty, as gnulib.mk will do the rest for us.
11949 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11950 for us.
11951 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11952 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11953
11954 * src/files.c: Include gnulib's xstrndup.h.
11955
11956 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11957 (REALLOC): Use xnrealloc, for likewise.
11958 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11959 (strnlen, memrchr): Remove decls; functions no longer used.
11960 Include <stpcpy.h>.
11961
11962 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11963 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11964 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11965 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11966 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11967 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11968 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11969 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11970 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11971 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11972 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11973 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11974 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11975 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11976 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11977 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11978 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11979 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11980 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11981 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11982 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11983 Remove, as these files are now generated automatically
11984 by bootstrap or automake.
11985
11986 * po/ChangeLog: Remove: all but one entry was a duplicate
11987 of this file, and I moved that 2000-11-02 entry here.
11988
11989 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11990 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11991 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11992 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11993 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11994 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11995 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11996 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11997 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11998 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11999 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12000 xstrndup.h.
12001 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12002 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12003 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12004 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12005 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12006 * src/.cvsignore: Remove *_.c.
12007
12008
12009 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12010 support it. (The latest stable gzip doesn't.)
12011
12012 2004-04-27 Paul Eggert <eggert@twinsun.com>
12013
12014 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12015 case, as stos_ is now used by destructors due to the 2004-02-09
12016 change.
12017
12018 Remove more K&R C support.
12019 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12020 * lib/subpipe.c (errno): Remove decl.
12021 Include <stdlib.h> unconditionally.
12022 (EXIT_FAILURE): Remove macro.
12023 * src/complain.c (vfprintf, strerror): Remove.
12024 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12025 unconditionally.
12026 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12027 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12028 (strchr, strspn, memchr): Remove decls.
12029 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12030 unconditionally. Do not declare perror.
12031 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12032 unconditionally.
12033
12034 * src/complain.c (_): Remove useless defn, as system.h defines this.
12035
12036 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12037 with latest obstack.h.
12038 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12039 to procedure types, as obstack.h now does that for us.
12040 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12041
12042 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12043 so that this include file can stand alone.
12044 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12045 does this now. Include subpipe.h first after config.h, to
12046 test whether it can stand alone.
12047
12048 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12049 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12050 unused declaration.
12051
12052 * tests/synclines.at (%union synch line): Put a dummy member in
12053 the union, because empty unions aren't allowed in C. Caught
12054 by GCC 3.4.0.
12055
12056 2004-04-13 Jim Meyering <jim@meyering.net>
12057
12058 * src/conflicts.c (conflicts_print): Correct format string typo:
12059 use `%%' to produce literal `%'. (trivial change)
12060
12061 2004-03-30 Paul Eggert <eggert@twinsun.com>
12062
12063 * src/getargs.c (version): Update copyright year to 2004.
12064
12065 * data/c.m4 (b4_int_type): Use 'short int' rather than
12066 'short', and similarly for 'long', 'unsigned', etc.
12067 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12068 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12069 yy_yypstack, yydumpstack): Likewise.
12070 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12071 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12072 Likewise.
12073 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12074 yy_stack_print, yyparse): Likewise.
12075 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12076 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12077 * lib/bitset.c (bitset_print): Likewise.
12078 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12079 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12080 * lib/bitsetv.c (bitsetv_dump): Likewise.
12081 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12082 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12083 Likewise.
12084 * src/LR0.c (allocate_itemsets): Likewise.
12085 * src/gram.h (rule_number, rule): Likewise.
12086 * src/lalr.h (goto_number): Likewise.
12087 * src/nullable.c (nullable_compute): Likewise.
12088 * src/output.c (prepare_rules): Likewise.
12089 * src/relation.c (relation_print, relation_digraph): Likewise.
12090 * src/relation.h (relation_node): Likewise.
12091 * src/state.h (state_number, transitions, errs, reductions,
12092 struct state): Likewise.
12093 * src/symtab.h (symbol_number, struct symbol): Likewise.
12094 * src/tables.c (vector_number, tally, action_number,
12095 default_goto, goto_actions): Likewise.
12096 * tests/existing.at (GNU Cim Grammar): Likewise.
12097 * tests/regression.at (Web2c Actions): Likewise.
12098
12099 * src/output.c (muscle_insert_short_int_table): Renamed from
12100 muscle_insert_short_table. All uses changed.
12101
12102 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12103
12104 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12105 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12106 Add %expect-rr rule.
12107
12108 * src/scan-gram.l: Recognize %expect-rr.
12109
12110 * src/conflicts.h (expected_sr_conflicts): Rename from
12111 expected_conflicts.
12112 (expected_rr_conflicts): Declare.
12113
12114 * src/conflicts.c (expected_sr_conflicts): Rename from
12115 expected_conflicts.
12116 (expected_rr_conflicts): Define.
12117 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12118 for GLR parsers.
12119 Use expected_sr_conflicts in place of expected_conflicts.
12120 Warn if expected_rr_conflicts used in non-GLR parser.
12121
12122 * doc/bison.texinfo: Add documentation for %expect-rr.
12123
12124 2004-03-08 Paul Eggert <eggert@gnu.org>
12125
12126 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12127 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12128
12129 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12130 in lalr1.cc.
12131 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12132 * src/scan-gram.l (scan_integer): New function.
12133 ({int}): Use it.
12134 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12135 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12136 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12137 Say "long int", not "long", for uniformity with GNU style.
12138
12139 2004-02-25 Paul Eggert <eggert@twinsun.com>
12140
12141 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12142 compilers. This fixes a problem with Intel's C++ compiler being
12143 chatty, reported by Guido Trentalancia in
12144 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12145
12146 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12147
12148 Support %destructor and merge error locations in lalr1.cc.
12149
12150 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12151 (Parser::stos_): Define unconditionally.
12152 (Parser::destruct_): New method. Generate its body with
12153 b4_yydestruct_generate.
12154 (Parser::error_start_): New attribute.
12155 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12156 token which are discarded.
12157 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12158 error_start_ when erroneous token are discarded.
12159 (Parser::parse) <yyerrlab1>: Compute the location of the error
12160 token so that it covers all the discarded tokens.
12161 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12162 it can be called with `%skeleton "lalr1.cc"', and do that.
12163
12164 2004-02-02 Paul Eggert <eggert@twinsun.com>
12165
12166 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12167 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12168 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12169 There's no need to mention top_builddir since Automake does that
12170 for us.
12171 (INCLUDES): Remove, as Automake says it's obsolescent.
12172 Contents migrated into AM_CPPFLAGS as described above.
12173 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12174
12175 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12176
12177 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12178 (yyreportSyntaxError): Handle case where lookahead token is
12179 YYEMPTY.
12180
12181 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12182
12183 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12184 resulting parsers are compilable with C++.
12185
12186 2003-12-23 Paul Eggert <eggert@twinsun.com>
12187
12188 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12189 * src/output.c (output_skeleton): Rename local var.
12190 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12191 Bison tokens, as this runs afoul of the 2003-10-07 change that
12192 disallowed NUL bytes in character constants or string literals.
12193
12194 * tests/local.at: Require Autoconf 2.59's Autotest.
12195 * tests/testsuite.at: Don't include local.at, since we now assume
12196 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12197 including it.
12198 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12199 multiple inclusion warnings.
12200
12201 2003-12-02 Akim Demaille <akim@epita.fr>
12202
12203 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12204 conditions.
12205 From Bruno Haible.
12206
12207 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12208
12209 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12210
12211 2003-10-07 Paul Eggert <eggert@twinsun.com>
12212
12213 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12214 if testsuite doesn't exist.
12215
12216 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12217 literals, unfortunately.
12218 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12219 Complain about NUL bytes in character constants or string literals.
12220
12221 2003-10-05 Paul Eggert <eggert@twinsun.com>
12222
12223 * NEWS: Don't document %no-default-prec, as it's still
12224 too experimental.
12225 * doc/bison.texinfo: Document %no-default-prec only if
12226 the defaultprec flag is set. Normally it's not.
12227
12228 2003-10-04 Paul Eggert <eggert@twinsun.com>
12229
12230 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12231 non-modifiable lvalue, instead of a modifiable one.
12232 * doc/bison.texinfo (Actions): Document that $$ can
12233 be assigned to. Do not claim that $$ and $N are
12234 array element references: user code should not rely on this.
12235
12236 2003-10-01 Paul Eggert <eggert@twinsun.com>
12237
12238 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12239 (grammar_declaration): Use it.
12240 * src/scan-gram.l: New token %no-default-prec.
12241 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12242 * NEWS, doc/bison.texinfo: Document the above.
12243
12244 2003-10-01 Akim Demaille <akim@epita.fr>
12245
12246 VCG no longer supports long_straight_phase.
12247
12248 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12249 * src/print_graph.c (print_graph): Adjust.
12250
12251 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12252 and Paul Eggert <eggert@twinsun.com>
12253
12254 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12255 Table of Symbols): Document %default-prec.
12256 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12257 (grammar_declaration): Set default_prec on %default-prec.
12258 * src/scan-gram.l (%default-prec): New token.
12259 * src/reader.h (default_prec): New flag.
12260 * src/reader.c: Likewise.
12261 (packgram): Handle it.
12262 * tests/conflicts.at (%default-prec without %prec,
12263 %default-prec with %prec, %default-prec 1): New tests.
12264
12265 2003-09-30 Paul Eggert <eggert@twinsun.com>
12266
12267 * tests/testsuite.at: Include local.at, not input.at, fixing
12268 a typo in the 2003-08-25 patch.
12269
12270 2003-08-27 Akim Demaille <akim@epita.fr>
12271
12272 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12273 GCC warnings.
12274
12275 2003-08-26 Akim Demaille <akim@epita.fr>
12276
12277 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12278 "<\#" to avoid magic from Gnus when posting parts of this script.
12279
12280 2003-08-26 Akim Demaille <akim@epita.fr>
12281
12282 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12283 (Parser::parse): here.
12284 Adjust: nerrs and errstatus is now replaced by...
12285 (Parser::nerrs_, Parser::errstatus_): New.
12286
12287 2003-08-25 Akim Demaille <akim@epita.fr>
12288
12289 * config/announce-gen, Makefile.cfg: New.
12290 * Makefile.am: Adjust.
12291 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12292 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12293
12294 2003-08-25 Akim Demaille <akim@epita.fr>
12295
12296 When reducing initial empty rules, Bison parser read an initial
12297 location that is not defined. This results in garbage, and that
12298 affects Bison's own parser. Therefore we need (i) to extend Bison
12299 to support a means to initialize this location, and (ii) to use
12300 this CVS Bison to fix CVS Bison's parser.
12301
12302 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12303 with...
12304 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12305 * src/parse-gram.y: Adjust.
12306 (%initial-action): New.
12307 (%error-verbose): Since we require CVS Bison, there is no reason
12308 not to use it.
12309 * src/scan-gram.l: Adjust.
12310 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12311 * data/yacc.c (yyparse): Use b4_initial_action.
12312
12313 2003-08-25 Akim Demaille <akim@epita.fr>
12314
12315 * doc/bison.texinfo: Don't promote stdout for error messages.
12316
12317 2003-08-25 Akim Demaille <akim@epita.fr>
12318
12319 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12320 From Alexandre Duret-Lutz.
12321
12322 2003-08-25 Akim Demaille <akim@epita.fr>
12323
12324 Version 1.875c.
12325
12326 2003-08-25 Akim Demaille <akim@epita.fr>
12327
12328 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12329 Use them.
12330
12331 2003-08-25 Akim Demaille <akim@epita.fr>
12332
12333 * data/lalr1.cc (Parser::reduce_print_): New.
12334 Use it.
12335
12336 2003-08-25 Akim Demaille <akim@epita.fr>
12337
12338 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12339 error recovery loops. This patch is based on
12340 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12341 Also, augment the similarity between lalr1.cc and yacc.c.
12342 Note: the locations of error recovery rules are not correct yet.
12343
12344 * data/lalr1.cc: Comment changes to augment the similarity between
12345 lalr1.cc and yacc.c.
12346 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12347 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12348 yyerrlab), when hitting EOF, pop the whole stack here instead of
12349 merely falling thru the default error handling mechanism.
12350 (yyerrorlab): New label, with the old contents of YYERROR,
12351 plus the following change: pop the stack of rhs corresponding
12352 to the production that invoked YYERROR. That is how Yacc
12353 behaves (required by POSIX).
12354 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12355 fail.
12356
12357 2003-08-25 Akim Demaille <akim@epita.fr>
12358
12359 Tune local.at so that people can "autom4te -l autotest calc.at -o
12360 calc" for instance, to extract a sub test suite.
12361
12362 * tests/testsuite.at: Move the initialization, Autotest version
12363 requirement, and AT_TESTED invocation into...
12364 * tests/local.at: here.
12365 * tests/testsuite.at: Include it for compatibility with Autoconf
12366 2.57.
12367 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12368 be ignore.
12369
12370 2003-08-04 Paul Eggert <eggert@twinsun.com>
12371
12372 Rework code slightly to avoid gcc -Wtraditional warnings.
12373 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12374 The returned value is now stored in *YY0. All callers changed.
12375 * src/output.c (merge_output): Adjust to the above change.
12376
12377 2003-07-26 Paul Eggert <eggert@twinsun.com>
12378
12379 * data/glr.c (YYASSERT): New macro.
12380 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12381 yyresolveStates, yyprocessOneStack):
12382 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12383 Derived from a suggestion by Frank Heckenbach.
12384
12385 2003-07-25 Paul Eggert <eggert@twinsun.com>
12386
12387 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12388 for portability to K&R C (after ansi2knr, presumably). See
12389 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12390 by Frank Heckenbach, though I have omitted the structure-initialization
12391 part of his glr-knr.diff patch since I recall that the Portable
12392 C Compiler didn't require that change.
12393
12394 Let the user specify how to allocate and free memory.
12395 Derived from a suggestion by Frank Heckenbach in
12396 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12397 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12398 All uses of free, malloc, realloc changed to use these macros,
12399 and unnecessary casts removed.
12400 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12401
12402 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12403
12404 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12405 use s.empty() rather than s == "" to test for empty string; see
12406 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12407 (trivial change)
12408
12409 2003-06-25 Akim Demaille <akim@epita.fr>
12410
12411 * config/depcomp, config/install-sh: Update from masters.
12412
12413 2003-06-20 Paul Eggert <eggert@twinsun.com>
12414
12415 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12416 and return properly parenthesized result.
12417 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12418 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12419 Remove unnecessary parentheses from uses.
12420 * doc/bison.texinfo (Location Default Action): Describe the
12421 conventions for parentheses.
12422
12423 2003-06-19 Paul Eggert <eggert@twinsun.com>
12424
12425 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12426 yyreportTree): Do not assume that size_t is the same width as int,
12427 when printing sizes. Print sizes using an unsigned format.
12428 Problem reported by Frank Heckenbach in
12429 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12430
12431 Port to Forte Developer 7 C compiler.
12432 * data/glr.c (struct YYLTYPE): If locations are not being used,
12433 declare a single dummy member, as empty structs do not conform
12434 to the C standard.
12435 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12436 the Forte Developer 7 C compiler complains that end-of-loop
12437 code is not reached.
12438
12439 2003-06-17 Paul Eggert <eggert@twinsun.com>
12440
12441 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12442 avoid warnings from picky compilers about redefinition of PARAMS.
12443
12444 2003-06-17 Paul Eggert <eggert@twinsun.com>
12445
12446 Version 1.875b.
12447
12448 * NEWS: Document 1.875b.
12449
12450 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12451 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12452 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12453 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12454 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12455 per recent gettext manual's suggestion.
12456 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12457 Use prototypes, not old-style definitions.
12458 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12459 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12460 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12461 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12462 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12463 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12464 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12465 vbitset_or_and_cmp, vbitset_copy): Likewise.
12466
12467 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12468 Do not include <stdlib.h>.
12469 (PARAMS): Define unconditionally for C89.
12470 (ATTRIBUTE_NORETURN): Remove.
12471 (ATTRIBUTE_UNUSED): Define unconditionally.
12472
12473 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12474 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12475 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12476 * lib/vbitset.c, lib/vbitset.h: New files.
12477 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12478 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12479 from libbitset.
12480
12481 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12482 `How Can I Reset @code{yyparse}', since texinfo does not allow
12483 arbitrary @ in node names.
12484
12485 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12486 shouldn't be needed according to the gettext 0.12.1 documentation
12487 but which seem to be needed anyway: codeset.m4 glibc21.m4
12488 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12489 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12490 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12491
12492 * lib/.cvsignore: Add stdbool.h.
12493 * m4/.cvsignore: Add nls.m4, po.m4.
12494
12495 Upgrade to CVS gnulib.
12496 * stdbool_.h: File renamed from stdbool.h.in.
12497 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12498 AC_HEADER_STDBOOL.
12499 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12500 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12501 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12502 (MOSTLYCLEANFILES): New var.
12503 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12504 (stdbool.h): New rule.
12505 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12506 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12507 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12508 m4/quote.m4: Upgrade to today's gnulib.
12509
12510 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12511 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12512 the tests right now.
12513 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12514 yyerror are declared before use; C99 requires this.
12515
12516 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12517
12518 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12519 first.
12520 (yyrecoverSyntaxError): Correct the logic for setting and testing
12521 yyerrState.
12522 Correct comment on handling EOF.
12523 Allow states with only a default reduction, rather than failing
12524 (I can't quite reconstruct why these were not allowed before).
12525
12526 Fixes to avoid problem that $-N rules in GLR parsers can cause
12527 buffer overruns, corrupting state.
12528
12529 * src/output.c (prepare_rules): Output max_left_semantic_context
12530 definition.
12531 * src/reader.h (max_left_semantic_context): New variable declaration.
12532 * src/scan-gram.l (max_left_semantic_context): Define.
12533 (handle_action_dollar): Update max_left_semantic_context.
12534 * data/glr.c (YYMAXLEFT): New definition.
12535 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12536 (yyresolveAction): Ditto.
12537
12538 Fixes to problems with location handling in GLR parsers reported by
12539 Frank Heckenbach (2003/06/05).
12540
12541 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12542 (YYRHSLOC): Add parentheses, and define only if locations used.
12543 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12544 locations not used.
12545 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12546 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12547
12548 * tests/cxx-type.at: Exercise location information; update tests
12549 to differentiate output with and without locations.
12550 Remove forward declarations of yylex and yyerror---caused errors
12551 because default YYLTYPE not yet defined.
12552 Change semantic actions to compute strings, rather than printing
12553 them directly (to test proper passing of semantics values). Change
12554 output to prefix notation and update test data and expected results.
12555 (yylex): Track locations.
12556 (stmtMerge): Return value rather than printing, and include arguments
12557 in value.
12558
12559 2003-06-03 Paul Eggert <eggert@twinsun.com>
12560
12561 Avoid warnings generated by GCC 2.95.4 when Bison is
12562 configured with --enable-gcc-warnings.
12563 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12564 yy::]b4_parser_class_name[::translate_,
12565 yy::Stack::operator[] (unsigned),
12566 yy::Stack::operator[] (unsigned) const,
12567 yy::Slice::operator[] (unsigned),
12568 yy::Slice::operator[] (unsigned) const):
12569 Rename local vars to avoid warnings.
12570 * tests/glr-regression.at (Improper handling of embedded actions
12571 and $-N in GLR parsers): Remove unused local variable from yylex.
12572 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12573 (void) as arg when not pure, since we now assume C89 when building
12574 Bison. Pacify GCC by using parameter.
12575
12576 2003-06-02 Paul Eggert <eggert@twinsun.com>
12577
12578 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12579 yy::Location::lines, yy::Location::columns): Rename arguments
12580 to avoid shadowing; this removes a warning generated by GCC 3.3.
12581
12582 2003-06-01 Paul Eggert <eggert@twinsun.com>
12583
12584 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12585 to g++, as GCC 3.3 complains if you do it.
12586 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12587 everything that WARNING_CFLAGS has, except omit warnings
12588 not suitable for C++.
12589 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12590 * tests/atlocal.in (CXXFLAGS): New var.
12591 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12592
12593 Fix a GLR parser bug I reported in February; see
12594 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12595 The problem was that GLR parsers did not conform to the C standard,
12596 because actions like { $1 = $2 + $3; } expanded to expressions
12597 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12598 to a local variable. The C standard says that expressions
12599 like (var = f ()) + (var = f ()) have undefined behavior.
12600 Another problem was that GCC sometimes issues warnings that
12601 yyfill and its parameters are unused.
12602
12603 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12604 as possibly unused.
12605 (yyfill): New function.
12606 (YYFILL): Use it.
12607 (yyuserAction): Change type of yynormal to bool, so that it matches
12608 the new yyfill signature. Mark it as possibly unused.
12609
12610
12611 Follow up on a bug I reported in February, where a Bison-generated
12612 parser can loop. Provide a test case and a fix for yacc.c. I
12613 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12614 The original bug report is in:
12615 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12616
12617 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12618 macro's size was becoming unwieldy.
12619 (yyerrlab): Do not discard an empty lookahead symbol, as this
12620 might destroy garbage.
12621 (yyerrorlab): New label, with the old contents of YYERROR,
12622 plus the following change: pop the stack of rhs corresponding
12623 to the production that invoked YYERROR. That is how Yacc
12624 behaves, and POSIX requires this behavior.
12625 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12626 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12627 Define 'alarm' to do nothing if unistd.h is not available.
12628 Add a new rule "exp: '-' error;" to test the above change to
12629 data/yacc.c. Use 'alarm' to abort any test taking longer than
12630 10 seconds, as it's probably looping.
12631 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12632 Also, the new yacc.c generates two fewer diagnostics for an
12633 existing test.
12634
12635 2003-05-24 Paul Eggert <eggert@twinsun.com>
12636
12637 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12638 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12639 This fixes a problem reported by John Bowman when the Compaq/HP
12640 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12641 -ansi -Wall -gall).
12642 * data/yacc.c (union yyalloc): Likewise.
12643 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12644
12645 Switch from 'int' to 'bool' where that makes sense.
12646
12647 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12648 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12649 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12650 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12651 Return or accept bool, not int. All callers changed.
12652 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12653 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12654 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12655 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12656 bitset_or_and_cmp_): Likewise.
12657 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12658 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12659 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12660 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12661 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12662 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12663 bitset_stats_or_and_cmp): Likewise.
12664 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12665 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12666 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12667 ebitset_xor_cmp): Likewise.
12668 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12669 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12670 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12671 lbitset_xor_cmp): Likewise.
12672 * lib/bbitset.h: Include <stdbool.h>.
12673 (struct bitset_vtable): The following members now return bool, not
12674 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12675 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12676 or_and_cmp).
12677 * src/conflicts.c (count_rr_conflicts): Likewise.
12678 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12679 All uses changed.
12680 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12681 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12682 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12683 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12684 graph_flag): Likewise.
12685 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12686 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12687 graph_flag): Likewise.
12688 * src/output.c (error_verbose): Likewise.
12689 * src/output.h (error_verbose): Likewise.
12690 * src/reader.c (start_flag, typed): Likewise.
12691 * src/reader.h (typed): Likewise.
12692 * src/getargs.c (LOCATIONS_OPTION): New constant.
12693 (long_options, getargs): Use it.
12694 * src/lalr.c (build_relations): Use bool, not int.
12695 * src/nullable.c (nullable_compute): Likewise.
12696 * src/print.c (print_reductions): Likewise.
12697 * src/tables.c (action_row, pack_vector): Likewise.
12698 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12699 * src/output.c (prepare): Use it.
12700 * src/output.c (token_definitions_output,
12701 symbol_destructors_output, symbol_destructors_output): Use string,
12702 not boolean integer, to keep track of whether to output separator.
12703 * src/print_graph.c (print_core): Likewise.
12704 * src/state.c (state_rule_lookaheads_print): Likewise.
12705
12706 * config/install-sh: Sync from automake 1.7.5.
12707
12708 2003-05-14 Paul Eggert <eggert@twinsun.com>
12709
12710 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12711 semicolon after a grammar declaration, in the interest of possible
12712 future changes to the Bison input language.
12713 Do not allow a stray semicolon at the start of the grammar.
12714 (rhses.1): Allow one or more semicolons after any rule, including
12715 just before "|" as required by POSIX.
12716 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12717 grammar.
12718
12719 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12720
12721 %parse-param support for lalr1.cc.
12722
12723 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12724 b4_cc_constructor_calls, b4_cc_constructor_call,
12725 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12726 definitions.
12727 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12728 parse-param arguments.
12729 (yy::b4_parser_class_name): Declare instance variables to
12730 hold parse-param arguments.
12731 * tests/calc.at: s/value/semantic_value/ because value clashes
12732 with a member of yy::b4_parser_class_name. Adjust C++ code
12733 to handle %parse-param. Enable %parse-param test in C++.
12734
12735 2003-05-12 Paul Eggert <eggert@twinsun.com>
12736
12737 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12738 English a bit. Fix fclose typo. Change "const char" to "char
12739 const", and use ANSI C rather than K&R for "main". Suggest
12740 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12741 and suggest yy_switch_to_buffer.
12742
12743 2003-05-05 Paul Eggert <eggert@twinsun.com>
12744
12745 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12746 C89. This avoids a diagnostic on compilers that define __STDC__
12747 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12748 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12749
12750 2003-05-03 Paul Eggert <eggert@twinsun.com>
12751
12752 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12753 Do not overrun array bounds.
12754 This should fix a bug reported today by Olatunji Oluwabukunmi in
12755 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12756
12757 2003-04-29 Akim Demaille <akim@epita.fr>
12758
12759 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12760 * src/getargs.c, src/getargs.h: here, as bool, not int.
12761 (nondeterministic_parser): New.
12762 * src/parse-gram.y, src/scan-gram.l: Support
12763 %nondeterministic-parser.
12764 * src/output.c (prepare): Use nondeterministic_parser instead
12765 of glr_parser where appropriate.
12766 * src/tables.c (conflict_row, action_row, save_row)
12767 (token_actions, token_actions, pack_vector): Ditto.
12768
12769 2003-04-29 Akim Demaille <akim@epita.fr>
12770
12771 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12772
12773 2003-04-29 Akim Demaille <akim@epita.fr>
12774
12775 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12776 with %pure-parser and %locations to exercise the patch from Yakov
12777 Markovitch below.
12778
12779 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12780
12781 * data/yacc.c: (b4_lex_param): Corrected for the case where
12782 %lex-param is provided and %pure-parser isn't.
12783
12784 2003-04-27 Paul Eggert <eggert@twinsun.com>
12785
12786 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12787 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12788 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12789 if it is not defined.
12790 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12791
12792 2003-04-26 Paul Eggert <eggert@twinsun.com>
12793
12794 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12795 Declare to be of type suitable for the ninf value itself, not of
12796 type suitable for the corresponding table, since the latter might
12797 be unsigned but the ninf value might be negative. This fixes a
12798 bug reported by Alexandre Duret-Lutz in
12799 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12800
12801 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12802 invokes it. We shouldn't invoke it twice because it will attempt
12803 to put error.o in the archive twice. This fixes a glitch reported
12804 by Martin Mokrejs in
12805 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12806
12807 2003-04-21 Paul Eggert <eggert@twinsun.com>
12808
12809 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12810 to gnulib.
12811
12812 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12813
12814 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12815 Fix obvious typo that results in uncompilable GLR parsers
12816 when both %pure-parser and %locations are used. (trivial change)
12817
12818 2003-04-17 Paul Eggert <eggert@twinsun.com>
12819
12820 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12821 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12822 Do not insert the expected token via unput, as this runs afoul
12823 of a POSIX-compatibility bug in flex 2.5.31.
12824 All uses changed to BEGIN the parent state,
12825 since we no longer insert the expected token via unput.
12826 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12827 that is no longer emitted after the above change.
12828
12829 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12830 the first one. This change is from Paul Hilfinger, and it fixes
12831 regression reported by Werner Lemberg in
12832 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12833
12834 (resolve_sr_conflict): Don't invoke state_errs_set
12835 unless one or more tokens have been explicitly made errors.
12836 Otherwise, the above change causes Bison to abort.
12837
12838 * tests/existing.at (GNU pic Grammar): New test case, taken from
12839 Lemberg's email.
12840
12841 2003-03-31 Akim Demaille <akim@epita.fr>
12842
12843 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12844
12845 2003-03-31 Akim Demaille <akim@epita.fr>
12846
12847 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12848 output.
12849
12850 2003-03-31 Akim Demaille <akim@epita.fr>
12851
12852 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12853 From Paul Hilfinger.
12854
12855 2003-03-29 Akim Demaille <akim@epita.fr>
12856
12857 * m4/error.m4: Do not put under dynamic conditions some code which
12858 expansion is under static control.
12859
12860 2003-03-29 Akim Demaille <akim@epita.fr>
12861
12862 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12863
12864 2003-03-29 Akim Demaille <akim@epita.fr>
12865
12866 * doc/bison.texinfo (Strings are Destroyed): New.
12867
12868 2003-03-13 Paul Eggert <eggert@twinsun.com>
12869
12870 * .cvsignore: Add configure.lineno.
12871 * src/.cvsignore: Add yacc.
12872 * tests/.cvsignore: Add testsuite.log.
12873 * doc/fdl.texi: Sync with latest FSF version.
12874
12875 2003-03-12 Paul Eggert <eggert@twinsun.com>
12876
12877 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12878 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12879 cursor, instead of leaving it undefined. This fixes a bug
12880 reported by Tim Van Holder in
12881 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12882 * tests/input.at (Torturing the Scanner): Test the scanner on
12883 an empty input file, which was Tim Van Holder's test case.
12884
12885 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12886 <sys/resource.h> can be included, include sys/time.h and
12887 sys/times.h first, if available. This works around the SunOS
12888 4.1.4 porting bug reported by Bruce Becker in
12889 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12890
12891 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12892 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12893 AC_HEADER_SYS_WAIT.
12894
12895 Merge changes from gnulib. This was prompted because the CVS
12896 snapshot didn't build on Solaris 7 due to strnlen problems.
12897
12898 These changes need to be merged back into gnulib:
12899 * lib/hash.c: Include <stdbool.h> unconditionally.
12900 * m4/onceonly.m4 (m4_quote): New macro.
12901 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12902 Quote AC_FOREACH variable-expansions properly.
12903 The 2003-01-03 obstack.h change also needs merging.
12904 {end of changes requiring merging}
12905
12906 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12907 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12908 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12909 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12910 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12911 New files, imported from gnulib.
12912 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12913 above.
12914
12915 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12916 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12917 gnulib sources.
12918
12919 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12920 Add.
12921 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12922 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12923 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12924 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12925 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12926 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12927 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12928 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12929 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12930 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12931 (jm_PREREQ_ARGMATCH): Remove.
12932 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12933 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12934
12935 * src/system.h: Include <stdbool.h> unconditionally.
12936
12937 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12938 assuming at least C89 in the bitset code for some time now.
12939
12940 2003-03-03 Akim Demaille <akim@epita.fr>
12941
12942 * ro.po: New.
12943
12944 2003-03-02 Akim Demaille <akim@epita.fr>
12945
12946 * doc/bison.texinfo (Table of Symbols): Reactivate the
12947 documentation for %lex-param, and %parse-param.
12948
12949 2003-03-02 Akim Demaille <akim@epita.fr>
12950
12951 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12952 generate verbose error messages.
12953 Use the number of tokens as an upper bound in yytname, as it
12954 cannot be a non terminal.
12955
12956 2003-03-02 Akim Demaille <akim@epita.fr>
12957
12958 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12959 message.
12960
12961 2003-03-02 Akim Demaille <akim@epita.fr>
12962
12963 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12964 Use them to exercise yycheck overrun.
12965 Based on Andrew Suffield's grammar.
12966
12967 2003-03-02 Akim Demaille <akim@epita.fr>
12968
12969 Create tests/local.at for Bison generic testing macros.
12970
12971 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12972 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12973 This new file.
12974 * tests/calc.at (AT_CHECK_CALC): Adjust.
12975 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12976 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12977 * tests/local.at: here.
12978 (AT_COMPILE_CXX): Tags the tests using it as c++.
12979 Ignore the test if CXX is not functional.
12980
12981 2003-03-01 Paul Eggert <eggert@twinsun.com>
12982
12983 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12984 not loc->end, since loc->end might contain garbage and this leads
12985 to undefined behavior on some platforms.
12986 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12987 depend on *loc, so that the reader doesn't give the the false
12988 impression that *loc is initialized.
12989 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12990 does not survive the return.
12991
12992 2003-03-01 Akim Demaille <akim@epita.fr>
12993
12994 * src/scan-gram.l (code_start): Always initialize it when entering
12995 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12996 yylex invocation. An alternative would be making it static, but
12997 then it starts with the second %%'s beginning, instead of its end.
12998
12999 2003-02-28 Paul Eggert <eggert@twinsun.com>
13000
13001 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13002 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13003 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13004
13005 2003-02-26 Paul Eggert <eggert@twinsun.com>
13006
13007 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13008 Remove Sequent/Pyramid discussion (nobody uses them any more).
13009 Merge VMS and MS-DOS discussion; these ports may well be dead
13010 but let's keep mentioning them for now. Put <> around email
13011 addresses. Add copyright notice.
13012
13013 2003-02-24 Paul Eggert <eggert@twinsun.com>
13014
13015 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13016 to avoid collision with flex use of yylineno.
13017 Problem reported by Bruce Lilly in
13018 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13019 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13020 * data/yacc.c (yy_reduce_print): Likewise.
13021
13022 * config/depcomp: Sync with Automake 1.7.3.
13023
13024 2003-02-21 Akim Demaille <akim@epita.fr>
13025
13026 * data/lalr1.cc: Use temporary variables instead of casts to
13027 change integer types.
13028 Suggested by Paul Eggert.
13029
13030 2003-02-21 Akim Demaille <akim@epita.fr>
13031
13032 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13033 to avoid confusions with lalr1.cc's notion of Position.
13034 Suggested by Paul Eggert.
13035
13036 2003-02-20 Akim Demaille <akim@epita.fr>
13037
13038 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13039 before initial_columns.
13040 (location.hh): Use consistent variable names when defining the
13041 operator<<.
13042 Use "last" so that we subtract from Positions, not from unsigned.
13043
13044 2003-02-20 Akim Demaille <akim@epita.fr>
13045
13046 * data/lalr1.cc (position.hh): New subfile, including the extended
13047 and Doxygen'ed documentation of class Position.
13048 (location.hh): Use it.
13049 Document a` la Doxygen.
13050 With the help of Benoit Perrot.
13051
13052 2003-02-20 Akim Demaille <akim@epita.fr>
13053
13054 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13055 AT_YACC_IF.
13056 Redefine AT_YYERROR_SEES_LOC_IF using it.
13057 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13058 not defined.
13059 Don't use the location in yy::Parser::error_ and
13060 yy::Parser::print_ when not %locations.
13061 Activate more lalr1.cc tests.
13062
13063 2003-02-19 Akim Demaille <akim@epita.fr>
13064
13065 * data/lalr1.cc: When displaying a line number, be sure to make it
13066 an int.
13067
13068 2003-02-19 Akim Demaille <akim@epita.fr>
13069
13070 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13071 Remove, useless.
13072 (YYABORT, YYACCEPT, YYERROR): New.
13073 * tests/calc.at: Renable the lalr1.cc test.
13074
13075 2003-02-19 Akim Demaille <akim@epita.fr>
13076
13077 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13078 error recovery, mixing with/without pops and discarding of the
13079 lookahead.
13080 Exercise YYERROR.
13081 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13082
13083 2003-02-17 Paul Eggert <eggert@twinsun.com>
13084
13085 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13086 * tests/testsuite.at (AT_COMPILE): Use them.
13087 This fixes the testsuite problem reported by Robert Lentz in
13088 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13089
13090 2003-02-12 Paul Eggert <eggert@twinsun.com>
13091
13092 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13093 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13094 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13095 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13096 Check for malloc failure, for consistency with yacc.c.
13097 (yytname_size): Remove, for consistency with yacc.c.
13098
13099 The bug still remains in data/lalr1.cc, as I didn't have time
13100 to fix it there.
13101
13102 2003-02-06 Akim Demaille <akim@epita.fr>
13103
13104 * configure.ac (GXX): Rename as...
13105 (CXX): this, to keep the original Autoconf semantics.
13106 Require 2.57.
13107 * data/lalr1.cc: Fix b4_copyright invocations.
13108 If YYDEBUG is not defined, don't depend upon name_ being defined.
13109 (location.hh): Include string and iostream.
13110 (Position::filename): New member.
13111 (Position::Position ()): New.
13112 (operator<< (Position)): New.
13113 (operator- (Position, int)): New.
13114 (Location::first, Location::last): Rename as...
13115 (Location::begin, Location::end): these, to mock the conventional
13116 iterator names.
13117 (operator<< (Location)): New.
13118 * tests/atlocal.in (CXX): New.
13119 * tests/testsuite.at (AT_COMPILE_CXX): New.
13120 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13121 locations in a more synthetic way.
13122 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13123 lalr1.cc is used.
13124 Adjust the C locations to match those from Emacs: first column is
13125 column 0.
13126 Change all the expected results.
13127 Conform to the GCS: simplify the locations when applicable.
13128 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13129 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13130 these CPP macros with the m4 macros new defined by...
13131 (AT_CHECK_PUSHDEFS): this, i.e.:
13132 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13133 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13134 New macros.
13135 (AT_CHECK_POPDEFS): Undefine them.
13136 (AT_CHECK_CALC_LALR1_CC): New.
13137 Use it for the first lalr1.cc test.
13138
13139 2003-02-04 Akim Demaille <akim@epita.fr>
13140
13141 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13142 Location as is defined.
13143
13144 2003-02-04 Akim Demaille <akim@epita.fr>
13145
13146 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13147 name_ being defined.
13148
13149 2003-02-03 Paul Eggert <eggert@twinsun.com>
13150
13151 * src/gram.h (start_symbol): Remove unused decl.
13152
13153 Use more-consistent naming conventions for local vars.
13154
13155 * src/derives.c (derives_compute): Change type of local var from
13156 int to rule_number.
13157 * src/gram.c (grammar_rules_partial_print): Likewise.
13158 * src/print.c (print_core): Likewise.
13159 * src/reduce.c (reduce_grammar_tables): Likewise.
13160
13161 * src/gram.c (grammar_dump): Change name of item_number *
13162 local var from r to rp.
13163 * src/nullable.c (nullable_compute): Likewise.
13164
13165 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13166
13167 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13168 for symbol or symbol_number var.
13169 * src/reader.c (grammar_start_symbol_set): Likewise.
13170 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13171 Likewise.
13172 * src/state.c (transitions_to): Likewise.
13173 * src/state.h: Likewise.
13174 * src/tables.c (symbol_number_to_vector_number): Likewise.
13175
13176 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13177 char * var.
13178
13179 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13180 var.
13181
13182 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13183 var.
13184
13185 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13186 Use str, not s, for char * var. Use ch, not c, for character var.
13187 Use size for size var.
13188
13189 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13190 char * var.
13191 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13192 uniqstr var.
13193 * src/uniqstr.h: Likewise.
13194
13195 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13196 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13197 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13198 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13199 param to have same name as that of enum, so that we don't use
13200 "s" to stand for a non-state.
13201
13202 2003-02-02 Akim Demaille <akim@epita.fr>
13203
13204 * src/scan-skel.l: Scan more than one inert character per yylex
13205 invocation.
13206
13207 2003-02-01 Paul Eggert <eggert@twinsun.com>
13208
13209 Version 1.875a.
13210
13211 * po/LINGUAS: Add ms.
13212
13213 2003-01-30 Akim Demaille <akim@epita.fr>
13214
13215 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13216
13217 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13218
13219 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13220 of $1.
13221
13222 Changes in response to error report by S. Eken: GLR mode does not
13223 handle negative $ indices or $ indices in embedded rules correctly.
13224 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13225
13226 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13227 (b4_rhs_location): Ditto.
13228 (yyfill): New function to copy from stack tree into array
13229 incrementally.
13230 (yyuserAction): Modify to allow incremental move of semantic values
13231 to rhs array when in GLR mode.
13232 Define YYFILL to use in user-defined actions to fill semantic array
13233 as needed.
13234 Remove dummy use of yystack, as there is now a guaranteed use.
13235 (yydoAction): Modify to allow incremental move of semantic values
13236 to rhs array when in GLR mode.
13237 (yyresolveAction): Ditto.
13238 (yyglrShiftDefer): Update comment.
13239 (yyresolveStates): Use X == NULL for pointers, not !X.
13240 (yyglrReduce): Ditto.
13241 (yydoAction): Ditto
13242
13243 * tests/glr-regr1.at: Rename to ...
13244 * tests/glr-regression.at: Add new regression test for the problems
13245 described above (adapted from S. Eken).
13246 Update copyright notice.
13247 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13248 * tests/Makefile.am: Ditto.
13249
13250 2003-01-28 Paul Eggert <eggert@twinsun.com>
13251
13252 * data/lalr1.cc: Do not use @output_header_name@ unless
13253 b4_defines_flag is set. This fixes two bugs reported by
13254 Tim Van Holder in
13255 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13256 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13257
13258 2003-01-21 Paul Eggert <eggert@twinsun.com>
13259
13260 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13261 we don't need to worry about yyerrlab1 being reported as an
13262 "unused label" by non-GCC C compilers. The downside is that if
13263 locations are used then a couple of statements are duplicated each
13264 time YYERROR is invoked, but the upside is that the warnings
13265 should vanish.
13266 (yyerrlab1): Move code to YERROR.
13267 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13268 This reverts some of the 2002-12-27 change.
13269
13270 2003-01-17 Paul Eggert <eggert@twinsun.com>
13271
13272 * src/output.c (symbol_printers_output): Fix typo that led
13273 to core dump. Problem reported by Antonio Rus in
13274 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13275
13276 2003-01-13 Akim Demaille <akim@epita.fr>,
13277 Quoc Peyrot <chojin@lrde.epita.fr>,
13278 Robert Anisko <anisko_r@lrde.epita.fr>
13279
13280 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13281 when the stacks contain one element, as the loop would otherwise
13282 free the last state, and then use the top state (the one we just
13283 popped). This means that the initial elements will not be freed
13284 explicitly, as is the case in yacc.c; it is not a problem, as
13285 these elements have fake values.
13286
13287 2003-01-11 Paul Eggert <eggert@twinsun.com>
13288
13289 * NEWS: %expect-violations are now just warnings, reverting
13290 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13291 bootstrapping problem reported by Matthias Klose; see
13292 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13293 * src/conflicts.c (conflicts_print): Likewise.
13294 * tests/conflicts.at (%expect not enough, %expect too much,
13295 %expect with reduce conflicts): Likewise.
13296 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13297 that the warning is enabled if the number of conflicts changes
13298 (not necessarily increases).
13299
13300 * src/getargs.c (version): Update copyright year.
13301
13302 2003-01-09 Akim Demaille <akim@epita.fr>
13303
13304 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13305
13306 2003-01-08 Paul Eggert <eggert@twinsun.com>
13307
13308 * Makefile.maint (WGETFLAGS):
13309 New macro, containing "-C off" to disable proxy caches.
13310 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13311 (rel-check): Use $(WGET) instead of wget.
13312
13313 2003-01-06 Paul Eggert <eggert@twinsun.com>
13314
13315 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13316 the GLR paper of Scott, Johnstone and Hussain.
13317
13318 2003-01-04 Paul Eggert <eggert@twinsun.com>
13319
13320 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13321 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13322 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13323 (EXTRA_LIBRARIES): New var, for liby.a.
13324 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13325 (EXTRA_SCRIPTS): New var, for yacc.
13326
13327 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13328 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13329 Problem reported by Nelson H. F. Beebe.
13330
13331 2003-01-03 Paul Eggert <eggert@twinsun.com>
13332
13333 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13334 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13335 when compiling Bison 1.875's `bitset bset = obstack_alloc
13336 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13337
13338 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13339 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13340 grow to a huge size with typical invocation.
13341
13342 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13343 Use the pattern recommended by Autoconf 2.57, except also protect
13344 against double-definition.
13345 * src/system.h: Likewise.
13346 Portability issues reported by Nelson H. F. Beebe.
13347
13348 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13349 All uses changed. Provide a definition in both C and C++.
13350 (yytrue, yyfalse): Define even if defined (__cplusplus).
13351
13352 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13353 Reported by Nelson H. F. Beebe.
13354
13355 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13356
13357 2003-01-02 Paul Eggert <eggert@twinsun.com>
13358
13359 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13360 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13361 Bug reported by Nelson H. F. Beebe.
13362
13363 2003-01-01 Paul Eggert <eggert@twinsun.com>
13364
13365 * Version 1.875.
13366
13367 2002-12-30 Paul Eggert <eggert@twinsun.com>
13368
13369 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13370 Moved here from...
13371 (<INITIAL>","): Here. This causes stray "," to be treated
13372 more uniformly.
13373
13374 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13375 last brace in braced code when not in Yacc mode, for compatibility
13376 with Bison 1.35. This resurrects the 2001-12-15 patch to
13377 src/reader.c.
13378
13379 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13380 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13381
13382 2002-12-28 Paul Eggert <eggert@twinsun.com>
13383
13384 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13385 that of SYM's type. This fixes Debian bug 168069, reported by
13386 Thomas Olsson.
13387
13388 2002-12-28 Paul Eggert <eggert@twinsun.com>
13389
13390 Version 1.75f.
13391
13392 Switch back to the Yacc style of conflict reports, undoing some
13393 of the 2002-07-30 change.
13394 * doc/bison.texinfo (Understanding): Use Yacc style for
13395 conflict reports. Also, use new way of locating rules.
13396 * src/conflicts.c (conflict_report):
13397 Renamed from conflict_report_yacc, removing the old
13398 'conflict_report'. Translate the entire conflict report at once,
13399 so that we don't assume that "," has the same interpretation in
13400 all languages.
13401 (conflicts_output): Use Yacc-style conflict report for each state,
13402 instead of our more-complicated style.
13403 (conflicts_print): Use Yacc-style conflict report, except print
13404 the input file name when not emulating Yacc.
13405 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13406 Conflicted Reduction, %expect not enough, %expect too much,
13407 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13408 * tests/existing.at (GNU Cim Grammar): Likewise.
13409 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13410
13411 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13412 fatal): Don't invoke fflush; it's not needed and it might even be
13413 harmful for stdout, as stdout might not be open.
13414 * src/reduce.c (reduce_print): Likewise.
13415
13416 2002-12-27 Paul Eggert <eggert@twinsun.com>
13417
13418 Fix a bug where error locations were not being recorded correctly.
13419 This problem was originally reported by Paul Hilfinger in
13420 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13421
13422 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13423 top of the location stack's error locations.
13424 (yyerrlab): Set it. When discarding a token, push its location
13425 onto yylerrsp so that we don't lose track of the error's end.
13426 (yyerrlab1): Now is only the target of YYERROR, so that we can
13427 properly record the location of the action that failed. For GCC
13428 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13429 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13430 (yyerrlab2): New label, which yyerrlab now falls through to.
13431 Compute the error's location by applying YYLLOC_DEFAULT to
13432 the locations of all the symbols that went into the error.
13433 * doc/bison.texinfo (Location Default Action): Mention that
13434 YYLLOC_DEFAULT is also invoked for syntax errors.
13435 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13436 Error locations include the locations of all the tokens that were
13437 discarded, not just the last token.
13438
13439 2002-12-26 Paul Eggert <eggert@twinsun.com>
13440
13441 * src/files.c: Include quote.h.
13442 (compute_output_file_names): Warn if we detect conflicting
13443 outputs to the same file. This should catch the misunderstanding
13444 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13445
13446 * src/conflicts.c (conflicts_print): If the user specifies
13447 "%expect N", report an error if there are any reduce/reduce
13448 conflicts. This is what the manual says should happen.
13449 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13450 * tests/conflicts.at (%expect with reduce conflicts): New test.
13451
13452 Don't use m4_include on relative file names, as it doesn't work as
13453 desired if there happens to be a file with that name under ".".
13454
13455 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13456 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13457 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13458 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13459 * src/output.c (output_skeleton): Use full path names when
13460 specifying a file to include; don't rely on include path, as
13461 it's unreliable when the working file contains a file with
13462 that name.
13463
13464 2002-12-25 Paul Eggert <eggert@twinsun.com>
13465
13466 Remove obsolete references to bison.simple and bison.hairy.
13467 Problem mentioned by Aubin Mahe in
13468 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13469 * data/glr.c: Comment fix.
13470 * doc/bison.1: Remove references. Also, mention "yacc".
13471
13472 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13473 with -g option.
13474
13475 * src/parse-gram.y (declaration): Use enum "report_states" rather
13476 than its numeric value 1.
13477
13478 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13479 opening a new one. This fixes Debian bug 165349, reported by
13480 Bruce Stephens.
13481
13482 2002-12-24 Paul Eggert <eggert@twinsun.com>
13483
13484 Version 1.75e.
13485
13486 * Makefile.maint (cvs-update): Don't assume that the shell
13487 supports $(...), as Solaris sh doesn't.
13488
13489 * src/parse-gram.y (lloc_default): Remove test for empty
13490 nonterminals at the end, since it didn't change the result.
13491
13492 2002-12-24 Paul Eggert <eggert@twinsun.com>
13493
13494 If the user does not define YYSTYPE as a macro, Bison now declares it
13495 using typedef instead of defining it as a macro. POSIX requires this.
13496 For consistency, YYLTYPE is also declared instead of defined.
13497
13498 %union directives can now have a tag before the `{', e.g., the
13499 directive `%union foo {...}' now generates the C code
13500 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13501 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13502 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13503 instead of `yyltype'.
13504
13505 `yystype' and `yyltype' are now obsolescent macros instead of being
13506 typedefs or tags; they are no longer documented and will be
13507 withdrawn in a future release.
13508
13509 * data/glr.c (b4_location_type): Remove.
13510 (YYSTYPE): Renamed from yystype.
13511 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13512 (struct YYLTYPE): Renamed from struct yyltype.
13513 (YYLTYPE): Renamed from yyltype.
13514 (yyltype, yystype): New (and obsolescent) macros,
13515 for backward compatibility.
13516 * data/yacc.c: Likewise.
13517
13518 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13519 does not specify a union tag. This is for compatibility with
13520 Solaris 9 yacc.
13521
13522 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13523 const *, since it is now modified by stripping surrounding { }.
13524 (current_braced_code): Remove.
13525 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13526 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13527 trailing " {...}". Now of type <chars>.
13528 (grammar_declaration): Adjust to bundled tokens.
13529 (code_content): Remove; stripping is now done by add_param.
13530 (print_token_value): Print contents of bundled tokens.
13531 (token_name): New function.
13532
13533 * src/reader.h (braced_code, current_braced_code): Remove.
13534 (token_name): New decl.
13535
13536 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13537 token_type, not braced_code code_kind. All uses changed.
13538 (SC_PRE_CODE): New state, for scanning after a keyword that
13539 has (or usually has) an immediately-following braced code.
13540 (token_type): New local var, to keep track of which token type
13541 to return when scanning braced code.
13542 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13543 <INITIAL>"%parse-param", <INITIAL>"%printer",
13544 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13545 instead of returning a token type immediately.
13546 (<INITIAL>"{"): Set token type.
13547 (<SC_BRACED_CODE>"}"): Use it.
13548 (handle_action_dollar, handle_action_at): Now returns bool
13549 indicating success. Fail if ! current_rule; this prevents a core dump.
13550 (handle_symbol_code_dollar, handle_symbol_code_at):
13551 Remove; merge body into caller.
13552 (handle_dollar, handle_at): Complain in invalid contexts.
13553
13554 * NEWS, doc/bison.texinfo: Document the above.
13555 * NEWS: Fix years and program names in copyright notice.
13556
13557 2002-12-17 Paul Eggert <eggert@twinsun.com>
13558
13559 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13560 Reporting, Table of Symbols): Omit mentions of %lex-param and
13561 %parse-param from the documentation for now.
13562
13563 2002-12-15 Paul Eggert <eggert@twinsun.com>
13564
13565 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13566 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13567 lookahead symbol, and which sets yychar in parser actions) and it
13568 disagreed with the Bison documentation. Bug
13569 reported by Andrew Walrond.
13570
13571 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13572 as the caller now does that.
13573 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13574 (YYEMPTY): Parenthesize right hand side, since others use it.
13575 (yyparse): Don't assume that our generated code is the only code
13576 that sets yychar.
13577
13578 2002-12-13 Paul Eggert <eggert@twinsun.com>
13579
13580 Version 1.75d.
13581
13582 POSIX requires a "yacc" command.
13583 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13584 (MOSTLYCLEANFILES): Add yacc.
13585 (yacc): New rule.
13586 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13587 as an alias for bison y.
13588
13589 * po/LINGUAS: Add da.
13590
13591 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13592 problem with latest <getopt.h>.
13593 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13594
13595 * doc/fdl.texi: Upgrade to 1.2.
13596 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13597 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13598 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13599 gnulib.
13600 * config/install-sh: Sync with autotools.
13601
13602 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13603 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13604 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13605 locations are requested.
13606 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13607 locations are requested.
13608
13609 2002-12-12 Paul Eggert <eggert@twinsun.com>
13610
13611 Remove unportable casts and storage allocation tricks.
13612 While we're at it, remove almost all casts, since they
13613 usually aren't needed and are a sign of trouble.
13614
13615 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13616
13617 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13618 the pointer DSET returned by malloc; this isn't portable.
13619 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13620 Similarly for DERIVES.
13621 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13622 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13623 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13624
13625 * src/derives.c (derives_compute): Do not bother invoking
13626 int_of_rule_number, since rule numbers are integers.
13627
13628 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13629 rather than XMALLOC (char, N).
13630
13631 * src/files.c (filename_split): Rewrite to avoid cast.
13632
13633 * src/gram.h (symbol_number_as_item_number,
13634 item_number_as_symbol_number, rule_number_as_item_number,
13635 item_number_as_rule_number):
13636 Now inline functions rather than macros, to avoid casts.
13637 * src/state.h (state_number_as_int): Likewise.
13638 * src/tables.c (state_number_to_vector_number,
13639 symbol_number_to_vector_number): Likewise.
13640
13641 * src/gram.h (int_of_rule_number): Remove; no longer used.
13642
13643 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13644 since the resulting storage is always stored into.
13645
13646 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13647 where it's needed.
13648
13649 * src/muscle_tab.c (muscle_m4_output):
13650 Now inline. Return bool, not int.
13651 * src/state.c (state_compare): Likewise.
13652 * src/symtab.c (symbol_check_defined,
13653 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13654 hash_compare_symbol, hash_symbol):
13655 Likewise.
13656 * src/uniqstr.c (uniqstr_print): Likewise.
13657 * src/muscle_tab.c (muscle_m4_output_processor):
13658 New function, to avoid casts.
13659 * src/state.c (state_comparator, stage_hasher): Likewise.
13660 * src/symtab.c (symbol_check_defined_processor,
13661 symbol_check_alias_consistency_processor, symbol_pack_processor,
13662 symbol_translation_processor, hash_symbol_comparator,
13663 hash_symbol_hasher): Likewise.
13664 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13665 * src/muscle_tab.c (muscles_m4_output):
13666 Use new functions instead of casting old functions unportably.
13667 * src/state.c (state_hash_new): Likewise.
13668 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13669 symbols_token_translations_init):
13670 Likewise.
13671 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13672
13673 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13674 var instead of casting to long, to avoid casts.
13675 (prepare_states): Use MALLOC rather than alloca, so that we don't
13676 have to worry about alloca.
13677 * src/state.c (state_hash_lookup): Likewise.
13678
13679 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13680 local var instead of casting to unsigned char, to avoid casts.
13681
13682 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13683 STATE_ALLOC): Remove.
13684 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13685 rather than calloc, and use offsetof to avoid allocating slightly
13686 too much storage.
13687 (state_new): Initialize all members.
13688
13689 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13690
13691 * src/symtab.c (symbol_free): Remove; unused.
13692 (symbol_get): Remove cast in lhs of assignment.
13693 (symbols_do): Now static. Accept generic arguments, not
13694 hashing-related ones.
13695
13696 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13697 (symbol_processor): Remove.
13698 (symbols_do): Remove decl; now static.
13699
13700 * src/system.h (alloca): Remove; decl no longer needed.
13701 (<stddef.h>): Include, for offsetof.
13702 (<inttypes.>, <stdint.h>): Include if available.
13703 (uintptr_t): New type, if system lacks it.
13704 (CALLOC, MALLOC, REALLOC): New macros.
13705 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13706 new macros.
13707
13708 * src/tables.c (table_size): Now int, to pacify GCC.
13709 (table_grow, table_ninf_remap): Use signed table size.
13710 (save_row): Don't bother initializing locals when not needed.
13711 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13712 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13713
13714 * src/vcg.h: Correct misspellings.
13715
13716 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13717
13718
13719 * src/getargs.c (getargs): Don't assume EOF == -1.
13720
13721 2002-12-09 Paul Eggert <eggert@twinsun.com>
13722
13723 Change identifier spellings to avoid collisions with names
13724 that are reserved by POSIX.
13725
13726 Don't use names ending in _t, since POSIX reserves them.
13727 For consistency, remove _e and _s endings -- they're weren't
13728 needed to remove ambiguity. All uses changed.
13729 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13730 turn was just renamed from struniq_t.
13731 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13732 which in turn was just renamed from struniq_processor_t.
13733 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13734 in turn was renamed from hash_compare_struniq_t.
13735 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13736 (state_list): Renamed from state_list_t.
13737 * src/assoc.h (assoc): Renamed from assoc_t.
13738 * src/conflicts.c (enum conflict_resolution): Renamed from
13739 enum conflict_resolution_e.
13740 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13741 (rule_list): Renamed from rule_list_t.
13742 * src/getargs.h (enum trace): Renamed from enum trace_e.
13743 (enum report): Renamed from enum report_e.
13744 * src/gram.h (item_number): Renamed from item_number_t.
13745 (rule_number): Renamed from rule_number_t.
13746 (struct rule_s): Remove the "rule_s" part; not used.
13747 (rule): Renamed from rule_t.
13748 (rule_filter): Renamed from rule_filter_t.
13749 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13750 (goto_list): Renamed from goto_list_t.
13751 * src/lalr.h (goto_number): Renamed from goto_number_t.
13752 * src/location.h (location): Renamed from location_t.
13753 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13754 and moved here from:
13755 * src/muscle_tab.h (muscle_entry_t): here.
13756 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13757 (rule_list): Renamed from rule_list_t.
13758 * src/print_graph.c (static_graph): Renamed from graph.
13759 * src/reader.h (braced_code): Renamed from braced_code_t.
13760 Remove brace_code_e tag.
13761 * src/relation.h (relation_node): Renamed from relation_node_t.
13762 (relation_nodes): Renamed from relation_nodes_t.
13763 (relation): Renamed from relation_t.
13764 * src/state.h (state_number): Renamed from state_number_t.
13765 (struct state): Renamed from struct state_s.
13766 (state): Renamed from state_t.
13767 (transitions): Renamed from transitions_t. Unused (and
13768 misspelled) transtion_s tag removed.
13769 (errs): Renamed from errs_t. Unused errs_s tag removed.
13770 (reductions): Renamed from reductions_t. Unused tag
13771 reductions_s removed.
13772 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13773 (struct symbol_list): Renamed from struct symbol_list_s.
13774 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13775 (struct symbol): Renamed from struct symbol_s.
13776 (symbol): Renamed from symbol_t.
13777 * src/tables.c (vector_number): Renamed from vector_number_t.
13778 (action_number): Renamed from action_t.
13779 * src/tables.h (base_number): Renamed from base_t.
13780 * src/vcg.h (enum color): Renamed from enum color_e.
13781 (enum textmode): Renamed from enum textmode_e.
13782 (enum shape): Renamed from enum shape_e.
13783 (struct colorentry): Renamed from struct colorentry_s.
13784 (struct classname): Renamed from struct classname_s.
13785 (struct infoname): Renamed from struct infoname_s.
13786 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13787 (enum decision): Renamed from enum decision_e.
13788 (enum orientation): Renamed from enum orientation_e.
13789 (enum alignment): Renamed from enum alignment_e.
13790 (enum arrow_mode): Renamed from enum arrow_mode_e.
13791 (enum crossing_type): Renamed from enum crossing_type_e.
13792 (enum view): Renamed from enum view_e.
13793 (struct node): Renamed from struct node_s.
13794 (node): Renamed from node_t.
13795 (enum linestyle): Renamed from enum linestyle_e.
13796 (enum arrowstyle): Renamed from enum arrowstyle_e.
13797 (struct edge): Renamed from struct edge.
13798 (edge): Renamed from edge_t.
13799 (struct graph): Renamed from struct graph_s.
13800 (graph): Renamed from graph_t.
13801 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13802 Rename value_t -> value.
13803 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13804 value_t_as_yystype -> value_as_yystype.
13805
13806 Don't include <errno.h> in the mainstream code, since it
13807 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13808 * lib/get-errno.c, lib/get-errno.h: New files.
13809 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13810 get-errno.c.
13811 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13812 * src/output.c (output_skeleton): Likewise.
13813 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13814 instead of errno.
13815 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13816 Likewise.
13817 (handle_action_dollar, handle_action_at): Likewise.
13818 * src/system.h: Do not include <errno.h>.
13819 (TAB_EXT): Renamed from EXT_TAB.
13820 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13821
13822 Avoid str[a-z]*, since <string.h> reserves that name space.
13823 Change all instances of "struniq" in names to "uniqstr", and
13824 likewise for "STRUNIQ" and "UNIQSTR".
13825 * src/uniqstr.c: Renamed from src/struniq.c.
13826 * src/uniqstr.h: Renamed from src/struniq.h.
13827 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13828 * src/files.c (strsuffix): Remove; unused.
13829 (concat2): Renamed from stringappend. Now static.
13830 * src/files.h (strsuffix, stringappend): Remove; unused.
13831 * src/parse-gram.y (<chars>): Renamed from <string>.
13832 (<uniqstr>): Renamed from <struniq>.
13833 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13834 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13835 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13836 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13837 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13838 (N_EXPAND): Renamed from N_STRETCH.
13839
13840 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13841 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13842 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13843 Remove; unused.
13844 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13845 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13846 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13847 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13848 (BASE_MAXIMUM): Renamed from BASE_MAX.
13849 (BASE_MINIMUM): Renamed from BASE_MIN.
13850 (ACTION_MAX): Remove; unused.
13851 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13852 Unnecessary casts removed from above defines.
13853
13854
13855 Fix misspelling in names.
13856 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13857 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13858 G_NODE_ALIGNEMENT.
13859
13860
13861 * lib/timevar.c (timevar_report): Renamed from time_report,
13862 for consistency with other names.
13863 * lib/timevar.h (timevar_report): New decl.
13864 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13865
13866
13867 Sort include-file uses.
13868
13869 Reorder all include files under src to be in the order "system.h".
13870 then the ../lib include files in angle brackets (alphabetized),
13871 then the . include files in double-quotes (alphabetized). Fix
13872 dependency breakages encountered in this process, as follows:
13873 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13874 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13875 * src/state.h: Include "symtab.h".
13876
13877 2002-12-08 Paul Eggert <eggert@twinsun.com>
13878
13879 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13880 since this causes problems when __file__ contains character
13881 sequences like "@" that are treated specially by src/scan-skel.l.
13882 Instead, just use the file's basename. This fixes the bug
13883 reported by Martin Mokrejs in
13884 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13885
13886 2002-12-06 Paul Eggert <eggert@twinsun.com>
13887
13888 Add support for rules that do not have trailing semicolons, as
13889 POSIX requires. Improve the quality of locations in Bison
13890 diagnostics.
13891
13892 * src/location.c: Include <quotearg.h>.
13893 (empty_location): Now const.
13894 (location_print): New function. Follow the recommendation of the
13895 GNU Coding Standards for locations that span file boundaries.
13896 * src/location.h: Do not include <quotearg.h>; no longer needed.
13897 (boundary): New type.
13898 (location_t): Use it. This allows locations to span file boundaries.
13899 All member uses changed: file -> start.file or end.file (as needed),
13900 first_line -> start.line, first_column -> start.column,
13901 last_line -> end.line, last_column -> end.column.
13902 (equal_boundaries): New function.
13903 (LOCATION_RESET, LOCATION_STEP): Remove.
13904 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13905 (empty_location): Now const.
13906 (location_print): New decl.
13907 * src/parse-gram.y (lloc_default): New function, which handles
13908 empty locations more accurately.
13909 (YYLLOC_DEFAULT): Use it.
13910 (%token COLON): Remove.
13911 (%token ID_COLON): New token.
13912 (rules): Use it.
13913 (declarations, rules): Remove trailing semicolon.
13914 (declaration, rules_or_grammar_declaration):
13915 Allow empty (";") declaration.
13916 (symbol_def): Remove empty actions; no longer needed.
13917 (rules_or_grammar_declaration): Remove trailing semicolon.
13918 (semi_colon.opt): Remove.
13919 * src/reader.h: Include location.h.
13920 (scanner_cursor): New decl.
13921 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13922 rolling our own.
13923 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13924 of *loc.
13925 (STEP): Remove. No longer needed, now that adjust_location does
13926 the work. All uses removed.
13927 (scanner_cursor): New var.
13928 (adjust_location): Renamed from extend_location. It now sets
13929 *loc and adjusts the scanner cursor. All uses changed.
13930 Don't bother testing for CR.
13931 (handle_syncline): Remove location arg; now updates scanner cursor.
13932 All callers changed.
13933 (unexpected_end_of_file): Now accepts start boundary of token or
13934 comment, not location. All callers changed. Update scanner cursor,
13935 not the location.
13936 (SC_AFTER_IDENTIFIER): New state.
13937 (context_state): Renamed from c_context. All uses changed.
13938 (id_loc, code_start, token_start): New local vars.
13939 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13940 processing of Yacc white space and equivalents here.
13941 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13942 instead of returning ID immediately, since we need to search for
13943 a subsequent colon.
13944 (<INITIAL>"'", "\""): Save token_start.
13945 (<INITIAL>"%{", "{", "%%"): Save code_start.
13946 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13947 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13948 BEGIN context_state at end, not INITIAL.
13949 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13950 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13951 Return correct token start.
13952 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13953 the start of a character, string or multiline comment is found.
13954 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13955 Reduction): Adjust reported locations to match the more-precise
13956 results now expected.
13957 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13958 * tests/reduce.at (Useless Rules, Reduced Automaton,
13959 Underivable Rules): Likewise.
13960 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13961 or "|"' now that so many other tokens are allowed by the new grammar.
13962
13963 * src/complain.h (current_file): Remove duplicate decl;
13964 current_file is now owned by files.h.
13965 * src/complain.c, src/scan-gram.l: Include files.h.
13966
13967 2002-12-06 Paul Eggert <eggert@twinsun.com>
13968
13969 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13970 promotes to int; it might be unsigned int.
13971 * data/yacc.c (yy_reduce_print): Likewise.
13972
13973 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13974 be #defined in the prologue, not in the Bison declarations.
13975 This fixes Debian Bug 102878, reported by Shaul Karl.
13976
13977 2002-12-02 Paul Eggert <eggert@twinsun.com>
13978
13979 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13980 * lib/strtoul.c: New file, from gnulib.
13981 This fixes a porting bug reported by Peter Klein in
13982 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13983
13984 2002-11-30 Paul Eggert <eggert@twinsun.com>
13985
13986 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13987 and put only a forward declaration in the prologue. This is for
13988 consistency with the other scanner helper functions.
13989
13990 Type clashes now generate warnings, not errors, since it
13991 appears that POSIX may allow some grammars with type clashes.
13992 * src/reader.c (grammar_current_rule_check): Warn about
13993 type clashes instead of complaining.
13994 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13995
13996 Add Yacc library, since POSIX requires it.
13997 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13998 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13999 * lib/main.c, lib/yyerror.c: New files.
14000
14001 gram_error can be static; it need not be extern.
14002 * src/reader.h (gram_error): Remove decl.
14003 * src/parse-gram.y (gram_error): Now static. Add static decl.
14004 (print_token_value): Omit parameter names from forward decl,
14005 for consistency.
14006
14007 2002-11-29 Paul Eggert <eggert@twinsun.com>
14008
14009 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14010 be declared before being used. E.g., one should typically
14011 declare them in the prologue. Use GNU coding style in examples.
14012 Put "const" consistently after the type it modifies. Mention
14013 that C99 supports "inline". Mention that yyerror traditionally
14014 returns "int".
14015
14016 %parse-param and %lex-param now take just one argument, the
14017 declaration; the argument name is deduced from the declaration.
14018
14019 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14020 Reporting, Table of Symbols): Document this.
14021 * src/parse-gram.y (add_param): New function.
14022 (COMMA): Remove.
14023 (declaration): Implement new rule for %parse-param and %lex-param.
14024 * src/scan-gram.l: "," now elicits a warning, rather than being
14025 a token; this is more compatible with byacc.
14026 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14027
14028 2002-11-27 Paul Eggert <eggert@twinsun.com>
14029
14030 Rename identifiers to avoid real and potential collisions.
14031
14032 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14033 to avoid collision with lex macro described by Bruce Lilly in
14034 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14035 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14036 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14037 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14038 All uses changed.
14039 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14040 The name "yycontrol" violates the name space rules, and this stuff
14041 wasn't being used anyway.
14042 (input): Remove action; this stuff wasn't being used.
14043 (gram_error): Rename local variable yylloc -> loc.
14044 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14045 (YY_DECL): Don't use "yy" at start of local variables.
14046 All uses changed, e.g., yylloc -> loc.
14047 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14048 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14049 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14050 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14051
14052 * src/parse-gram.y (gram_error): loc is now const *.
14053 * src/reader.h (gram_error): Likewise.
14054
14055 2002-11-24 Paul Eggert <eggert@twinsun.com>
14056
14057 Version 1.75c.
14058
14059 * tests/actions.at (Actions after errors): Use an output format
14060 more similar to that of the Printers and Destructors test.
14061 Test the position of the ';' token too.
14062 (Printers and Destructors): Likewise.
14063 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14064 unnecessarily alarming people when the test fails.
14065
14066 * data/yacc.c (yyerrlab1): Move this label down, so that the
14067 parser does not discard the lookahead token if the user code
14068 invokes YYERROR. This change is required for POSIX conformance.
14069
14070 * lib/error.c: Sync with gnulib.
14071
14072 2002-11-22 Paul Eggert <eggert@twinsun.com>
14073
14074 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14075 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14076 * lib/xmalloc.c: Likewise.
14077
14078 2002-11-20 Paul Eggert <eggert@twinsun.com>
14079
14080 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14081
14082 2002-11-20 Paul Eggert <eggert@twinsun.com>
14083
14084 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14085 should use `if (! x) abort ();' rather than `assert (x);', and
14086 anyway it's one less thing to worry about configuring.
14087
14088 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14089 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14090 and replace all instances of assert with abort.
14091 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14092 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14093
14094 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14095 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14096 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14097 hash_find_entry, hash_rehash, hash_insert): Likewise.
14098 * src/conflicts.c (resolve_sr_conflict): Likewise.
14099 * src/lalr.c (set_goto_map, map_goto): Likewise.
14100 * src/nullable.c (nullable_compute): Likewise.
14101 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14102 * src/reader.c (packgram, reader): Likewise.
14103 * src/state.c (state_new, state_free, state_transitions_set,
14104 state_reduction_find): Likewise.
14105 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14106 symbol_pack): Likewise.
14107 * src/tables.c (conflict_row, pack_vector): Likewise.
14108 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14109 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14110 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14111 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14112
14113 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14114 (ARGMATCH_CONSTRAINT): New macro.
14115 (ARGMATCH_ASSERT): Use it.
14116
14117 * src/system.h (verify): New macro.
14118 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14119 rather than assert.
14120 * src/tables.c (tables_generate): Likewise.
14121
14122 * src/struniq.c (struniq_assert): Now returns void, and aborts
14123 if the assertion is false.
14124 (struniq_assert_p): Remove.
14125 * src/struniq.h: Likewise.
14126
14127 2002-11-18 Paul Eggert <eggert@twinsun.com>
14128
14129 * data/glr.c (yygetLRActions): Replace `yyindex' with
14130 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14131 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14132 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14133
14134 2002-11-18 Akim Demaille <akim@epita.fr>
14135
14136 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14137 space.
14138 From Tim Van Holder.
14139
14140 2002-11-17 Paul Eggert <eggert@twinsun.com>
14141
14142 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14143 to "SyntaxError" for consistency with my 2002-11-15 change.
14144
14145 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14146 not define to {}, since this breaks the common use of `YYDPRINTF
14147 ((...));' if a single statement is desired (e.g. before `else').
14148 Work around GCC warnings by surrounding corresponding calls with
14149 {} if needed.
14150 (yyhasResolvedValue): Remove unused function.
14151 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14152 loop body.
14153 (yyreportSyntaxError): Renamed from yyreportParseError.
14154 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14155 All uses changed.
14156 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14157 extern when possible. Remove unused initializations.
14158
14159 2002-11-16 Akim Demaille <akim@epita.fr>
14160
14161 Augment the similarity between GLR and LALR traces.
14162
14163 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14164 (YY_REDUCE_PRINT): New.
14165 (yyparse): Use them.
14166 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14167 YYDPRINT here.
14168 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14169 state reached after the reduction/recovery, since...
14170 (yyparse, yyprocessOneStack): Report the state we are entering in.
14171
14172 2002-11-16 Akim Demaille <akim@epita.fr>
14173
14174 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14175 Add support for --trace=skeleton.
14176 * src/scan-skel.l: %option debug.
14177 Scan strings of non-@ or \n instead of character by character.
14178 (scan_skel): Handle trace_skeleton.
14179 (QPUTS): New.
14180 (@output_parser_name@, @output_header_name@): ``Restore'' their
14181 support (used to be M4 macros).
14182 * data/yacc.c: Quote larger chunks, a la glr.c.
14183 * data/lalr1.cc: Likewise.
14184 The header guards are no longer available, so use some other
14185 string than `YYLSP_NEEDED'.
14186
14187 2002-11-16 Akim Demaille <akim@epita.fr>
14188
14189 Make the ``Printers and Destructors'' test more verbose, taking
14190 `yacc.c''s behavior as (possibly wrong) reference.
14191
14192 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14193 instead of fprint on stdout.
14194 Set and report the last_line of the symbols.
14195 Consistently display values and locations.
14196
14197 2002-11-16 Paul Eggert <eggert@twinsun.com>
14198
14199 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14200
14201 2002-11-15 Paul Eggert <eggert@twinsun.com>
14202
14203 * tests/actions.at (Actions after errors): New test case.
14204
14205 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14206 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14207 tests/action.at, tests/calc.at, tests/conflicts.at,
14208 tests/cxx-type.at, tests/regression.at:
14209 "parse error" -> "syntax error" for POSIX compatibility.
14210 "parsing stack overflow..." -> "parser stack overflow" so
14211 that code matches Bison documentation.
14212
14213 2002-11-15 Akim Demaille <akim@epita.fr>
14214
14215 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14216 take two BRACED_CODE, not two string_content.
14217 Free the scanner's obstack when we are done.
14218 (code_content): New.
14219 * tests/calc.at: Adjust.
14220 * doc/bison.texinfo: Adjust.
14221 Also, make sure to include the `,' for these declarations.
14222
14223 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14224
14225 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14226 definition; avoids potential autoreconf problems.
14227
14228 2002-11-15 Akim Demaille <akim@epita.fr>
14229
14230 Always check the value returned by yyparse.
14231
14232 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14233 returned by yyparse.
14234 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14235 Adjust calls.
14236 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14237 returned by yyparse.
14238
14239 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14240
14241 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14242 on input.at test.
14243
14244 2002-11-14 Paul Eggert <eggert@twinsun.com>
14245
14246 * src/output.c (output_skeleton): Call xfopen instead of
14247 duplicating xfopen's body.
14248
14249 Fix bugs reported by Nelson H. F. Beebe in
14250 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14251
14252 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14253 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14254 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14255 file twice in the grammar, as an extra check.
14256
14257 * tests/input.at (Torturing the Scanner): Surround the
14258 backslash-newline tests with "#if 0", to make it less likely that
14259 we'll run into compiler bugs. Bring back solitary \ inside
14260 comment, but add a closing comment to work around HP C bug. Don't
14261 test backslash-newline in C character constant.
14262
14263 2002-11-14 Akim Demaille <akim@epita.fr>
14264
14265 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14266 status of the compiler.
14267 Calling `exit 1' is no longer needed.
14268 Reported by Nelson H. F. Beebe.
14269
14270 2002-11-14 Akim Demaille <akim@epita.fr>
14271
14272 * tests/atlocal.in (CPPFLAGS): We have config.h.
14273 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14274 New.
14275 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14276 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14277 * tests/regression.at, tests/torture.at: Use them for all the
14278 grammars that are to be compiled.
14279 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14280 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14281 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14282
14283 2002-11-14 Akim Demaille <akim@epita.fr>
14284
14285 * doc/bison.texinfo: Various formatting changes (alignments in
14286 samples, additional @group/@end group, GCS in samples.
14287 Use @deffn instead of simple @table to define the directives,
14288 macros, variables etc.
14289
14290 2002-11-13 Paul Eggert <eggert@twinsun.com>
14291
14292 Fix some bugs reported by Albert Chin-A-Young in
14293 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14294
14295 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14296 -o c"; the HP C compiler chatters during compilation.
14297 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14298 * tests/headers.at (export YYLTYPE): Likewise.
14299
14300 * tests/input.at (Torturing the Scanner): Remove lines containing
14301 solitary backslashes, as they tickle a bug in the HP C compiler.
14302
14303 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14304 comments, since they're not portable. Use GNU coding style.
14305
14306 2002-11-13 Akim Demaille <akim@epita.fr>
14307
14308 * data/yacc.c: Leave bigger chunks of quoted text.
14309 (YYDSYMPRINTF): New.
14310 Use it to report symbol activities.
14311 * data/glr.c (YYDSYMPRINTF): New.
14312 Use it.
14313
14314 2002-11-12 Paul Eggert <eggert@twinsun.com>
14315
14316 Version 1.75b.
14317
14318 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14319 (yyglrReduce): Return yyok, not 0.
14320 This should avoid the enumerated-type warnings reported
14321 by Nelson H. F. Beebe in
14322 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14323
14324 * lib/bbitset.h (BITSET_INLINE): Remove.
14325 * lib/bitset.h [! BITSET_INLINE]: Remove.
14326 (bitset_set, bitset_reset, bitset_test): Rename local vars
14327 to avoid shadowing warnings by GCC.
14328
14329 * data/glr.c (inline): Remove #define. It's the user's
14330 responsibility to #define it away, just like 'const'.
14331 This fixes one of the bugs reported by Nelson H. F. Beebe in
14332 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14333
14334 * Makefile.maint (po-check): Scan .l and .y files instead of the
14335 .c and the .h files that they generate. This fixes the bug
14336 reported by Tim Van Holder in:
14337 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14338 Look for N_ as well as for _. Try to avoid matching #define for
14339 N_ and _.
14340 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14341 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14342 * src/scan-gram.l: Revamp regular expressions so that " and '
14343 do not confuse xgettext.
14344
14345 * src/struniq.h (struniq_new): Do not declare the return type
14346 to be 'const'; this violates the C standard.
14347 * src/struniq.c (struniq_new): Likewise.
14348
14349 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14350
14351 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14352 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14353 linker.
14354
14355 2002-11-12 Akim Demaille <akim@epita.fr>
14356
14357 * Makefile.maint: Sync with Autoconf:
14358 (local_updates): New.
14359
14360 2002-11-12 Akim Demaille <akim@epita.fr>
14361
14362 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14363
14364 2002-11-12 Akim Demaille <akim@epita.fr>
14365
14366 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14367 locations.
14368
14369 2002-11-12 Akim Demaille <akim@epita.fr>
14370
14371 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14372 not yyvalue.
14373
14374 2002-11-12 Akim Demaille <akim@epita.fr>
14375
14376 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14377 Use it to test the GLR parser.
14378
14379 2002-11-12 Akim Demaille <akim@epita.fr>
14380
14381 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14382 defines it.
14383 * data/glr.c (yystos): New.
14384 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14385 (YYDSYMPRINT): New.
14386 (yyval): Don't define it, it is handled via M4.
14387 (yyrecoverParseError): Free verbosely the discarded symbols.
14388 * data/yacc.c (yysymprint): Remove, rather...
14389 (b4_yysymprint_generate): invoke.
14390 * data/c.m4 (b4_yysymprint_generate): New.
14391 Accept pointers as arguments, as opposed to the version from
14392 yacc.c.
14393 (b4_yydestruct_generate): Likewise.
14394 * tests/cations.at (Printers and Destructors): Use Bison directives
14395 instead of CPP macros.
14396 Don't rely on internal details.
14397
14398 2002-11-12 Akim Demaille <akim@epita.fr>
14399
14400 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14401 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14402 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14403 it against YYEMPTY and so forth), work on yytoken (i.e., set
14404 it to YYEMPTY etc.).
14405 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14406 (b4_symbol_actions): Remove.
14407 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14408 for 0, end-of-input.
14409
14410 2002-11-12 Akim Demaille <akim@epita.fr>
14411
14412 * doc/bison.texinfo (Destructor Decl): New.
14413
14414 2002-11-12 Akim Demaille <akim@epita.fr>
14415
14416 * src/tables.c (tables_generate): Use free for pointers that
14417 cannot be NULL, not XFREE.
14418 (pack_vector): Use assert, not fatal, for bound violations.
14419 * src/state.c (state_new): Likewise.
14420 * src/reader.c (reader): Likewise.
14421 * src/lalr.c (set_goto_map): Likewise.
14422 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14423 the file name.
14424
14425 2002-11-12 Akim Demaille <akim@epita.fr>
14426
14427 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14428 Restore.
14429 * src/scan-gram.l (last_string): Is global to the file, not to
14430 yylex.
14431 * src/parse-gram.y (input): Don't append the epilogue here,
14432 (epilogue.opt): do it here, and free the scanner's obstack.
14433 * src/reader.c (epilogue_set): Rename as...
14434 (epilogue_augment): this.
14435 * data/c.m4 (b4_epilogue): Defaults to empty.
14436
14437 2002-11-12 Akim Demaille <akim@epita.fr>
14438
14439 * src/getargs.c (long_options): Remove duplicates.
14440 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14441 Remove.
14442 * doc/bison.rnh: Remove.
14443 * doc/bison.texinfo (VMS Invocation): Remove.
14444
14445 2002-11-12 Akim Demaille <akim@epita.fr>
14446
14447 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14448 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14449
14450 Use struniq for symbols.
14451
14452 * src/symtab.h (symbol_t): The tag member is a struniq.
14453 (symbol_type_set): Adjust.
14454 * src/symtab.c (symbol_new): Takes a struniq.
14455 (symbol_free): Don't free the tag member.
14456 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14457 (hash_compare_symbol, hash_symbol): these.
14458 Use the fact that tags as struniqs.
14459 (symbol_get): Use struniq_new.
14460 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14461 Returns a strniq.
14462 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14463 and type members are struniqs.
14464 * src/reader.c (get_merge_function)
14465 (grammar_current_rule_merge_set): Adjust.
14466 (TYPE, current_type): Are struniq.
14467
14468 Use struniq for file names.
14469
14470 * src/files.h, src/files.c (infile): Split into...
14471 (grammar_file, current_file): these.
14472 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14473 * src/reduce.c (reduce_print): Likewise.
14474 * src/getargs.c (getargs): Likewise.
14475 * src/complain.h, src/complain.c: Likewise.
14476 * src/main.c (main): Call struniqs_new early enough to use it for
14477 file names.
14478 Don't free the input file name.
14479
14480 2002-11-12 Akim Demaille <akim@epita.fr>
14481
14482 * src/symtab.c (symbol_free): Remove dead deactivated code:
14483 type_name are properly removed.
14484 Don't use XFREE to free items that cannot be NULL.
14485 * src/struniq.h, src/struniq.c: New.
14486 * src/main.c (main): Initialize/free struniqs.
14487 * src/parse-gram.y (%union): Add astruniq member.
14488 (yyprint): Adjust.
14489 * src/scan-gram.l (<{tag}>): Return a struniq.
14490 Free the obstack bit that used to store it.
14491 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14492
14493 2002-11-11 Paul Eggert <eggert@twinsun.com>
14494
14495 Revamp to fix many (but not all) of the C- and M4-related quoting
14496 problems. Among other things, this fixes the Bison bug reported
14497 by Jan Hubicka when processing the Bash grammar; see:
14498 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14499
14500 Use new @ escapes consistently. Represent brackets with @{ and @}
14501 rather than @<:@ and @:>@, since this works a bit better with dumb
14502 editors like vi. Represent @ with @@, since @ is now consistently
14503 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14504 __ofile__, to avoid unexpected expansions. Similarly, use @output
14505 rather than #output.
14506
14507 * data/c.m4 (b4_copyright): Omit file name from comment, since
14508 the file name could contain "*/".
14509 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14510 be quoted. All uses changed.
14511
14512 * data/glr.c: Use new @ escapes consistently.
14513 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14514 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14515 Remove, since they couldn't handle arbitrary characters in file
14516 names.
14517 * data/lalr1.cc: Likewise.
14518 * data/yacc.c: Likewise.
14519
14520 * src/files.c (output_infix): Remove; all uses removed.
14521 * src/files.h: Likewise.
14522
14523 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14524 mishandled funny characters in file names, and anyway it isn't
14525 needed any more.
14526 * data/yacc.c: Likewise.
14527 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14528
14529 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14530 * data/yacc.c: Likewise.
14531
14532 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14533 strings now.
14534 (muscle_init): Quote filename as a C string.
14535 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14536 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14537 * src/output.c (escaped_file_name_output): New function.
14538 (prepare_symbols): Quote tokens for M4.
14539 (prepare): Don't insert output_infix, output_prefix,
14540 output_parser_name, output_header_name; this is now down by scan-skel.
14541 Insert skeleton as a C string.
14542
14543 * src/output.c (user_actions_output, symbol_destructors_output,
14544 symbol_printers_output): Quote filenames for C and M4.
14545 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14546
14547 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14548 escapes other than \\ and \'; this simplifies the code.
14549 (<SC_STRING>): Likewise, for \\ and \".
14550 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14551 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14552 Use new escapes @{ and @} for [ and ].
14553
14554 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14555 them with auto vars.
14556 Switch to new escape scheme, where @ is the escape character uniformly.
14557 Abort if a stray escape character is found. Avoid unbounded input
14558 buffer when parsing non-escaped text.
14559
14560 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14561 __oline__, #output, $@, and @{ do not have unintended meanings.
14562
14563 2002-11-09 Paul Eggert <eggert@twinsun.com>
14564
14565 Fix the test failure due to GCC warnings described in
14566 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14567 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14568 evaluate to 0 if it's impossible for NINF to be in the respective
14569 table.
14570 (yygetLRActions, yyrecoverParseError): Use them.
14571
14572 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14573 counted in the token inserted at end of file. Now takes
14574 location_t *, not location_t, so that the location can be
14575 adjusted. All uses changed.
14576
14577 * tests/regression.at (Invalid inputs): Adjust wording in
14578 diagnostic to match the new behavior.
14579
14580 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14581 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14582 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14583 abort ();'. This reduces the runtime of the "Many lookaheads"
14584 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14585 GCC 3.2.
14586
14587 2002-11-07 Paul Eggert <eggert@twinsun.com>
14588
14589 * src/parse-gram.y (CHARACTER): Remove unused token.
14590 All uses removed.
14591
14592 * src/scan-gram.l: Remove stack option. We no longer use the
14593 stack, since the stack was never deeper than 1; instead, use the
14594 new auto var c_context to record the stacked value.
14595
14596 Remove nounput option. At an unexpected end of file, we now unput
14597 the minimal input necessary to end cleanly; this simplifies the
14598 code.
14599
14600 Avoid unbounded token sizes where this is easy.
14601
14602 (unexpected_end_of_file): New function.
14603 Use it to systematize the error message on unexpected EOF.
14604 (last-string): Now auto, not static.
14605 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14606 (scanner_last_string_free): Remove; not used.
14607 (percent_percent_count): Move decl to just before use.
14608 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14609 not the (never otherwised-used) CHARACTER.
14610
14611 2002-11-07 Akim Demaille <akim@epita.fr>
14612
14613 Let yyerror always receive the msg as last argument, so that
14614 yyerror can be variadic.
14615
14616 * data/yacc.c (b4_yyerror_args): New.
14617 Use it when calling yyerror.
14618 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14619 Use it when calling yyerror.
14620 * doc/bison.texinfo (Error Reporting): Adjust.
14621 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14622 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14623
14624 2002-11-06 Akim Demaille <akim@epita.fr>
14625
14626 #line should have quoted strings.
14627 Ideally, this should be done by m4_quotearg.
14628
14629 * src/scan-skel.l: Include quotearg.h.
14630 Quote __ofile__.
14631 * src/output.c (symbol_printers_output)
14632 (symbol_destructors_output): Quote the file name.
14633
14634 2002-11-06 Akim Demaille <akim@epita.fr>
14635
14636 * tests/regression.at (Invalid inputs): Adjust to the recent
14637 messages.
14638
14639 2002-11-06 Akim Demaille <akim@epita.fr>
14640
14641 Restore --no-lines.
14642 Reported by Jim Kent.
14643
14644 * data/c.m4 (b4_syncline): New.
14645 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14646 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14647 * src/output.c (user_actions_output): Likewise.
14648 (prepare): Define 'b4_synclines_flag'.
14649 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14650
14651 2002-11-06 Akim Demaille <akim@epita.fr>
14652
14653 * src/main.c (main): Free `infile'.
14654 * src/scan-gram.l (handle_syncline): New.
14655 Recognize `#line'.
14656 * src/output.c (user_actions_output, symbol_destructors_output)
14657 (symbol_printers_output): Use the location's file name, not
14658 infile.
14659 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14660
14661 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14662
14663 * src/tables.c (matching_state): Don't allow states to match if
14664 either has GLR conflict entries.
14665
14666 2002-11-05 Paul Eggert <eggert@twinsun.com>
14667
14668 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14669 "integer out of range" rather than "invalid value".
14670 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14671 accordingly.
14672
14673 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14674 Also, remove one static variable in the scanner.
14675
14676 * src/scan-gram.l (braces_level): Now auto, not static.
14677 Initialize to zero if the compiler is being picky.
14678 (INITIAL): Clear braces_level instead of incrementing it.
14679 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14680 as POSIX 1003.1-2001 requires.
14681 * src/system.h (IF_LINT): New macro, taken from coreutils.
14682 * configure.ac: Define "lint" if --enable-gcc-warnings.
14683
14684 2002-11-05 Akim Demaille <akim@epita.fr>
14685
14686 * src/scan-gram.l: When it starts with `%', complain about the
14687 whole directive, not just that `invalid character: %'.
14688
14689 2002-11-04 Akim Demaille <akim@epita.fr>
14690
14691 * Makefile.maint: Update from Autoconf.
14692 (update, cvs-update, po-update, do-po-update): New.
14693
14694 2002-11-04 Akim Demaille <akim@epita.fr>
14695
14696 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14697 and yyerror.
14698 Have yyerror `use' its arguments.
14699 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14700 returns true when location & yacc & pure & parse-param.
14701 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14702
14703 2002-11-04 Akim Demaille <akim@epita.fr>
14704
14705 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14706 clashes.
14707 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14708 font-lock-mode.
14709 Use complain_at.
14710 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14711 slot 0.
14712
14713 2002-11-03 Paul Eggert <eggert@twinsun.com>
14714
14715 * src/reader.c (get_merge_function, grammar_current_rule_check):
14716 Use consistent diagnostics for reporting type name clashes.
14717 Quote the types with <>, for consistency with Yacc.
14718 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14719
14720 2002-11-03 Akim Demaille <akim@epita.fr>
14721
14722 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14723 New.
14724 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14725 (b4_parse_param): Remove.
14726 Use b4_identification.
14727 Propagate b4_pure_args where needed to pass them to yyerror.
14728 * data/glr.m4 (b4_parse_param): Remove.
14729 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14730 (b4_lpure_formals): New.
14731 Use b4_identification.
14732 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14733 b4_user_formals and b4_user_args.
14734 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14735 (yyreportAmbiguity): When using a pure parser, also need
14736 the location, and the parse-params.
14737 Adjust callers.
14738 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14739 When using a pure parser, also need the parse-params.
14740 Adjust callers.
14741 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14742 (%pure-parser + %parse-param) LALR and GLR parsers.
14743 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14744 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14745 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14746 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14747 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14748 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14749 * doc/bison.texinfo: Untabify the whole file.
14750 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14751 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14752 (Error Reporting): Adjust to these new directives.
14753 Document %error-verbose, deprecate YYERROR_VERBOSE.
14754
14755 2002-11-03 Akim Demaille <akim@epita.fr>
14756
14757 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14758 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14759 command line options.
14760 * tests/cxx-type.at: Formatting changes.
14761
14762 2002-11-03 Paul Eggert <eggert@twinsun.com>
14763
14764 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14765 to count columns correctly, and to check for invalid inputs.
14766
14767 Use mbsnwidth to count columns correctly. Account for tabs, too.
14768 Include mbswidth.h.
14769 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14770 (extend_location): New function.
14771 (YY_LINES): Remove.
14772
14773 Handle CRLF in C code rather than in Lex code.
14774 (YY_INPUT): New macro.
14775 (no_cr_read): New function.
14776
14777 Scan UCNs, even though we don't fully handle them yet.
14778 (convert_ucn_to_byte): New function.
14779
14780 Handle backslash-newline correctly in C code.
14781 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14782 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14783 all uses changed.
14784 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14785 Use {splice} wherever C allows backslash-newline.
14786 YY_STEP after space, newline, vertical-tab.
14787 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14788
14789 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14790
14791 ({int}, handle_action_dollar, handle_action_at): Check for integer
14792 overflow.
14793
14794 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14795
14796 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14797 as well as \000. Check for UCHAR_MAX, not 255.
14798 Allow \x with an arbitrary positive number of digits, as in C.
14799 Check for overflow here.
14800 Allow \? and UCNs, for compatibility with C.
14801
14802 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14803 with quote slot used by complain_at.
14804
14805 * tests/input.at: Add tests for backslash-newline, m4 quotes
14806 in symbols, long literals, and funny escapes in strings.
14807
14808 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14809 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14810 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14811 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14812 * m4/mbswidth.m4: New file, from GNU coreutils.
14813
14814 * doc/bison.texinfo (Grammar Outline): Document // comments.
14815 (Symbols): Document that trigraphs have no special meaning in Bison,
14816 nor is backslash-newline allowed.
14817 (Actions): Document that trigraphs have no special meaning.
14818
14819 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14820 no longer used.
14821
14822 2002-11-02 Paul Eggert <eggert@twinsun.com>
14823
14824 * src/reader.c: Don't include quote.h; not needed.
14825 (get_merge_function): Reword warning to be consistent with
14826 type clash diagnostic in grammar_current_rule_check.
14827
14828 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14829 bug in trigraph handling.
14830
14831 * src/output.c (prepare_symbols): When printing token names,
14832 escape "[" as "@<:@" and likewise for "]".
14833
14834 * src/system.h (errno): Remove declaration, as we are now
14835 assuming C89 or better, and C89 guarantees errno.
14836
14837 2002-10-30 Paul Eggert <eggert@twinsun.com>
14838
14839 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14840 Check for close failures.
14841 * src/files.h (xfclose): Return void, not int, since it always
14842 returned zero.
14843 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14844 indicates one.
14845 * src/output.c (output_skeleton): Use xfclose rather than fclose
14846 and ferror. xfclose now checks ferror.
14847
14848 * data/glr.c (YYLEFTMOST_STATE): Remove.
14849 (yyreportTree): Use a stack-based leftmost state. This avoids
14850 our continuing battles with bogus warnings about initializers.
14851
14852 2002-10-30 Akim Demaille <akim@epita.fr>
14853
14854 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14855 #if.
14856
14857 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14858
14859 * tests/glr-regr1.at: New test for reported regressions.
14860 * tests/testsuite.at: Add glr-regr1.at test.
14861 * tests/Makefile.am: Add glr-regr1.at test.
14862
14863 2002-10-24 Paul Eggert <eggert@twinsun.com>
14864
14865 Version 1.75a.
14866
14867 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14868 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14869 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14870 Don't assume strdup exists; POSIX says its an XSI extension.
14871 Check for buffer overflow on input.
14872
14873 2002-10-24 Akim Demaille <akim@epita.fr>
14874
14875 * src/output.c (output_skeleton): Don't disable M4sugar comments
14876 too soon: it results in comments being expanded.
14877 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14878 first output.
14879
14880 2002-10-24 Akim Demaille <akim@epita.fr>
14881
14882 * data/yacc.c (m4_int_type): New.
14883 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14884 char' as only yacc.c wants K&R portability.
14885 * data/glr.c (yysigned_char): Remove.
14886 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14887 Reported by Quoc Peyrot.
14888
14889 2002-10-23 Paul Eggert <eggert@twinsun.com>
14890
14891 * src/main.c (main): With --trace=time, report times even if a
14892 non-fatal error occurs. Formerly, the times were reported in some
14893 such cases but not in others.
14894 * src/reader.c (reader): Just return if a complaint has been issued,
14895 instead of exiting, so that 'main' can report times.
14896
14897 2002-10-22 Akim Demaille <akim@epita.fr>
14898
14899 * src/system.h: Include sys/types.
14900 Reported by Bert Deknuydt.
14901
14902 2002-10-23 Paul Eggert <eggert@twinsun.com>
14903
14904 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14905 Suggested by Art Haas.
14906
14907 2002-10-22 Paul Eggert <eggert@twinsun.com>
14908
14909 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14910 decl; not needed any more.
14911 * src/main.c (main): Use return to exit, undoing yesterday's change.
14912 The last OS that we could find where this wouldn't work is
14913 SunOS 3.5, and that's too old to worry about now.
14914
14915 * data/glr.c (struct yyltype): Define members even when not
14916 doing locations. This is more consistent with yacc.c, and it
14917 works around the following bug reports:
14918 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14919 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14920
14921 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14922 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14923 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14924
14925 2002-10-22 Akim Demaille <akim@epita.fr>
14926
14927 * data/README: New.
14928
14929 2002-10-21 Paul Eggert <eggert@twinsun.com>
14930
14931 Be consistent about 'bool'; the old code used an enum in one
14932 module and an int in another, and this violates the C standard.
14933 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14934 * configure.ac (AC_HEADER_STDBOOL): Add.
14935 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14936 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14937 * src/symtab.c (hash_compare_symbol_t): Likewise.
14938 * src/system.h (bool, false, true): Use a definition consistent
14939 with ../lib/hash.c. All uses changed.
14940
14941 * src/complain.c (warning_issued): Renamed from warn_message_count,
14942 so that we needn't worry about integer overflow (!).
14943 Now of type bool. All uses changed.
14944 (complaint_issued): Renamed from complain_message_count; likewise.
14945
14946 * src/main.c (main): Use exit to exit with failure.
14947
14948 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14949 rather than 1 and 0.
14950 * src/main.c (main): Likewise.
14951 * src/getargs.c (getargs): Likewise.
14952 * src/reader.c (reader): Likewise.
14953
14954 * src/getarg.c (getargs): Remove duplicate code for
14955 "Try `bison --help'".
14956
14957 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14958 What was that "2" for?
14959
14960 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14961 * src/getargs.c (usage): Likewise.
14962
14963 * src/getargs.c (getargs): When there are too few operands, report
14964 the last one. When there are too many, report the first extra
14965 one. This is how diffutils does it.
14966
14967 2002-10-20 Paul Eggert <eggert@twinsun.com>
14968
14969 Remove K&R vestiges.
14970 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14971 * src/complain.c (VA_START): Remove. Assume prototypes.
14972 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14973 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14974 fatal): Assume prototypes.
14975 * src/complain.h: Assume prototypes.
14976 * src/system.h (PARAMS): Remove.
14977 Include <limits.h> unconditionally, since it's guaranteeed even
14978 for a freestanding C89 compiler.
14979 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14980 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14981
14982 2002-10-20 Akim Demaille <akim@epita.fr>
14983
14984 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14985 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14986 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14987 (yyresolveStates, yyresolveAction, yyresolveStack)
14988 (yyprocessOneStack): Use them.
14989 (yy_reduce_print): New.
14990 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14991
14992 2002-10-20 Akim Demaille <akim@epita.fr>
14993
14994 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14995 arguments and output `void'.
14996 (b4_c_function): Rename as...
14997 (b4_c_function_def): this.
14998 (b4_c_function_decl, b4_c_ansi_function_def)
14999 (b4_c_ansi_function_decl): New.
15000 Change the interpretation of the arguments: before `int, foo', now
15001 `int foo, foo'.
15002 * data/yacc.c (yyparse): Prototype and define thanks to these.
15003 Adjust b4_c_function_def uses.
15004 * data/glr.c (yyparse): Likewise, but ANSI only.
15005
15006 2002-10-20 Akim Demaille <akim@epita.fr>
15007
15008 * src/output.c (prepare): Move the definition of `tokens_number',
15009 `nterms_number', `undef_token_number', `user_token_number_max'
15010 to...
15011 (prepare_tokens): Here.
15012 (prepare_tokens): Rename as...
15013 (prepare_symbols): this.
15014 (prepare): Move the definition of `rules_number' to...
15015 (prepare_rules): here.
15016 (prepare): Move the definition of `last', `final_state_number',
15017 `states_number' to...
15018 (prepare_states): here.
15019 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15020
15021 2002-10-20 Akim Demaille <akim@epita.fr>
15022
15023 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15024
15025 2002-10-20 Akim Demaille <akim@epita.fr>
15026
15027 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15028 * data/c.m4: here.
15029
15030 2002-10-20 Akim Demaille <akim@epita.fr>
15031
15032 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15033 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15034 `pair'.
15035 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15036 `name' to...
15037 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15038 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15039 These.
15040
15041 2002-10-19 Paul Eggert <eggert@twinsun.com>
15042
15043 Do not create a temporary file, as that involves security and
15044 cleanup headaches. Instead, use a pair of pipes.
15045 Derived from a suggestion by Florian Krohm.
15046 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15047 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15048 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15049 (BISON_PREREQ_SUBPIPE): Add.
15050 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15051 Add subpipe.h, subpipe.c.
15052 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15053 * po/POTFILES.in: Add lib/subpipe.c.
15054 * src/output.c: Include "subpipe.h".
15055 (m4_invoke): Remove decl.
15056 (scan_skel): New decl.
15057 (output_skeleton): Use pipe rather than temporary file for m4 input.
15058 Check that m4sugar.m4 is readable, to avoid deadlock.
15059 Check for pipe I/O error.
15060 * src/scan-skel.l (readpipe): Remove decl.
15061 (scan_skel): New function, to be used in place of m4_invoke.
15062 Read from stream rather than file.
15063
15064 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15065 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15066 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15067 this generates a more-accurate value anyway.
15068
15069 * lib/timevar.c (timervar_accumulate): Rename locals to
15070 avoid confusion with similarly-named more-global.
15071 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15072
15073 * src/output.c (prepare): Use xstrdup to convert char const *
15074 to char *, to avoid GCC warning.
15075
15076 2002-10-19 Akim Demaille <akim@epita.fr>
15077
15078 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15079 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15080 Use them to have `calc.y' ready for %pure-parser.
15081 * data/yacc.c (YYLEX): Pass a yylex return type to
15082 b4_c_function_call.
15083
15084 2002-10-19 Akim Demaille <akim@epita.fr>
15085
15086 Prototype support of %lex-param and %parse-param.
15087
15088 * src/parse-gram.y: Add the definition of the %lex-param and
15089 %parse-param tokens, plus their rules.
15090 Drop the `_' version of %glr-parser.
15091 Add the "," token.
15092 * src/scan-gram.l (INITIAL): Scan them.
15093 * src/muscle_tab.c: Comment changes.
15094 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15095 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15096 (muscle_entry_s): The `value' member is no longer const.
15097 Adjust all dependencies.
15098 * src/muscle_tab.c (muscle_init): Adjust: use
15099 MUSCLE_INSERT_STRING.
15100 Initialize the obstack earlier.
15101 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15102 (muscle_pair_list_grow): New.
15103 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15104 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15105 * tests/calc.at: Use %locations, not --locations.
15106 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15107
15108 2002-10-19 Akim Demaille <akim@epita.fr>
15109
15110 * src/getargs.c (usage): Take status as argument and exit
15111 accordingly.
15112 Report the traditional `Try ... --help' message when status != 0.
15113 (usage, version): Don't take a FILE * as arg, it is pointless.
15114 (getargs): When there is an incorrect number of arguments, make it
15115 an error, and report it GNUlically thanks to `usage ()'.
15116
15117 2002-10-18 Paul Eggert <eggert@twinsun.com>
15118
15119 * data/glr.c (yyreportParseError): Don't assume that sprintf
15120 yields the length of the printed string, as this is not true
15121 on SunOS 4.1.4. Reported by Peter Klein.
15122
15123 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15124 * tests/conflicts.at (%nonassoc and eof): Likewise.
15125 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15126
15127 2002-10-17 Akim Demaille <akim@epita.fr>
15128
15129 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15130 * src/getargs.c (trace_types, trace_args): Adjust.
15131 * src/reader.c (grammar_current_rule_prec_set)
15132 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15133 Standardize error messages.
15134 And s/@prec/%prec/!
15135 (reader): Use trace_flag to enable scanner/parser debugging,
15136 instead of an adhoc scheme.
15137 * src/scan-gram.l: Remove trailing debugging code.
15138
15139 2002-10-16 Paul Eggert <eggert@twinsun.com>
15140
15141 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15142 MUSCLE_TAB_H.
15143
15144 * NEWS: Officially drop support for building Bison with K&R C,
15145 since it didn't work anyway and it's not worth worrying about.
15146 * Makefile.maint (wget_files): Remove ansi2knr.c.
15147 (ansi2knr.c-url_prefix): Remove.
15148 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15149 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15150 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15151
15152 2002-10-15 Paul Eggert <eggert@twinsun.com>
15153
15154 Stop using the "enum_" trick for K&R-style function definitions;
15155 it confused me, and I was the author! Instead, assume that people
15156 who want to use K&R C compilers (when using these modules in GCC,
15157 perhaps?) will run ansi2knr.
15158
15159 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15160 All uses of "enum_" changed to "enum ".
15161 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15162 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15163
15164 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15165 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15166 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15167 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15168 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15169 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15170 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15171 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15172 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15173 Use function prototypes; this removes the need for declaring
15174 static functions simply to provide their prototypes.
15175 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15176 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15177 bitset_count_, bitset_create, bitset_dump, bitset_first,
15178 bitset_free, bitset_init, bitset_last, bitset_next,
15179 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15180 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15181 bitset_print, bitset_release_memory, bitset_toggle_,
15182 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15183 debug_bitset): Likewise.
15184 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15185 * lib/bitset_stats.c (bitset_log_histogram_print,
15186 bitset_percent_histogram_print, bitset_stats_and,
15187 bitset_stats_and_cmp, bitset_stats_and_or,
15188 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15189 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15190 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15191 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15192 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15193 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15194 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15195 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15196 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15197 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15198 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15199 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15200 bitset_stats_zero): Likewise.
15201 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15202 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15203 bitsetv_dump, debug_bitsetv): Likewise.
15204 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15205 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15206 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15207 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15208 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15209 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15210 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15211 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15212 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15213 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15214 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15215 Likewise.
15216 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15217 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15218 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15219 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15220 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15221 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15222 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15223 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15224 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15225 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15226 lbitset_xor_cmp, lbitset_zero): Likewise.
15227
15228 2002-10-14 Akim Demaille <akim@epita.fr>
15229
15230 Version 1.75.
15231
15232 2002-10-14 Akim Demaille <akim@epita.fr>
15233
15234 * tests/Makefile.am (maintainer-check-posix): New.
15235
15236 2002-10-14 Akim Demaille <akim@epita.fr>
15237
15238 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15239 member.
15240
15241 2002-10-14 Akim Demaille <akim@epita.fr>
15242
15243 * src/tables.c (table_ninf_remap): base -> tab.
15244 Reported by Matt Rosing.
15245
15246 2002-10-14 Paul Eggert <eggert@twinsun.com>
15247
15248 * tests/action.at, tests/calc.at, tests/conflicts.at,
15249 tests/cxx-type.at, tests/headers.at, tests/input.at,
15250 tests/regression.at, tests/synclines.at, tests/torture.at:
15251 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15252 so that the tests still work even if POSIXLY_CORRECT is set.
15253 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15254
15255 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15256 for portability to K&R hosts. Fix typo: signed char is guaranteed
15257 only to 127, not to 128.
15258 * data/glr.c (yysigned_char): New type.
15259 * data/yacc.c (yysigned_char): Likewise.
15260 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15261
15262 2002-10-13 Paul Eggert <eggert@twinsun.com>
15263
15264 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15265 true due to limited range of data type" warning from GCC.
15266
15267 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15268 by wrapping enum yytokentype's definition inside #ifndef
15269 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15270
15271 2002-10-13 Akim Demaille <akim@epita.fr>
15272
15273 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15274 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15275
15276 2002-10-13 Akim Demaille <akim@epita.fr>
15277
15278 * Makefile.maint: Update from Autoconf 2.54.
15279 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15280
15281 2002-10-13 Akim Demaille <akim@epita.fr>
15282
15283 * src/print.c (print_state): Separate the list of solved conflicts
15284 from the other items.
15285 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15286
15287 2002-10-13 Akim Demaille <akim@epita.fr>
15288
15289 Let nondeterministic skeletons be usable with deterministic
15290 tables.
15291
15292 With the patch, GAWK compiled by GCC without -O2 passes its test
15293 suite using a GLR parser driven by LALR tables. It fails with -O2
15294 because `struct stat' gives two different answers on my machine:
15295 88 (definition of an auto var) and later 96 (memset on this var).
15296 Hence the stack is badly corrumpted. The headers inclusion is to
15297 blame: if I move the awk.h inclusion before GLR's system header
15298 inclusion, the two struct stat have the same size.
15299
15300 * src/tables.c (pack_table): Always create conflict_table.
15301 (token_actions): Always create conflict_list.
15302 * data/glr.c (YYFLAG): Remove, unused.
15303
15304 2002-10-13 Akim Demaille <akim@epita.fr>
15305
15306 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15307 (O0FLAGS): New.
15308 (VALGRIND, GXX): New.
15309 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15310 * tests/bison.in: Run $PREBISON a pre-command.
15311 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15312 (maintainer-check-g++): New.
15313 * Makefile.am (maintainer-check): New.
15314
15315 2002-10-13 Akim Demaille <akim@epita.fr>
15316
15317 * data/glr.c: Formatting changes.
15318 Tweak some trace messages to match yacc.c's.
15319
15320 2002-10-13 Akim Demaille <akim@epita.fr>
15321
15322 GLR parsers sometimes raise parse errors instead of performing the
15323 default reduction.
15324 Reported by Charles-Henry de Boysson.
15325
15326 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15327 check the length of the traces when %glr.
15328 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15329 GLR's traces.
15330 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15331 Test GLR parsers.
15332 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15333 (yyltype): Remove the yy prefix from the member names.
15334 (yytable): Complete its comment.
15335 (yygetLRActions): Map error action number from YYTABLE from
15336 YYTABLE_NINF to 0.
15337 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15338 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15339 not satisfying as we could compare an YYACTION computed from
15340 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15341 only value for error actions.
15342 (yyreportParseError): In verbose parse error messages, don't issue
15343 `error' in the list of expected tokens.
15344 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15345 next action to perform to match glr.c's decoding.
15346 (yytable): Complete its comment.
15347
15348 2002-10-13 Paul Eggert <eggert@twinsun.com>
15349
15350 Fix problem reported by Henrik Grubbstroem in
15351 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15352 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15353 because the Bison parser reads the second action before reducing
15354 the first one.
15355 * src/scan-gram.l (rule_length): New static var.
15356 Use it to keep track of the rule length in the scanner, since
15357 we can't expect the parser to be in lock-step sync with the scanner.
15358 (handle_action_dollar, handle_action_at): Use this var.
15359 * tests/actions.at (Exotic Dollars): Test for the problem.
15360
15361 2002-10-12 Paul Eggert <eggert@twinsun.com>
15362
15363 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15364 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15365 Include <sys/time.h> when checking for clock_t and struct tms.
15366 Use same include order as source.
15367 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15368 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15369
15370 * lib/timevar.c: Update copyright date and clarify comments.
15371 (get_time) [IN_GCC]: Keep the GCC version for reference.
15372
15373 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15374 GCC version as of today, then merge Bison's changes.
15375 Change "GCC" to "Bison" in copyright notice. timevar.def's
15376 author is Akim, so change that too.
15377
15378 * src/reader.c (grammar_current_rule_check):
15379 Don't worry about the default action if $$ is untyped.
15380 Prevents bogus warnings reported by Jim Gifford in
15381 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15382
15383 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15384 * data/glr.c, data/lalr1.cc, data/yacc.c:
15385 Output token definitions before the first part of user declarations.
15386 Fixes compatibility problem reported by Jim Gifford for kbd in
15387 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15388
15389 2002-10-11 Paul Eggert <eggert@twinsun.com>
15390
15391 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15392 (yyparse): here. This undoes some of the 2002-07-25 change.
15393 Compatibility problem reported by Ralf S. Engelschall with
15394 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15395
15396 2002-10-11 Akim Demaille <akim@epita.fr>
15397
15398 * tests/regression.at Characters Escapes): New.
15399 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15400 characters.
15401 Reported by Jan Nieuwenhuizen.
15402
15403 2002-10-11 Akim Demaille <akim@epita.fr>
15404
15405 * po/id.po: New.
15406
15407 2002-10-10 Paul Eggert <eggert@twinsun.com>
15408
15409 Portability fixes for bitsets; this also avoids several GCC
15410 warnings.
15411
15412 * lib/abitset.c: Include <stddef.h>, for offsetof.
15413 * lib/lbitset.c: Likewise.
15414
15415 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15416 properly for vectors of objects. Do not assume that adding a
15417 header size to a multiple of a word size yields a value that is
15418 properly aligned for the whole union.
15419 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15420
15421 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15422 unique names for structures.
15423 * lib/ebitset.c (ebitset_bytes): Likewise.
15424 * lib/lbitset.c (lbitset_bytes): Likewise.
15425
15426 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15427 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15428 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15429 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15430 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15431 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15432 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15433 to improve the type-checking that GCC can do.
15434 * lib/bitset.c (bitset_op4_cmp): Likewise.
15435 * lib/bitset_stats.c (bitset_stats_count,
15436 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15437 bitset_stats_copy, bitset_stats_disjoint_p,
15438 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15439 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15440 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15441 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15442 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15443 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15444 bitset_stats_or_and_cmp): Likewise.
15445 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15446 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15447 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15448 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15449
15450 * lib/abitset.h: Include bitset.h, not bbitset.h.
15451 * lib/ebitset.h: Likewise.
15452 * lib/lbitset.h: Likewise.
15453
15454 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15455 All instances of parameters of type enum bitset_opts are now of
15456 type enum_bitset_opts, to conform to the C Standard, and similarly
15457 for enum_bitset_type.
15458 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15459 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15460
15461 Do not use "struct bitset_struct" to mean different things in
15462 different modules. Not only is this confusing, it violates
15463 the C Standard, which requires that structure types in different
15464 modules must be compatible if one is to be passed to the other.
15465 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15466 All instances of "struct bitset_struct *" replaced with "bitset".
15467 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15468 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15469 struct lbitset_struct, struct bitset_stats_struct): New types.
15470 All uses of struct bitset_struct changed to union bitset_union,
15471 etc.
15472 * lib/abitset.c (struct abitset_struct, abitset,
15473 struct bitset_struct): Remove.
15474 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15475 struct bitset_struct): Remove.
15476 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15477 bitset_struct): Remove.
15478 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15479 Likewise.
15480
15481 Do not call a function of type T using a call that assumes the
15482 function is of a different type U. Standard C requires that a
15483 function must be called with a type that is compatible with its
15484 definition.
15485 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15486 New decls.
15487 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15488 New functions.
15489 * lib/ebitset.c (PFV): Remove.
15490 * lib/lbitset.c (PFV): Likewise.
15491 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15492 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15493 decls.
15494 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15495 (ebitset_vtable): Use them.
15496 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15497 lbitset_xor): New functions.
15498 (lbitset_vtable): Use them.
15499
15500 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15501 Declare.
15502
15503 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15504 GCC warning.
15505 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15506 Use offsetof, for simplicity.
15507
15508 2002-10-06 Paul Eggert <eggert@twinsun.com>
15509
15510 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15511 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15512 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15513 which was inadvertently undone by the 2002-09-30 patch.
15514 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15515 the same width as int.
15516
15517 2002-10-04 Paul Eggert <eggert@twinsun.com>
15518
15519 Version 1.50.
15520
15521 * configure.ac (AC_INIT), NEWS: Increment version number.
15522
15523 * doc/bison.texinfo: Minor spelling, grammar, and white space
15524 fixes.
15525 (Symbols): Mention that any negative value returned from yylex
15526 signifies end-of-input. Warn about negative chars. Mention
15527 the portable Standard C character set.
15528
15529 The GNU coding standard says CFLAGS and YFLAGS are reserved
15530 for the installer to set.
15531 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15532 * src/Makefile.am (AM_CFLAGS): Likewise.
15533 (AM_YFLAGS): Renamed from YFLAGS.
15534
15535 Fix some MAX and MIN problems.
15536 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15537 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15538 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15539 * src/reader.c (reader): Use it.
15540
15541 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15542 POSIX 1003.1-2001 has removed fgrep.
15543
15544 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15545
15546 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15547 interpreted as signed.
15548 * lib/ebitset.c (ebitset_list): Fix bug.
15549
15550 2002-10-01 Paul Eggert <eggert@twinsun.com>
15551
15552 More fixes for 64-bit hosts and large bitsets.
15553
15554 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15555 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15556 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15557 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15558 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15559 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15560 bitset_count_): Likewise.
15561 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15562 bitset_first, bitset_last): Likewise.
15563 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15564 bitset_stats_list_reverse, bitset_stats_size,
15565 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15566 Likewise.
15567 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15568 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15569 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15570 bitsetv_reflexive_transitive_closure): Likewise.
15571 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15572 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15573 Likewise.
15574 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15575 Likewise.
15576
15577 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15578 Use size_t, not unsigned int, to count bytes.
15579 * lib/abitset.h (abitset_bytes): Likewise.
15580 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15581 Likewise.
15582 * lib/bitset.h (bitset_bytes): Likewise.
15583 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15584 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15585 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15586 * lib/ebitset.c (ebitset_bytes): Likewise.
15587 * lib/ebitset.h (ebitset_bytes): Likewise.
15588 * lib/lbitset.c (lbitset_bytes): Likewise.
15589 * lib/lbitset.h (lbitset_bytes): Likewise.
15590
15591 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15592 abitset_subset_p, abitset_disjoint_p, abitset_and,
15593 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15594 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15595 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15596 abitset_or_and, abitset_or_and_cmp):
15597 Use bitset_windex instead of unsigned int.
15598 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15599 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15600 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15601 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15602 Likewise.
15603 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15604
15605 * lib/bitset.c (bitset_print):
15606 Use proper printf formats for widths of integer types.
15607 * lib/bitset_stats.c (bitset_percent_histogram_print,
15608 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15609 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15610 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15611 * lib/lbitset.c (lbitset_bytes): Likewise.
15612
15613 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15614 BITSET_SIZE_MAX): New macros.
15615 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15616 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15617 to BITSET_WINDEX_MAX.
15618
15619 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15620 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15621 since we now return the bitset_bindex type (not int).
15622
15623 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15624 when computing sizes.
15625 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15626
15627 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15628 and avoid cast to unsigned.
15629
15630 2002-09-30 Akim Demaille <akim@epita.fr>
15631
15632 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15633 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15634 Updates from Michael Hayes.
15635
15636 2002-09-30 Art Haas <ahaas@neosoft.com>
15637
15638 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15639 invocations.
15640 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15641 defined.
15642
15643 2002-09-27 Akim Demaille <akim@epita.fr>
15644
15645 Version 1.49c.
15646
15647 2002-09-27 Akim Demaille <akim@epita.fr>
15648
15649 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15650 (Because of AC_LIBSOURCE).
15651
15652 2002-09-27 Akim Demaille <akim@epita.fr>
15653
15654 Playing with Autoscan.
15655
15656 * configure.ac: Remove the old LIBOBJ tweaks.
15657 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15658 * lib/strrchr.c: New.
15659 * lib/strtol.c: New, from the Coreutils 4.5.1.
15660
15661 2002-09-27 Akim Demaille <akim@epita.fr>
15662
15663 Playing with Autoscan.
15664
15665 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15666 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15667 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15668 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15669 Coreutils 4.5.1.
15670
15671 2002-09-24 Akim Demaille <akim@epita.fr>
15672
15673 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15674 (Frequently Asked Questions, Parser Stack Overflow): New.
15675
15676 2002-09-13 Akim Demaille <akim@epita.fr>
15677
15678 Playing with autoscan.
15679
15680 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15681 * src/files.c (skeleton_find): Remove, unused.
15682 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15683 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15684
15685 2002-09-13 Akim Demaille <akim@epita.fr>
15686
15687 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15688 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15689
15690 2002-09-13 Akim Demaille <akim@epita.fr>
15691
15692 * configure.ac: Require 2.54.
15693 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15694 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15695 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15696 Remove, provided by Autoconf macros.
15697
15698 2002-09-12 Akim Demaille <akim@epita.fr>
15699
15700 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15701
15702 2002-09-12 Akim Demaille <akim@epita.fr>
15703
15704 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15705 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15706 Reported by Martin Mokrejs.
15707
15708 2002-09-10 Akim Demaille <akim@epita.fr>
15709
15710 * src/parse-gram.y: Associate a human readable string to each
15711 token type.
15712 * tests/regression.at (Invalid inputs): Adjust.
15713
15714 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15715
15716 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15717 with an Autoconf-2.5x style configure.ac.
15718
15719 2002-09-06 Paul Eggert <eggert@twinsun.com>
15720
15721 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15722 exception applies only to yacc.c. This is a modification of a
15723 patch originally suggested by Akim Demaille.
15724
15725 2002-09-06 Akim Demaille <akim@epita.fr>
15726
15727 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15728 here to...
15729 * data/yacc.c: here.
15730
15731 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15732 LocationType.
15733 (b4_ltype): Default to yy::Location from location.hh.
15734
15735 2002-09-04 Jim Meyering <jim@meyering.net>
15736
15737 * data/yacc.c: Guard the declaration of yytoknum also with
15738 `#ifdef YYPRINT', so it is declared only when used.
15739
15740 2002-09-04 Akim Demaille <akim@epita.fr>
15741
15742 * configure.in: Rename as...
15743 * configure.ac: this.
15744 Bump to 1.49c.
15745
15746 2002-09-04 Akim Demaille <akim@epita.fr>
15747
15748 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15749 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15750 translate maintainer only messages.
15751
15752 2002-08-12 Paul Eggert <eggert@twinsun.com>
15753
15754 Version 1.49b.
15755
15756 * Makefile.am (SUBDIRS): Remove intl.
15757 (DISTCLEANFILES): Remove.
15758 * NEWS: Mention that GNU M4 is now required. Clarify what is
15759 meant by "larger grammars". Mention the pt_BR translation.
15760 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15761 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15762 Bump version from 0.11.2 to 0.11.5.
15763 (BISON_PREREQ_STAGE): Remove.
15764 (AM_GNU_GETTEXT): Use external gettext.
15765 (AC_OUTPUT): Remove intl/Makefile.
15766
15767 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15768
15769 * data/glr.c: Include string.h, for strlen.
15770 (yyreportParseError): Use size_t for yysize.
15771 (yy_yypstack): No longer nested inside yypstates, as nested
15772 functions are not portable. Do not assume size_t is the
15773 same width as int.
15774 (yypstates): Do not assume that ptrdiff_t is the same width
15775 as int, and similarly for yyposn and YYINDEX.
15776
15777 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15778
15779 * lib/Makefile.am (INCLUDES): Do not include from the intl
15780 directory, which has been removed.
15781 * src/Makefile.am (INCLUDES): Likewise.
15782
15783 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15784 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15785 New vars.
15786
15787 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15788 * tests/Makefile.am (EXTRA_DIST): Likewise.
15789
15790 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15791 Do not assume that bitset_windex is the same width as unsigned.
15792
15793 * lib/abitset.c (abitset_unused_clear): Do not assume that
15794 bitset_word is the same width as int.
15795 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15796 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15797 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15798 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15799 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15800
15801 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15802 portability to one's complement hosts!).
15803 * lib/ebitset.c (ebitset_op1): Likewise.
15804 * lib/lbitset.c (lbitset_op1): Likewise.
15805
15806 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15807 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15808 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15809 Sync with fileutils.
15810 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15811 lib/gettext.h: Sync with diffutils.
15812
15813 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15814 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15815
15816 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15817 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15818 check for void *.
15819
15820 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15821 size_t; the old version tried to do this but casted improperly.
15822 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15823 (bitset_test): Now returns int, not unsigned long.
15824
15825 * lib/bitset_stats.c: Include "gettext.h".
15826 (_): New macro.
15827 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15828 name locals "index", as it generates unnecessary warnings on some
15829 hosts that have an "index" function.
15830
15831 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15832 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15833 they need translation.
15834 * src/LR0.c (state_list_append, new_itemsets, get_state,
15835 append_states, generate_states): Likewise.
15836 * src/assoc.c (assoc_to_string): Likewise.
15837 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15838 * src/gram.c (grammar_dump): Likewise.
15839 * src/injections.c (injections_compute): Likewise.
15840 * src/lalr.c (lookaheads_print): Likewise.
15841 * src/relation.c (relation_transpose): Likewise.
15842 * src/scan-gram.l: Likewise.
15843 * src/tables.c (table_grow, pack_vector): Likewise.
15844
15845 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15846 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15847 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15848 * m4/mbstate_t.m4: Sync with fileutils.
15849 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15850
15851 * po/LINGUAS: Add pt_BR.
15852 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15853 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15854 lib/timevar.c.
15855 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15856 manual recommends.
15857 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15858
15859 * src/complain.c (strerror_r): Remove decl; not needed.
15860 (strerror): Use same pattern as ../lib/error.c.
15861
15862 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15863
15864 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15865
15866 * src/main.c (main): Cast result of bindtextdomain and textdomain
15867 to void, to avoid a GCC warning when --disable-nls is in effect.
15868
15869 * src/scan-gram.l: Use strings rather than escapes when possible,
15870 to minimize the number of warnings from xgettext.
15871 (handle_action_dollar, handle_action_at): Don't use isdigit,
15872 as it mishandles negative chars and it may not work as expected
15873 outside the C locale.
15874
15875 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15876 this is a GCC extension and is not portable to other compilers.
15877
15878 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15879 Do not include <ctype.h>; no longer needed.
15880 Do not include <malloc.h>; no longer needed (and generates
15881 warnings on OpenBSD 3.0).
15882
15883 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15884 it's not portable.
15885
15886 * tests/regression.at: Do not use 'cc -c input.c -o input';
15887 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15888
15889 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15890 exit status as failure, not just exit status 1. Sun C exits
15891 with status 2 sometimes.
15892
15893 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15894 Use it for the two large tests.
15895
15896 2002-08-02 Akim Demaille <akim@epita.fr>
15897
15898 * src/conflicts.c (conflicts_output): Don't output rules never
15899 reduced here, since anyway that computation doesn't work.
15900 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15901 (rule_useless_p, rule_never_reduced_p): New.
15902 (grammar_rules_partial_print): Use a filter instead of a range.
15903 Display the title only if needed.
15904 (grammar_rules_print): Adjust.
15905 (grammar_rules_never_reduced_report): New.
15906 * src/tables.c (action_row): Move the computation of rules never
15907 reduced to...
15908 (token_actions): here.
15909 * src/main.c (main): Make the parser before making the report, so
15910 that rules never reduced are computed.
15911 Call grammar_rules_never_reduced_report.
15912 * src/print.c (print_results): Report rules never reduced.
15913 * tests/conflicts.at, tests/reduce.at: Adjust.
15914
15915 2002-08-01 Akim Demaille <akim@epita.fr>
15916
15917 Instead of attaching lookaheads and duplicating the rules being
15918 reduced by a state, attach the lookaheads to the reductions.
15919
15920 * src/state.h (state_t): Remove the `lookaheads',
15921 `lookaheads_rule' member.
15922 (reductions_t): Add a `lookaheads' member.
15923 Use a regular array for the `rules'.
15924 * src/state.c (reductions_new): Initialize the lookaheads member
15925 to 0.
15926 (state_rule_lookaheads_print): Adjust.
15927 * src/state.h, src/state.c (state_reductions_find): New.
15928 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15929 (count_rr_conflicts): Adjust.
15930 * src/lalr.c (LArule): Remove.
15931 (add_lookback_edge): Adjust.
15932 (state_lookaheads_count): New.
15933 (states_lookaheads_initialize): Merge into...
15934 (initialize_LA): this.
15935 (lalr_free): Adjust.
15936 * src/main.c (main): Don't free nullable and derives too early: it
15937 is used by --verbose.
15938 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15939
15940 2002-08-01 Akim Demaille <akim@epita.fr>
15941
15942 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15943 `rule_number_t**'.
15944 (set_derives, free_derives): Rename as...
15945 (derives_compute, derives_free): this.
15946 Adjust all dependencies.
15947 * src/nullable.c (set_nullable, free_nullable): Rename as...
15948 (nullable_compute, nullable_free): these.
15949 (rule_list_t): Store rule_t *, not rule_number_t.
15950 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15951 pointers, instead of their numbers.
15952 * src/main.c (main): Call nullable_free, and derives_free earlier,
15953 as they were lo longer used.
15954
15955 2002-08-01 Akim Demaille <akim@epita.fr>
15956
15957 * lib/timevar.c (get_time): Include children time.
15958 * src/lalr.h (LA, LArule): Don't export them: used with the
15959 state_t.
15960 * src/lalr.c (LA, LArule): Static.
15961 * src/lalr.h, src/lalr.c (lalr_free): New.
15962 * src/main.c (main): Call it.
15963 * src/tables.c (pack_vector): Check whether loc is >= to the
15964 table_size, not >.
15965 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15966 (tables_generate): do it, since that's also it which allocates
15967 them.
15968 Don't free LA and LArule, main does.
15969
15970 2002-07-31 Akim Demaille <akim@epita.fr>
15971
15972 Separate parser tables computation and output.
15973
15974 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15975 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15976 (yydefgoto, yydefact, high): Move to...
15977 * src/tables.h, src/tables.c: here.
15978 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15979 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15980 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15981 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15982 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15983 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15984 (action_row, save_row, token_actions, save_column, default_goto)
15985 (goto_actions, sort_actions, matching_state, pack_vector)
15986 (table_ninf_remap, pack_table, prepare_actions): Move to...
15987 * src/tables.c: here.
15988 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15989 * src/output.c (token_actions, output_base, output_conflicts)
15990 (output_check): Merge into...
15991 (prepare_actions): this.
15992 (actions_output): Rename as...
15993 (user_actions_output): this.
15994 * src/main.c (main): Call tables_generate and tables_free.
15995
15996 2002-07-31 Akim Demaille <akim@epita.fr>
15997
15998 Steal GCC's --time-report support.
15999
16000 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16001 stolen/adjusted from GCC.
16002 * m4/stage.m4: Remove time related checks.
16003 * m4/timevar.m4: New.
16004 * configure.in: Adjust.
16005 * src/system.h: Adjust to using timevar.h.
16006 * src/getargs.h, src/getargs.c: Support trace_time for
16007 --trace=time.
16008 * src/main.c (stage): Remove.
16009 (main): Replace `stage' invocations with timevar calls.
16010 * src/output.c: Insert pertinent timevar calls.
16011
16012 2002-07-31 Akim Demaille <akim@epita.fr>
16013
16014 Let --trace have arguments.
16015
16016 * src/getargs.h (enum trace_e): New.
16017 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16018 (long_options, short_options): --trace/-T takes an optional
16019 argument.
16020 Change all the uses of trace_flag to reflect the new flags.
16021 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16022
16023 Strengthen `stage' portability.
16024
16025 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16026 * configure.in: Use it.
16027 Don't check for malloc.h and sys/times.h.
16028 * src/system.h: Include them when appropriate.
16029 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16030 times and struct tms are available.
16031
16032 2002-07-30 Akim Demaille <akim@epita.fr>
16033
16034 In verbose parse error message, don't report `error' as an
16035 expected token.
16036 * tests/actions.at (Printers and Destructors): Adjust.
16037 * tests/calc.at (Calculator $1): Adjust.
16038 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16039 error message, do not report the parser accepts the error token in
16040 that state.
16041
16042 2002-07-30 Akim Demaille <akim@epita.fr>
16043
16044 Normalize conflict related messages.
16045
16046 * src/complain.h, src/complain.c (warn, complain): New.
16047 * src/conflicts.c (conflicts_print): Use them.
16048 (conflict_report_yacc): New, extracted from...
16049 (conflicts_print): here.
16050 * tests/conflicts.at, tests/existing.at: Adjust.
16051
16052 2002-07-30 Akim Demaille <akim@epita.fr>
16053
16054 Report rules which are never reduced by the parser: those hidden
16055 by conflicts.
16056
16057 * src/LR0.c (save_reductions): Don't make the final state too
16058 different: save its reduction (accept) instead of having a state
16059 without any action (no shift or goto, no reduce).
16060 Note: the final state is now a ``regular'' state, i.e., the
16061 parsers now contain `reduce 0' as default reduction.
16062 Nevertheless, since they decide to `accept' when yystate =
16063 final_state, they still will not reduce rule 0.
16064 * src/print.c (print_actions, print_reduction): Adjust.
16065 * src/output.c (action_row): Track reduced rules.
16066 (token_actions): Report rules never reduced.
16067 * tests/conflicts.at, tests/regression.at: Adjust.
16068
16069 2002-07-30 Akim Demaille <akim@epita.fr>
16070
16071 `stage' was accidently included in a previous patch.
16072 Initiate its autoconfiscation.
16073
16074 * configure.in: Look for malloc.h and sys/times.h.
16075 * src/main.c (stage): Adjust.
16076 Report only when trace_flag.
16077
16078 2002-07-29 Akim Demaille <akim@epita.fr>
16079
16080 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16081 state_number_t.
16082 (errs_t): symbol_t*, not symbol_number_t.
16083 (reductions_t): rule_t*, not rule_number_t.
16084 (FOR_EACH_SHIFT): New.
16085 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16086 * src/print.c, src/print_graph.c: Adjust.
16087
16088 2002-07-29 Akim Demaille <akim@epita.fr>
16089
16090 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16091
16092 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16093 (endtoken, accept): these.
16094 * src/reader.c (reader): Set endtoken's default tag to "$end".
16095 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16096 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16097 Adjust.
16098
16099 2002-07-29 Akim Demaille <akim@epita.fr>
16100
16101 * src/reduce.c (reduce_grammar): When the language is empty,
16102 complain about the start symbol, not the axiom.
16103 Use its location.
16104 * tests/reduce.at (Empty Language): New.
16105
16106 2002-07-26 Akim Demaille <akim@epita.fr>
16107
16108 * src/reader.h, src/reader.c (gram_error): ... can't get
16109 yycontrol without making too strong assumptions on the parser
16110 itself.
16111 * src/output.c (prepare_tokens): Use the real 0th value of
16112 token_translations instead of `0'.
16113 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16114 visible here.
16115 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16116 for the time being: %locations ought to provide it to yyerror.
16117
16118 2002-07-25 Akim Demaille <akim@epita.fr>
16119
16120 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16121 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16122 * tests/regression.at (Web2c Actions): Adjust.
16123
16124 2002-07-25 Akim Demaille <akim@epita.fr>
16125
16126 Stop storing rules from 1 to nrules + 1.
16127
16128 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16129 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16130 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16131 Iterate from 0 to nrules.
16132 Use rule_number_as_item_number and item_number_as_rule_number.
16133 Adjust to `derive' now containing possibly 0.
16134 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16135 Handle the `- 1' part in rule numbers from/to item numbers.
16136 * src/conflicts.c (log_resolution): Fix the message which reversed
16137 shift and reduce.
16138 * src/output.c (action_row): Initialize default_rule to -1.
16139 (token_actions): Adjust.
16140 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16141 expected output.
16142 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16143
16144 2002-07-25 Akim Demaille <akim@epita.fr>
16145
16146 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16147 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16148 (b4_c_knr_arg_decl): New.
16149 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16150 yyreport_parse_error.
16151
16152 2002-07-25 Akim Demaille <akim@epita.fr>
16153
16154 * data/yacc.c (yyreport_parse_error): New, extracted from...
16155 (yyparse): here.
16156 (yydestruct, yysymprint): Move above yyparse.
16157 Be K&R compliant.
16158
16159 2002-07-25 Akim Demaille <akim@epita.fr>
16160
16161 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16162 replace...
16163 (b4_sint_type, b4_uint_type): these.
16164 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16165 * tests/regression.at (Web2c Actions): Adjust.
16166
16167 2002-07-25 Akim Demaille <akim@epita.fr>
16168
16169 * src/gram.h (TIEM_NUMBER_MAX): New.
16170 (item_number_of_rule_number, rule_number_of_item_number): Rename
16171 as...
16172 (rule_number_as_item_number, item_number_as_rule_number): these.
16173 Adjust dependencies.
16174 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16175 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16176 (symbol_number_to_vector_number): New.
16177 (order): Of vector_number_t* type.
16178 (base_t, BASE_MAX, BASE_MIN): New.
16179 (froms, tos, width, pos, check): Of base_t type.
16180 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16181 (actrow): Of action_number_t type.
16182 (conflrow): Of unsigned int type.
16183 (table_ninf, base_ninf): New.
16184 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16185 (muscle_insert_int_table, muscle_insert_base_table)
16186 (muscle_insert_rule_number_table): New.
16187 (prepare_tokens): Output `toknum' as int_table.
16188 (action_row): Returns a rule_number_t.
16189 Use ACTION_MIN, not SHRT_MIN.
16190 (token_actions): yydefact is rule_number_t*.
16191 (table_ninf_remap): New.
16192 (pack_table): Use it for `base' and `table'.
16193 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16194 replaced with...
16195 (YYPACT_NINF, YYTABLE_NINF): these.
16196 (yypact, yytable): Compute their types instead of hard-coded
16197 `short'.
16198 * tests/regression.at (Web2c Actions): Adjust.
16199
16200 2002-07-19 Akim Demaille <akim@epita.fr>
16201
16202 * src/scan-gram.l (id): Can start with an underscore.
16203
16204 2002-07-16 Akim Demaille <akim@epita.fr>
16205
16206 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16207 Adjust all former `associativity' dependencies.
16208 * src/symtab.c (symbol_new): Default associativity is `undef', not
16209 `right'.
16210 (symbol_check_alias_consistence): Adjust.
16211
16212 2002-07-09 Akim Demaille <akim@epita.fr>
16213
16214 * doc/bison.texinfo: Properly set the ``header'' part.
16215 Use @dircategory ``GNU programming tools'' as per Texinfo's
16216 documentation.
16217 Use @copying.
16218
16219 2002-07-09 Akim Demaille <akim@epita.fr>
16220
16221 * lib/quotearg.h: Protect against multiple inclusions.
16222 * src/location.h (location_t): Add a `file' member.
16223 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16224 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16225 `error_one_per_line' support.
16226
16227 2002-07-09 Akim Demaille <akim@epita.fr>
16228
16229 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16230 * src/reader.c (lineno): Remove.
16231 Adjust all dependencies.
16232 (get_merge_function): Take a location and use complain_at.
16233 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16234 * tests/regression.at (Invalid inputs, Mixing %token styles):
16235 Adjust.
16236
16237 2002-07-09 Akim Demaille <akim@epita.fr>
16238
16239 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16240 recovery rule, and forbid extensions when --yacc.
16241 (gram_error): Use complain_at.
16242 * src/reader.c (reader): Exit if there were parse errors.
16243
16244 2002-07-09 Akim Demaille <akim@epita.fr>
16245
16246 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16247 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16248 Reported by R Blake <blakers@mac.com>.
16249
16250 2002-07-09 Akim Demaille <akim@epita.fr>
16251
16252 * data/yacc.c: Output the copyright notive in the header.
16253
16254 2002-07-03 Akim Demaille <akim@epita.fr>
16255
16256 * src/output.c (froms, tos): Are state_number_t.
16257 (save_column): sp, sp1, and sp2 are state_number_t.
16258 (prepare): Rename `final' as `final_state_number', `nnts' as
16259 `nterms_number', `nrules' as `rules_number', `nstates' as
16260 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16261 unused.
16262 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16263 * data/lalr1.cc (nsym_): Remove, unused.
16264
16265 2002-07-03 Akim Demaille <akim@epita.fr>
16266
16267 * src/lalr.h, src/lalr.c (goto_number_t): New.
16268 * src/lalr.c (goto_list_t): New.
16269 Propagate them.
16270 * src/nullable.c (rule_list_t): New.
16271 Propagate.
16272 * src/types.h: Remove.
16273
16274 2002-07-03 Akim Demaille <akim@epita.fr>
16275
16276 * src/closure.c (print_fderives): Use rule_rhs_print.
16277 * src/derives.c (print_derives): Use rule_rhs_print.
16278 (rule_list_t): New, replaces `shorts'.
16279 (set_derives): Add comments.
16280 * tests/sets.at (Nullable, Firsts): Adjust.
16281
16282 2002-07-03 Akim Demaille <akim@epita.fr>
16283
16284 * src/output.c (prepare_actions): Free `tally' and `width'.
16285 (prepare_actions): Allocate and free `order'.
16286 * src/symtab.c (symbols_free): Free `symbols'.
16287 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16288 * src/output.c (m4_invoke): Move to...
16289 * src/scan-skel.l: here.
16290 (<<EOF>>): Close yyout, and free its name.
16291
16292 2002-07-03 Akim Demaille <akim@epita.fr>
16293
16294 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16295
16296 * src/LR0.c (new_state): Merge into...
16297 (state_list_append): this.
16298 (new_states): Merge into...
16299 (generate_states): here.
16300 (set_states): Don't ensure a proper `errs' state member here, do it...
16301 * src/conflicts.c (conflicts_solve): here.
16302 * src/state.h, src/state.c: Comment changes.
16303 (state_t): Rename member `shifts' as `transitions'.
16304 Adjust all dependencies.
16305 (errs_new): For consistency, also take the values as argument.
16306 (errs_dup): Remove.
16307 (state_errs_set): New.
16308 (state_reductions_set, state_transitions_set): Assert that no
16309 previous value was assigned.
16310 (state_free): New.
16311 (states_free): Use it.
16312 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16313 temporary storage: use `errs' and `nerrs' as elsewhere.
16314 (set_conflicts): Allocate and free this `errs'.
16315
16316 2002-07-02 Akim Demaille <akim@epita.fr>
16317
16318 * lib/libiberty.h: New.
16319 * lib: Update the bitset implementation from upstream.
16320 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16321 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16322 * src/main.c: Adjust bitset stats calls.
16323
16324 2002-07-01 Paul Eggert <eggert@twinsun.com>
16325
16326 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16327 char, so that negative chars don't collide with $.
16328
16329 2002-06-30 Akim Demaille <akim@epita.fr>
16330
16331 Have the GLR tests be `warning' checked, and fix the warnings.
16332
16333 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16334 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16335 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16336 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16337 (yyaddDeferredAction): static.
16338 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16339 (yyreportParseError): yyprefix is const.
16340 yytokenp is used only when verbose.
16341 (yy__GNUC__): Replace with __GNUC__.
16342 (yypdumpstack): yyi is size_t.
16343 (yypreference): Un-yy local variables and arguments, to avoid
16344 clashes with `yyr1'. Anyway, we are not in the user name space.
16345 (yytname_size): be an int, as is compared with ints.
16346 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16347 Use them.
16348 * tests/cxx-gram.at: Use quotation to protect $1.
16349 Use AT_COMPILE to enable warnings hunts.
16350 Prototype yylex and yyerror.
16351 `Use' argc.
16352 Include `string.h', not `strings.h'.
16353 Produce and prototype stmtMerge only when used.
16354 yylex takes a location.
16355
16356 2002-06-30 Akim Demaille <akim@epita.fr>
16357
16358 We spend a lot of time in quotearg, in particular when --verbose.
16359
16360 * src/symtab.c (symbol_get): Store a quoted version of the key.
16361 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16362 Adjust all callers.
16363
16364 2002-06-30 Akim Demaille <akim@epita.fr>
16365
16366 * src/state.h (reductions_t): Rename member `nreds' as num.
16367 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16368 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16369
16370 2002-06-30 Akim Demaille <akim@epita.fr>
16371
16372 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16373 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16374 (shifts_to): Rename as...
16375 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16376 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16377 (TRANSITION_IS_DISABLED, transitions_to): these.
16378
16379 2002-06-30 Akim Demaille <akim@epita.fr>
16380
16381 * src/print.c (print_shifts, print_gotos): Merge into...
16382 (print_transitions): this.
16383 (print_transitions, print_errs, print_reductions): Align the
16384 lookaheads columns.
16385 (print_core, print_transitions, print_errs, print_state,
16386 print_grammar): Output empty lines separator before, not after.
16387 (state_default_rule_compute): Rename as...
16388 (state_default_rule): this.
16389 * tests/conflicts.at (Defaulted Conflicted Reduction),
16390 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16391 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16392
16393 2002-06-30 Akim Demaille <akim@epita.fr>
16394
16395 Display items as we display rules.
16396
16397 * src/gram.h, src/gram.c (rule_lhs_print): New.
16398 * src/gram.c (grammar_rules_partial_print): Use it.
16399 * src/print.c (print_core): Likewise.
16400 * tests/conflicts.at (Defaulted Conflicted Reduction),
16401 (Unresolved SR Conflicts): Adjust.
16402 (Unresolved SR Conflicts): Adjust and rename as...
16403 (Resolved SR Conflicts): this, as was meant.
16404 * tests/regression.at (Web2c Report): Adjust.
16405
16406 2002-06-30 Akim Demaille <akim@epita.fr>
16407
16408 * src/print.c (state_default_rule_compute): New, extracted from...
16409 (print_reductions): here.
16410 Pessimize, but clarify the code.
16411 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16412
16413 2002-06-30 Akim Demaille <akim@epita.fr>
16414
16415 * src/output.c (action_row): Let default_rule be always a rule
16416 number.
16417
16418 2002-06-30 Akim Demaille <akim@epita.fr>
16419
16420 * src/closure.c (print_firsts, print_fderives, closure):
16421 Use BITSET_EXECUTE.
16422 * src/lalr.c (lookaheads_print): Likewise.
16423 * src/state.c (state_rule_lookaheads_print): Likewise.
16424 * src/print_graph.c (print_core): Likewise.
16425 * src/print.c (print_reductions): Likewise.
16426 * src/output.c (action_row): Likewise.
16427 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16428
16429 2002-06-30 Akim Demaille <akim@epita.fr>
16430
16431 * src/print_graph.c: Use report_flag.
16432
16433 2002-06-30 Akim Demaille <akim@epita.fr>
16434
16435 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16436 to...
16437 * src/relation.h, src/relation.c (traverse, relation_digraph)
16438 (relation_print, relation_transpose): New.
16439
16440 2002-06-30 Akim Demaille <akim@epita.fr>
16441
16442 * src/state.h, src/state.c (shifts_to): New.
16443 * src/lalr.c (build_relations): Use it.
16444
16445 2002-06-30 Akim Demaille <akim@epita.fr>
16446
16447 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16448 (item_number_of_rule_number, rule_number_of_item_number): New.
16449 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16450 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16451 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16452 Propagate their use.
16453 Much remains to be done, in particular wrt `shorts' from types.h.
16454
16455 2002-06-30 Akim Demaille <akim@epita.fr>
16456
16457 * src/symtab.c (symbol_new): Initialize the `printer' member.
16458
16459 2002-06-30 Akim Demaille <akim@epita.fr>
16460
16461 * src/LR0.c (save_reductions): Remove, replaced by...
16462 * src/state.h, src/state.c (state_reductions_set): New.
16463 (reductions, errs): Rename as...
16464 (reductions_t, errs_t): these.
16465 Adjust all dependencies.
16466
16467 2002-06-30 Akim Demaille <akim@epita.fr>
16468
16469 * src/LR0.c (state_list_t, state_list_append): New.
16470 (first_state, last_state): Now symbol_list_t.
16471 (this_state): Remove.
16472 (new_itemsets, append_states, save_reductions): Take a state_t as
16473 argument.
16474 (set_states, generate_states): Adjust.
16475 (save_shifts): Remove, replaced by...
16476 * src/state.h, src/state.c (state_shifts_set): New.
16477 (shifts): Rename as...
16478 (shifts_t): this.
16479 Adjust all dependencies.
16480 * src/state.h (state_t): Remove the `next' member.
16481
16482 2002-06-30 Akim Demaille <akim@epita.fr>
16483
16484 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16485 escaped in slot 0.
16486
16487 2002-06-30 Akim Demaille <akim@epita.fr>
16488
16489 Use hash.h for the state hash table.
16490
16491 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16492 (allocate_storage): Use state_hash_new.
16493 (free_storage): Use state_hash_free.
16494 (new_state, get_state): Adjust.
16495 * src/lalr.h, src/lalr.c (states): Move to...
16496 * src/states.h (state_t): Remove the `link' member, no longer
16497 used.
16498 * src/states.h, src/states.c: here.
16499 (state_hash_new, state_hash_free, state_hash_lookup)
16500 (state_hash_insert, states_free): New.
16501 * src/states.c (state_table, state_compare, state_hash): New.
16502 * src/output.c (output_actions): Do not free states now, since we
16503 still need to know the final_state number in `prepare', called
16504 afterwards. Do it...
16505 * src/main.c (main): here: call states_free after `output'.
16506
16507 2002-06-30 Akim Demaille <akim@epita.fr>
16508
16509 * src/state.h, src/state.c (state_new): New, extracted from...
16510 * src/LR0.c (new_state): here.
16511 * src/state.h (STATE_ALLOC): Move to...
16512 * src/state.c: here.
16513 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16514 * src/state.h, src/state.c: here.
16515
16516 2002-06-30 Akim Demaille <akim@epita.fr>
16517
16518 * src/reader.c (gensym): Rename as...
16519 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16520 (getsym): Rename as...
16521 (symbol_get): this.
16522
16523 2002-06-30 Akim Demaille <akim@epita.fr>
16524
16525 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16526 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16527 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16528 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16529
16530 2002-06-30 Akim Demaille <akim@epita.fr>
16531
16532 Make the test suite pass with warnings checked.
16533
16534 * tests/actions.at (Printers and Destructors): Improve.
16535 Avoid unsigned vs. signed issues.
16536 * tests/calc.at: Don't exercise the scanner here, do it...
16537 * tests/input.at (Torturing the Scanner): here.
16538
16539 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16540
16541 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16542 reorganize first lines parallel to yacc.c.
16543
16544 2002-06-28 Akim Demaille <akim@epita.fr>
16545
16546 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16547 (b4_token_enum, b4_token_defines): New, factored from...
16548 * data/lalr1.cc, data/yacc.c, glr.c: here.
16549
16550 2002-06-28 Akim Demaille <akim@epita.fr>
16551
16552 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16553 unused variables.
16554 * src/output.c (merger_output): static.
16555
16556 2002-06-28 Akim Demaille <akim@epita.fr>
16557
16558 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16559 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16560 pacify GCC.
16561 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16562
16563 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16564
16565 Accumulated changelog for new GLR parsing features.
16566
16567 * src/conflicts.c (count_total_conflicts): Change name to
16568 conflicts_total_count.
16569 * src/conflicts.h: Ditto.
16570 * src/output.c (token_actions): Use the new name.
16571 (output_conflicts): Change conflp => conflict_list_heads, and
16572 confl => conflict_list for better readability.
16573 * data/glr.c: Use the new names.
16574 * NEWS: Add self to GLR announcement.
16575
16576 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16577
16578 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16579 Akim Demaille.
16580
16581 * data/bison.glr: Change name to glr.c
16582 * data/glr.c: Renamed from bison.glr.
16583 * data/Makefile.am: Add glr.c
16584
16585 * src/getargs.c:
16586
16587 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16588 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16589
16590 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16591
16592 * data/bison.glr: Be sure to restore the
16593 current #line when returning to the skeleton contents after having
16594 exposed the input file's #line.
16595
16596 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16597
16598 * data/bison.glr: Bring up to date with changes to bison.simple.
16599
16600 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16601
16602 * data/bison.glr: Correct definitions that use b4_prefix.
16603 Various reformatting.
16604 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16605 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16606 yytokenp argument; now part of stack.
16607 (yychar): Define to behave as documented.
16608 (yyclearin): Ditto.
16609
16610 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16611
16612 * src/reader.h: Add declaration for free_merger_functions.
16613
16614 * src/reader.c (merge_functions): New variable.
16615 (get_merge_function): New function.
16616 (free_merger_functions): New function.
16617 (readgram): Check for %prec that is not followed by a symbol.
16618 Handle %dprec and %merge declarations.
16619 (packgram): Initialize dprec and merger fields in rules array.
16620
16621 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16622 conflict_list_cnt, conflict_list_free): New variables.
16623 (table_grow): Also grow conflict_table.
16624 (prepare_rules): Output dprec and merger tables.
16625 (conflict_row): New function.
16626 (action_row): Output conflict lists for GLR parser. Don't use
16627 default reduction in conflicted states for GLR parser so that there
16628 are spaces for the conflict lists.
16629 (save_row): Also save conflict information.
16630 (token_actions): Allocate conflict list.
16631 (merger_output): New function.
16632 (pack_vector): Pack conflict table, too.
16633 (output_conflicts): New function to output yyconflp and yyconfl.
16634 (output_check): Allocate conflict_tos.
16635 (output_actions): Output conflict tables, also.
16636 (output_skeleton): Output b4_mergers definition.
16637 (prepare): Output b4_max_rhs_length definition.
16638 Use 'bison.glr' as default skeleton for GLR parsers.
16639
16640 * src/gram.c (glr_parser): New flag.
16641 (grammar_free): Call free_merger_functions.
16642
16643 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16644 all pairs of conflicting reductions, rather than just all tokens
16645 causing conflicts. Needed to size conflict tables.
16646 (conflicts_output): Modify call to count_rr_conflicts for new
16647 interface.
16648 (conflicts_print): Ditto.
16649 (count_total_conflicts): New function.
16650
16651 * src/reader.h (merger_list): New type.
16652 (merge_functions): New variable.
16653
16654 * src/lex.h (tok_dprec, tok_merge): New token types.
16655
16656 * src/gram.h (rule_s): Add dprec and merger fields.
16657 (glr_parser): New flag.
16658
16659 * src/conflicts.h (count_total_conflicts): New function.
16660
16661 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16662
16663 * doc/bison.texinfo (Generalized LR Parsing): New section.
16664 (GLR Parsers): New section.
16665 (Language and Grammar): Mention GLR parsing.
16666 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16667 Correct typo ("tge" -> "the").
16668
16669 * data/bison.glr: New skeleton for GLR parsing.
16670
16671 * tests/cxx-gram.at: New tests for GLR parsing.
16672
16673 * tests/testsuite.at: Include cxx-gram.at.
16674
16675 * tests/Makefile.am: Add cxx-gram.at.
16676
16677 * src/parse-gram.y:
16678
16679 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16680
16681 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16682
16683 2002-06-27 Akim Demaille <akim@epita.fr>
16684
16685 * src/options.h, src/options.c: Remove.
16686 * src/getargs.c (short_options, long_options): New.
16687
16688 2002-06-27 Akim Demaille <akim@epita.fr>
16689
16690 * data/bison.simple, data/bison.c++: Rename as...
16691 * data/yacc.c, data/lalr1.cc: these.
16692 * doc/bison.texinfo (Environment Variables): Remove.
16693
16694 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16695
16696 * src/getargs.c (report_argmatch): Initialize strtok().
16697
16698 2002-06-20 Akim Demaille <akim@epita.fr>
16699
16700 * data/bison.simple (b4_symbol_actions): New, replaces...
16701 (b4_symbol_destructor, b4_symbol_printer): these.
16702 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16703 user token numbers.
16704
16705 2002-06-20 Akim Demaille <akim@epita.fr>
16706
16707 * data/bison.simple (yydestructor): Rename as...
16708 (yydestruct): this.
16709
16710 2002-06-20 Akim Demaille <akim@epita.fr>
16711
16712 * src/symtab.h, src/symtab.c (symbol_type_set)
16713 (symbol_destructor_set, symbol_precedence_set): The location is
16714 the last argument.
16715 Adjust all callers.
16716
16717 2002-06-20 Akim Demaille <akim@epita.fr>
16718
16719 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16720 internals.
16721 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16722 Takes a location.
16723 * src/symtab.h, src/symtab.c (symbol_class_set)
16724 (symbol_user_token_number_set): Likewise.
16725 Adjust all callers.
16726 Promote complain_at.
16727 * tests/input.at (Type Clashes): Adjust.
16728
16729 2002-06-20 Akim Demaille <akim@epita.fr>
16730
16731 * data/bison.simple (YYLEX): Fix the declaration when
16732 %pure-parser.
16733
16734 2002-06-20 Akim Demaille <akim@epita.fr>
16735
16736 * data/bison.simple (yysymprint): Don't print the token number,
16737 just its name.
16738 * tests/actions.at (Destructors): Rename as...
16739 (Printers and Destructors): this.
16740 Also exercise %printer.
16741
16742 2002-06-20 Akim Demaille <akim@epita.fr>
16743
16744 * data/bison.simple (YYDSYMPRINT): New.
16745 Use it to remove many of the #if YYDEBUG/if (yydebug).
16746
16747 2002-06-20 Akim Demaille <akim@epita.fr>
16748
16749 * src/symtab.h, src/symtab.c (symbol_t): printer and
16750 printer_location are new members.
16751 (symbol_printer_set): New.
16752 * src/parse-gram.y (PERCENT_PRINTER): New token.
16753 Handle its associated rule.
16754 * src/scan-gram.l: Adjust.
16755 (handle_destructor_at, handle_destructor_dollar): Rename as...
16756 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16757 * src/output.c (symbol_printers_output): New.
16758 (output_skeleton): Call it.
16759 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16760 since there are already many grammar files with a user `yyprint'.
16761 Replace the calls to YYPRINT to calls to yysymprint.
16762 * tests/calc.at: Adjust.
16763 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16764 taking advantage of parser very internal details (stack size!).
16765
16766 2002-06-20 Akim Demaille <akim@epita.fr>
16767
16768 * src/scan-gram.l: Complete the scanner with the missing patterns
16769 to pacify Flex.
16770 Use `quote' and `symbol_tag_get' where appropriate.
16771
16772 2002-06-19 Akim Demaille <akim@epita.fr>
16773
16774 * tests/actions.at (Destructors): Augment to test locations.
16775 * data/bison.simple (yydestructor): Pass it the current location
16776 if locations are enabled.
16777 Prototype only when __STDC__ or C++.
16778 Change the argument names to move into the yy name space: there is
16779 user code here.
16780
16781 2002-06-19 Akim Demaille <akim@epita.fr>
16782
16783 * data/bison.simple (b4_pure_if): New.
16784 Use it instead of #ifdef YYPURE.
16785
16786 2002-06-19 Akim Demaille <akim@epita.fr>
16787
16788 * data/bison.simple (b4_location_if): New.
16789 Use it instead of #ifdef YYLSP_NEEDED.
16790
16791 2002-06-19 Akim Demaille <akim@epita.fr>
16792
16793 Prepare @$ in %destructor, but currently don't bind it in the
16794 skeleton, as %location use is not cleaned up yet.
16795
16796 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16797 (handle_action_at): New.
16798 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16799 a braced_code_t and a location as additional arguments.
16800 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16801 unquote one when outputting `b4_dollar_dollar'.
16802 Adjust callers.
16803 * data/bison.simple (b4_eval): Remove.
16804 (b4_symbol_destructor): Adjust.
16805 * tests/input.at (Invalid @n): Adjust.
16806
16807 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16808
16809 * doc/bison.texinfo: Document ability to have multiple
16810 prologue sections.
16811
16812 2002-06-18 Akim Demaille <akim@epita.fr>
16813
16814 * src/files.c (compute_base_names): When computing the output file
16815 names from the input file name, strip the directory part.
16816
16817 2002-06-18 Akim Demaille <akim@epita.fr>
16818
16819 * data/bison.simple.new: Comment changes.
16820 Reported by Andreas Schwab.
16821
16822 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16823
16824 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16825 there are no `label `yyoverflowlab' defined but not used' warnings
16826 when yyoverflow is defined.
16827
16828 2002-06-18 Akim Demaille <akim@epita.fr>
16829
16830 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16831 new member.
16832 (symbol_destructor_set): Adjust.
16833 * src/output.c (symbol_destructors_output): Output the destructor
16834 locations.
16835 Output the symbol name.
16836 * data/bison.simple (b4_symbol_destructor): Adjust.
16837
16838 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16839 and Akim Demaille <akim@epita.fr>
16840
16841 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16842 what's left on the stack when the error recovery hits EOF.
16843 * tests/actions.at (Destructors): Complete to exercise this case.
16844
16845 2002-06-17 Akim Demaille <akim@epita.fr>
16846
16847 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16848 arguments is really empty, not only equal to `[]'.
16849 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16850 member.
16851 (symbol_destructor_set): New.
16852 * src/output.c (symbol_destructors_output): New.
16853 * src/reader.h (brace_code_t, current_braced_code): New.
16854 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16855 (handle_dollar): Rename as...
16856 (handle_action_dollar): this.
16857 (handle_destructor_dollar): New.
16858 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16859 (grammar_declaration): Use it.
16860 * data/bison.simple (yystos): Is always defined.
16861 (yydestructor): New.
16862 * tests/actions.at (Destructors): New.
16863 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16864
16865 2002-06-17 Akim Demaille <akim@epita.fr>
16866
16867 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16868 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16869 rule_length only when needed.
16870 * src/output.c (actions_output, token_definitions_output): Output
16871 the full M4 block.
16872 * src/symtab.c: Don't access directly to the symbol tag, use
16873 symbol_tag_get.
16874 * src/parse-gram.y: Use symbol_list_free.
16875
16876 2002-06-17 Akim Demaille <akim@epita.fr>
16877
16878 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16879 (symbol_list_prepend, get_type_name): Move to...
16880 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16881 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16882 Adjust all callers.
16883 (symbol_list_free): New.
16884 * src/scan-gram.l (handle_dollar): Takes a location.
16885 * tests/input.at (Invalid $n): Adjust.
16886
16887 2002-06-17 Akim Demaille <akim@epita.fr>
16888
16889 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16890 (symbol_list_prepend): New.
16891 * src/parse-gram.y (%union): `list' is a new member.
16892 (symbols.1): New, replaces...
16893 (terms_to_prec.1, nterms_to_type.1): these.
16894 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16895 Take a location as additional argument.
16896 Adjust all callers.
16897
16898 2002-06-15 Akim Demaille <akim@epita.fr>
16899
16900 * src/parse-gram.y: Move %token in the declaration section so that
16901 we don't depend upon CVS Bison.
16902
16903 2002-06-15 Akim Demaille <akim@epita.fr>
16904
16905 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16906 * src/print.c (print_core): Use it.
16907
16908 2002-06-15 Akim Demaille <akim@epita.fr>
16909
16910 * src/conflicts.c (log_resolution): Accept the rule involved in
16911 the sr conflicts instead of the lookahead number that points to
16912 that rule.
16913 (flush_reduce): Accept the current lookahead vector as argument,
16914 instead of the index in LA.
16915 (resolve_sr_conflict): Accept the current number of lookahead
16916 bitset to consider for the STATE, instead of the index in LA.
16917 (set_conflicts): Adjust.
16918 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16919
16920 2002-06-15 Akim Demaille <akim@epita.fr>
16921
16922 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16923 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16924 Adjust all dependencies.
16925 * src/lalr.c (initialize_lookaheads): Split into...
16926 (states_lookaheads_count, states_lookaheads_initialize): these.
16927 (lalr): Adjust.
16928
16929 2002-06-15 Akim Demaille <akim@epita.fr>
16930
16931 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16932 out of...
16933 (grammar_rules_print): here.
16934 * src/reduce.c (reduce_output): Use it.
16935 * tests/reduce.at (Useless Rules, Reduced Automaton)
16936 (Underivable Rules): Adjust.
16937
16938 2002-06-15 Akim Demaille <akim@epita.fr>
16939
16940 Copy BYacc's nice way to report the grammar.
16941
16942 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16943 New.
16944 Don't print the rules' location, it is confusing and useless.
16945 (rule_print): Use grammar_rhs_print.
16946 * src/print.c (print_grammar): Use grammar_rules_print.
16947
16948 2002-06-15 Akim Demaille <akim@epita.fr>
16949
16950 Complete and rationalize `useless thing' warnings.
16951
16952 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16953 (symbol_tag_print): New.
16954 Use them everywhere in place of accessing directly the tag member.
16955 * src/gram.h, src/gram.c (rule_print): New.
16956 Use it where a rule used to be printed `by hand'.
16957 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16958 (reduce_grammar_tables): Report the useless rules.
16959 (reduce_print): Useless things are a warning, not an error.
16960 Report it as such.
16961 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16962 (Reduced Automaton, Underivable Rules): Adjust.
16963 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16964 * tests/conflicts.at (Unresolved SR Conflicts)
16965 (Solved SR Conflicts): Adjust.
16966
16967 2002-06-15 Akim Demaille <akim@epita.fr>
16968
16969 Let symbols have a location.
16970
16971 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16972 (getsym): Adjust.
16973 Adjust all callers.
16974 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16975 Use location_t, not int.
16976 * src/symtab.c (symbol_check_defined): Take advantage of the
16977 location.
16978 * tests/regression.at (Invalid inputs): Adjust.
16979
16980 2002-06-15 Akim Demaille <akim@epita.fr>
16981
16982 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16983 (input): Don't try to initialize yylloc here, do it in the
16984 scanner.
16985 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16986 * src/gram.h (rule_t): Change line and action_line into location
16987 and action_location, of location_t type.
16988 Adjust all dependencies.
16989 * src/location.h, src/location.c (empty_location): New.
16990 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16991 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16992 (grammar_current_rule_symbol_append)
16993 (grammar_current_rule_action_append): Expect a location as argument.
16994 * src/reader.c (grammar_midrule_action): Adjust to attach an
16995 action's location as dummy symbol location.
16996 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16997 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16998 the line numbers.
16999
17000 2002-06-14 Akim Demaille <akim@epita.fr>
17001
17002 Grammar declarations may be found in the grammar section.
17003
17004 * src/parse-gram.y (rules_or_grammar_declaration): New.
17005 (declarations): Each declaration may end with a semicolon, not
17006 just...
17007 (grammar_declaration): `"%union"'.
17008 (grammar): Branch to rules_or_grammar_declaration.
17009
17010 2002-06-14 Akim Demaille <akim@epita.fr>
17011
17012 * src/main.c (main): Invoke scanner_free.
17013
17014 2002-06-14 Akim Demaille <akim@epita.fr>
17015
17016 * src/output.c (m4_invoke): Extracted from...
17017 (output_skeleton): here.
17018 Free tempfile.
17019
17020 2002-06-14 Akim Demaille <akim@epita.fr>
17021
17022 * src/parse-gram.y (directives, directive, gram)
17023 (grammar_directives, precedence_directives, precedence_directive):
17024 Rename as...
17025 (declarations, declaration, grammar, grammar_declaration)
17026 (precedence_declaration, precedence_declarator): these.
17027 (symbol_declaration): New.
17028
17029 2002-06-14 Akim Demaille <akim@epita.fr>
17030
17031 * src/files.c (action_obstack): Remove, unused.
17032 (output_obstack): Remove it, and all its dependencies, as it is no
17033 longer needed.
17034 * src/reader.c (epilogue_set): Build the epilogue in the
17035 muscle_obstack.
17036 * src/output.h, src/output.c (muscle_obstack): Move to...
17037 * src/muscle_tab.h, src/muscle_tab.h: here.
17038 (muscle_init): Initialize muscle_obstack.
17039 (muscle_free): New.
17040 * src/main.c (main): Call it.
17041
17042 2002-06-14 Akim Demaille <akim@epita.fr>
17043
17044 * src/location.h: New, extracted from...
17045 * src/reader.h: here.
17046 * src/Makefile.am (noinst_HEADERS): Merge into
17047 (bison_SOURCES): this.
17048 Add location.h.
17049 * src/parse-gram.y: Use location_t instead of Bison's.
17050 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17051 Use location_t instead of ints.
17052
17053 2002-06-14 Akim Demaille <akim@epita.fr>
17054
17055 * data/bison.simple, data/bison.c++: Be sure to restore the
17056 current #line when returning to the skeleton contents after having
17057 exposed the input file's #line.
17058
17059 2002-06-12 Akim Demaille <akim@epita.fr>
17060
17061 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17062 eager.
17063 * tests/actions.at (Exotic Dollars): New.
17064
17065 2002-06-12 Akim Demaille <akim@epita.fr>
17066
17067 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17068 ['"/] too eagerly.
17069 * tests/input.at (Torturing the Scanner): New.
17070
17071 2002-06-11 Akim Demaille <akim@epita.fr>
17072
17073 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17074 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17075 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17076 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17077 * src/reader.c (reader): Use it.
17078
17079 2002-06-11 Akim Demaille <akim@epita.fr>
17080
17081 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17082 Adjust all callers.
17083 (scanner_last_string_free): New.
17084
17085 2002-06-11 Akim Demaille <akim@epita.fr>
17086
17087 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17088 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17089 (last_string, YY_OBS_FREE): New.
17090 Use them when returning an ID.
17091
17092 2002-06-11 Akim Demaille <akim@epita.fr>
17093
17094 Have Bison grammars parsed by a Bison grammar.
17095
17096 * src/reader.c, src/reader.h (prologue_augment): New.
17097 * src/reader.c (copy_definition): Remove.
17098
17099 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17100 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17101 (grammar_current_rule_prec_set, grammar_current_rule_check)
17102 (grammar_current_rule_symbol_append)
17103 (grammar_current_rule_action_append): Export.
17104 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17105 (symbol_list_action_append): Remove.
17106 Hook the routines from reader.
17107 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17108 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17109
17110 * src/reader.c (read_declarations): Remove, unused.
17111
17112 * src/parse-gram.y: Handle the epilogue.
17113 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17114 (grammar_start_symbol_set): this.
17115 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17116 * src/reader.c (readgram): Remove, unused.
17117 (reader): Adjust to insert eoftoken and axiom where appropriate.
17118
17119 * src/reader.c (copy_dollar): Replace with...
17120 * src/scan-gram.h (handle_dollar): this.
17121 * src/parse-gram.y: Remove `%thong'.
17122
17123 * src/reader.c (copy_at): Replace with...
17124 * src/scan-gram.h (handle_at): this.
17125
17126 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17127 New.
17128
17129 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17130 time being.
17131
17132 * src/reader.h, src/reader.c (grammar_rule_end): New.
17133
17134 * src/parse.y (current_type, current_class): New.
17135 Implement `%nterm', `%token' support.
17136 Merge `%term' into `%token'.
17137 (string_as_id): New.
17138 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17139 type name.
17140
17141 * src/parse-gram.y: Be sure to handle properly the beginning of
17142 rules.
17143
17144 * src/parse-gram.y: Handle %type.
17145 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17146
17147 * src/parse-gram.y: More directives support.
17148 * src/options.c: No longer handle source directives.
17149
17150 * src/parse-gram.y: Fix %output.
17151
17152 * src/parse-gram.y: Handle %union.
17153 Use the prologue locations.
17154 * src/reader.c (parse_union_decl): Remove.
17155
17156 * src/reader.h, src/reader.c (epilogue_set): New.
17157 * src/parse-gram.y: Use it.
17158
17159 * data/bison.simple, data/bison.c++: b4_stype is now either not
17160 defined, then default to int, or to the contents of %union,
17161 without `union' itself.
17162 Adjust.
17163 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17164
17165 * src/output.c (actions_output): Don't output braces, as they are
17166 already handled by the scanner.
17167
17168 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17169 characters to themselves.
17170
17171 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17172 that the epilogue has a proper #line.
17173
17174 * src/parse-gram.y: Handle precedence/associativity.
17175
17176 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17177 a terminal.
17178 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17179 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17180 at all to define terminals that cannot be emitted.
17181
17182 * src/scan-gram.l: Escape M4 characters.
17183
17184 * src/scan-gram.l: Working properly with escapes in user
17185 strings/characters.
17186
17187 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17188 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17189 grammar.
17190 Use more modest sizes, as for the time being the parser does not
17191 release memory, and therefore the process swallows a huge amount
17192 of memory.
17193
17194 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17195 stricter %token grammar.
17196
17197 * src/symtab.h (associativity): Add `undef_assoc'.
17198 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17199 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17200
17201 * tests/regression.at (Invalid %directive): Remove, as it is now
17202 meaningless.
17203 (Invalid inputs): Adjust to the new error messages.
17204 (Token definitions): The new grammar doesn't allow too many
17205 eccentricities.
17206
17207 * src/lex.h, src/lex.c: Remove.
17208 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17209 (copy_character, copy_string2, copy_string, copy_identifier)
17210 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17211 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17212 (parse_action): Remove.
17213 * po/POTFILES.in: Adjust.
17214
17215 2002-06-11 Akim Demaille <akim@epita.fr>
17216
17217 * src/reader.c (parse_action): Don't store directly into the
17218 rule's action member: return the action as a string.
17219 Don't require `rule_length' as an argument: compute it.
17220 (grammar_current_rule_symbol_append)
17221 (grammar_current_rule_action_append): New, eved out from
17222 (readgram): here.
17223 Remove `action_flag', `rulelength', unused now.
17224
17225 2002-06-11 Akim Demaille <akim@epita.fr>
17226
17227 * src/reader.c (grammar_current_rule_prec_set).
17228 (grammar_current_rule_check): New, eved out from...
17229 (readgram): here.
17230 Remove `xaction', `first_rhs': useless.
17231 * tests/input.at (Type clashes): New.
17232 * tests/existing.at (GNU Cim Grammar): Adjust.
17233
17234 2002-06-11 Akim Demaille <akim@epita.fr>
17235
17236 * src/reader.c (grammar_midrule_action): New, Eved out from
17237 (readgram): here.
17238
17239 2002-06-11 Akim Demaille <akim@epita.fr>
17240
17241 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17242 New.
17243 (readgram): Use them as replacement of inlined code, crule and
17244 crule1.
17245
17246 2002-06-11 Akim Demaille <akim@epita.fr>
17247
17248 * src/reader.c (grammar_end, grammar_symbol_append): New.
17249 (readgram): Use them.
17250 Make the use of `p' as local as possible.
17251
17252 2002-06-10 Akim Demaille <akim@epita.fr>
17253
17254 GCJ's parser requires the tokens to be defined before the prologue.
17255
17256 * data/bison.simple: Output the token definition before the user's
17257 prologue.
17258 * tests/regression.at (Braces parsing, Duplicate string)
17259 (Mixing %token styles): Check the output from bison.
17260 (Early token definitions): New.
17261
17262 2002-06-10 Akim Demaille <akim@epita.fr>
17263
17264 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17265 assigning twice the same user number to a token, so that we can
17266 use it in...
17267 * src/lex.c (lex): here.
17268 Also use `symbol_class_set' instead of hand written code.
17269 * src/reader.c (parse_assoc_decl): Likewise.
17270
17271 2002-06-10 Akim Demaille <akim@epita.fr>
17272
17273 * src/symtab.c, src/symtab.c (symbol_class_set)
17274 (symbol_user_token_number_set): New.
17275 * src/reader.c (parse_token_decl): Use them.
17276 Use a switch instead of ifs.
17277 Use a single argument.
17278
17279 2002-06-10 Akim Demaille <akim@epita.fr>
17280
17281 Remove `%thong' support as it is undocumented, unused, duplicates
17282 `%token's job, and creates useless e-mail traffic with people who
17283 want to know what it is, why it is undocumented, unused, and
17284 duplicates `%token's job.
17285
17286 * src/reader.c (parse_thong_decl): Remove.
17287 * src/options.c (option_table): Remove "thong".
17288 * src/lex.h (tok_thong): Remove.
17289
17290 2002-06-10 Akim Demaille <akim@epita.fr>
17291
17292 * src/symtab.c, src/symtab.c (symbol_type_set)
17293 (symbol_precedence_set): New.
17294 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17295 (value_components_used): Remove, unused.
17296
17297 2002-06-09 Akim Demaille <akim@epita.fr>
17298
17299 Move symbols handling code out of the reader.
17300
17301 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17302 (axiom): Move to...
17303 * src/symtab.h, src/symtab.c: here.
17304
17305 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17306 * src/reader.c (startval): Rename as...
17307 * src/symtab.h, src/symtab.c (startsymbol): this.
17308 * src/reader.c: Adjust.
17309
17310 * src/reader.c (symbol_check_defined, symbol_make_alias)
17311 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17312 (token_translations_init)
17313 Move to...
17314 * src/symtab.c: here.
17315 * src/reader.c (packsymbols): Move to...
17316 * src/symtab.h, src/symtab.c (symbols_pack): here.
17317 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17318 argument.
17319
17320 2002-06-03 Akim Demaille <akim@epita.fr>
17321
17322 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17323 then statements.
17324
17325 2002-06-03 Akim Demaille <akim@epita.fr>
17326
17327 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17328 structs with non literals.
17329 * src/scan-skel.l: never-interactive.
17330 * src/conflicts.c (enum conflict_resolution_e): No trailing
17331 comma.
17332 * src/getargs.c (usage): Split long literal strings.
17333 Reported by Hans Aberg.
17334
17335 2002-05-28 Akim Demaille <akim@epita.fr>
17336
17337 * data/bison.c++: Use C++ ostreams.
17338 (cdebug_): New member.
17339
17340 2002-05-28 Akim Demaille <akim@epita.fr>
17341
17342 * src/output.c (output_skeleton): Be sure to allocate enough room
17343 for `/' _and_ for `\0' in full_skeleton.
17344
17345 2002-05-28 Akim Demaille <akim@epita.fr>
17346
17347 * data/bison.c++: Catch up with bison.simple:
17348 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17349 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17350 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17351 and popping traces.
17352
17353 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17354
17355 * src/output.c (output_skeleton): Put an explicit path in front of
17356 the skeleton file name, rather than relying on the -I directory,
17357 to partially alleviate effects of having a skeleton file lying around
17358 in the current directory.
17359
17360 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17361
17362 * src/conflicts.c (log_resolution): Correct typo:
17363 obstack_printf should be obstack_fgrow1.
17364
17365 2002-05-26 Akim Demaille <akim@epita.fr>
17366
17367 * src/state.h (state_t): `solved_conflicts' is a new member.
17368 * src/LR0.c (new_state): Set it to 0.
17369 * src/conflicts.h, src/conflicts.c (print_conflicts)
17370 (free_conflicts, solve_conflicts): Rename as...
17371 (conflicts_print, conflicts_free, conflicts_solve): these.
17372 Adjust callers.
17373 * src/conflicts.c (enum conflict_resolution_e)
17374 (solved_conflicts_obstack): New, used by...
17375 (log_resolution): this.
17376 Adjust to attach the conflict resolution to each state.
17377 Complete the description with the precedence/associativity
17378 information.
17379 (resolve_sr_conflict): Adjust.
17380 * src/print.c (print_state): Output its solved_conflicts.
17381 * tests/conflicts.at (Unresolved SR Conflicts)
17382 (Solved SR Conflicts): Exercise --report=all.
17383
17384 2002-05-26 Akim Demaille <akim@epita.fr>
17385
17386 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17387 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17388 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17389 (token_number_t, item_number_as_token_number)
17390 (token_number_as_item_number, muscle_insert_token_number_table):
17391 Rename as...
17392 (symbol_number_t, item_number_as_symbol_number)
17393 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17394 these, since it is more appropriate.
17395
17396 2002-05-26 Akim Demaille <akim@epita.fr>
17397
17398 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17399 `Error:' lines.
17400 * data/bison.simple (yystos) [YYDEBUG]: New.
17401 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17402 error recovery.
17403 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17404
17405 2002-05-25 Akim Demaille <akim@epita.fr>
17406
17407 * doc/bison.texinfo (Debugging): Split into...
17408 (Tracing): this new section, its former contents, and...
17409 (Understanding): this new section.
17410 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17411 by...
17412 (report_flag): this.
17413 Adjust all dependencies.
17414 (report_args, report_types, report_argmatch): New.
17415 (usage, getargs): Report/support -r, --report.
17416 * src/options.h
17417 (struct option_table_struct): Rename as..,
17418 (struct option_table_s): this.
17419 Rename the `set_flag' member to `flag' to match with getopt_long's
17420 struct.
17421 * src/options.c (option_table): Split verbose into an entry for
17422 %verbose, and another for --verbose.
17423 Support --report/-r, so remove -r from the obsolete --raw.
17424 * src/print.c: Attach full item sets and lookaheads reports to
17425 report_flag instead of trace_flag.
17426 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17427
17428 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17429 and Paul Eggert <eggert@twinsun.com>
17430
17431 * data/bison.simple (yyparse): Correct error handling to conform to
17432 POSIX and yacc. Specifically, after syntax error is discovered,
17433 do not reduce further before shifting the error token.
17434 Clean up the code a bit by removing the labels yyerrdefault,
17435 yyerrhandle, yyerrpop.
17436 * NEWS: Document the above.
17437
17438 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17439
17440 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17441 type; it isn't always big enough, since it doesn't necessarily
17442 include non-terminals.
17443 (yytranslate): Expand definition of yy_token_number_type, so that
17444 the latter can be removed.
17445 (yy_token_number_type): Remove, only one use.
17446 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17447 don't use TokenNumberType as element type.
17448
17449 * tests/regression.at: Modify expected output to agree with change
17450 to yyr1 and yytranslate.
17451
17452 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17453
17454 * src/reader.c (parse_action): Use copy_character instead of
17455 obstack_1grow.
17456
17457 2002-05-13 Akim Demaille <akim@epita.fr>
17458
17459 * tests/regression.at (Token definitions): Prototype yylex and
17460 yyerror.
17461
17462 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17463
17464 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17465 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17466 32-bit arithmetic.
17467 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17468
17469 2002-05-07 Akim Demaille <akim@epita.fr>
17470
17471 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17472 avoid GCC warnings.
17473
17474 2002-05-07 Akim Demaille <akim@epita.fr>
17475
17476 Kill GCC warnings.
17477
17478 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17479 over the RHS of each rule.
17480 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17481 * src/state.h (state_t): Member `nitems' is unsigned short.
17482 * src/LR0.c (get_state): Adjust.
17483 * src/reader.c (packgram): Likewise.
17484 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17485 `Type'.
17486 (muscle_insert_int_table): Remove, unused.
17487 (prepare_rules): Remove `max'.
17488
17489 2002-05-06 Akim Demaille <akim@epita.fr>
17490
17491 * src/closure.c (print_firsts): Display of the symbol tags.
17492 (bitmatrix_print): Move to...
17493 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17494 here.
17495 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17496
17497 2002-05-06 Akim Demaille <akim@epita.fr>
17498
17499 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17500 hash_do_for_each.
17501
17502 2002-05-06 Akim Demaille <akim@epita.fr>
17503
17504 * src/LR0.c (new_state, get_state): Instead of using the global
17505 `kernel_size' and `kernel_base', have two new arguments:
17506 `core_size' and `core'.
17507 Adjust callers.
17508
17509 2002-05-06 Akim Demaille <akim@epita.fr>
17510
17511 * src/reader.c (packgram): No longer end `ritem' with a 0
17512 sentinel: it is not used.
17513
17514 2002-05-05 Akim Demaille <akim@epita.fr>
17515
17516 New experimental feature: display the lookaheads in the report and
17517 graph.
17518
17519 * src/print (print_core): When --trace-flag, display the rules
17520 lookaheads.
17521 * src/print_graph.c (print_core): Likewise.
17522 Swap the arguments.
17523 Adjust caller.
17524
17525 2002-05-05 Akim Demaille <akim@epita.fr>
17526
17527 * tests/torture.at (Many lookaheads): New test.
17528
17529 2002-05-05 Akim Demaille <akim@epita.fr>
17530
17531 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17532 (GENERATE_MUSCLE_INSERT_TABLE): this.
17533 (output_int_table, output_unsigned_int_table, output_short_table)
17534 (output_token_number_table, output_item_number_table): Replace with...
17535 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17536 (muscle_insert_short_table, muscle_insert_token_number_table)
17537 (muscle_insert_item_number_table): these.
17538 Adjust all callers.
17539 (prepare_tokens): Don't free `translations', since...
17540 * src/reader.h, src/reader.c (grammar_free): do it.
17541 Move to...
17542 * src/gram.h, src/gram.c (grammar_free): here.
17543 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17544 b4_translate_max.
17545
17546 2002-05-05 Akim Demaille <akim@epita.fr>
17547
17548 * src/output.c (output_unsigned_int_table): New.
17549 (prepare_rules): `i' is unsigned.
17550 `prhs', `rline', `r2' are unsigned int.
17551 Rename muscle `rhs_number_max' as `rhs_max'.
17552 Output muscles `prhs_max', `rline_max', and `r2_max'.
17553 Free rline and r1.
17554 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17555 to compute types instead of constant types.
17556 * tests/regression.at (Web2c Actions): Adjust.
17557
17558 2002-05-04 Akim Demaille <akim@epita.fr>
17559
17560 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17561 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17562 Adjust dependencies.
17563 * src/output.c (token_definitions_output): Be sure not to output a
17564 `#define 'a'' when fed with `%token 'a' "a"'.
17565 * tests/regression.at (Token definitions): New.
17566
17567 2002-05-03 Paul Eggert <eggert@twinsun.com>
17568
17569 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17570 for K&R C.
17571
17572 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17573
17574 * Makefile.am (SUBDIRS): Remove intl.
17575 (EXTRA_DIST): Add config/config.rpath.
17576
17577 2002-05-03 Akim Demaille <akim@epita.fr>
17578
17579 * data/bison.simple (m4_if): Don't output empty enums.
17580 And actually, output valid enum definitions :(.
17581
17582 2002-05-03 Akim Demaille <akim@epita.fr>
17583
17584 * configure.bat: Remove, completely obsolete.
17585 * Makefile.am (EXTRA_DIST): Adjust.
17586 Don't distribute config.rpath...
17587 * config/Makefile.am (EXTRA_DIST): Do it.
17588
17589 2002-05-03 Akim Demaille <akim@epita.fr>
17590
17591 * configure.in (GETTEXT_VERSION): New.
17592 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17593
17594 2002-05-03 Akim Demaille <akim@epita.fr>
17595
17596 * data/bison.simple (b4_token_enum): New.
17597 (b4_token_defines): Use it to output tokens both as #define and
17598 enums.
17599 Suggested by Paul Eggert.
17600 * src/output.c (token_definitions_output): Don't output spurious
17601 white spaces.
17602
17603 2002-05-03 Akim Demaille <akim@epita.fr>
17604
17605 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17606
17607 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17608
17609 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17610 Update the stack class, give a try to deque as the default container.
17611
17612 2002-05-02 Akim Demaille <akim@epita.fr>
17613
17614 * data/bison.simple (yyparse): Do not implement @$ = @1.
17615 (YYLLOC_DEFAULT): Adjust to do it.
17616 * doc/bison.texinfo (Location Default Action): Fix.
17617
17618 2002-05-02 Akim Demaille <akim@epita.fr>
17619
17620 * src/reader.c (parse_braces): Merge into...
17621 (parse_action): this.
17622
17623 2002-05-02 Akim Demaille <akim@epita.fr>
17624
17625 * configure.in (ALL_LINGUAS): Remove.
17626 * po/LINGUAS, hr.po: New.
17627
17628 2002-05-02 Akim Demaille <akim@epita.fr>
17629
17630 Remove the so called hairy (semantic) parsers.
17631
17632 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17633 * src/gram.h, src/gram.c (semantic_parser): Remove.
17634 (rule_t): Remove the guard and guard_line members.
17635 * src/lex.h (token_t): remove tok_guard.
17636 * src/options.c (option_table): Remove %guard and %semantic_parser
17637 support.
17638 * src/output.c, src/output.h (guards_output): Remove.
17639 (prepare): Adjust.
17640 (token_definitions_output): Don't output the `T'
17641 tokens (???).
17642 (output_skeleton): Don't output the guards.
17643 * src/files.c, src/files.c (attrsfile): Remove.
17644 * src/reader.c (symbol_list): Remove the guard and guard_line
17645 members.
17646 Adjust dependencies.
17647 (parse_guard): Remove.
17648 * data/bison.hairy: Remove.
17649 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17650 BISON_HAIRY.
17651
17652 2002-05-02 Akim Demaille <akim@epita.fr>
17653
17654 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17655 (parse_guard): Rename the formal argument `stack_offset' as
17656 `rule_length', which is more readable.
17657 Adjust callers.
17658 (copy_at, copy_dollar): Instead of outputting the hard coded
17659 values of $$, $n and so forth, output invocation to b4_lhs_value,
17660 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17661 Note: this patch partially drops `semantic-parser' support: it
17662 always does `rule_length - n', where semantic parsers ought to
17663 always use `-n'.
17664 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17665 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17666
17667 2002-05-02 Akim Demaille <akim@epita.fr>
17668
17669 * configure.in (AC_INIT): Bump to 1.49b.
17670 (AM_INIT_AUTOMAKE): Short invocation.
17671
17672 2002-05-02 Akim Demaille <akim@epita.fr>
17673
17674 Version 1.49a.
17675
17676 2002-05-01 Akim Demaille <akim@epita.fr>
17677
17678 * src/skeleton.h: Remove.
17679
17680 2002-05-01 Akim Demaille <akim@epita.fr>
17681
17682 * src/skeleton.h: Fix the #endif.
17683 Reported by Magnus Fromreide.
17684
17685 2002-04-26 Paul Eggert <eggert@twinsun.com>
17686
17687 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17688 Define if we define YYSTYPE and YYLTYPE, respectively.
17689 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17690
17691 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17692
17693 * src/scan-skel.l: Postprocess quadrigraphs.
17694
17695 * src/reader.c (copy_character): New function, used to output
17696 single characters while replacing `[' and `]' with quadrigraphs, to
17697 avoid troubles with M4 quotes.
17698 (copy_comment): Output characters with copy_character.
17699 (read_additionnal_code): Likewise.
17700 (copy_string2): Likewise.
17701 (copy_definition): Likewise.
17702
17703 * tests/calc.at: Exercise M4 quoting.
17704
17705 2002-04-25 Akim Demaille <akim@epita.fr>
17706
17707 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17708 between `!' and the command.
17709 Reported by Paul Eggert.
17710
17711 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17712
17713 * tests/calc.at: Exercise prologue splitting.
17714
17715 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17716 `b4_post_prologue' instead of `b4_prologue'.
17717
17718 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17719 muscles.
17720 (output): Free pre_prologue_obstack and post_prologue_obstack.
17721 * src/files.h, src/files.c (attrs_obstack): Remove.
17722 (pre_prologue_obstack, post_prologue_obstack): New.
17723 * src/reader.c (copy_definition): Add a parameter to specify the
17724 obstack to fill, instead of using attrs_obstack unconditionally.
17725 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17726 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17727
17728 2002-04-23 Paul Eggert <eggert@twinsun.com>
17729
17730 * data/bison.simple: Remove unnecessary commentary and white
17731 space differences from 1_29-branch.
17732 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17733
17734 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17735 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17736 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17737 constructors or destructors.
17738
17739 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17740
17741 2002-04-23 Akim Demaille <akim@epita.fr>
17742
17743 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17744 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17745 location with columns.
17746 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17747 All reported by Paul Eggert.
17748
17749 2002-04-22 Akim Demaille <akim@epita.fr>
17750
17751 * src/reduce.c (dump_grammar): Move to...
17752 * src/gram.h, src/gram.c (grammar_dump): here.
17753 Be sure to separate long item numbers.
17754 Don't read the members of a rule's prec if its nil.
17755
17756 2002-04-22 Akim Demaille <akim@epita.fr>
17757
17758 * src/output.c (table_size, table_grow): New.
17759 (MAXTABLE): Remove, replace uses with table_size.
17760 (pack_vector): Instead of dying when the table is too big, grow it.
17761
17762 2002-04-22 Akim Demaille <akim@epita.fr>
17763
17764 * data/bison.simple (yyr1): Its type is that of a token number.
17765 * data/bison.c++ (r1_): Likewise.
17766 * tests/regression.at (Web2c Actions): Adjust.
17767
17768 2002-04-22 Akim Demaille <akim@epita.fr>
17769
17770 * src/reader.c (token_translations_init): 256 is now the default
17771 value for the error token, i.e., it will be assigned another
17772 number if the user assigned 256 to one of her tokens.
17773 (reader): Don't force 256 to error.
17774 * doc/bison.texinfo (Symbols): Adjust.
17775 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17776 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17777 etc. instead of 10, 20, 30 (which was used to `jump' over error
17778 (256) and undefined (2)).
17779
17780 2002-04-22 Akim Demaille <akim@epita.fr>
17781
17782 Propagate more token_number_t.
17783
17784 * src/gram.h (token_number_as_item_number)
17785 (item_number_as_token_number): New.
17786 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17787 Use it to create output_item_number_table and
17788 output_token_number_table.
17789 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17790 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17791 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17792 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17793
17794 2002-04-22 Akim Demaille <akim@epita.fr>
17795
17796 * src/output.h, src/output.c (get_lines_number): Remove.
17797
17798 2002-04-19 Akim Demaille <akim@epita.fr>
17799
17800 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17801 as Lex/Flex'.
17802 (Debugging): More details about enabling the debugging features.
17803 (Table of Symbols): Describe $$, $n, @$, and @n.
17804 Suggested by Tim Josling.
17805
17806 2002-04-19 Akim Demaille <akim@epita.fr>
17807
17808 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17809
17810 2002-04-10 Akim Demaille <akim@epita.fr>
17811
17812 * src/system.h: Rely on HAVE_LIMITS_H.
17813 Suggested by Paul Eggert.
17814
17815 2002-04-09 Akim Demaille <akim@epita.fr>
17816
17817 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17818 full stderr, and strip it according to the bison options, instead
17819 of composing the error message from different bits.
17820 This makes it easier to check for several error messages.
17821 Adjust all the invocations.
17822 Add an invocation exercising the error token.
17823 Add an invocation demonstrating a stupid error message.
17824 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17825 Adjust the tests.
17826 Error message are for stderr, not stdout.
17827
17828 2002-04-09 Akim Demaille <akim@epita.fr>
17829
17830 * src/gram.h, src/gram.c (error_token_number): Remove, use
17831 errtoken->number.
17832 * src/reader.c (reader): Don't specify the user token number (2)
17833 for $undefined, as it uselessly prevents using it.
17834 * src/gram.h (token_number_t): Move to...
17835 * src/symtab.h: here.
17836 (state_t.number): Is a token_number_t.
17837 * src/print.c, src/reader.c: Use undeftoken->number instead of
17838 hard coded 2.
17839 (Even though this 2 is not the same as above: the number of the
17840 undeftoken remains being 2, it is its user token number which
17841 might not be 2).
17842 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17843 `user_token_number_max'.
17844 Output `undef_token_number'.
17845 * data/bison.simple, data/bison.c++: Use them.
17846 Be sure to map invalid yylex return values to
17847 `undef_token_number'. This saves us from gratuitous SEGV.
17848
17849 * tests/conflicts.at (Solved SR Conflicts)
17850 (Unresolved SR Conflicts): Adjust.
17851 * tests/regression.at (Web2c Actions): Adjust.
17852
17853 2002-04-08 Akim Demaille <akim@epita.fr>
17854
17855 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17856 Adding #line.
17857 Remove the duplicate `typedefs'.
17858 (RhsNumberType): Fix the declaration and various other typos.
17859 Use __ofile__.
17860 * data/bison.simple: Use __ofile__.
17861 * src/scan-skel.l: Handle __ofile__.
17862
17863 2002-04-08 Akim Demaille <akim@epita.fr>
17864
17865 * src/gram.h (item_number_t): New, the type of item numbers in
17866 RITEM. Note that it must be able to code symbol numbers as
17867 positive number, and the negation of rule numbers as negative
17868 numbers.
17869 Adjust all dependencies (pretty many).
17870 * src/reduce.c (rule): Remove this `short *' pointer: use
17871 item_number_t.
17872 * src/system.h (MINSHORT, MAXSHORT): Remove.
17873 Include `limits.h'.
17874 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17875 (shortcpy): Remove.
17876 (MAXTABLE): Move to...
17877 * src/output.c (MAXTABLE): here.
17878 (prepare_rules): Use output_int_table to output rhs.
17879 * data/bison.simple, data/bison.c++: Adjust.
17880 * tests/torture.at (Big triangle): Move the limit from 254 to
17881 500.
17882 * tests/regression.at (Web2c Actions): Ajust.
17883
17884 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17885 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17886 passes, but produces negative #line number, once fixed, GCC is
17887 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17888 C), it passes.
17889 * src/state.h (state_h): Code input lines on ints, not shorts.
17890
17891 2002-04-08 Akim Demaille <akim@epita.fr>
17892
17893 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17894 and then the grammar.
17895
17896 2002-04-08 Akim Demaille <akim@epita.fr>
17897
17898 * src/system.h: No longer using strndup.
17899
17900 2002-04-07 Akim Demaille <akim@epita.fr>
17901
17902 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17903 * src/output.c (output_table_data): Return the longest number.
17904 (prepare_tokens): Output `token_number_max').
17905 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17906 New.
17907 Use them to define yy_token_number_type/TokenNumberType.
17908 Use this type for yytranslate.
17909 * tests/torture.at (Big triangle): Push the limit from 124 to
17910 253.
17911 * tests/regression.at (Web2c Actions): Adjust.
17912
17913 2002-04-07 Akim Demaille <akim@epita.fr>
17914
17915 * tests/torture.at (Big triangle): New.
17916 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17917 * tests/existing.at: here.
17918
17919 2002-04-07 Akim Demaille <akim@epita.fr>
17920
17921 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17922 nritems.
17923 Adjust dependencies.
17924
17925 2002-04-07 Akim Demaille <akim@epita.fr>
17926
17927 * src/reader.c: Normalize increments to prefix form.
17928
17929 2002-04-07 Akim Demaille <akim@epita.fr>
17930
17931 * src/reader.c, symtab.c: Remove debugging code.
17932
17933 2002-04-07 Akim Demaille <akim@epita.fr>
17934
17935 Rename all the `bucket's as `symbol_t'.
17936
17937 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17938 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17939 * src/symtab.c, src/symtab.h (bucket): Rename as...
17940 (symbol_t): this.
17941 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17942 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17943 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17944 (buckets_new, buckets_free, buckets_do): Rename as...
17945 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17946 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17947 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17948 (symbols_new, symbols_free, symbols_do): these.
17949
17950 2002-04-07 Akim Demaille <akim@epita.fr>
17951
17952 Use lib/hash for the symbol table.
17953
17954 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17955 EOF.
17956 * src/lex.c (lex): Set the `number' member of new terminals.
17957 * src/reader.c (bucket_check_defined, bucket_make_alias)
17958 (bucket_check_alias_consistence, bucket_translation): New.
17959 (reader, grammar_free, readgram, token_translations_init)
17960 (packsymbols): Adjust.
17961 (reader): Number the predefined tokens.
17962 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17963 for predefined tokens.
17964 * src/symtab.h (bucket): Remove all the hash table related
17965 members.
17966 * src/symtab.c (symtab): Replace by...
17967 (bucket_table): this.
17968 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17969 (buckets_new, buckets_do): New.
17970
17971 2002-04-07 Akim Demaille <akim@epita.fr>
17972
17973 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17974 (start_symbol, max_user_token_number, semantic_parser)
17975 (error_token_number): Initialize.
17976 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17977 Initialize.
17978 (reader): Don't.
17979 (errtoken, eoftoken, undeftoken, axiom): Extern.
17980
17981 2002-04-07 Akim Demaille <akim@epita.fr>
17982
17983 * src/gram.h (rule_s): prec and precsym are now pointers
17984 to the bucket giving the priority/associativity.
17985 Member `associativity' removed: useless.
17986 * src/reduce.c, src/conflicts.c: Adjust.
17987
17988 2002-04-07 Akim Demaille <akim@epita.fr>
17989
17990 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17991 Properly escape the symbols' TAG when outputting them.
17992
17993 2002-04-07 Akim Demaille <akim@epita.fr>
17994
17995 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17996
17997 2002-04-07 Akim Demaille <akim@epita.fr>
17998
17999 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18000 (LArule): this, which is an array to rule_t*.
18001 * src/print.c, src/conflicts.c: Adjust.
18002
18003 2002-04-07 Akim Demaille <akim@epita.fr>
18004
18005 * src/gram.h (rule_t): Rename `number' as `user_number'.
18006 `number' is a new member.
18007 Adjust dependencies.
18008 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18009
18010 2002-04-07 Akim Demaille <akim@epita.fr>
18011
18012 As a result of the previous patch, it is no longer needed
18013 to reorder ritem itself.
18014
18015 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18016
18017 2002-04-07 Akim Demaille <akim@epita.fr>
18018
18019 Be sure never to walk through RITEMS, but use only data related to
18020 the rules themselves. RITEMS should be banished.
18021
18022 * src/output.c (output_token_translations): Rename as...
18023 (prepare_tokens): this.
18024 In addition to `translate', prepare the muscles `tname' and
18025 `toknum', which were handled by...
18026 (output_rule_data): this.
18027 Remove, and move the remainder of its outputs into...
18028 (prepare_rules): this new routines, which also merges content from
18029 (output_gram): this.
18030 (prepare_rules): Be sure never to walk through RITEMS.
18031 (output_stos): Rename as...
18032 (prepare_stos): this.
18033 (output): Always invoke prepare_states, after all, just don't use it
18034 in the output if you don't need it.
18035
18036 2002-04-07 Akim Demaille <akim@epita.fr>
18037
18038 * src/LR0.c (new_state): Display `nstates' as the name of the
18039 newly created state.
18040 Adjust to initialize first_state and last_state if needed.
18041 Be sure to distinguish the initial from the final state.
18042 (new_states): Create the itemset of the initial state, and use
18043 new_state.
18044 * src/closure.c (closure): Now that the initial state has its
18045 items properly set, there is no need for a special case when
18046 creating `ruleset'.
18047
18048 As a result, now the rule 0, reducing to $axiom, is visible in the
18049 outputs. Adjust the test suite.
18050
18051 * tests/conflicts.at (Solved SR Conflicts)
18052 (Unresolved SR Conflicts): Adjust.
18053 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18054 * tests/conflicts.at (S/R in initial): New.
18055
18056 2002-04-07 Akim Demaille <akim@epita.fr>
18057
18058 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18059 the RHS of the rules.
18060 * src/output.c (output_gram): Likewise.
18061
18062 2002-04-07 Akim Demaille <akim@epita.fr>
18063
18064 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18065 bucket.
18066 Adjust all dependencies.
18067 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18068 `number' of the buckets too.
18069 * src/gram.h: Include `symtab.h'.
18070 (associativity): Move to...
18071 * src/symtab.h: here.
18072 No longer include `gram.h'.
18073
18074 2002-04-07 Akim Demaille <akim@epita.fr>
18075
18076 * src/gram.h, src/gram.c (rules_rhs_length): New.
18077 (ritem_longest_rhs): Use it.
18078 * src/gram.h (rule_t): `number' is a new member.
18079 * src/reader.c (packgram): Set it.
18080 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18081 the end of `rules', and count them out of `nrules'.
18082 (reduce_output, dump_grammar): Adjust.
18083 * src/print.c (print_grammar): It is no longer needed to check for
18084 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18085 * tests/reduce.at (Reduced Automaton): New test.
18086
18087 2002-04-07 Akim Demaille <akim@epita.fr>
18088
18089 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18090 lacking `+ 1' to nrules, Bison reported as useless a token if it
18091 was used solely to set the precedence of the last rule...
18092
18093 2002-04-07 Akim Demaille <akim@epita.fr>
18094
18095 * data/bison.c++, data/bison.simple: Don't output the current file
18096 name in #line, to avoid useless diffs between two identical
18097 outputs under different names.
18098
18099 2002-04-07 Akim Demaille <akim@epita.fr>
18100
18101 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18102 Normalize loops to using `< nrules + 1', not `<= nrules'.
18103
18104 2002-04-07 Akim Demaille <akim@epita.fr>
18105
18106 * TODO: Update.
18107
18108 2002-04-07 Akim Demaille <akim@epita.fr>
18109
18110 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18111 bucket.value as bucket.number.
18112
18113 2002-04-07 Akim Demaille <akim@epita.fr>
18114
18115 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18116 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18117 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18118 RHS, instead of being an index in RITEMS.
18119
18120 2002-04-04 Paul Eggert <eggert@twinsun.com>
18121
18122 * doc/bison.texinfo: Update copyright date.
18123 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18124 (Symbols): Warn about running Bison in one character set,
18125 but compiling and/or running in an incompatible one.
18126 Warn about character code 256, too.
18127
18128 2002-04-03 Paul Eggert <eggert@twinsun.com>
18129
18130 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18131 YYERROR_VERBOSE is nonzero, not whether it is defined.
18132
18133 Merge changes from bison-1_29-branch.
18134
18135 2002-03-20 Paul Eggert <eggert@twinsun.com>
18136
18137 Merge fixes from Debian bison_1.34-1.diff.
18138
18139 * configure.in (AC_PREREQ): 2.53.
18140
18141 2002-03-20 Akim Demaille <akim@epita.fr>
18142
18143 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18144
18145 2002-03-19 Paul Eggert <eggert@twinsun.com>
18146
18147 * src/bison.simple (YYCOPY): New macro.
18148 (YYSTACK_RELOCATE): Use it.
18149 Remove Type arg; no longer needed. All callers changed.
18150 (yymemcpy): Remove; no longer needed.
18151
18152 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18153 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18154
18155 2002-03-19 Akim Demaille <akim@epita.fr>
18156
18157 Test and fix the #line outputs.
18158
18159 * tests/atlocal.at (GCC): New.
18160 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18161 (Prologue synch line, %union synch line, Postprologue synch line)
18162 (Action synch line, Epilogue synch line): New tests.
18163 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18164 * data/bison.simple, data/bison.c++: Use it.
18165
18166 2002-03-19 Akim Demaille <akim@epita.fr>
18167
18168 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18169 (Solved SR Conflicts, %expect not enough, %expect right)
18170 (%expect too much): Move to...
18171 * tests/conflicts.at: this new file.
18172
18173 2002-03-19 Akim Demaille <akim@epita.fr>
18174
18175 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18176 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18177 that we can move to enums for instance.
18178 * src/output.c (token_definitions_output): Output a list of
18179 `token-name, token-number' instead of the #define.
18180 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18181
18182 2002-03-14 Akim Demaille <akim@epita.fr>
18183
18184 Use Gettext 0.11.1.
18185
18186 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18187
18188 * data/bison.c++: Make the user able to add members to the generated
18189 parser by subclassing.
18190
18191 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18192
18193 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18194 a character.
18195 Reported by Nicolas Tisserand and Nicolas Burrus.
18196
18197 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18198
18199 * src/reader.c: Warn about lacking semi-colons, do not complain.
18200
18201 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18202
18203 * data/bison.c++: Remove a debug line.
18204
18205 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18206
18207 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18208 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18209 provide a default implementation.
18210
18211 2002-03-04 Akim Demaille <akim@epita.fr>
18212
18213 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18214 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18215 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18216 * tests/semantic.at (Parsing Guards): Similarly.
18217 * src/reader.at (readgram): Complain if the last rule is not ended
18218 with a semi-colon.
18219
18220 2002-03-04 Akim Demaille <akim@epita.fr>
18221
18222 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18223 * src/closure.c: here.
18224 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18225 RTC.
18226 * src/warshall.h, src/warshall.c: Remove.
18227 * tests/sets.at (Broken Closure): Adjust.
18228
18229 2002-03-04 Akim Demaille <akim@epita.fr>
18230
18231 * src/output.c (output_skeleton): tempdir is const.
18232 bytes_read is unused.
18233
18234 2002-03-04 Akim Demaille <akim@epita.fr>
18235
18236 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18237 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18238 Update.
18239 From Michael Hayes.
18240
18241 2002-03-04 Akim Demaille <akim@epita.fr>
18242
18243 * src/closure.c (closure): `r' is unused.
18244
18245 2002-03-04 Akim Demaille <akim@epita.fr>
18246
18247 * tests/sets.at (Broken Closure): Add the ending `;'.
18248 * src/reader.at (readgram): Complain if a rule is not ended with a
18249 semi-colon.
18250
18251 2002-03-04 Akim Demaille <akim@epita.fr>
18252
18253 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18254 (count_sr_conflicts): Use bitset_count.
18255 * src/reduce.c (inaccessable_symbols): Ditto.
18256 (bits_size): Remove.
18257 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18258
18259 2002-03-04 Akim Demaille <akim@epita.fr>
18260
18261 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18262 * src/reduce.c: Remove the `bitset_zero's following the
18263 `bitset_create's, as now it is performed by the latter.
18264
18265 2002-03-04 Akim Demaille <akim@epita.fr>
18266
18267 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18268 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18269 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18270 latest sources from Michael.
18271
18272 2002-03-04 Akim Demaille <akim@epita.fr>
18273
18274 * src/output.c (output): Don't free the grammar.
18275 * src/reader.c (grammar_free): New.
18276 * src/main.c (main): Call it and don't free symtab here.
18277
18278 2002-03-04 Akim Demaille <akim@epita.fr>
18279
18280 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18281 before returning.
18282 Reported by Benoit Perrot.
18283
18284 2002-03-04 Akim Demaille <akim@epita.fr>
18285
18286 Use bitset operations when possible, not loops over bits.
18287
18288 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18289 bitset_or.
18290 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18291 * src/reduce.c (useless_nonterminals): Formatting changes.
18292 * src/warshall.c (TC): Use bitset_or.
18293
18294 2002-03-04 Akim Demaille <akim@epita.fr>
18295
18296 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18297 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18298 Ditto.
18299
18300 2002-03-04 Akim Demaille <akim@epita.fr>
18301
18302 * src/lalr.c (F): Now a bitset*.
18303 Adjust all dependencies.
18304
18305 2002-03-04 Akim Demaille <akim@epita.fr>
18306
18307 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18308 Adjust all dependencies.
18309
18310 2002-03-04 Akim Demaille <akim@epita.fr>
18311
18312 * src/L0.c, src/LR0.h (nstates): Be size_t.
18313 Adjust comparisons (signed vs unsigned).
18314 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18315 bitset*.
18316 Adjust all dependencies.
18317
18318 2002-03-04 Akim Demaille <akim@epita.fr>
18319
18320 * src/closure.c (firsts): Now, also a bitset.
18321 Adjust all dependencies.
18322 (varsetsize): Remove, now unused.
18323 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18324
18325 2002-03-04 Akim Demaille <akim@epita.fr>
18326
18327 * src/print.c: Convert to use bitset.h, not hand coded iterations
18328 over ints.
18329
18330 2002-03-04 Akim Demaille <akim@epita.fr>
18331
18332 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18333
18334 2002-03-04 Akim Demaille <akim@epita.fr>
18335
18336 * src/closure.c (ruleset): Be a bitset.
18337 (rulesetsize): Remove.
18338
18339 2002-03-04 Akim Demaille <akim@epita.fr>
18340
18341 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18342 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18343 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18344 * src/closure.c (fderives): Be an array of bitsets.
18345
18346 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18347
18348 * data/bison.c++: Merge the two generated headers. Insert a copyright
18349 notice in each output file.
18350
18351 2002-02-28 Akim Demaille <akim@epita.fr>
18352
18353 * data/bison.c++: Copy the prologue of bison.simple to fetch
18354 useful M4 definitions, such as b4_header_guard.
18355
18356 2002-02-25 Akim Demaille <akim@epita.fr>
18357
18358 * src/getargs.c (version): Give the name of the authors, and use a
18359 translator friendly scheme for the bgr
18360 copyright notice.
18361
18362 2002-02-25 Akim Demaille <akim@epita.fr>
18363
18364 * src/output.c (header_output): Remove, now handled completely via
18365 M4.
18366
18367 2002-02-25 Akim Demaille <akim@epita.fr>
18368
18369 * m4/m4.m4: New, from CVS Autoconf.
18370 * configure.in: Invoke it.
18371 * src/output.c (output_skeleton): Use its result instead of the
18372 hard coded name.
18373
18374 2002-02-25 Akim Demaille <akim@epita.fr>
18375
18376 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18377 Fileutils 4.1.5.
18378 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18379 * src/output.c (output_skeleton): Use mkstemp to create a real
18380 temporary file.
18381 Move the filling of `skeleton' and its muscle to...
18382 (prepare): here.
18383 (output): Move the definition of the prologue muscle to...
18384 (prepare): here.
18385 * src/system.h (DEFAULT_TMPDIR): New.
18386
18387 2002-02-14 Paul Eggert <eggert@twinsun.com>
18388
18389 Remove the support for C++ namespace cleanliness; it was
18390 causing more problems than it was curing, since it didn't work
18391 properly on some nonstandard C++ compilers. This can wait
18392 for a proper C++ parser.
18393
18394 * NEWS: Document this.
18395 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18396 of C++, as it's treated like C now.
18397 * src/bison.simple (YYSTD): Remove.
18398 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18399 Treat C++ just like Standard C instead of trying to support
18400 namespace cleanliness.
18401
18402 2002-02-14 Akim Demaille <akim@epita.fr>
18403
18404 * tests/regression.at (else): Adjust to Andreas' change.
18405
18406 2002-02-14 Akim Demaille <akim@epita.fr>
18407
18408 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18409
18410 2002-02-13 Andreas Schwab <schwab@suse.de>
18411
18412 * src/output.c (output_rule_data): Don't output NULL, it might
18413 not be defined yet.
18414
18415 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18416
18417 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18418 (Copyright notice): Update.
18419
18420 2002-02-11 Akim Demaille <akim@epita.fr>
18421
18422 * tests/regression.at (%nonassoc and eof): Don't include
18423 nonportable headers.
18424
18425 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18426
18427 * data/bison.c++: Correct error recovery. Make the user able to
18428 initialize the starting location.
18429
18430 2002-02-07 Akim Demaille <akim@epita.fr>
18431
18432 * tests/input.at: New.
18433
18434 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18435
18436 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18437 more consistent when naming methods and variables. Put preprocessor
18438 directives around tables only needed for debugging.
18439
18440 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18441
18442 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18443 C++ parsers.
18444 (yy::b4_name::parse): Use print_.
18445
18446 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18447
18448 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18449
18450 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18451
18452 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18453 C++ parsers.
18454 (yy::b4_name::parse): Build verbose error messages, and use error_.
18455
18456 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18457
18458 * data/bison.c++: Fix m4 quoting in comments.
18459
18460 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18461
18462 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18463 not expanded by m4.
18464
18465 2002-02-05 Akim Demaille <akim@epita.fr>
18466
18467 * data/bison.c++: Adjust to the M4 back end.
18468 More is certainly needed.
18469
18470 2002-02-05 Akim Demaille <akim@epita.fr>
18471
18472 Give a try to M4 as a back end.
18473
18474 * lib/readpipe.c: New, from wdiff.
18475 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18476 BISON_HAIRY.
18477 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18478 specific values. Now it is m4 that performs the lookup.
18479 * src/parse-skel.y: Remove.
18480 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18481 * src/output.c (actions_output, guards_output)
18482 (token_definitions_output): No longer keeps track of the output
18483 line number, hence remove the second argument.
18484 (guards_output): Check against the guard member of a rule, not the
18485 action member.
18486 Adjust callers.
18487 (output_skeleton): Don't look for the skeleton location, let m4 do
18488 that.
18489 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18490 file will be used.
18491 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18492 (prepare): Given that for the time being changesyntax is not
18493 usable in M4, rename the muscles using `-' to `_'.
18494 Define `defines_flag', `output_parser_name' and `output_header_name'.
18495 * src/output.h (actions_output, guards_output)
18496 (token_definitions_output): Adjust prototypes.
18497 * src/scan-skel.l: Instead of scanning the skeletons, it now
18498 processes the output of m4: `__oline__' and `#output'.
18499 * data/bison.simple: Adjust to be used by M4(sugar).
18500 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18501 to date.
18502 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18503 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18504 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18505 shamelessly stolen from CVS Autoconf.
18506
18507 2002-02-05 Akim Demaille <akim@epita.fr>
18508
18509 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18510 * configure.in: Check for the declarations of free and malloc.
18511 * src/muscle_tab.c: Adjust.
18512
18513 2002-02-05 Akim Demaille <akim@epita.fr>
18514
18515 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18516 which have no values.
18517
18518 2002-02-05 Akim Demaille <akim@epita.fr>
18519
18520 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18521 * data/: here.
18522
18523 2002-01-29 Paul Eggert <eggert@twinsun.com>
18524
18525 * src/bison.simple (YYSIZE_T): Do not define merely because
18526 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18527 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18528
18529 2002-01-27 Akim Demaille <akim@epita.fr>
18530
18531 Fix `%nonassoc and eof'.
18532
18533 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18534 which were not properly copied! Replace
18535 memcpy (res->errs, src->errs, src->nerrs);
18536 with
18537 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18538 !!!
18539 * tests/regression.at (%nonassoc and eof): Adjust to newest
18540 Autotest: `.' is not in the PATH.
18541
18542 2002-01-27 Akim Demaille <akim@epita.fr>
18543
18544 * tests/sets.at (AT_EXTRACT_SETS): New.
18545 (Nullable): Use it.
18546 (Firsts): New.
18547
18548 2002-01-26 Akim Demaille <akim@epita.fr>
18549
18550 * tests/actions.at, tests/calc.at, tests/headers.at,
18551 * tests/torture.at: Adjust to the newest Autotest which no longer
18552 forces `.' in the PATH.
18553
18554 2002-01-25 Akim Demaille <akim@epita.fr>
18555
18556 * tests/regression.at (%nonassoc and eof): New.
18557 Suggested by Robert Anisko.
18558
18559 2002-01-24 Akim Demaille <akim@epita.fr>
18560
18561 Bison dumps core when trying to complain about broken input files.
18562 Reported by Cris van Pelt.
18563
18564 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18565 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18566 into...
18567 (Invalid inputs): Strengthen: exercise parse_percent_token.
18568
18569 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18570
18571 * src/Makefile.am: Add bison.c++.
18572 * src/bison.c++: New skeleton.
18573
18574 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18575
18576 * po/it.po: New.
18577
18578 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18579
18580 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18581
18582 2002-01-20 Marc Autret <marc@gnu.org>
18583
18584 * src/files.c (compute_output_file_names): Fix
18585
18586 2002-01-20 Marc Autret <marc@gnu.org>
18587
18588 * tests/output.at: New test.
18589 * src/files.c (compute_base_names): Don't map extensions when
18590 the YACC flag is set, use defaults.
18591 Reported by Evgeny Stambulchik.
18592
18593 2002-01-20 Marc Autret <marc@gnu.org>
18594
18595 * src/system.h: Need to define __attribute__ away for non-GCC
18596 compilers as well (i.e., the vendor C compiler).
18597 Suggested by Albert Chin-A-Young.
18598
18599 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18600
18601 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18602 canonical definition.
18603 * src/system.h: Use the canonical definition for PARAMS (avoids
18604 a conflict with the macro from lib/hash.h).
18605
18606 2002-01-11 Akim Demaille <akim@epita.fr>
18607
18608 * configure.in: Use AC_FUNC_STRNLEN.
18609 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18610
18611 2002-01-09 Akim Demaille <akim@epita.fr>
18612
18613 * src/files.c, src/files.h (output_infix): New.
18614 (tab_extension): Remove.
18615 (compute_base_names): Compute the former, drop the latter.
18616 * src/output.c (prepare): Insert the muscles `output-infix', and
18617 `output-suffix'.
18618 * src/parse-skel.y (string, string.1): New.
18619 (section.header): Use it.
18620 (section.yacc): Remove.
18621 (prefix): Remove too.
18622 * src/scan-skel.l: Adjust.
18623 * src/bison.simple, src/bison.hairy: Adjust.
18624
18625 2002-01-09 Akim Demaille <akim@epita.fr>
18626
18627 * configure.in (WERROR_CFLAGS): Compute it.
18628 * src/Makefile.am (CFLAGS): Pass it.
18629 * tests/atlocal.in (CFLAGS): Idem.
18630 * src/files.c: Fix a few warnings.
18631 (get_extension_index): Remove, unused.
18632
18633 2002-01-08 Akim Demaille <akim@epita.fr>
18634
18635 * src/getargs.c (AS_FILE_NAME): New.
18636 (getargs): Use it to convert DOSish file names.
18637 * src/files.c (base_name): Rename as full_base_name to avoid
18638 clashes with `base_name ()'.
18639 (filename_split): New.
18640 (compute_base_names): N-th rewrite, using filename_split.
18641
18642 2002-01-08 Akim Demaille <akim@epita.fr>
18643
18644 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18645 New, stolen from the Fileutils 4.1.
18646 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18647 * configure.in: Check for the presence of memrchr, and of its
18648 prototype.
18649
18650 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18651
18652 * lib/hash.h (__P): Added definition for this macro.
18653 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18654 BUILT_SOURCES, to ensure they are generated first.
18655 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18656 %error-verbose to allow bootstrapping with bison 1.30x.
18657
18658 2002-01-06 Akim Demaille <akim@epita.fr>
18659
18660 * src/reader.c (parse_braces): Don't fetch the next char, the
18661 convention is to fetch on entry.
18662 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18663 'switch' without a following semicolon.
18664 * tests/regression.at (braces parsing): New.
18665
18666 2002-01-06 Akim Demaille <akim@epita.fr>
18667
18668 Bison is dead wrong in its RR conflict reports.
18669
18670 * tests/torture.at (GNU Cim Grammar): New.
18671 * src/conflicts.c (count_rr_conflicts): Fix.
18672
18673 2002-01-06 Akim Demaille <akim@epita.fr>
18674
18675 Creating package.m4 from configure.ac causes too many problems.
18676
18677 * tests/Makefile.am (package.m4): Create it by hand,
18678 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18679
18680 2002-01-06 Akim Demaille <akim@epita.fr>
18681
18682 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18683 skeleton.h.
18684
18685 2002-01-04 Paul Eggert <eggert@twinsun.com>
18686
18687 * doc/bison.texinfo (Debugging):
18688 Remove YYSTDERR; it's no longer defined or used.
18689 Also, s/cstdio.h/cstdio/.
18690
18691 2002-01-03 Akim Demaille <akim@epita.fr>
18692
18693 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18694
18695 2002-01-03 Akim Demaille <akim@epita.fr>
18696
18697 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18698 tracing code to --trace, wait for a better --trace option, with
18699 args.
18700
18701 2002-01-03 Akim Demaille <akim@epita.fr>
18702
18703 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18704 The ISO C++ standard is extremely clear about it: stderr is
18705 considered a macro, not a regular symbol (see table 94 `Header
18706 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18707 Therefore std:: does not apply to it. It still does with fprintf.
18708 Also, s/cstdio.h/cstdio/.
18709
18710 2002-01-03 Akim Demaille <akim@epita.fr>
18711
18712 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18713 for non system headers.
18714
18715 2002-01-02 Akim Demaille <akim@epita.fr>
18716
18717 Equip the skeleton chain with location tracking, runtime trace,
18718 pure parser and scanner.
18719
18720 * src/parse-skel.y: Request a pure parser, locations, and prefix
18721 renaming.
18722 (%union): Having several members with the same type does not help
18723 type mismatches, simplify.
18724 (YYPRINT, yyprint): New.
18725 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18726 (skel_error): this.
18727 Handle locations.
18728 * src/scan-skel.l: Adjust to these changes.
18729 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18730 (LOCATION_PRINT, skel_control_t): New.
18731
18732 2001-12-30 Akim Demaille <akim@epita.fr>
18733
18734 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18735 replace `gb' with BLANKS.
18736 * src/scan-skel.l: Adjust.
18737
18738 2001-12-30 Akim Demaille <akim@epita.fr>
18739
18740 * src/system.h: We don't need nor want bcopy.
18741 Throw away MS-DOS crap: we don't need getpid.
18742 * configure.in: We don't need strndup. It was even causing
18743 problems: because Flex includes the headers *before* us,
18744 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18745 not visible.
18746 * lib/xstrndup.c: New.
18747 * src/scan-skel.l: Use it.
18748 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18749 * src/parse-skel.y: Use %directives instead of #defines.
18750
18751 2001-12-30 Akim Demaille <akim@epita.fr>
18752
18753 * src/skeleton.h: New.
18754 * src/output.c (output_parser, output_master_parser): Remove, dead
18755 code.
18756 * src/output.h (get_lines_number, actions_output, guards_output)
18757 (token_definitions_output): Prototype them.
18758 * src/parse-skel.y: Add the license notice.
18759 Include output.h and skeleton.h.
18760 (process_skeleton): Returns void, and takes a single parameter.
18761 * src/scan-skel.l: Add the license notice.
18762 Include skeleton.h.
18763 Don't use %option yylineno: it seems that then Flex imagines
18764 REJECT has been used, and therefore it won't reallocate its
18765 buffers (which makes no other sense to me than a bug). It results
18766 in warnings for `unused: yy_flex_realloc'.
18767
18768 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18769
18770 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18771 (MUSCLE_INSERT_PREFIX): ...to there.
18772 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18773 (MUSCLE_INSERT_PREFIX): Move from here...
18774
18775 * src/bison.hairy: Add a section directive. Put braces around muscle
18776 names. This parser skeleton is still broken, but Bison should not
18777 choke on a bad muscle 'syntax'.
18778 * src/bison.simple: Add a section directive. Put braces around muscle
18779 names.
18780
18781 * src/files.h (strsuffix, stringappend): Add declarations.
18782 (tab_extension): Add declaration.
18783 (short_base_name): Add declaration.
18784
18785 * src/files.c (strsuffix, stringappend): No longer static. These
18786 functions are used in the skeleton parser.
18787 (tab_extension): New.
18788 (compute_base_names): Use the computations done in this function
18789 to guess if the generated parsers should have '.tab' in their
18790 names.
18791 (short_base_name): No longer static.
18792
18793 * src/output.c (output_skeleton): New.
18794 (output): Disable call to output_master_parser, and give a try to
18795 a new skeleton handling system.
18796 (guards_output, actions_output): No longer static.
18797 (token_definitions_output, get_lines_number): No longer static.
18798
18799 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18800
18801 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18802 parse-skel.y.
18803
18804 * src/parse-skel.y: New file.
18805 * src/scan-skel.l: New file.
18806
18807 2001-12-29 Akim Demaille <akim@epita.fr>
18808
18809 %name-prefix is broken.
18810
18811 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18812 Adjust all dependencies.
18813 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18814 %name-prefix.
18815
18816 Renaming yylval but not yylloc is not consistent. Now we do.
18817
18818 * src/bison.simple: Prefix yylloc if used.
18819 * doc/bison.texinfo (Decl Summary): Document that.
18820
18821 2001-12-29 Akim Demaille <akim@epita.fr>
18822
18823 * doc/bison.texinfo: Promote `%long-directive' over
18824 `%long_directive'.
18825 Remove all references to fixed-output-files, yacc is enough.
18826
18827 2001-12-29 Akim Demaille <akim@epita.fr>
18828
18829 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18830 user prologue. These are defaults.
18831 * tests/actions.at (Mid-rule actions): Make sure the user can
18832 define YYDEBUG and YYERROR_VERBOSE.
18833
18834 2001-12-29 Akim Demaille <akim@epita.fr>
18835
18836 * src/output.c (header_output): Don't forget to export YYLTYPE and
18837 yylloc.
18838 * tests/headers.at (export YYLTYPE): New, make sure it does.
18839 * tests/regression.at (%union and --defines, Invalid CPP headers):
18840 Move to...
18841 * tests/headers.at: here.
18842
18843 2001-12-29 Akim Demaille <akim@epita.fr>
18844
18845 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18846
18847 2001-12-29 Akim Demaille <akim@epita.fr>
18848
18849 * tests/actions.at (Mid-rule actions): Output on a single line
18850 instead of several.
18851
18852 2001-12-29 Akim Demaille <akim@epita.fr>
18853
18854 * doc/bison.texinfo: Formatting changes.
18855
18856 2001-12-29 Akim Demaille <akim@epita.fr>
18857
18858 Don't store the token defs in a muscle, just be ready to output it
18859 on command. Now possible via `symbols'. Fixes a memory leak.
18860
18861 * src/output.c (token_definitions_output): New.
18862 (output_parser, header_output): Use it.
18863 * src/reader.c (symbols_save): Remove.
18864
18865 2001-12-29 Akim Demaille <akim@epita.fr>
18866
18867 * src/bison.simple: Do not provide a default for YYSTYPE and
18868 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18869 default.
18870
18871 2001-12-29 Akim Demaille <akim@epita.fr>
18872
18873 Mid-rule actions are simply... ignored!
18874
18875 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18876 the empty-rule associated to the dummy symbol, not to the host
18877 rule.
18878 * tests/actions.at (Mid-rule actions): New.
18879
18880 2001-12-29 Akim Demaille <akim@epita.fr>
18881
18882 Memory leak.
18883
18884 * src/reader.c (reader): Free grammar.
18885
18886 2001-12-29 Akim Demaille <akim@epita.fr>
18887
18888 Memory leak.
18889
18890 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18891 since it allocates it for each state, although only one is needed.
18892 (allocate_storage): Do it here.
18893
18894 2001-12-29 Akim Demaille <akim@epita.fr>
18895
18896 * src/options.h, src/options.c (create_long_option_table): Rename
18897 as...
18898 (long_option_table_new): this, with a clearer prototype.
18899 (percent_table): Remove, unused,
18900 * src/getargs.c (getargs): Adjust.
18901
18902 2001-12-29 Akim Demaille <akim@epita.fr>
18903
18904 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18905 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18906 as states.
18907
18908 2001-12-29 Akim Demaille <akim@epita.fr>
18909
18910 * src/lalr.c (build_relations): Rename `states' as `states1'.
18911 Sorry, I don't understand exactly what it is, no better name...
18912
18913 2001-12-29 Akim Demaille <akim@epita.fr>
18914
18915 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18916 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18917 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18918 as rules.
18919
18920 2001-12-29 Akim Demaille <akim@epita.fr>
18921
18922 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18923 ago.
18924
18925 2001-12-29 Akim Demaille <akim@epita.fr>
18926
18927 * src/reader.c, src/reader.h (user_toknums): Remove.
18928 Adjust all users to use symbols[i]->user_token_number.
18929
18930 2001-12-29 Akim Demaille <akim@epita.fr>
18931
18932 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18933 Adjust all users to use symbols[i]->prec or ->assoc.
18934
18935 2001-12-29 Akim Demaille <akim@epita.fr>
18936
18937 * src/reader.c, src/reader.h (tags): Remove.
18938 Adjust all users to use symbols[i]->tag.
18939
18940 2001-12-29 Akim Demaille <akim@epita.fr>
18941
18942 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18943 and rule_table.
18944 * src/reader.c (packsymbols): Fill this table.
18945 Drop sprec.
18946 * src/conflicts.c (resolve_sr_conflict): Adjust.
18947 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18948 single table.
18949 Use symbols[i]->tag instead of tags[i].
18950
18951 2001-12-29 Akim Demaille <akim@epita.fr>
18952
18953 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18954 In addition, put a comment in there, to replace...
18955 * tests/regression.at (%union and C comments): Remove.
18956
18957 2001-12-29 Akim Demaille <akim@epita.fr>
18958
18959 * tests/regression.at (Web2c Actions): Blindly move the actual
18960 output as expected output. The contents *seem* right to me, but I
18961 can't pretend reading perfectly parser tables... Nonetheless, all
18962 the other tests pass correctly, the table look OK, even though the
18963 presence of `$axiom' is to be noted: AFAICS it is useless (but
18964 harmless).
18965
18966 2001-12-29 Akim Demaille <akim@epita.fr>
18967
18968 * src/reader.c (readgram): Don't add the rule 0 if there were no
18969 rules read. In other words, add it _after_ having performed
18970 grammar sanity checks.
18971 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18972
18973 2001-12-29 Akim Demaille <akim@epita.fr>
18974
18975 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18976 visible, and some states have now a different number.
18977
18978 2001-12-29 Akim Demaille <akim@epita.fr>
18979
18980 * src/reader.c (readgram): Bind the initial rule's lineno to that
18981 of the first rule.
18982 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18983 (Solved SR Conflicts): Adjust rule 0's line number.
18984
18985 2001-12-29 Akim Demaille <akim@epita.fr>
18986
18987 Fix the `GAWK Grammar' failure.
18988
18989 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18990 the reductions of the first state which was mistakenly confused
18991 with the final state because precisely final_state was initialized
18992 to 0.
18993 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18994 now noticed by Bison.
18995 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18996 have a reduction on $default.
18997
18998 2001-12-29 Akim Demaille <akim@epita.fr>
18999
19000 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19001 rule line numbers.
19002 * src/closure.c (print_closure): Likewise.
19003 * src/derives.c (print_derives): Likewise.
19004 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19005 now.
19006
19007 2001-12-29 Akim Demaille <akim@epita.fr>
19008
19009 * src/lalr.c (lookaheads_print): New.
19010 (lalr): Call it when --trace-flag.
19011 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19012 are dumped.
19013
19014 2001-12-29 Akim Demaille <akim@epita.fr>
19015
19016 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19017 when walking through ritem, even via rule->rhs.
19018 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19019 (useful_production, useless_nonterminals): Likewise.
19020 (reduce_grammar_tables): Likewise, plus update nritems.
19021 * src/nullable.c (set_nullable): Likewise.
19022 * src/lalr.c (build_relations): Likewise.
19023 * tests/sets.at (Nullable): Adjust.
19024 Fortunately, now, the $axiom is no longer nullable.
19025
19026 2001-12-29 Akim Demaille <akim@epita.fr>
19027
19028 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19029 the 0-sentinel.
19030 * src/gram.c (ritem_longest_rhs): Likewise.
19031 * src/reduce.c (nonterminals_reduce): Likewise.
19032 * src/print_graph.c (print_graph): Likewise.
19033 * src/output.c (output_rule_data): Likewise.
19034 * src/nullable.c (set_nullable): Likewise.
19035
19036 2001-12-29 Akim Demaille <akim@epita.fr>
19037
19038 * src/output.c: Comment changes.
19039
19040 2001-12-27 Paul Eggert <eggert@twinsun.com>
19041
19042 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19043 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19044 Sparc, as they were causing more porting problems than the
19045 (minor) performance improvement was worth.
19046
19047 Also, catch up with 1.31's YYSTD.
19048
19049 2001-12-27 Akim Demaille <akim@epita.fr>
19050
19051 * src/output.c (output_gram): Rely on nritems, not the
19052 0-sentinel. See below.
19053 Use -1 as separator, not 0.
19054 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19055 Rely on -1 as separator in yyrhs, instead of 0.
19056 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19057 twice `Now at end of input', therefore there are two lines less to
19058 expect.
19059
19060 2001-12-27 Akim Demaille <akim@epita.fr>
19061
19062 * tests/regression.at (Unresolved SR Conflicts):
19063 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19064 below.
19065
19066 2001-12-27 Akim Demaille <akim@epita.fr>
19067
19068 * src/LR0.c (new_state): Recognize the final state by the fact it
19069 is reached by eoftoken.
19070 (insert_start_shifting_state, insert_eof_shifting_state)
19071 (insert_accepting_state, augment_automaton): Remove, since now
19072 these states are automatically computed from the initial state.
19073 (generate_states): Adjust.
19074 * src/print.c: When reporting a rule number to the user, substract
19075 1, so that the axiom rule is rule 0, and the first user rule is 1.
19076 * src/reduce.c: Likewise.
19077 * src/print_graph.c (print_core): For the time being, just as for
19078 the report, depend upon --trace-flags to dump the full set of
19079 items.
19080 * src/reader.c (readgram): Once the grammar read, insert the rule
19081 0: `$axiom: START-SYMBOL $'.
19082 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19083 number of the states has changed (the final state is no longer
19084 necessarily the last), catch up.
19085
19086 2001-12-27 Akim Demaille <akim@epita.fr>
19087
19088 Try to make the use of the eoftoken valid. Given that its value
19089 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19090 is used instead of > 0 where appropriate, (ii), depend upon nritems
19091 instead of the 0-sentinel.
19092
19093 * src/gram.h, src/gram.c (nritems): New.
19094 Expected to be duplication of nitems, but for the time being...
19095 * src/reader.c (packgram): Assert nritems and nitems are equal.
19096 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19097 * src/closure.c (print_closure, print_fderives): Likewise.
19098 * src/gram.c (ritem_print): Likewise.
19099 * src/print.c (print_core, print_grammar): Likewise.
19100 * src/print_graph.c: Likewise.
19101
19102 2001-12-27 Akim Demaille <akim@epita.fr>
19103
19104 * src/main.c (main): If there are complains after grammar
19105 reductions, then output the report anyway if requested, then die.
19106 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19107 * src/reader.c (eoftoken): New.
19108 (parse_token_decl): If the token being defined has value `0', it
19109 is the eoftoken.
19110 (packsymbols): No longer hack `tags' to insert `$' by hand.
19111 Be sure to preserve the value of the eoftoken.
19112 (reader): Make sure eoftoken is defined.
19113 Initialize nsyms to 0: now eoftoken is created just like the others.
19114 * src/print.c (print_grammar): Don't special case the eof token.
19115 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19116 lie anyway, albeit pleasant.
19117 * tests/calc.at: Exercise error messages with eoftoken.
19118 Change the grammar so that empty input is invalid.
19119 Adjust expectations.
19120 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19121
19122 2001-12-27 Akim Demaille <akim@epita.fr>
19123
19124 * configure.in: Check the protos of strchr ans strspn.
19125 Replace strchr if needed.
19126 * src/system.h: Provide the protos of strchr, strspn and memchr if
19127 missing.
19128 * lib/strchr.c: New.
19129 * src/reader.c (symbols_save): Use strchr.
19130
19131 2001-12-27 Akim Demaille <akim@epita.fr>
19132
19133 * src/print.c, src/print_graph.c (escape): New.
19134 Use it to quote the TAGS outputs.
19135 * src/print_graph.c (print_state): Now errors are in red, and
19136 reductions in green.
19137 Prefer high to wide: output the state number on a line of its own.
19138
19139 2001-12-27 Akim Demaille <akim@epita.fr>
19140
19141 * src/state.h, src/state.c (reductions_new): New.
19142 * src/LR0.c (set_state_table): Let all the states have a
19143 `reductions', even if reduced to 0.
19144 (save_reductions): Adjust.
19145 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19146 * src/print.c (print_reductions, print_actions): Adjust.
19147 * src/output.c (action_row): Adjust.
19148
19149 2001-12-27 Akim Demaille <akim@epita.fr>
19150
19151 * src/state.h, src/state.c (errs_new, errs_dup): New.
19152 * src/LR0.c (set_state_table): Let all the states have an errs,
19153 even if reduced to 0.
19154 * src/print.c (print_errs, print_reductions): Adjust.
19155 * src/output.c (output_actions, action_row): Adjust.
19156 * src/conflicts.c (resolve_sr_conflict): Adjust.
19157
19158 2001-12-27 Akim Demaille <akim@epita.fr>
19159
19160 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19161
19162 2001-12-27 Akim Demaille <akim@epita.fr>
19163
19164 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19165 * src/print.c: here.
19166 (lookaheadset, shiftset): New, used as additional storage by
19167 print_reductions.
19168 (print_results): Adjust.
19169 (print_shifts, print_gotos, print_errs): New, extracted from...
19170 (print_actions): here.
19171 * src/print_graph.c (print_actions): Remove dead code.
19172
19173 2001-12-27 Akim Demaille <akim@epita.fr>
19174
19175 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19176 `$n' and `@n'.
19177
19178 2001-12-27 Akim Demaille <akim@epita.fr>
19179
19180 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19181 (build_relations): Adjust.
19182
19183 2001-12-27 Akim Demaille <akim@epita.fr>
19184
19185 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19186 duplication.
19187
19188 2001-12-27 Akim Demaille <akim@epita.fr>
19189
19190 * src/reader.c (packgram): Catch nitems overflows.
19191
19192 2001-12-27 Akim Demaille <akim@epita.fr>
19193
19194 * src/files.c, src/files.h (guard_obstack): Remove.
19195 * src/output.c (output): Adjust.
19196 * src/reader.c (parse_braces): New, factoring...
19197 (copy_action, copy_guard): these two which are renamed as...
19198 (parse_action, parse_guard): these.
19199 As a voluntary consequence, using braces around guards is now
19200 mandatory.
19201
19202 2001-12-27 Akim Demaille <akim@epita.fr>
19203
19204 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19205 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19206 members.
19207 (symbol_list_new): Adjust.
19208 (copy_action): action_line is the first line, not the last.
19209 (copy_guard): Just as for actions, store the `action' only, not
19210 the switch/case/break flesh.
19211 Don't parse the user action that might follow the guard, let...
19212 (readgram): do it, i.e., now, there can be an action after a
19213 guard.
19214 In other words the guard is just explicitly optional.
19215 (packgram): Adjust.
19216 * src/output.c (guards_output): New.
19217 (output_parser): Call it when needed.
19218 (output): Also free the guard and attrs obstacks.
19219 * src/files.c, src/files.h (obstack_save): Remove.
19220 (output_files): Remove.
19221 As a result, if one needs the former `.act' file, using an
19222 appropriate skeleton which requires actions and guards is now
19223 required.
19224 * src/main.c (main): Adjust.
19225 * tests/semantic.at: New.
19226 * tests/regression.at: Use `input.y' as input file name.
19227 Avoid 8+3 problems by requiring input.c when the test needs the
19228 parser.
19229
19230 2001-12-27 Akim Demaille <akim@epita.fr>
19231
19232 * src/reader.c (symbol_list_new): Be sure to initialize all the
19233 fields.
19234
19235 2001-12-27 Akim Demaille <akim@epita.fr>
19236
19237 All the hacks using a final pseudo state are now useless.
19238
19239 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19240 * src/lalr.c (nLA): New.
19241 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19242 instead of lookaheadsp from the pseudo state (nstate + 1).
19243
19244 2001-12-27 Akim Demaille <akim@epita.fr>
19245
19246 * src/output.c (action_row, token_actions): Use a state_t instead
19247 of a integer, and nlookaheads instead of the following state's
19248 lookaheadsp.
19249
19250 2001-12-27 Akim Demaille <akim@epita.fr>
19251
19252 * src/conflicts.c (log_resolution, flush_shift)
19253 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19254 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19255 (conflicts_print, print_reductions): Use a state_t instead of an
19256 integer when referring to a state.
19257 As much as possible, depend upon nlookaheads, instead of the
19258 `lookaheadsp' member of the following state (since lookaheads of
19259 successive states are successive, the difference between state n + 1
19260 and n served as the number of lookaheads for state n).
19261 * src/lalr.c (add_lookback_edge): Likewise.
19262 * src/print.c (print_core, print_actions, print_state)
19263 (print_results): Likewise.
19264 * src/print_graph.c (print_core, print_actions, print_state)
19265 (print_graph): Likewise.
19266 * src/conflicts.h: Adjust.
19267
19268 2001-12-27 Akim Demaille <akim@epita.fr>
19269
19270 * src/bison.hairy: Formatting/comment changes.
19271 ANSIfy.
19272 Remove `register' indications.
19273 Add plenty of `static'.
19274
19275 2001-12-27 Akim Demaille <akim@epita.fr>
19276
19277 * src/output.c (prepare): Drop the muscle `ntbase' which
19278 duplicates ntokens.
19279 * src/bison.simple: Formatting/comment changes.
19280 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19281 is an undocumented synonym.
19282
19283 2001-12-22 Akim Demaille <akim@epita.fr>
19284
19285 * src/output.c (output_table_data): Change the prototype to use
19286 `int' for array ranges: some invocations do pass an int, not a
19287 short.
19288 Reported by Wayne Green.
19289
19290 2001-12-22 Akim Demaille <akim@epita.fr>
19291
19292 Some actions of web2c.y are improperly triggered.
19293 Reported by Mike Castle.
19294
19295 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19296 * tests/regression.at (Web2c): Rename as...
19297 (Web2c Report): this.
19298 (Web2c Actions): New.
19299
19300 2001-12-22 Akim Demaille <akim@epita.fr>
19301
19302 Reductions in web2c.y are improperly reported.
19303 Reported by Mike Castle.
19304
19305 * src/conflicts.c (print_reductions): Fix.
19306 * tests/regression.at (Web2c): New.
19307
19308 2001-12-18 Akim Demaille <akim@epita.fr>
19309
19310 Some host fail on `assert (!"foo")', which expands to
19311 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19312 Reported by Nelson Beebee.
19313
19314 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19315 `#define it_succeeded 0' and `assert (it_succeeded)'.
19316
19317 2001-12-17 Marc Autret <autret_m@epita.fr>
19318
19319 * src/bison.simple: Don't hard code the skeleton line and filename.
19320 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19321 New line counter 'skeleton_line' (skeleton-line muscle).
19322
19323 2001-12-17 Paul Eggert <eggert@twinsun.com>
19324
19325 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19326 YYDEBUG must be defined to a nonzero value.
19327
19328 * src/bison.simple (yytname): Do not assume that the user defines
19329 YYDEBUG to a properly parenthesized expression.
19330
19331 2001-12-17 Akim Demaille <akim@epita.fr>
19332
19333 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19334 nlookaheads is a new member.
19335 Adjust all users.
19336 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19337 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19338 state.
19339
19340 2001-12-17 Akim Demaille <akim@epita.fr>
19341
19342 * src/files.h, src/files.c (open_files, close_files): Remove.
19343 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19344 let...
19345 * src/reader.c (reader): Do it.
19346
19347 2001-12-17 Akim Demaille <akim@epita.fr>
19348
19349 * src/conflicts.c (print_reductions): Formatting changes.
19350
19351 2001-12-17 Akim Demaille <akim@epita.fr>
19352
19353 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19354 (flush_reduce): New.
19355 (resolve_sr_conflict): Adjust.
19356
19357 2001-12-17 Akim Demaille <akim@epita.fr>
19358
19359 * src/output.c (output_obstack): Be static and rename as...
19360 (format_obstack): this, to avoid any confusion with files.c's
19361 output_obstack.
19362 * src/reader.h (muscle_obstack): Move to...
19363 * src/output.h: here, since it's defined in output.c.
19364
19365 2001-12-17 Akim Demaille <akim@epita.fr>
19366
19367 * src/output.c (action_row, save_column, default_goto)
19368 (sort_actions, matching_state, pack_vector): Better variable
19369 locality.
19370
19371 2001-12-17 Akim Demaille <akim@epita.fr>
19372
19373 * src/output.c: Various formatting changes.
19374
19375 2001-12-17 Akim Demaille <akim@epita.fr>
19376
19377 * src/files.c (output_files): Free the output_obstack.
19378 * src/main.c (main): Call print and print_graph conditionally.
19379 * src/print.c (print): Work unconditionally.
19380 * src/print_graph.c (print_graph): Work unconditionally.
19381 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19382
19383 2001-12-16 Marc Autret <autret_m@epita.fr>
19384
19385 * src/output.c (actions_output): Fix. When we use %no-lines,
19386 there is one less line per action.
19387
19388 2001-12-16 Marc Autret <autret_m@epita.fr>
19389
19390 * src/bison.simple: Remove a useless #line directive.
19391 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19392 * src/output.c (get_lines_number): New.
19393 (output_parser): Adjust, now takes care about the lines of a
19394 output muscles.
19395 Fix line numbering.
19396 (actions_output): Computes the number of lines taken by actions.
19397 (output_master_parser): Insert new skeleton which is the name of
19398 the output parser file name.
19399
19400 2001-12-15 Marc Autret <autret_m@epita.fr>
19401
19402 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19403
19404 2001-12-15 Marc Autret <autret_m@epita.fr>
19405
19406 * src/output.c (output_gram): Keep track of the hairy one.
19407
19408 2001-12-15 Akim Demaille <akim@epita.fr>
19409
19410 Make `make distcheck' work.
19411
19412 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19413 system.h which uses libgettext.h.
19414
19415 2001-12-15 Akim Demaille <akim@epita.fr>
19416
19417 * src/nullable.c (set_nullable): Useless rules must be skipped,
19418 otherwise, since we range over their symbols, we might look at a
19419 nonterminal which no longer ``exists'', i.e., it is not counted in
19420 `nvars', hence we overflow our arrays.
19421
19422 2001-12-15 Akim Demaille <akim@epita.fr>
19423
19424 The header can also be produced directly, without any obstack!
19425 Yahoo!
19426
19427 * src/files.c, src/files.h (defines_obstack): Remove.
19428 (compute_header_macro): Global.
19429 (defines_obstack_save): Remove.
19430 * src/reader.c (parse_union_decl): No longer output to
19431 defines_obstack: its content can be found in the `stype' muscle
19432 anyway.
19433 (output_token_translations): Merge into...
19434 (symbols_output): this.
19435 Rename as...
19436 (symbols_save): this.
19437 (reader): Adjust.
19438 * src/output.c (header_output): New.
19439 (output): Call it.
19440
19441 2001-12-15 Akim Demaille <akim@epita.fr>
19442
19443 * src/reader.c (parse_union_decl): Instead of handling two obstack
19444 simultaneously, use one to define the `stype' muscle, and use the
19445 value of the latter to fill defines_obstack.
19446 (copy_comment): Remove.
19447 (copy_comment2): Work for a single obstack.
19448 Rename as...
19449 (copy_comment): this.
19450
19451 2001-12-15 Akim Demaille <akim@epita.fr>
19452
19453 * src/lex.c, src/lex.h (xgetc): No longer static.
19454 * src/reader.c (parse_union_decl): Revamp.
19455
19456 2001-12-15 Akim Demaille <akim@epita.fr>
19457
19458 Still making progress in separating Bison into (i) input, (ii)
19459 process, (iii) output: now we can directly output the parser file
19460 without using table_obstack at all.
19461
19462 * src/files.c, src/files.h (table_obstack): Bye bye.
19463 (parser_file_name): New.
19464 * src/files.c (compute_output_file_names): Compute it.
19465 * src/output.c (actions_output, output_parser)
19466 (output_master_parser): To a file instead of an obstack.
19467
19468 2001-12-15 Akim Demaille <akim@epita.fr>
19469
19470 Attach actions to rules, instead of pre-outputting them to
19471 actions_obstack.
19472
19473 * src/gram.h (rule_t): action and action_line are new members.
19474 * src/reader.c (symbol_list): Likewise.
19475 (copy_action): Save the actions within the rule.
19476 (packgram): Save them in rule_table.
19477 * src/output.c (actions_output): New.
19478 (output_parser): Use it on `%%actions'.
19479 (output_rule_data): Don't free rule_table.
19480 (output): Do it.
19481 (prepare): Don't save the `action' muscle.
19482 * src/bison.simple: s/%%action/%%actions/.
19483
19484 2001-12-15 Akim Demaille <akim@epita.fr>
19485
19486 * src/reader.c (copy_action): When --yacc, don't append a `;'
19487 to the user action: let it fail if lacking.
19488 Suggested by Arnold Robbins and Tom Tromey.
19489
19490 2001-12-14 Akim Demaille <akim@epita.fr>
19491
19492 * src/lex.c (literalchar): Simply return the char you decoded, non
19493 longer mess around with obstacks and int pointers.
19494 Adjust all callers.
19495
19496 2001-12-14 Akim Demaille <akim@epita.fr>
19497
19498 * src/lex.c (literalchar): Don't escape the special characters,
19499 just decode them, and keep them as char (before, eol was output as
19500 the 2 char string `\n' etc.).
19501 * src/output.c (output_rule_data): Use quotearg to output the
19502 token strings.
19503
19504 2001-12-13 Paul Eggert <eggert@twinsun.com>
19505
19506 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19507 Do not infringe on the global user namespace when using C++.
19508 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19509 All uses of `fprintf' and `stderr' changed.
19510
19511 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19512
19513 2001-12-13 Akim Demaille <akim@epita.fr>
19514
19515 The computation of nullable is broken: it doesn't handle empty
19516 RHS's properly.
19517
19518 * tests/torture.at (GNU AWK Grammar): New.
19519 * tests/sets.at (Nullable): New.
19520 * src/nullable.c (set_nullable): Instead of blindly looping over
19521 `ritems', loop over the rules, and then over their rhs's.
19522
19523 Work around Autotest bugs.
19524
19525 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19526 frame, because Autotest understand lines starting with a `+' as
19527 traces from the shell. Then, they are not processed properly.
19528 Admittedly an Autotest bug, but we don't have time to wait for
19529 Autotest to catch up.
19530 * tests/regression.at (Broken Closure): Adjust to the new table
19531 frames.
19532 Move to...
19533 * tests/sets.at: here.
19534
19535 2001-12-13 Akim Demaille <akim@epita.fr>
19536
19537 * src/closure.c (closure): Use nrules instead of playing tricks
19538 with BITS_PER_WORD.
19539
19540 2001-12-13 Akim Demaille <akim@epita.fr>
19541
19542 * src/print.c (print_actions): Output the handling of `$' as the
19543 traces do: shifting the token EOF. Before EOF was treated as a
19544 nonterminal.
19545 * tests/regression.at: Adjust some tests.
19546 * src/print_graph.c (print_core): Complete the set of items via
19547 closure. The next-to-final and final states are still unsatisfying,
19548 but that's to be addressed elsewhere.
19549 No longer output the rule numbers, but do output the state number.
19550 A single loop for the shifts + gotos is enough, but picked a
19551 distinct color for each.
19552 (print_graph): Initialize and finalize closure.
19553
19554 2001-12-13 Akim Demaille <akim@epita.fr>
19555
19556 * src/reader.c (readgram): Remove dead code, an strip useless
19557 braces.
19558 (get_type): Remove, unused.
19559
19560 2001-12-12 Akim Demaille <akim@epita.fr>
19561
19562 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19563 on that of lib/error.c.
19564
19565 2001-12-12 Akim Demaille <akim@epita.fr>
19566
19567 Some hosts don't like `/' in includes.
19568
19569 * src/system.h: Include libgettext.h without qualifying the path.
19570 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19571 $(top_srcdir).
19572
19573 2001-12-11 Marc Autret <autret_m@epita.fr>
19574
19575 * src/output.c (output_parser): Remove useless muscle.
19576
19577 2001-12-11 Marc Autret <autret_m@epita.fr>
19578
19579 * src/bison.simple: Remove #line just before %%epilogue. It
19580 is now handled in ...
19581 * src/reader.c (read_additionnal_code): Add the output of a
19582 #line for the epilogue.
19583
19584 2001-12-10 Marc Autret <autret_m@epita.fr>
19585
19586 * src/reader.c (copy_definition): Re-use CPP-outed code which
19587 replace precedent remove.
19588 * src/bison.simple: Remove #line before %%prologue because
19589 %%input-line is wrong at this time.
19590
19591 2001-12-10 Marc Autret <autret_m@epita.fr>
19592
19593 * src/reader.c (symbols_output): Clean up.
19594 * src/output.c (output_gram, output): Clean up.
19595
19596 2001-12-10 Akim Demaille <akim@epita.fr>
19597
19598 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19599 * src/LR0.c (set_state_table): here.
19600 * src/lalr.c (lalr): Call it.
19601
19602 2001-12-10 Akim Demaille <akim@epita.fr>
19603
19604 * src/state.h (shifts): Remove the `number' member: shifts are
19605 attached to state, hence no longer need to be labelled with a
19606 state number.
19607
19608 2001-12-10 Akim Demaille <akim@epita.fr>
19609
19610 Now that states have a complete set of members, the linked list of
19611 shifts is useless: just fill directly the state's shifts member.
19612
19613 * src/state.h (shifts): Remove the `next' member.
19614 * src/LR0.c (first_state, last_state): Remove.
19615 Adjust the callers.
19616 (augment_automaton): Don't look for the shifts that must be added
19617 a shift on EOF: it is those of the state we looked for! But now,
19618 since shifts are attached, it is no longer needed to looking
19619 merely by its id: its number.
19620
19621 2001-12-10 Akim Demaille <akim@epita.fr>
19622
19623 * src/LR0.c (augment_automaton): Better variable locality.
19624 Remove an impossible branch: if there is a state corresponding to
19625 the start symbol being shifted, then there is shift for the start
19626 symbol from the initial state.
19627
19628 2001-12-10 Akim Demaille <akim@epita.fr>
19629
19630 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19631 only when appropriate: when insert_start_shifting_state' is not
19632 invoked.
19633 * tests/regression.at (Rule Line Numbers): Adjust.
19634
19635 2001-12-10 Akim Demaille <akim@epita.fr>
19636
19637 * src/LR0.c (augment_automaton): Now that all states have shifts,
19638 merge the two cases addition shifts to the initial state.
19639
19640 2001-12-10 Akim Demaille <akim@epita.fr>
19641
19642 * src/lalr.c (set_state_table): Move to...
19643 * src/LR0.c: here.
19644 * src/lalr.c (lalr): Don't call it...
19645 * src/LR0.c (generate_states): do it.
19646 * src/LR0.h (first_state): Remove, only the table is used.
19647
19648 2001-12-10 Akim Demaille <akim@epita.fr>
19649
19650 * src/LR0.h (first_shift, first_reduction): Remove.
19651 * src/lalr.c: Don't use first_shift: find shifts through the
19652 states.
19653
19654 2001-12-10 Akim Demaille <akim@epita.fr>
19655
19656 * src/LR0.c: Attach shifts to states as soon as they are
19657 computed.
19658 * src/lalr.c (set_state_table): Instead of assigning shifts to
19659 state, just assert that the mapping was properly done.
19660
19661 2001-12-10 Akim Demaille <akim@epita.fr>
19662
19663 * src/LR0.c (insert_start_shift): Rename as...
19664 (insert_start_shifting_state): this.
19665 (insert_eof_shifting_state, insert_accepting_state): New.
19666 (augment_automaton): Adjust.
19667 Better locality of the variables.
19668 When looking if the start_symbol is shifted from the initial
19669 state, using `while (... symbol != start_symbol ...)' sounds
19670 better than `while (... symbol < start_symbol ...)': If fail
19671 to see how the order between symbols could be relevant!
19672
19673 2001-12-10 Akim Demaille <akim@epita.fr>
19674
19675 * src/getargs.h: Don't declare `spec_name_prefix' and
19676 `spec_file_prefix', declared by src/files.h.
19677 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19678 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19679 * src/output.c (prepare): Adjust.
19680 * src/reader.c (symbols_output): Likewise.
19681 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19682
19683 2001-12-10 Akim Demaille <akim@epita.fr>
19684
19685 * src/muscle_tab.c (muscle_init): NULL is a better default than
19686 `"0"'.
19687
19688 2001-12-10 Akim Demaille <akim@epita.fr>
19689
19690 * src/reader.c (reader): Calling symbols_output once is enough.
19691
19692 2001-12-10 Akim Demaille <akim@epita.fr>
19693
19694 Now that states have a complete set of members, the linked list of
19695 reductions is useless: just fill directly the state's reductions
19696 member.
19697
19698 * src/state.h (struct reductions): Remove member `number' and
19699 `next'.
19700 * src/LR0.c (first_reduction, last_reduction): Remove.
19701 (save_reductions): Don't link the new reductions, store them in
19702 this_state.
19703 * src/lalr.c (set_state_table): No need to attach reductions to
19704 states, it's already done.
19705 * src/output.c (output_actions): No longer free the shifts, then
19706 the reductions, then the states: free all the states and their
19707 members.
19708
19709 2001-12-10 Akim Demaille <akim@epita.fr>
19710
19711 * src/options.c (OPTN, DRTV, BOTH): New.
19712 (option_table): Use them.
19713
19714 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19715 the job of system.h.
19716 * src/options.c: Don't include stdio.h and xalloc.h for the same
19717 reasons.
19718
19719 2001-12-10 Akim Demaille <akim@epita.fr>
19720
19721 * src/output.c (output, prepare): Make sure the values of the
19722 muscles `action' and `prologue' are 0-terminated.
19723
19724 2001-12-10 Akim Demaille <akim@epita.fr>
19725
19726 Clean up GCC warnings.
19727
19728 * src/reader.c (copy_action): `buf' is not used.
19729 (parse_skel_decl): Be static.
19730 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19731 * src/options.h (create_long_option_table): Have a real prototype.
19732 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19733 (hash_delete_at): Return const void *.
19734 Adjust casts to preserve the const.
19735
19736 2001-12-10 Akim Demaille <akim@epita.fr>
19737
19738 * configure.in: Require 2.52g.
19739 M4 is not needed, but AUTOM4TE is.
19740 * m4/m4.m4: Remove.
19741 * tests/Makefile.am: Adjust.
19742
19743 2001-12-10 Akim Demaille <akim@epita.fr>
19744
19745 One structure for states is enough, even though theoretically
19746 there are LR(0) states and LALR(1) states.
19747
19748 * src/lalr.h (state_t): Remove.
19749 (state_table): Be state_t **, not state_t *.
19750 * src/state.h (core, CORE_ALLOC): Rename as...
19751 (state_t, STATE_ALLOC): this.
19752 Add the LALR(1) members: shifts, reductions, errs.
19753 * src/LR0.c (state_table): Rename as...
19754 (state_hash): this, to avoid name clashes with the global
19755 `state_table'.
19756 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19757 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19758
19759 2001-12-10 Akim Demaille <akim@epita.fr>
19760
19761 Bison dumps core on bash.y.
19762 Reported by Pascal Bart.
19763
19764 * src/warshall.c (bitmatrix_print): New.
19765 (TC): Use it.
19766 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19767 j must be the outer loop.
19768 * tests/regression.at (Broken Closure): New.
19769
19770 2001-12-05 Akim Demaille <akim@epita.fr>
19771
19772 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19773 its argument.
19774 Reported by Peter Hamorsky.
19775
19776 2001-12-05 Akim Demaille <akim@epita.fr>
19777
19778 * src/conflicts.c (err_table): Remove.
19779 (resolve_sr_conflict): Adjust.
19780 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19781 Rename as...
19782 (state_t.reductions, state_t.shifts): this.
19783
19784 2001-12-05 Akim Demaille <akim@epita.fr>
19785
19786 * src/reduce.c (reduce_grammar_tables): No longer disable the
19787 removal of useless rules via CPP but via `if (0)', so that the
19788 compiler still check the code is valid.
19789 For instance, it should have noticed `rline' no longer exists: use
19790 the `line' member of rule_t.
19791 * src/gram.c (dummy, rline): Remove, unused.
19792
19793 2001-12-05 Akim Demaille <akim@epita.fr>
19794
19795 * src/output.c (pack_vector): Use assert, not berror.
19796 * src/main.c (berror): Remove, unused.
19797
19798 2001-12-05 Akim Demaille <akim@epita.fr>
19799
19800 New experimental feature: if --verbose --trace output all the
19801 items of a state, not only its kernel.
19802
19803 * src/print.c (print_core): If `trace_flag', then invoke closure
19804 before outputting the items of the state (print_core is no longer
19805 a correct name them).
19806 (print_results): Invoke new_closure/free_closure if needed.
19807
19808 2001-12-05 Akim Demaille <akim@epita.fr>
19809
19810 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19811 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19812 (nitemset): for consistency with the rest of the project.
19813
19814 2001-12-05 Akim Demaille <akim@epita.fr>
19815
19816 * src/closure.c (print_closure): Improve.
19817 (closure): Use it for printing input and output.
19818
19819 2001-12-05 Akim Demaille <akim@epita.fr>
19820
19821 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19822 indexed by nonterminals.
19823
19824 2001-12-05 Akim Demaille <akim@epita.fr>
19825
19826 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19827 what it was!).
19828 * src/warshall.h: Remove accidental duplication of the content.
19829
19830 2001-12-05 Akim Demaille <akim@epita.fr>
19831
19832 * src/closure.c (set_fderives): De-obfuscate.
19833
19834 2001-12-05 Akim Demaille <akim@epita.fr>
19835
19836 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19837
19838 2001-12-05 Akim Demaille <akim@epita.fr>
19839
19840 * src/closure.c (set_firsts): De-obfuscate.
19841
19842 2001-12-05 Akim Demaille <akim@epita.fr>
19843
19844 * src/output.c (action_row): De-obfuscate
19845 using the good o' techniques: arrays not pointers, variable
19846 locality, BITISSET, RESETBIT etc.
19847
19848 2001-12-05 Akim Demaille <akim@epita.fr>
19849
19850 Pessimize the code to simplify it: from now on, all the states
19851 have a valid SHIFTS, which NSHIFTS is possibly 0.
19852
19853 * src/LR0.c (shifts_new): Be global and move to..
19854 * src/state.c, src/state.h: here.
19855 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19856 * src/print_graph: Adjust.
19857
19858 2001-12-05 Akim Demaille <akim@epita.fr>
19859
19860 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19861 * src/conflicts.c: Use it.
19862 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19863 incorrectly ``simplified''.
19864
19865 2001-12-05 Akim Demaille <akim@epita.fr>
19866
19867 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19868 using the good o' techniques: arrays not pointers, variable
19869 locality, BITISSET, RESETBIT etc.
19870
19871 2001-12-05 Akim Demaille <akim@epita.fr>
19872
19873 * src/state.h (SHIFT_SYMBOL): New.
19874 * src/conflicts.c: Use it to deobfuscate.
19875
19876 2001-12-05 Akim Demaille <akim@epita.fr>
19877
19878 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19879 (print_reductions): De-obfuscate using the good o' techniques:
19880 arrays not pointers, variable locality, BITISSET.
19881
19882 2001-12-05 Akim Demaille <akim@epita.fr>
19883
19884 * src/conflicts.c (print_reductions): Arrays, not pointers.
19885 Use BITISSET.
19886
19887 2001-12-05 Akim Demaille <akim@epita.fr>
19888
19889 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19890
19891 2001-12-05 Akim Demaille <akim@epita.fr>
19892
19893 * src/conflicts.c (print_reductions): Improve variable locality.
19894
19895 2001-12-05 Akim Demaille <akim@epita.fr>
19896
19897 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19898
19899 2001-12-05 Akim Demaille <akim@epita.fr>
19900
19901 * src/conflicts.c (print_reductions): Improve variable locality.
19902
19903 2001-12-05 Akim Demaille <akim@epita.fr>
19904
19905 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19906 * src/lalr.c: Use them.
19907
19908 2001-12-05 Akim Demaille <akim@epita.fr>
19909
19910 * src/LR0.c (augment_automaton): Formatting changes.
19911 Better variable locality.
19912
19913 2001-12-05 Akim Demaille <akim@epita.fr>
19914
19915 * src/lalr.c (matrix_print): New.
19916 (transpose): Use it.
19917 Use arrays instead of pointers.
19918
19919 2001-12-05 Akim Demaille <akim@epita.fr>
19920
19921 * src/lalr.c (maxrhs): Move to...
19922 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19923 * src/lalr.c (build_relations): Adjust.
19924
19925 2001-12-05 Akim Demaille <akim@epita.fr>
19926
19927 * src/lalr.c (transpose): Free the memory allocated to the
19928 argument, as it is replaced by the results by the unique caller.
19929 (build_relations): Merely invoke transpose: it handles the memory
19930 deallocation.
19931 Improve variable locality.
19932 Avoid variables used as mere abbreviations.
19933 (compute_lookaheads): Use arrays instead of pointers.
19934
19935 2001-12-05 Akim Demaille <akim@epita.fr>
19936
19937 * src/lalr.c (initialize_F): Improve variable locality.
19938 Avoid variables used as mere abbreviations.
19939
19940 2001-12-05 Akim Demaille <akim@epita.fr>
19941
19942 * src/derives.c (print_derives): Display the ruleno.
19943 * src/lalr.c (initialize_F, transpose): Better variable locality
19944 to improve readability.
19945 Avoid variables used as mere abbreviations.
19946
19947 2001-12-05 Akim Demaille <akim@epita.fr>
19948
19949 * src/lalr.c (traverse): Use arrays instead of pointers.
19950
19951 2001-12-05 Akim Demaille <akim@epita.fr>
19952
19953 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19954 the handling of squeue.
19955 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19956
19957 2001-12-05 Akim Demaille <akim@epita.fr>
19958
19959 Because useless nonterminals are now kept alive (instead of being
19960 `destroyed'), we now sometimes examine them, and store information
19961 related to them. Hence we need to know their number, and adjust
19962 memory allocations.
19963
19964 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19965 static.
19966 * src/LR0.c (allocate_itemsets): The memory allocated to
19967 `symbol_count' was used for two different purpose: once to count
19968 the number of occurrences of each symbol, and later reassigned to
19969 `shift_symbol', containing the symbol that can be shifted from a
19970 given state.
19971 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19972 only, and...
19973 (new_itemsets): Allocate `shift_symbol' here.
19974 (allocate_itemsets): symbol_count includes useless nonterminals.
19975 Make room for them.
19976 (free_storage): Use `free', not `XFREE', for pointers that cannot
19977 be null.
19978
19979 2001-12-05 Akim Demaille <akim@epita.fr>
19980
19981 * src/nullable.c (set_nullable): Deobfuscate the handling of
19982 ritem.
19983 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19984
19985 2001-12-05 Akim Demaille <akim@epita.fr>
19986
19987 * src/gram.c, src/gram.h (ritem_print): New.
19988 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19989 (This useless function was defined only to work around VMS linkers
19990 that can't handle compilation units with variables only).
19991 * src/reduce.c (dump_grammar): Use it to trace the construction of
19992 ritem.
19993
19994 2001-12-04 Paul Eggert <eggert@twinsun.com>
19995
19996 * src/bison.simple (union yyalloc): Change member names
19997 to be the same as the stack names.
19998 (yyparse): yyptr is now union yyalloc *, not char *.
19999 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20000 and may generate better code on some machines.
20001 (yystpcpy): Use prototype if __STDC__ is defined, not just
20002 if __cplusplus is defined.
20003
20004 2001-11-30 Akim Demaille <akim@epita.fr>
20005
20006 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20007 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20008 Gettext doesn't compile cleanly, and dies with -Werror.
20009 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20010 Include WARNING_CFLAGS here.
20011 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20012 before being defined.
20013
20014 2001-11-27 Paul Eggert <eggert@twinsun.com>
20015
20016 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20017 First arg is int, not unsigned.
20018 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20019 (SIZE_MAX, UINT_MAX): New macros.
20020 (quotearg_n_options): Abort if N is negative.
20021 Avoid overflow check on hosts where size_t is 64 bits and int
20022 is 32 bits, as overflow is impossible there.
20023 Fix off-by-one typo that caused unnecessary reallocation.
20024
20025 2001-11-29 Paul Eggert <eggert@twinsun.com>
20026
20027 Name space cleanup in generated parser.
20028
20029 * doc/bison.texinfo (Bison Parser): Discuss system headers
20030 and their effect on the user name space.
20031
20032 * src/bison.simple:
20033 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20034 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20035 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20036
20037 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20038 on user names when possible.
20039
20040 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20041 Simplify test for whather <alloca.h> exists.
20042
20043 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20044
20045 (<stdio.h>): Include if YYDEBUG.
20046
20047 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20048 ! defined (yyoverflow) && ! defined (yymemcpy).
20049
20050 (yymemcpy, yyparse): Rename local variables as needed so that
20051 they all begin with 'yy'.
20052
20053 (yystrlen, yystpcpy): New functions.
20054
20055 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20056 All uses changed.
20057
20058 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20059 instead of relying on string.h functions. Use YYSTACK_ALLOC
20060 and YYSTACK_FREE instead of malloc and free.
20061
20062 2001-11-30 Akim Demaille <akim@epita.fr>
20063
20064 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20065 before their first uses.
20066 (YYBISON, YYPURE): Move to the top of the output.
20067
20068 2001-11-30 Akim Demaille <akim@epita.fr>
20069
20070 * tests/reduce.at (Useless Nonterminals): Fix.
20071
20072 2001-11-30 Akim Demaille <akim@epita.fr>
20073
20074 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20075 if body instead of `;' to pacify GCC's warnings.
20076
20077 2001-11-30 Akim Demaille <akim@epita.fr>
20078
20079 Instead of mapping the LHS of unused rules to -1, keep the LHS
20080 valid, but flag the rules as invalid.
20081
20082 * src/gram.h (rule_t): `useful' is a new member.
20083 * src/print.c (print_grammar): Adjust.
20084 * src/derives.c (set_derives): Likewise.
20085 * src/reader.c (packgram, reduce_output): Likewise.
20086 * src/reduce.c (reduce_grammar_tables): Likewise.
20087 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20088
20089 2001-11-30 Akim Demaille <akim@epita.fr>
20090
20091 * src/reduce.c (reduce_output): Formatting changes.
20092 * src/print.c (print_results, print_grammar): Likewise.
20093 * tests/regression.at (Rule Line Numbers)
20094 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20095
20096 2001-11-30 Akim Demaille <akim@epita.fr>
20097
20098 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20099 useless nonterminals, move them at the end of the symbol arrays.
20100 (reduce_output): Adjust.
20101 * tests/reduce.at (Useless Nonterminals): Adjust.
20102
20103 2001-11-30 Akim Demaille <akim@epita.fr>
20104
20105 * src/reduce.c: Various comment/formatting changes.
20106 (nonterminals_reduce): New, extracted from...
20107 (reduce_grammar_tables): here.
20108 (reduce_grammar): Call nonterminals_reduce.
20109
20110 2001-11-29 Paul Eggert <eggert@twinsun.com>
20111
20112 * src/bison.simple (YYSTACK_REALLOC): Remove.
20113 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20114 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20115 New macros.
20116 (union yyalloc): New type.
20117 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20118 an arbitrary restriction on hosts where size_t is wider than int.
20119
20120 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20121 a parser stack overflow. Allocate just one block of memory for all
20122 three stacks, instead of allocating three blocks; this typically is
20123 faster and reduces fragmentation.
20124
20125 Do not limit the number of items in the stack to a value that fits
20126 in 'int', as this is an arbitrary limit on hosts with 64-bit
20127 size_t and 32-bit int.
20128
20129 2001-11-29 Marc Autret <autret_m@epita.fr>
20130
20131 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20132 of defining YYERROR_VERBOSE.
20133 [AT_DATA]: $4 is now out of C declarations in the prologue.
20134
20135 2001-11-28 Marc Autret <autret_m@epita.fr>
20136
20137 * src/reader.c (parse_dquoted_param): New.
20138 (parse_skel_decl): Use it.
20139 * src/lex.h: Add its prototype.
20140 * src/lex.c (literalchar): Become not static.
20141
20142 2001-11-28 Marc Autret <autret_m@epita.fr>
20143
20144 * src/output.h: And put its extern declaration here.
20145 * src/output.c (error_verbose): Define here.
20146 (prepare): Echo name modification.
20147 * src/getargs.h: Clean its extern declaration.
20148 * src/getargs.c (error_verbose_flag): Remove.
20149 (getargs): Remove case 'e'.
20150 * src/options.c (option_table): 'error-verbose' is now seen as simple
20151 percent option.
20152 Include output.h.
20153
20154 * src/reader.c (read_declarations): Remove case tok_include.
20155 (parse_include_decl): Remove.
20156 * src/lex.h (token_t): Remove tok_include.
20157 * src/options.c (option_table): 'include' is now a simple command line
20158 option.
20159
20160 2001-11-28 Marc Autret <autret_m@epita.fr>
20161
20162 * src/bison.simple: Adjust muscle names.
20163 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20164 * src/output.c (prepare): s/_/-/ for the muscles names.
20165 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20166
20167 2001-11-28 Marc Autret <autret_m@epita.fr>
20168
20169 * src/bison.simple: Fix debug.
20170 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20171
20172 2001-11-28 Akim Demaille <akim@epita.fr>
20173
20174 * src/LR0.c (shifts_new): New.
20175 (save_shifts, insert_start_shift, augment_automaton): Use it.
20176
20177 2001-11-28 Akim Demaille <akim@epita.fr>
20178
20179 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20180 keep ruleno only.
20181
20182 2001-11-28 Akim Demaille <akim@epita.fr>
20183
20184 * src/closure.c (closure): Instead of looping over word in array
20185 then bits in words, loop over bits in array.
20186
20187 2001-11-28 Akim Demaille <akim@epita.fr>
20188
20189 * src/closure.c (closure): No longer optimize the special case
20190 where all the bits of `ruleset[r]' are set to 0, to make the code
20191 clearer.
20192
20193 2001-11-28 Akim Demaille <akim@epita.fr>
20194
20195 * src/closure.c (closure): `r' and `c' are new variables, used to
20196 de-obfuscate accesses to RULESET and CORE.
20197
20198 2001-11-28 Akim Demaille <akim@epita.fr>
20199
20200 * src/reduce.c (reduce_print): Use ngettext.
20201 (dump_grammar): Improve the trace accuracy.
20202
20203 2001-11-28 Akim Demaille <akim@epita.fr>
20204
20205 * src/reduce.c (dump_grammar): Don't translate trace messages.
20206
20207 2001-11-28 Akim Demaille <akim@epita.fr>
20208
20209 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20210 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20211 as all tags are free'ed afterwards.
20212 From Enrico Scholz.
20213
20214 2001-11-27 Paul Eggert <eggert@twinsun.com>
20215
20216 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20217 use alloca when we didn't want to, and vice versa.
20218
20219 2001-11-27 Marc Autret <autret_m@epita.fr>
20220
20221 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20222 initialization.
20223 * src/output.c (prepare): Remove its update.
20224
20225 2001-11-27 Marc Autret <autret_m@epita.fr>
20226
20227 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20228 Use %error-verbose.
20229
20230 2001-11-27 Marc Autret <autret_m@epita.fr>
20231
20232 * src/bison.simple: Remove YYERROR_VERBOSE using.
20233 Use %%error_verbose.
20234 (yyparse): Likewise.
20235 * src/output.c (prepare): Give its final value.
20236 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20237 * src/getargs.h: Add its extern declaration.
20238 * src/getargs.c (error_verbose_flag): New int.
20239 (getargs): Update to catch new case.
20240 * src/options.c (option_table): 'error-verbose' is a new option.
20241 (shortopts): Update.
20242
20243 2001-11-27 Akim Demaille <akim@epita.fr>
20244
20245 * src/system.h: Use intl/libgettext.h.
20246 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20247
20248 2001-11-27 Akim Demaille <akim@epita.fr>
20249
20250 * tests/torture.at (Exploding the Stack Size with Malloc):
20251 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20252
20253 2001-11-27 Akim Demaille <akim@epita.fr>
20254
20255 * src/files.c: Include error.h.
20256 Reported by Hans Aberg.
20257
20258 2001-11-26 Marc Autret <autret_m@epita.fr>
20259
20260 * src/reader.c (parse_include_decl): New, not yet implemented.
20261 (read_declarations): Add case tok_include.
20262 * src/getargs.h (include): Add its extern definition.
20263 * src/getargs.c (include): New const char *.
20264 (getargs): Add case '-I'.
20265 * src/options.c (option_table): Add include as command line and
20266 percent option.
20267 * src/lex.h (token_t): Add tok_include.
20268
20269 2001-11-26 Akim Demaille <akim@epita.fr>
20270
20271 * src/reader.c (readgram): Make sure rules for mid-rule actions
20272 have a lineno equal to that of their host rule.
20273 Reported by Hans Aberg.
20274 * tests/regression.at (Rule Line Numbers): New.
20275
20276 2001-11-26 Akim Demaille <akim@epita.fr>
20277
20278 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20279 size_ts.
20280
20281 2001-11-26 Akim Demaille <akim@epita.fr>
20282
20283 * src/complain.c, src/complain.h (error): Remove, provided by
20284 lib/error.[ch].
20285
20286 2001-11-26 Akim Demaille <akim@epita.fr>
20287
20288 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20289 issue an error message.
20290 * tests/regression.at (Invalid %directive): New.
20291 Reported by Hans Aberg.
20292
20293 2001-11-26 Akim Demaille <akim@epita.fr>
20294
20295 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20296 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20297
20298 2001-11-26 Akim Demaille <akim@epita.fr>
20299
20300 * src/conflicts.c (conflicts_print): Don't complain at all when
20301 there are no reduce/reduce conflicts, and as many shift/reduce
20302 conflicts as expected.
20303 * tests/regression.at (%expect right): Adjust.
20304
20305 2001-11-23 Akim Demaille <akim@epita.fr>
20306
20307 * lib/alloca.c: Update, from fileutils.
20308
20309 2001-11-23 Akim Demaille <akim@epita.fr>
20310
20311 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20312
20313 2001-11-23 Akim Demaille <akim@epita.fr>
20314
20315 * src/system.h: Include alloca.h.
20316 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20317
20318 2001-11-23 Akim Demaille <akim@epita.fr>
20319
20320 * src/print_graph.c (print_actions): Remove `rule', unused.
20321 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20322 pacify GCC's signed < unsigned warnings.
20323 * src/closure.c (itemsetsize): Likewise.
20324 * src/reader.c (symbol_list_new): Static.
20325
20326 2001-11-23 Akim Demaille <akim@epita.fr>
20327
20328 Attaching lineno to buckets is stupid, since only one copy of each
20329 symbol is kept, only the line of the first occurrence is kept too.
20330
20331 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20332 * src/reader.c (rline_allocated): Remove, unused.
20333 (symbol_list): Have a `line' member.
20334 (symbol_list_new): New.
20335 (readgram): Use it.
20336 * src/print.c (print_grammar): Output the rule line numbers.
20337 * tests/regression.at (Solved SR Conflicts)
20338 (Unresolved SR Conflicts): Adjust.
20339 Reported by Hans Aberg.
20340
20341 2001-11-22 Marc Autret <autret_m@epita.fr>
20342
20343 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20344
20345 2001-11-22 Marc Autret <autret_m@epita.fr>
20346
20347 * src/muscle_tab.c (muscle_init): Remove initialization of
20348 skeleton muscle.
20349 * src/output.c (output_master_parser): Do it here.
20350
20351 2001-11-20 Akim Demaille <akim@epita.fr>
20352
20353 * po/sv.po: New.
20354 * configure.in (ALL_LINGUAS): Adjust.
20355 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20356 longer contains strings to translate.
20357
20358 2001-11-19 Akim Demaille <akim@epita.fr>
20359
20360 * src/conflicts.c (conflicts_print): Add a missing \n.
20361
20362 2001-11-19 Akim Demaille <akim@epita.fr>
20363
20364 * src/nullable.c (nullable_print): New.
20365 (set_nullable): Call it when tracing.
20366 Better locality of variables.
20367
20368 2001-11-19 Akim Demaille <akim@epita.fr>
20369
20370 * src/print.c (print_actions): Better locality of variables.
20371
20372 2001-11-19 Akim Demaille <akim@epita.fr>
20373
20374 * src/derives.c (print_derives): Fix and enrich.
20375 * src/closure.c (print_fderives): Likewise.
20376
20377 2001-11-19 Akim Demaille <akim@epita.fr>
20378
20379 * src/closure.c (itemsetend): Remove, replaced with...
20380 (itemsetsize): new.
20381
20382 2001-11-19 Akim Demaille <akim@epita.fr>
20383
20384 * src/LR0.c (kernel_end): Remove, replaced with...
20385 (kernel_size): new.
20386
20387 2001-11-19 Akim Demaille <akim@epita.fr>
20388
20389 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20390 to clarify.
20391
20392 2001-11-19 Akim Demaille <akim@epita.fr>
20393
20394 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20395
20396 2001-11-19 Akim Demaille <akim@epita.fr>
20397
20398 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20399 trace messages.
20400 * src/LR0.c: Likewise.
20401 (allocate_itemsets): Use arrays instead of pointers to clarify.
20402
20403 2001-11-19 Akim Demaille <akim@epita.fr>
20404
20405 * src/getargs.c (statistics_flag): Replace with...
20406 (trace_flag): New.
20407 (longopts): Accept --trace instead of --statistics.
20408 * src/getargs.h, src/options.c: Adjust.
20409 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20410 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20411
20412 2001-11-19 Akim Demaille <akim@epita.fr>
20413
20414 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20415 pointers to clarify the code.
20416 (save_reductions, save_shifts): Factor common parts of alternatives.
20417
20418 2001-11-19 Akim Demaille <akim@epita.fr>
20419
20420 * src/LR0.c (new_state, get_state): Complete TRACE code.
20421 * src/closure.c: Include `reader.h' to get `tags', needed by the
20422 trace code.
20423 Rename the conditional DEBUG as TRACE.
20424 Output consistently TRACEs to stderr, not stdout.
20425 * src/derives.c: Likewise.
20426 * src/reduce.c: (inaccessable_symbols): Using if is better style
20427 than goto.
20428 Use `#if TRACE' instead of `#if 0' for tracing code.
20429
20430 2001-11-19 Akim Demaille <akim@epita.fr>
20431
20432 * src/system.h (LIST_FREE, shortcpy): New.
20433 * src/LR0.c: Use them.
20434 * src/output.c (free_itemsets, free_reductions, free_shifts):
20435 Remove, replaced by LIST_FREE.
20436
20437 2001-11-19 Akim Demaille <akim@epita.fr>
20438
20439 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20440 (REDUCTIONS_ALLOC): New.
20441 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20442 allocation.
20443
20444 2001-11-19 Akim Demaille <akim@epita.fr>
20445
20446 * src/LR0.c (new_state): Complete trace code.
20447 * src/nullable.c (set_nullable): Don't translate traces.
20448
20449 2001-11-19 Akim Demaille <akim@epita.fr>
20450
20451 * src/print_graph.c (print_core): Better locality of variables.
20452 * src/print.c (print_core): Likewise.
20453
20454 2001-11-19 Akim Demaille <akim@epita.fr>
20455
20456 * src/vcg.c: You do the output, so you are responsible of the
20457 handling of VCG syntax, in particular: use quotearg.
20458 * src/print_graph.c: Don't.
20459 (print_actions): Don't output the actions as part of the nodes,
20460 since that's the job of the edges.
20461 (print_state): Don't output by hand: fill the node description,
20462 and ask for its output.
20463
20464 2001-11-19 Akim Demaille <akim@epita.fr>
20465
20466 * src/bison.simple (yyparse): When verbosely reporting an error,
20467 no longer put additional quotes around token names.
20468 * tests/calc.at: Adjust.
20469
20470 2001-11-19 Akim Demaille <akim@epita.fr>
20471
20472 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20473 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20474 * src/output.c: Adjust.
20475
20476 2001-11-19 Akim Demaille <akim@epita.fr>
20477
20478 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20479 (rule_t): this.
20480 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20481
20482 2001-11-19 Akim Demaille <akim@epita.fr>
20483
20484 * src/gram.h (rule_t): New.
20485 (rule_table): New.
20486 (rrhs, rlhs): Remove, part of state_t.
20487 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20488 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20489 * src/reader.c, src/reduce.c: Adjust.
20490
20491 2001-11-19 Akim Demaille <akim@epita.fr>
20492
20493 * src/reader.c (symbols_output): New, extracted from...
20494 (packsymbols): Here.
20495 (reader): Call it.
20496
20497 2001-11-19 Akim Demaille <akim@epita.fr>
20498
20499 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20500 (maxrhs): this new function.
20501
20502 2001-11-19 Akim Demaille <akim@epita.fr>
20503
20504 * src/lalr.c (F): New macro to access the variable F.
20505 Adjust.
20506
20507 2001-11-19 Akim Demaille <akim@epita.fr>
20508
20509 * src/lalr.h (LA): New macro to access the variable LA.
20510 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20511 * src/lalr.c: Adjust.
20512
20513 2001-11-19 Akim Demaille <akim@epita.fr>
20514
20515 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20516 (set_state_table): handle the `lookaheads' members.
20517
20518 2001-11-19 Akim Demaille <akim@epita.fr>
20519
20520 * src/lalr.h (lookaheads): Removed array, whose contents is now
20521 a member of...
20522 (state_t): this structure.
20523 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20524 Adjust.
20525
20526 2001-11-19 Akim Demaille <akim@epita.fr>
20527
20528 * src/lalr.h (consistent): Removed array, whose contents is now
20529 a member of...
20530 (state_t): this structure.
20531 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20532 Adjust.
20533
20534 2001-11-19 Akim Demaille <akim@epita.fr>
20535
20536 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20537 contents are now members of...
20538 (state_t): this structure.
20539 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20540 Adjust.
20541
20542 2001-11-19 Akim Demaille <akim@epita.fr>
20543
20544 * src/lalr.h (state_t): New.
20545 (state_table): Be a state_t * instead of a core **.
20546 (accessing_symbol): Remove, part of state_t.
20547 * src/lalr.c: Adjust.
20548 (set_accessing_symbol): Merge into...
20549 (set_state_table): this.
20550 * src/print_graph.c, src/conflicts.c: Adjust.
20551
20552 2001-11-14 Akim Demaille <akim@epita.fr>
20553
20554 * tests/calc.at, tests/output.at, tests/regression.at,
20555 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20556 now the tests are run in private dirs, therefore AC_CLEANUP and
20557 family can be simplified to 0-ary.
20558 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20559 use abs. path to find config.h.
20560 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20561 stderr, there can be way too much random noise.
20562 Instead pass -Werror to GCC and rely on the exit status.
20563 Reported by Wolfram Wagner.
20564
20565 2001-11-14 Akim Demaille <akim@epita.fr>
20566
20567 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20568 defined only if yyoverflow is defined, to avoid `warning: unused
20569 variable `yyvs1''.
20570 Reported by The Test Suite.
20571
20572 2001-11-14 Akim Demaille <akim@epita.fr>
20573
20574 * src/print.c: Include reduce.h.
20575 Reported by Hans Aberg.
20576
20577 2001-11-14 Akim Demaille <akim@epita.fr>
20578
20579 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20580 Revert a previous patch: these are really const.
20581 * src/conflicts.c (conflict_report): Additional useless pair of
20582 braces to pacify GCC's warnings for `if () if () {} else {}'.
20583 * src/lex.c (parse_percent_token): Replace equal_offset with
20584 arg_offset.
20585 arg is const.
20586 Be sure to strdup `arg' when used, since there is no reason for
20587 token_buffer not to change.
20588
20589 2001-11-14 Akim Demaille <akim@epita.fr>
20590
20591 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20592 definition.
20593 * src/main.c (main): Use them.
20594 Suggested by Hans Aberg.
20595
20596 2001-11-12 Akim Demaille <akim@epita.fr>
20597
20598 * src/system.h (ngettext): Now that we use ngettext, be sure to
20599 provide a default definition when NLS are not used.
20600
20601 2001-11-12 Akim Demaille <akim@epita.fr>
20602
20603 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20604 Use @kbd to denote user input.
20605 (Language and Grammar): ANSIfy the example.
20606 Adjust its layout for info/notinfo.
20607 (Location Tracking Calc): Output error messages to stderr.
20608 Output locations in a more GNUtically correct way.
20609 Fix a couple of Englishos.
20610 Adjust @group/@end group pairs.
20611
20612 2001-11-12 Akim Demaille <akim@epita.fr>
20613
20614 %expect was not functioning at all.
20615
20616 * src/conflicts.c (expected_conflicts): Set to -1.
20617 (conflict_report): Use ngettext.
20618 (conflicts_print): Check %expect and make its violation an error.
20619 * doc/bison.texinfo (Expect Decl): Adjust.
20620 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20621 * tests/regression.at (%expect not enough, %expect right)
20622 (%expect too much): New.
20623
20624 2001-11-12 Akim Demaille <akim@epita.fr>
20625
20626 * tests/regression.at (Conflicts): Rename as...
20627 (Unresolved SR Conflicts): this.
20628 (Solved SR Conflicts): New.
20629
20630 2001-11-12 Akim Demaille <akim@epita.fr>
20631
20632 * src/reduce.c (print_results): Rename as...
20633 (reduce_output): This.
20634 Output to OUT, passed as argument, instead of output_obstack.
20635 (dump_grammar): Likewise.
20636 (reduce_free): New.
20637 Also free V1.
20638 (reduce_grammar): No longer call reduce_output, since...
20639 * src/print.c (print_results): do it.
20640 * src/main.c (main): Call reduce_free;
20641
20642 2001-11-12 Akim Demaille <akim@epita.fr>
20643
20644 * src/conflicts.c (print_reductions): Accept OUT as argument.
20645 Output to it, not to output_obstack.
20646 * src/print.c (print_actions): Adjust.
20647
20648 2001-11-12 Akim Demaille <akim@epita.fr>
20649
20650 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20651 the result instead of using...
20652 (src_total, rrc_total, src_count, rrc_count): Remove.
20653 (any_conflicts): Remove.
20654 (print_conflicts): Split into...
20655 (conflicts_print, conflicts_output): New.
20656 * src/conflicts.h: Adjust.
20657 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20658 * src/print.c (print_grammar): Issue `\n' between two rules.
20659 * tests/regression.at (Conflicts): New.
20660 Reported by Tom Lane.
20661
20662 2001-11-12 Akim Demaille <akim@epita.fr>
20663
20664 * tests/regression.at (Invalid input): Remove, duplicate with
20665 ``Invalid input: 1''.
20666
20667 2001-11-12 Akim Demaille <akim@epita.fr>
20668
20669 * tests/torture.at (AT_DATA_STACK_TORTURE)
20670 (Exploding the Stack Size with Alloca)
20671 (Exploding the Stack Size with Malloc): New.
20672
20673 2001-11-12 Akim Demaille <akim@epita.fr>
20674
20675 * src/bison.simple (YYSTACK_REALLOC): New.
20676 (yyparse) [!yyoverflow]: Use it and free the old stack.
20677 Reported by Per Allansson.
20678
20679 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20680
20681 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20682 define CPP macro, which substitute YYSTYPE by yystype.
20683 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20684 with yyltype/YYLTYPE. This allows inclusion of the generated
20685 header within the parser if the compiler, such as GGC, accepts
20686 multiple equivalent #defines.
20687 From Akim.
20688
20689 2001-11-05 Akim Demaille <akim@epita.fr>
20690
20691 * src/reader.c (symbols_output): New, extracted from...
20692 (packsymbols): here.
20693 (reader): Adjust.
20694
20695 2001-11-05 Akim Demaille <akim@epita.fr>
20696
20697 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20698
20699 2001-11-05 Akim Demaille <akim@epita.fr>
20700
20701 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20702 pattern.
20703
20704 2001-11-05 Akim Demaille <akim@epita.fr>
20705
20706 * src/options.h (struct option_table_struct): set_flags is void*.
20707 * src/options.c (longopts): Support `--output' and `%output'.
20708 (usage): Adjust.
20709 * src/lex.h (tok_setopt): Remove, replaced with...
20710 (tok_intopt, tok_stropt): these new guys.
20711 * src/lex.c (getopt.h): Not needed.
20712 (token_buffer, unlexed_token_buffer): Not const.
20713 (percent_table): Promote `-' over `_' in directive names.
20714 Active `%name-prefix', `file-prefix', and `output'.
20715 (parse_percent_token): Accept possible arguments to directives.
20716 Promote `-' over `_' in directive names.
20717
20718 2001-11-04 Akim Demaille <akim@epita.fr>
20719
20720 * doc/bison.texinfo (Decl Summary): Split the list into
20721 `directives for grammars' and `directives for bison'.
20722 Sort'em.
20723 Add description of `%name-prefix', `file-prefix', and `output'.
20724 Promote `-' over `_' in directive names.
20725 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20726 Simplify the description of `--name-prefix'.
20727 Promote `-' over `_' in directive names.
20728 Promote `--output' over `--output-file'.
20729 Fix the description of `--defines'.
20730 * tests/output.at: Exercise %file-prefix and %output.
20731
20732 2001-11-02 Akim Demaille <akim@epita.fr>
20733
20734 * doc/refcard.tex: Update.
20735
20736 2001-11-02 Akim Demaille <akim@epita.fr>
20737
20738 * src/symtab.h (SUNDEF): New.
20739 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20740 stand for `uninitialized', instead of 0.
20741 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20742 * src/lex.c (lex): Adjust.
20743
20744 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20745 Number it 0.
20746 Let yylex return it instead of a plain 0.
20747 Reported by Dick Streefland.
20748
20749 2001-11-02 Akim Demaille <akim@epita.fr>
20750
20751 * tests/regression.at (Mixing %token styles): New test.
20752
20753 2001-11-02 Akim Demaille <akim@epita.fr>
20754
20755 * src/reader.c (parse_thong_decl): Formatting changes.
20756 (token_translations_init): New, extracted from...
20757 (packsymbols): Here.
20758 Adjust.
20759
20760 2001-11-01 Akim Demaille <akim@epita.fr>
20761
20762 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20763 Check that `9foo.y' produces correct cpp guards.
20764 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20765 guards.
20766 Reported by Wwp.
20767
20768 2001-11-01 Akim Demaille <akim@epita.fr>
20769
20770 * tests/regression.at (Invalid input: 2): New.
20771 * src/lex.c (unlexed_token_buffer): New.
20772 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20773 too.
20774 Reported by Wwp.
20775
20776 2001-11-01 Akim Demaille <akim@epita.fr>
20777
20778 * tests/calc.at: Catch up with 1.30.
20779 * configure.in: Bump to 1.49a.
20780 Adjust to newer Autotest.
20781
20782 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20783
20784 * src/conflicts.c: Move global variables rrc_total and src_total ...
20785 (print_conflicts): here.
20786 * src/output.c (output): Free global variable user_toknums.
20787 * src/lex.c (token_obstack): Become static.
20788
20789 2001-10-18 Akim Demaille <akim@epita.fr>
20790
20791 * tests/atlocal.in (GCC): Add.
20792 * tests/calc.at: s/m4_match/m4_bmatch/.
20793 s/m4_patsubst/m4_bpatsubst/.
20794 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20795 * configure.in: AC_SUBST(GCC).
20796
20797 2001-10-14 Marc Autret <autret_m@epita.fr>
20798
20799 * src/options.c (create_long_option_table): Fix.
20800
20801 2001-10-10 Akim Demaille <akim@epita.fr>
20802
20803 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20804
20805 2001-10-04 Akim Demaille <akim@epita.fr>
20806
20807 * src/reader.c (parse_union_decl): Push the caracters in
20808 union_obstack, not attrs_obstack.
20809
20810 2001-10-04 Akim Demaille <akim@epita.fr>
20811
20812 Merge in the branch 1.29.
20813
20814 * src/reader.c (packsymbols): Use a temporary obstack for
20815 `%%tokendef', since output_stack is already used elsewhere.
20816
20817 2001-10-02 Akim Demaille <akim@epita.fr>
20818
20819 Bump 1.29d.
20820
20821 2001-10-02 Akim Demaille <akim@epita.fr>
20822
20823 Version 1.29c.
20824
20825 2001-10-02 Akim Demaille <akim@epita.fr>
20826
20827 * tests/regression.at (Invalid CPP headers): New.
20828 From Alexander Belopolsky.
20829 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20830
20831 2001-10-02 Akim Demaille <akim@epita.fr>
20832
20833 * tests/regression.at (Invalid input): New.
20834 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20835 Reported by Shura.
20836
20837 2001-10-02 Akim Demaille <akim@epita.fr>
20838
20839 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20840
20841 2001-10-02 Akim Demaille <akim@epita.fr>
20842
20843 * src/output.c (output_parser): Assert `skeleton'.
20844 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20845 systems.
20846 From Shura.
20847
20848 2001-10-01 Marc Autret <autret_m@epita.fr>
20849
20850 * src/lex.h: Echo modifications.
20851 * src/lex.c (unlex): Parameter is now token_t.
20852 From Hans Aberg.
20853
20854 2001-10-01 Marc Autret <autret_m@epita.fr>
20855
20856 * src/main.c: Include lex.h.
20857 From Hans Aberg.
20858
20859 2001-09-29 Akim Demaille <akim@epita.fr>
20860
20861 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20862
20863 2001-09-28 Akim Demaille <akim@epita.fr>
20864
20865 * tests/testsuite.at: Update to newer Autotest.
20866 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20867
20868 2001-09-27 Akim Demaille <akim@epita.fr>
20869
20870 Position independent wrapper.
20871
20872 * tests/bison: Remove.
20873 * tests/bison.in: New.
20874 * configure.in: Adjust.
20875
20876 2001-09-27 Paul Eggert <eggert@twinsun.com>
20877
20878 Port quotearg fixes from tar 1.13.24.
20879
20880 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20881 tm to be declared.
20882 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20883 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20884
20885 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20886 * m4/mbrtowc.m4: New file.
20887 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20888 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20889
20890 2001-09-27 Akim Demaille <akim@epita.fr>
20891
20892 Bump to 1.29c.
20893
20894 2001-09-27 Akim Demaille <akim@epita.fr>
20895
20896 Version 1.29b.
20897
20898 2001-09-25 Akim Demaille <akim@epita.fr>
20899
20900 * src/system.h: Include `xalloc.h'.
20901 Remove it from the C files.
20902 * src/files.c (output_files): Free the obstacks.
20903 * src/lex.c (init_lex): Rename as...
20904 (lex_init): this.
20905 (lex_free): New.
20906 * src/main.c (main): Use it.
20907
20908 2001-09-24 Marc Autret <autret_m@epita.fr>
20909
20910 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20911 to output informations in fout (FILE*).
20912 (open_graph, close_graph): Likewise.
20913 (output_graph, output_edge, output_node): Likewise.
20914 * src/vcg.h: Update function prototypes.
20915 * src/print_graph.c (print_graph): Open output graph file.
20916 (print_actions): Adjust.
20917 * src/files.h: Remove extern declaration.
20918 * src/files.c: Remove graph_obstack declaration.
20919 (open_files): Remove graph_obstack initialization.
20920 (output_files): Remove graph_obstack saving.
20921
20922 2001-09-24 Marc Autret <autret_m@epita.fr>
20923
20924 * src/files.c (compute_output_file_names): Fix.
20925
20926 2001-09-24 Marc Autret <autret_m@epita.fr>,
20927 Akim Demaille <akim@epita.fr>
20928
20929 * src/reader.c (reader): Remove call to free_symtab ().
20930 * src/main.c (main): Call it here.
20931 Include symtab.h.
20932 * src/conflicts.c (initialize_conflicts): Rename as...
20933 (solve_conflicts): this.
20934 * src/print.c (print_core, print_actions, print_state)
20935 (print_grammar): Dump to a file instead a `output_obstack'.
20936 (print_results): Dump `output_obstack', and then proceed with the
20937 FILE *.
20938 * src/files.c (compute_output_file_names, close_files): New.
20939 (output_files): Adjust.
20940 * src/main.c (main): Adjust.
20941
20942 2001-09-23 Marc Autret <autret_m@epita.fr>
20943
20944 * src/files.c (compute_header_macro): Computes header macro name
20945 from spec_defines_file when given.
20946
20947 2001-09-23 Marc Autret <autret_m@epita.fr>
20948
20949 * src/files.c (output_files): Add default extensions.
20950
20951 2001-09-22 Akim Demaille <akim@epita.fr>
20952
20953 * src/conflicts.c (finalize_conflicts): Rename as...
20954 (free_conflicts): this.
20955
20956 2001-09-22 Akim Demaille <akim@epita.fr>
20957
20958 * src/gram.c (gram_free): Rename back as...
20959 (dummy): this.
20960 (output_token_translations): Free `token_translations'.
20961 * src/symtab.c (free_symtab): Free the tag field.
20962
20963 2001-09-22 Akim Demaille <akim@epita.fr>
20964
20965 Remove `translations' as it is always set to true.
20966
20967 * src/gram.h: Adjust.
20968 * src/reader.c (packsymbols, parse_token_decl): Adjust
20969 * src/print.c (print_grammar): Adjust.
20970 * src/output.c (output_token_translations): Adjust.
20971 * src/lex.c (lex): Adjust.
20972 * src/gram.c: Be sure the set pointers to NULL.
20973 (dummy): Rename as...
20974 (gram_free): this.
20975
20976 2001-09-22 Akim Demaille <akim@epita.fr>
20977
20978 * configure.in: Invoke AM_LIB_DMALLOC.
20979 * src/system.h: Use dmalloc.
20980 * src/LR0.c: Be sure to have pointers initialized to NULL.
20981 (allocate_itemsets): Allocate kernel_items only if needed.
20982
20983 2001-09-22 Akim Demaille <akim@epita.fr>
20984
20985 * configure.in: Bump to 1.29b.
20986 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20987 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20988 need xmalloc.c in calc.y.
20989 From Pascal Bart.
20990
20991 2001-09-21 Akim Demaille <akim@epita.fr>
20992
20993 Version 1.29a.
20994 * Makefile.maint, config/config.guess, config/config.sub,
20995 * config/missing: Update from masters.
20996 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20997 upon package.m4.
20998 * configure.in (ALL_LINGUAS): Add `tr'.
20999
21000 2001-09-21 Akim Demaille <akim@epita.fr>
21001
21002 * tests/Makefile.am (package.m4): Move to...
21003 ($(srcdir)/$(TESTSUITE)): here.
21004
21005 2001-09-20 Akim Demaille <akim@epita.fr>
21006
21007 * src/complain.c: No longer try to be standalone: use system.h.
21008 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21009 * src/complain.h: Likewise.
21010 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21011 Remove the unused variable `n'.
21012 From Albert Chin-A-Young.
21013
21014 2001-09-18 Marc Autret <autret_m@epita.fr>
21015
21016 * doc/bison.1: Update.
21017 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21018 descriptions.
21019 (Option Cross Key): Update.
21020 Add --graph.
21021
21022 2001-09-18 Marc Autret <autret_m@epita.fr>
21023
21024 * tests/regression.at: New test (comment in %union).
21025
21026 2001-09-18 Marc Autret <autret_m@epita.fr>
21027
21028 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21029 do that.
21030 Reported by Keith Browne.
21031
21032 2001-09-18 Marc Autret <autret_m@epita.fr>
21033
21034 * tests/output.at: Add tests for --defines and --graph.
21035
21036 2001-09-18 Marc Autret <autret_m@epita.fr>
21037
21038 * tests/output.at: Removes tests of %{header,src}_extension features.
21039
21040 2001-09-18 Akim Demaille <akim@epita.fr>
21041
21042 * tests/Makefile.am (package.m4): New.
21043 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21044 (_AT_CHECK_CALC_ERROR): Likewise.
21045 Factor the `, ' part of verbose error messages.
21046
21047 2001-09-18 Marc Autret <autret_m@epita.fr>
21048
21049 * src/getargs.c (longopts): Declare --defines and --graph as options
21050 with optional arguments.
21051 * src/files.h: Add extern declarations.
21052 * src/files.c (spec_graph_file, spec_defines_file): New.
21053 (output_files): Update.
21054 Remove CPP-outed code.
21055
21056 2001-09-18 Marc Autret <autret_m@epita.fr>
21057
21058 Turn off %{source,header}_extension feature.
21059
21060 * src/files.c (compute_exts_from_gf): Update.
21061 (compute_exts_from_src): Update.
21062 (output_files): CPP-out useless code.
21063 * src/files.h: Remove {header,source}_extension extern declarations.
21064 * src/reader.c (parse_dquoted_param): CPP-out.
21065 (parse_header_extension_decl): Remove.
21066 (parse_source_extension_decl): Remove.
21067 (read_declarations): Remove cases tok_{hdrext,srcext}.
21068 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21069 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21070
21071 2001-09-10 Akim Demaille <akim@epita.fr>
21072
21073 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21074 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21075 (AT_CHECK_OUTPUT): this.
21076 Merely check ls' exit status, its output is useless.
21077
21078 2001-09-10 Akim Demaille <akim@epita.fr>
21079
21080 * tests/calc.at: Use m4_match.
21081 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21082
21083 2001-09-10 Marc Autret <autret_m@epita.fr>,
21084 Akim Demaille <akim@epita.fr>
21085
21086 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21087 enum color_e.
21088 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21089 to `normal'.
21090 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21091 * src/lex.h: Adjust prototype.
21092 (token_t): Add `tok_undef'.
21093 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21094 (parse_percent_token): Now returns token_t.
21095 Add default statement in switch.
21096 (lex): Separate `c' as an input variable, from the token_t result
21097 part.
21098 (unlexed): Is a token_t.
21099
21100 2001-09-10 Akim Demaille <akim@epita.fr>
21101
21102 * configure.in: Bump to 1.29a.
21103
21104 2001-09-07 Akim Demaille <akim@epita.fr>
21105
21106 Version 1.29.
21107
21108 2001-08-30 Akim Demaille <akim@epita.fr>
21109
21110 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21111 * m4/atconfig.m4: Remove.
21112 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21113 * tests/bison: New.
21114 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21115 m4_if, m4_patsubst, and m4_regexp.
21116 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21117 `input' file instead of echo.
21118
21119 2001-08-29 Akim Demaille <akim@epita.fr>
21120
21121 Bump to 1.28e.
21122
21123 2001-08-29 Akim Demaille <akim@epita.fr>
21124
21125 Version 1.28d.
21126
21127 2001-08-29 Paul Eggert <eggert@twinsun.com>
21128
21129 * src/bison.simple (yyparse): Don't take the address of an
21130 item before the start of an array, as that doesn't conform to
21131 the C Standard.
21132
21133 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21134
21135 * doc/bison.texinfo (Location Tracking Calc): New node.
21136
21137 2001-08-29 Paul Eggert <eggert@twinsun.com>
21138
21139 * src/output.c (output): Do not define const, as this now
21140 causes more problems than it cures.
21141
21142 2001-08-29 Akim Demaille <akim@epita.fr>
21143
21144 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21145 the nodes.
21146 Be sure to tag the `detailmenu'.
21147
21148 2001-08-29 Akim Demaille <akim@epita.fr>
21149
21150 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21151 download in a tmp dir.
21152
21153 2001-08-28 Marc Autret <autret_m@epita.fr>
21154
21155 * config/depcomp: New file.
21156
21157 2001-08-28 Marc Autret <autret_m@epita.fr>
21158
21159 * doc/bison.1 (mandoc): Adjust.
21160 From Juan Manuel Guerrero.
21161
21162 2001-08-28 Marc Autret <autret_m@epita.fr>
21163
21164 * src/print_graph.c (print_state): Fix.
21165
21166 2001-08-27 Marc Autret <autret_m@epita.fr>
21167
21168 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21169 char * members.
21170 Echo modifications to the functions prototypes.
21171 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21172
21173 2001-08-27 Marc Autret <autret_m@epita.fr>
21174
21175 * src/vcg.c: Include `xalloc.h'.
21176 (add_colorentry): New.
21177 (add_classname): New.
21178 (add_infoname): New.
21179 * src/vcg.h: Add new prototypes.
21180
21181 2001-08-27 Akim Demaille <akim@epita.fr>
21182
21183 * Makefile.maint: Sync. again with CVS Autoconf.
21184
21185 2001-08-27 Akim Demaille <akim@epita.fr>
21186
21187 * Makefile.maint: Formatting changes.
21188 (po-update, cvs-update, update): New targets.
21189 (AMTAR): Remove.
21190
21191 2001-08-27 Akim Demaille <akim@epita.fr>
21192
21193 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21194 * Makefile.maint: Sync. with CVS Autoconf.
21195
21196 2001-08-27 Marc Autret <autret_m@epita.fr>
21197
21198 * src/vcg.h (struct infoname_s): New.
21199 (struct colorentry_s): New.
21200 (graph_s): New fields {vertical,horizontal}_order in structure.
21201 Add `infoname' field.
21202 Add `colorentry' field;
21203 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21204 (G_HORIZONTAL_ORDER): New.
21205 (G_INFONAME): New.
21206 (G_COLORENTRY): New.
21207 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21208 Add output of `infoname'.
21209 Add output of `colorentry'.
21210
21211 2001-08-27 Marc Autret <autret_m@epita.fr>
21212
21213 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21214 This one shadowed a global parameter.
21215
21216 2001-08-24 Marc Autret <autret_m@epita.fr>
21217
21218 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21219 instead of `unsigned'.
21220 (print_state): Do not call obstack_object_size () in obstack_grow ()
21221 to avoid macro variables shadowing.
21222
21223 2001-08-23 Marc Autret <autret_m@epita.fr>
21224
21225 * src/lex.c (percent_table): Typo: s/naem/name/.
21226 Add graph option.
21227 Normalize new options declarations.
21228
21229 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21230
21231 * tests/suite.at: Exercise %header_extension and %source_extension.
21232
21233 2001-08-16 Marc Autret <autret_m@epita.fr>
21234
21235 * src/reader.c (parse_dquoted_param): New.
21236 (parse_header_extension_decl): Use it.
21237 (parse_source_extension_decl): Likewise.
21238
21239 2001-08-16 Marc Autret <autret_m@epita.fr>
21240
21241 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21242 (get_xxxx_str): Use assert () instead of complain ().
21243 Remove return invokations in default cases.
21244 (get_decision_str): Modify default behaviour. Remove second argument.
21245 Echo modifications on calls.
21246 (output_graph): Fix.
21247
21248 2001-08-16 Marc Autret <autret_m@epita.fr>
21249
21250 * src/getargs.c (usage): Update with ``-g, --graph''.
21251
21252 2001-08-16 Marc Autret <autret_m@epita.fr>
21253
21254 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21255 (Option Cross Key): Likewise.
21256 * doc/bison.1: Update.
21257
21258 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21259
21260 * src/output.c (output_master_parser): Don't finish action_obstack.
21261 (output_parser): Don't care about the muscle action, here.
21262 (prepare): Copy the action_obstack in the action muscle.
21263 (output): Free action_obstack.
21264
21265 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21266
21267 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21268 will contain `%union' declaration.
21269 (parse_union_decl): Delete #line directive output.
21270 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21271 informations about %union.
21272 (parse_union_decl): Copy the union_obstack in the muscle stype.
21273 * src/bison.simple: Add new #line directive.
21274 Add typdef %%stype YYSTYPE.
21275
21276 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21277
21278 * src/bison.simple: Add new `#line' directive.
21279
21280 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21281
21282 * src/bison.simple: New `#line' directive.
21283 * src/output.c (output_parser): Support new dynamic muscle input_line.
21284
21285 2001-09-22 Marc Autret <autret_m@epita.fr>
21286
21287 * src/output.c (output_master_parser): New.
21288 (output_parser): Be more re-entrant.
21289
21290 2001-09-21 Marc Autret <autret_m@epita.fr>
21291
21292 * src/reader.c (copy_definition, parse_union_decl): Update and use
21293 `linef' muscle.
21294 (copy_action): Likewise.
21295 Use obstack_1grow ().
21296 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21297
21298 2001-09-21 Marc Autret <autret_m@epita.fr>
21299
21300 * src/options.c (option_table): Adjust.
21301 * src/lex.c (parse_percent_token): Fix.
21302
21303 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21304
21305 * src/options.c (symtab.h): Include it, need by lex.h.
21306
21307 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21308
21309 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21310 is now an option_table_struct*.
21311 (option_strcmp): New function option_strcmp.
21312 (parse_percent_token): Call option_strcmp.
21313 * src/getargs.c (xalloc.h, options.h): Include it.
21314 (getargs): Call create_long_option_table.
21315 (getargs): Free longopts at the end of the function.
21316 (shortopts): Move in options.c.
21317 * src/options.c (create_long_option_table): New function. Convert
21318 information from option_table to option structure.
21319 * src/reader.c (options.h): Include it.
21320
21321 * src/Makefile.am: Adjust.
21322 * src/options.c (option_table): Create from longopts and percent_table.
21323 * src/getargs.c (longopts): Delete.
21324 * src/lex.c (struct percent_table_struct): Delete.
21325 (percent_table): Delete.
21326 (options.h): Include it.
21327 * src/options.c: Create.
21328 * src/options.h: Create.
21329 Declare enum opt_access_e.
21330 Define struct option_table_struct.
21331
21332 2001-09-20 Marc Autret <autret_m@epita.fr>
21333
21334 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21335 sections of Bison.
21336
21337 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21338
21339 * src/bison.simple: s/%%filename/%%skeleton.
21340 * src/muscle_tab.c (getargs.h): Include it.
21341 (muscle_init): Insert new muscle skeleton.
21342
21343 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21344
21345 * src/output.c (output_parser): Delete unused variable actions_dumped.
21346
21347 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21348
21349 * src/output.c (output): Delete call to reader_output_yylsp.
21350 * src/reader.c (reader): Likewise.
21351 * src/reader.h: Delete declaration of reader_output_yylsp.
21352
21353 2001-09-02 Marc Autret <autret_m@epita.fr>
21354
21355 * src/reader.c: Include muscle_tab.h.
21356 (parse_union_decl): Update.
21357 (parse_macro_decl): Rename parse_muscle_decl.
21358 Update to use renamed functions and variable.
21359 (read_declarations, copy_action, read_additionnal_code, : Updated
21360 with correct variables and functions names.
21361 (packsymbols, reader): Likewise.
21362
21363 * src/reader.h (muscle_obstack): Extern declaration update.
21364
21365 * src/output.c: Include muscle_tab.h
21366 In all functions using macro_insert, change by using muscle_insert ().
21367 (macro_obstack): Rename muscle_obstack.
21368 Echo modifications in the whole file.
21369 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21370 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21371 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21372
21373 * src/muscle_tab.h: Update double inclusion macros.
21374 (macro_entry_s): Rename muscle_entry_s.
21375 Update prototypes.
21376
21377 * src/muscle_tab.c: Include muscle_tab.h.
21378 Rename macro_tabble to muscle_table.
21379 (mhash1, mhash2, mcmp): Use muscle_entry.
21380 (macro_init): Rename muscle_init. Update.
21381 (macro_insert): Rename muscle_insert. Update.
21382 (macro_find): Rename muscle_find. Update.
21383
21384 * src/main.c: Include muscle_tab.h.
21385 (main): Call muscle_init ().
21386 * src/Makefile.am (bison_SOURCES): Echo modifications.
21387
21388 2001-09-02 Marc Autret <autret_m@epita.fr>
21389
21390 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21391
21392 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21393
21394 2001-09-02 Marc Autret <autret_m@epita.fr>
21395
21396 * src/macrotab.c, src/macrotab.h: Remove.
21397
21398 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21399
21400 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21401 filename.
21402
21403 2001-09-01 Marc Autret <autret_m@epita.fr>
21404
21405 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21406 to an explicit value to activate the feature. We do it here.
21407
21408 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21409
21410 * src/output.c (prepare): Delete the `filename' muscule insertion.
21411 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21412 (parse_union_decl): Likewise.
21413 * src/macrotab.c (macro_init): Initialize filename by infile.
21414
21415 2001-08-31 Marc Autret <autret_m@epita.fr>
21416
21417 * src/bison.simple (YYLSP_NEEDED): New definition.
21418 * src/output.c (prepare): Add macro insertion of `locations_flag'
21419
21420 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21421
21422 * src/output.c (prepare): Delete insertion of previous muscles,
21423 and insert the `prefix' muscles.
21424 * src/macrotab.c (macro_init): Likewise.
21425 (macro_init): Initialization prefix directive by `yy'.
21426 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21427 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21428 yylval, yydebug, yyerror, yynerrs and yyparse.
21429 New directive `#define' to substitute yydebug, ... with option
21430 name_prefix.
21431
21432 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21433
21434 * src/main.c (main): Standardize.
21435 * src/output.c (output_table_data, output_parser): Likewise.
21436 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21437
21438 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21439
21440 * src/reader.c (read_additionnal_code): Rename %%user_code to
21441 %%epilogue.
21442 * src/output.c (output): Rename %%declarations to %%prologue.
21443 * src/bison.simple: Echo modifications.
21444
21445 2001-08-31 Marc Autret <autret_m@epita.fr>
21446
21447 * src/reader.c (readgram): CleanUp.
21448 (output_token_defines): Likewise.
21449 (packsymbols): Likewise.
21450 (reader): Likewise.
21451 * src/output.c (output): CPP-out useless code.
21452
21453 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21454
21455 * src/reader.c (reader): Delete obsolete call to function
21456 output_trailers and output_headers.
21457 * src/output.h: Remove obsolete functions prototypes of output_headers
21458 and output_trailers.
21459
21460 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21461
21462 * src/main.c: Include macrotab.h.
21463 * src/macrotab.h (macro_entry_s): Constify fields.
21464 Adjust functions prototypes.
21465 * src/macrotab.c (macro_insert): Constify key and value.
21466 (macro_find): Constify key.
21467 (macro_insert): Include 'xalloc.h'
21468 (macro_insert): Use XMALLOC.
21469 (macro_find): Constify return value.
21470 * src/output.c (output_table_data): Rename table to table_data.
21471 (output_parser): Constify macro_key, macro_value.
21472
21473 2001-08-30 Marc Autret <autret_m@epita.fr>
21474
21475 * src/reader.c (parse_skel_decl): New.
21476 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21477 * src/lex.h (token_t): New token `tok_skel'.
21478 * src/lex.c (percent_table): Add skeleton option entry.
21479 Standardize.
21480
21481 2001-08-29 Marc Autret <autret_m@epita.fr>
21482
21483 * src/bison.simple: Add %%user_code directive at the end.
21484 * src/reader.c (read_additionnal_code): New.
21485 (reader): Use it.
21486 * src/output.c (output_program): Remove.
21487 (output): Update.
21488
21489 2001-08-28 Marc Autret <autret_m@epita.fr>
21490
21491 * src/output.c (output_actions): Clean up.
21492 (output_gram): CPP-out useless code.
21493 * src/reader.c (reader): Clean up, CPP-out useless code.
21494
21495 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21496
21497 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21498 directive.
21499 * src/bison.simple: Add `%%definitions'.
21500
21501 2001-08-28 Marc Autret <autret_m@epita.fr>
21502
21503 * config/depcomp: New file.
21504
21505 2001-08-27 Paul Eggert <eggert@twinsun.com>
21506
21507 * src/bison.simple (yyparse): Don't take the address of an
21508 item before the start of an array, as that doesn't conform to
21509 the C Standard.
21510
21511 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21512
21513 * src/output.c (output): Remove the initialization of the macro
21514 obstack. It was done too late here.
21515
21516 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21517 completely wrong.
21518 (reader): Initialize the macro obstack here, since we need it to grow
21519 '%define' directives.
21520
21521 * src/reader.h: Declare the macro obstack as extern.
21522
21523 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21524
21525 * src/output.c (output_parser): Fix. Store single '%' characters in
21526 the output obstack instead of throwing them away.
21527
21528 2001-08-27 Akim Demaille <akim@epita.fr>
21529
21530 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21531
21532 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21533
21534 * lib/Makefile.am: Adjust.
21535
21536 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21537
21538 * src/bison.simple: Update and add '%%' directives.
21539
21540 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21541
21542 * src/reader.c (reader): Remove calls to 'output_headers' and
21543 'output_trailers'. Remove some C output.
21544 (readgram): Disable a piece of code that was writing a default
21545 definition for 'YYSTYPE'.
21546 (reader_output_yylsp): Remove.
21547 (packsymbols): Output token defintions to a macro.
21548 (copy_definition): Disable C output.
21549
21550 * src/reader.c (parse_macro_decl): New function used to parse macro
21551 declarations.
21552 (copy_string2): Put the body of copy_string into this new function.
21553 Add a parameter to let the caller choose whether he wants to copy the
21554 string delimiters or not.
21555 (copy_string): Be a simple call to copy_string2 with the last argument
21556 bound to true.
21557 (read_declarations): Add case for macro definition.
21558 (copy_identifier): New.
21559 (parse_macro_decl): Read macro identifiers using copy_identifier
21560 rather than lex.
21561
21562 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21563
21564 * src/output.c (prepare): Add prefixed names.
21565 (output_parser): Output semantic actions.
21566 (output_parser): Fix bug on '%%line' directives.
21567
21568 * src/output.c (output_headers): Remove. The C code printed by this
21569 function should now be in the skeletons.
21570 (output_trailers): Remove.
21571 (output): Disable call to 'reader_output_yylsp'.
21572 (output_rule_data): Do not output tables to the table obstack.
21573
21574 * src/output.c: Remove some C dedicated output.
21575 Improve the use of macro and output obstacks.
21576 (output_defines): Remove.
21577
21578 * src/output.c (output_token_translations): Associate 'translate'
21579 table with a macro. No output to the table obstack.
21580 (output_gram): Same for 'rhs' and 'prhs'.
21581 (output_stos): Same for 'stos'.
21582 (output_rule_data): Same for 'r1' and 'r2'.
21583 (token_actions): Same for 'defact'.
21584 (goto_actions): Same for 'defgoto'.
21585 (output_base): Same for 'pact' and 'pgoto'.
21586 (output_table): Same for 'table'.
21587 (output_check): Same for 'check'.
21588
21589 * src/output.c (output_table_data): New function.
21590 (output_short_table): Remove.
21591 (output_short_or_char_table): Remove.
21592
21593 * src/output.c (output_parser): Replace most of the skeleton copy code
21594 with something new. Skeletons are now processed character by character
21595 rather than line by line, and Bison looks for '%%' macros. This is the
21596 first step in making Bison's output process (a lot) more flexible.
21597 (output_parser): Use the macro table.
21598
21599 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21600
21601 * src/main.c (main): Initialize the macro table.
21602
21603 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21604
21605 * src/lex.c (percent_table): Add tok_define.
21606 * src/lex.h: Add tok_define.
21607
21608 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21609
21610 * src/macrotab.c: New file.
21611 * src/macrotab.h: New file.
21612 * src/Makefile.am: Update.
21613
21614 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21615
21616 * lib/hash.c: New file.
21617 * lib/hash.h: New file.
21618 * lib/Makefile.am: Update.
21619
21620 2001-08-15 Akim Demaille <akim@epita.fr>
21621
21622 Version 1.28c.
21623
21624 2001-08-15 Marc Autret <autret_m@epita.fr>
21625
21626 * src/reader.c (readgram): Indent output macro YYSTYPE.
21627 (packsymbols): Likewise.
21628 (output_token_defines): Likewise.
21629 * src/files.c: Standardize.
21630 (compute_header_macro): New.
21631 (defines_obstack_save): New. Use compute_header_macro.
21632 (output_files): Update. Use defines_obstack_save.
21633
21634 2001-08-15 Akim Demaille <akim@epita.fr>
21635
21636 * doc/bison.texinfo (Table of Symbols): Document
21637 YYSTACK_USE_ALLOCA.
21638
21639 2001-08-15 Akim Demaille <akim@epita.fr>
21640
21641 * missing: Update from CVS Automake.
21642 * config/config.guess, config/config.sub, config/texinfo.tex:
21643 Update from gnu.org.
21644
21645 2001-08-15 Akim Demaille <akim@epita.fr>
21646
21647 * Makefile.maint: Sync with CVS Autoconf.
21648
21649 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21650
21651 * doc/bison.texinfo: Include GNU Free Documentation License from
21652 `fdl.texi'.
21653 * doc/fdl.texi: Add to package.
21654
21655 2001-08-14 Marc Autret <autret_m@epita.fr>
21656
21657 Turn on %{source,header}_extension features.
21658
21659 * src/lex.c (percent_table): Un-CPP out header_extension and
21660 source_extension.
21661 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21662 (compute_exts_from_src): Remove conditions. It restores priorities
21663 between options.
21664
21665 2001-08-14 Marc Autret <autret_m@epita.fr>
21666
21667 * src/files.c (compute_base_names): Add extensions computing when
21668 `--file-prefix' used.
21669 Standardize function calls.
21670
21671 2001-08-13 Marc Autret <autret_m@epita.fr>
21672
21673 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21674 defining it (defined but null disables alloca).
21675
21676 2001-08-13 Marc Autret <autret_m@epita.fr>
21677
21678 * src/bison.simple (_yy_memcpy): CPP reformat.
21679
21680 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21681
21682 * tests/atconfig.in (CPPFLAGS): Fix.
21683
21684 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21685
21686 * doc/bison.texinfo: Include GNU General Public License from
21687 `gpl.texi'.
21688 * doc/gpl.texi: Add to package.
21689
21690 2001-08-10 Marc Autret <autret_m@epita.fr>
21691
21692 * src/print_graph.h: Fix.
21693 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21694
21695 2001-08-10 Akim Demaille <akim@epita.fr>
21696
21697 * src/system.h: Provide default declarations for stpcpy, strndup,
21698 and strnlen.
21699
21700 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21701
21702 * doc/bison.texinfo (Locations): Update @$ stuff.
21703
21704 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21705
21706 * src/bison.simple (YYLLOC_DEFAULT): Update.
21707 (yyparse): Adjust.
21708
21709 2001-08-08 Marc Autret <autret_m@epita.fr>
21710
21711 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21712 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21713 Reported by Fabrice Bauzac.
21714
21715 2001-08-08 Marc Autret <autret_m@epita.fr>
21716
21717 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21718 * src/vcg.c (output_node): Fix.
21719 * src/vcg.h: Cleanup.
21720 * src/print_graph.c: Add comments.
21721 (node_output_size): New global variable. Simplify the formatting of
21722 the VCG graph output.
21723 (print_actions): Unused code is now used. It notifies the final state
21724 and no action states in the VCG graph. It also give the reduce actions.
21725 The `shift and goto' edges are red and the `go to state' edges are
21726 blue.
21727 Get the current node name and node_obstack by argument.
21728 (node_obstack): New variable.
21729 (print_state): Manage node_obstack.
21730 (print_core): Use node_obstack given by argument.
21731 A node is not only computed here but in print_actions also.
21732 (print_graph): CPP out useless code instead of commenting it.
21733
21734 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21735
21736 * tests/atconfig.in (CPPFLAGS): Fix.
21737
21738 2001-08-07 Akim Demaille <akim@epita.fr>
21739
21740 * src/print_graph.c (quote): New.
21741 (print_core): Use it.
21742
21743 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21744
21745 * src/vcg.c (complain.h): Include it.
21746 Unepitaize `return' invocations.
21747 [NDEBUG] (main): Remove.
21748 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21749 * src/files.c (open_files): Initialize graph_obstack.
21750 * src/print_graph.c (print_actions): CPP out useless code.
21751 (print_core): Don't output the last `\n' in labels.
21752 Use `quote'.
21753 * src/files.c (output_files): Output the VCG file.
21754 * src/main.c (main): Invoke print_graph ();
21755
21756 2001-08-06 Marc Autret <autret_m@epita.fr>
21757
21758 Automaton VCG graph output.
21759 Using option ``-g'' or long option ``--graph'', you can generate
21760 a gram_filename.vcg file containing a VCG description of the LALR (1)
21761 automaton of your grammar.
21762
21763 * src/main.c: Call to print_graph() function.
21764 * src/getargs.h: Update.
21765 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21766 (graph_flag): New flag.
21767 (longopts): Update.
21768 (getargs): Add case `g'.
21769 * src/files.c (graph_obstack): New obstack struct.
21770 (open_files): Initialize new obstack.
21771 (output_files): Saves graph_obstack if required.
21772 * src/files.h (graph_obstack): New extern declaration.
21773 * src/Makefile.am: Add new source files.
21774
21775 2001-08-06 Marc Autret <autret_m@epita.fr>
21776
21777 * src/print_graph.c, src/print_graph.h (graph): New.
21778 * src/vcg.h: New file.
21779 * src/vcg.c: New file, VCG graph handling.
21780
21781 2001-08-06 Marc Autret <autret_m@epita.fr>
21782
21783 Add of %source_extension and %header_extension which specify
21784 the source or/and the header output file extension.
21785
21786 * src/files.c (compute_base_names): Remove initialisation of
21787 src_extension and header_extension.
21788 (compute_exts_from_gf): Update.
21789 (compute_exts_from_src): Update.
21790 (output_files): Update.
21791 * src/reader.c (parse_header_extension_decl): New.
21792 (parse_source_extension_decl): New.
21793 (read_declarations): New case statements for the new tokens.
21794 * src/lex.c (percent_table): Add entries for %source_extension
21795 and %header_extension.
21796 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21797
21798 2001-08-06 Marc Autret <autret_m@epita.fr>
21799
21800 * configure.in: Bump to 1.28c.
21801 * doc/bison.texinfo: Texinfo thingies.
21802
21803 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21804
21805 * tests/atconfig.in (CPPFLAGS): Add.
21806 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21807
21808 2001-08-03 Akim Demaille <akim@epita.fr>
21809
21810 Version 1.28b.
21811
21812 2001-08-03 Akim Demaille <akim@epita.fr>
21813
21814 * tests/Makefile.am (check-local): Ship testsuite.
21815 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21816 Include `string.h'.
21817
21818 2001-08-03 Akim Demaille <akim@epita.fr>
21819
21820 * configure.in: Try using -Wformat when compiling.
21821
21822 2001-08-03 Akim Demaille <akim@epita.fr>
21823
21824 * configure.in: Bump to 1.28b.
21825
21826 2001-08-03 Akim Demaille <akim@epita.fr>
21827
21828 * src/complain.c: Adjust strerror_r portability issues.
21829
21830 2001-08-03 Akim Demaille <akim@epita.fr>
21831
21832 Version 1.28a.
21833
21834 2001-08-03 Akim Demaille <akim@epita.fr>
21835
21836 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21837 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21838 * src/getargs.c: Include complain.h.
21839 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21840 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21841
21842 2001-08-03 Akim Demaille <akim@epita.fr>
21843
21844 * src/reader.c (readgram): Display hidden chars in error messages.
21845
21846 2001-08-03 Akim Demaille <akim@epita.fr>
21847
21848 Update to gettext 0.10.39.
21849
21850 2001-08-03 Akim Demaille <akim@epita.fr>
21851
21852 * lib/strspn.c: New.
21853
21854 2001-08-01 Marc Autret <autret_m@epita.fr>
21855
21856 * doc/bison.texinfo: Update.
21857 * doc/bison.1 (mandoc): Update.
21858 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21859 * src/files.c: Support output files extensions computing.
21860 (src_extension): New static variable.
21861 (header_extension): New static variable.
21862 (tr): New function.
21863 (get_extension_index): New function, gets the index of an extension
21864 filename in a string.
21865 (compute_exts_from_gf): New function, computes extensions from the
21866 grammar file extension.
21867 (compute_exts_from_src): New functions, computes extensions from the
21868 C source file extension, file given by ``-o'' option.
21869 (compute_base_names): Update.
21870 (output_files): Update.
21871
21872 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21873
21874 * doc/bison.texi: Document @$.
21875 (Locations): New section.
21876
21877 2001-07-18 Akim Demaille <akim@epita.fr>
21878
21879 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21880 * config/prev-version.txt, config/move-if-change: New.
21881 * Makefile.am: Adjust.
21882
21883 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21884
21885 * src/bison.simple (yyparse): Suppress warning `comparaison
21886 between signed and unsigned'.
21887
21888 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21889
21890 * src/getargs.h (raw_flag): Remove.
21891 * src/getargs.c: Die on `-r'/`--raw'.
21892 * src/lex.c (parse_percent_token): Die on `%raw'.
21893 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21894 * tests/calc.at: Suppress test with option `--raw'.
21895
21896 2001-07-14 Akim Demaille <akim@epita.fr>
21897
21898 * config/: New.
21899 * configure.in: Require Autoconf 2.50.
21900 Update to gettext 0.10.38.
21901
21902 2001-03-16 Akim Demaille <akim@epita.fr>
21903
21904 * doc/bison.texinfo: ANSIfy the examples.
21905
21906 2001-03-16 Akim Demaille <akim@epita.fr>
21907
21908 * getargs.c (skeleton): New variable.
21909 (longopts): --skeleton is a new option.
21910 (shortopts, getargs): -S is a new option.
21911 * getargs.h: Declare skeleton.
21912 * output.c (output_parser): Use it.
21913
21914 2001-03-16 Akim Demaille <akim@epita.fr>
21915
21916 * m4/strerror_r.m4: New.
21917 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21918 * lib/error.h, lib/error.c: Update.
21919
21920 2001-03-16 Akim Demaille <akim@epita.fr>
21921
21922 * src/getargs.c (longopts): Clean up.
21923
21924 2001-02-21 Akim Demaille <akim@epita.fr>
21925
21926 * src/reader.c (gensym): `gensym_count' is your own.
21927 Use a static buf to create the symbol name, as token_buffer is no
21928 longer a buffer.
21929
21930 2001-02-08 Akim Demaille <akim@epita.fr>
21931
21932 * src/conflicts.c (conflict_report): Be sure not to append to res
21933 between two calls, which could happen if both first sprintf were
21934 skipped, but not the first cp += strlen.
21935
21936 2001-02-08 Akim Demaille <akim@epita.fr>
21937
21938 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21939 New, from fileutils 4.0.37.
21940 * configure.in: Require Autoconf 2.49c. I took some time before
21941 making this decision. This is the only way out for portability
21942 issues in Bison, it would mean way too much duplicate effort to
21943 import in Bison features implemented in 2.49c since 2.13.
21944 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21945
21946 2001-02-02 Akim Demaille <akim@epita.fr>
21947
21948 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21949 * lib/xalloc.h, lib/xmalloc.c: Update.
21950
21951 2001-01-19 Akim Demaille <akim@epita.fr>
21952
21953 Get rid of the ad hoc handling of token_buffer in the scanner: use
21954 the obstacks.
21955
21956 * src/lex.c (token_obstack): New.
21957 (init_lex): Initialize it. No longer call...
21958 (grow_token_buffer): this. Remove it.
21959 Adjust all the places which used it to use the obstack.
21960
21961 2001-01-19 Akim Demaille <akim@epita.fr>
21962
21963 * src/lex.h: Rename all the tokens:
21964 s/\bENDFILE\b/tok_eof/g;
21965 s/\bIDENTIFIER\b/tok_identifier/g;
21966 etc.
21967 Let them be enums, not #define, to ease debugging.
21968 Adjust all the code.
21969
21970 2001-01-18 Akim Demaille <akim@epita.fr>
21971
21972 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21973 * src/lex.c (maxtoken, grow_token_buffer): Static.
21974
21975 2001-01-18 Akim Demaille <akim@epita.fr>
21976
21977 Since we now use obstacks, more % directives can be enabled.
21978
21979 * src/lex.c (percent_table): Also accept `%yacc',
21980 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21981 `%debug'.
21982 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21983 instead of returning a token.
21984 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21985 * src/reader.c (read_declarations): Adjust.
21986 * src/files.c (open_files): Don't call `compute_base_names', don't
21987 compute `attrsfile' since they depend upon data which might be
21988 *in* the input file now.
21989 (output_files): Do it here.
21990 * src/output.c (output_headers): Document the fact that this patch
21991 introduces a guaranteed SEGV for semantic parsers.
21992 * doc/bison.texinfo: Document them.
21993 * tests/suite.at: Exercise these %options.
21994
21995 2000-12-20 Akim Demaille <akim@epita.fr>
21996
21997 Also handle the output file (--verbose) with obstacks.
21998
21999 * files.c (foutput): Remove.
22000 (output_obstack): New.
22001 Adjust all dependencies.
22002 * src/conflicts.c: Return a string.
22003 * src/system.h (obstack_grow_string): Rename as...
22004 (obstack_sgrow): this. Be ready to work with non literals.
22005 (obstack_fgrow4): New.
22006
22007 2000-12-20 Akim Demaille <akim@epita.fr>
22008
22009 * src/files.c (open_files): Fix the computation of short_base_name
22010 in the case of `-o foo.tab.c'.
22011
22012 2000-12-20 Akim Demaille <akim@epita.fr>
22013
22014 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22015 (copy_dollar): Now that everything uses obstacks, get rid of the
22016 FILE * parameters.
22017
22018 2000-12-20 Akim Demaille <akim@epita.fr>
22019
22020 * src/files.c (open_files): Actually the `.output' file is based
22021 on the short_base_name, not base_name.
22022 * tests/suite.at (Checking output file names): Adjust.
22023
22024 2000-12-20 Akim Demaille <akim@epita.fr>
22025
22026 * src/bison.s1: Remove, we now use directly...
22027 * src/bison.simple: this.
22028 * src/Makefile.am: Use pkgdata instead of data.
22029
22030 2000-12-20 Akim Demaille <akim@epita.fr>
22031
22032 * src/files.c (guard_obstack): New.
22033 (open_files): Initialize it.
22034 (output_files): Dump it...
22035 * src/files.h: Export it.
22036 * src/reader.c (copy_guard): Use it.
22037
22038 2000-12-19 Akim Demaille <akim@epita.fr>
22039
22040 * src/files.c (outfile, defsfile, actfile): Removed as global
22041 vars.
22042 (open_files): Don't compute them.
22043 (output_files): Adjust.
22044 (base_name, short_base_name): Be global.
22045 Adjust dependencies.
22046
22047 2000-12-19 Akim Demaille <akim@epita.fr>
22048
22049 * src/files.c (strsuffix): New.
22050 (stringappend): Be just like strcat but allocate.
22051 (base_names): Eve out from open_files.
22052 Try to simplify the rather hairy computation of base_name and
22053 short_base_name.
22054 (open_files): Use it.
22055 * tests/suite.at (Checking output file names): New test.
22056
22057 2000-12-19 Akim Demaille <akim@epita.fr>
22058
22059 * src/system.h (obstack_grow_literal_string): Rename as...
22060 (obstack_grow_string): this.
22061 * src/output.c (output_parser): Recognize `%% actions' instead of
22062 `$'.
22063 * src/bison.s1: s/$/%% actions/.
22064 * src/bison.hairy: Likewise.
22065
22066 2000-12-19 Akim Demaille <akim@epita.fr>
22067
22068 * src/output.c (output_parser): Compute the `#line' lines when
22069 there are.
22070 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22071 Suggested by Hans Aberg.
22072
22073 2000-12-19 Akim Demaille <akim@epita.fr>
22074
22075 Let the handling of the skeleton files be local to the procedures
22076 that use it.
22077
22078 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22079 longer static.
22080 (fparser, open_extra_files): Remove.
22081 (open_files, output_files): Don't take care of fparser.
22082 * src/files.h: Adjust.
22083 * src/output.c (output_parser): Open and close the file to the
22084 skeleton.
22085 * src/reader.c (read_declarations): When %semantic_parser, open
22086 fguard.
22087
22088 2000-12-19 Akim Demaille <akim@epita.fr>
22089
22090 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22091 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22092
22093 2000-12-19 Akim Demaille <akim@epita.fr>
22094
22095 * src/files.c (open_files): Yipee! We no longer need all the code
22096 looking for `/tmp' since we have no tmp file.
22097
22098 2000-12-19 Akim Demaille <akim@epita.fr>
22099
22100 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22101 New macros.
22102 * src/files.c (open_files): Less dependency on MSDOS etc.
22103
22104 2000-12-14 Akim Demaille <akim@epita.fr>
22105
22106 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22107 Provide a default definition.
22108 Use it when executing the default @ action.
22109 * src/reader.c (reader_output_yylsp): No longer include
22110 `timestamp' and `text' in the default YYLTYPE.
22111
22112 2000-12-12 Akim Demaille <akim@epita.fr>
22113
22114 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22115 (copy_guard): Quote the file names.
22116 Reported by Laurent Mascherpa.
22117
22118 2000-12-12 Akim Demaille <akim@epita.fr>
22119
22120 * src/output.c (output_headers, output_program, output): Be sure
22121 to escape special characters when outputting filenames.
22122 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22123 (output_headers): Don't depend on them, Use ACTSTR.
22124
22125 2000-11-17 Akim Demaille <akim@epita.fr>
22126
22127 * lib/obstack.h: Formatting changes.
22128 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22129 prevents type checking.
22130 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22131 cast the value to (void *): assigning a `foo *' to a `void *'
22132 variable is valid.
22133 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22134 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22135 append characters.
22136
22137 2000-11-17 Akim Demaille <akim@epita.fr>
22138
22139 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22140 as...
22141 (suite.m4, regression.m4, calc.m4): these.
22142 * tests/atgeneral.m4: Update from CVS Autoconf.
22143
22144 2000-11-17 Akim Demaille <akim@epita.fr>
22145
22146 * tests/regression.m4 (%union and --defines): New test,
22147 demonstrating a current bug in the obstack implementation.
22148
22149 2000-11-17 Akim Demaille <akim@epita.fr>
22150
22151 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22152 macros.
22153 Use them to declare the variables which are global or local to
22154 `yyparse'.
22155
22156 2000-11-17 Akim Demaille <akim@epita.fr>
22157
22158 * acconfig.h: Remove, no longer used.
22159
22160 2000-11-07 Akim Demaille <akim@epita.fr>
22161
22162 * src: s/Copyright (C)/Copyright/g.
22163
22164 2000-11-07 Akim Demaille <akim@epita.fr>
22165
22166 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22167 defining.
22168 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22169
22170 2000-11-07 Akim Demaille <akim@epita.fr>
22171
22172 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22173 Merge in a single CPP if/else.
22174
22175 2000-11-07 Akim Demaille <akim@epita.fr>
22176
22177 * src/output.c (output): Remove useless variables.
22178 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22179 argument `data' for consistency with the prototypes.
22180 Qualify it `const'.
22181 (obstack_copy, obstack_copy0): Rename the second argument as
22182 `address' for consistency. Qualify it `const'.
22183 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22184 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22185 `const' their input argument (`data' or `address').
22186 Adjust the corresponding macros to include `const' in casts.
22187
22188 2000-11-03 Akim Demaille <akim@epita.fr>
22189
22190 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22191 s/PFILE1/BISON_HAIRY/.
22192 Adjust dependencies.
22193
22194 2000-11-03 Akim Demaille <akim@epita.fr>
22195
22196 For some reason, this was not applied.
22197
22198 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22199 `unlink': it's no longer used.
22200
22201 2000-11-03 Akim Demaille <akim@epita.fr>
22202
22203 * src/files.c (skeleton_find): New function, eved out of...
22204 (open_files, open_extra_files): here.
22205
22206 2000-11-03 Akim Demaille <akim@epita.fr>
22207
22208 Don't use `atexit'.
22209
22210 * src/files.c (obstack_save): New function.
22211 (done): Rename as...
22212 (output_files): this.
22213 Use `obstack_save'.
22214 * src/main.c (main): Don't use `atexit' to register `done', since
22215 it no longer has to remove tmp files, just call `output_files'
22216 when there are no errors.
22217
22218 2000-11-02 Akim Demaille <akim@epita.fr>
22219
22220 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22221 `unlink': it's no longer used.
22222 * src/files.h: Formatting changes.
22223
22224 2000-11-02 Akim Demaille <akim@epita.fr>
22225
22226 Remove the last uses of mktemp and unlink/delete.
22227
22228 * src/files.c (fdefines, ftable): Removed.
22229 (defines_ostack, table_obstack): New.
22230 Adjust dependencies of the former into uses of the latter.
22231 * src/output.c (output_short_or_char_table, output_short_table):
22232 Convert to using obstacks.
22233 * src/reader.c (copy_comment2): Accept one FILE * and two
22234 obstacks.
22235 (output_token_defines, reader_output_yylsp): Use obstacks.
22236 * src/system.h (obstack_fgrow3): New.
22237 * po/POTFILES.in: Adjust.
22238
22239 2000-11-01 Akim Demaille <akim@epita.fr>
22240
22241 Change each use of `fattrs' into a use of `attrs_obstack'.
22242
22243 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22244 * src/files.c (fattrs): Remove.
22245 (attrs_obstack): New.
22246 Adjust all dependencies.
22247 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22248
22249 2000-11-01 Akim Demaille <akim@epita.fr>
22250
22251 Introduce obstacks.
22252 Change each use of `faction' into a use of `action_obstack'.
22253
22254 * lib/obstack.h, lib/obstack.c: New files.
22255 * src/files.c (faction): Remove.
22256 (action_obstack): New.
22257 Adjust all dependencies.
22258
22259 2000-10-20 Akim Demaille <akim@epita.fr>
22260
22261 * lib/quote.h (PARAMS): New macro. Use it.
22262
22263 2000-10-16 Akim Demaille <akim@epita.fr>
22264
22265 * src/output.c (output_short_or_char_table): New function.
22266 (output_short_table, output_token_translations): Use it.
22267 (goto_actions): Use output_short_table.
22268
22269 2000-10-16 Akim Demaille <akim@epita.fr>
22270
22271 * src/symtab.c (bucket_new): New function.
22272 (getsym): Use it.
22273
22274 * src/output.c (output_short_table): New argument to display the
22275 comment associated with the table.
22276 Adjust dependencies.
22277 (output_gram): Use it.
22278 (output_rule_data): Nicer output layout for YYTNAME.
22279
22280 2000-10-16 Akim Demaille <akim@epita.fr>
22281
22282 * src/lex.c (read_typename): New function.
22283 (lex): Use it.
22284 * src/reader.c (copy_dollar): Likewise.
22285
22286 2000-10-16 Akim Demaille <akim@epita.fr>
22287
22288 * src/reader.c (copy_comment2): Expect the input stream to be on
22289 the `/' which is suspected to open a comment, instead of being
22290 called after `//' or `/*' was read.
22291 (copy_comment, copy_definition, parse_union_decl, copy_action)
22292 (copy_guard): Adjust.
22293
22294 2000-10-16 Akim Demaille <akim@epita.fr>
22295
22296 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22297 `read_signed_integer'.
22298
22299 2000-10-16 Akim Demaille <akim@epita.fr>
22300
22301 * src/reader.c (copy_dollar): New function.
22302 (copy_guard, copy_action): Use it.
22303
22304 2000-10-16 Akim Demaille <akim@epita.fr>
22305
22306 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22307 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22308 New files, from Fileutils 4.0.27.
22309 * src/main.c (printable_version): Remove.
22310 * src/lex.c, src/reader.c: Use `quote'.
22311
22312 2000-10-04 Akim Demaille <akim@epita.fr>
22313
22314 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22315
22316 2000-10-04 Akim Demaille <akim@epita.fr>
22317
22318 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22319
22320 2000-10-04 Akim Demaille <akim@epita.fr>
22321
22322 When a literal string is used to define two different tokens,
22323 `bison -v' segfaults.
22324 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22325
22326 * tests/regression.m4: New file.
22327 Include the core of the sample provided by Piotr Gackiewicz.
22328 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22329 properly.
22330
22331 2000-10-04 Akim Demaille <akim@epita.fr>
22332
22333 * src/reader.c (parse_expect_decl): Keep `count' within the size
22334 of `buffer'.
22335 From Neil Booth.
22336
22337 2000-10-02 Paul Eggert <eggert@twinsun.com>
22338
22339 * bison.s1 (yyparse): Assign the default value
22340 unconditionally, to avoid a GCC warning and make the parser a
22341 tad smaller.
22342
22343 2000-10-02 Akim Demaille <akim@epita.fr>
22344
22345 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22346 options.
22347
22348 2000-10-02 Akim Demaille <akim@epita.fr>
22349
22350 * src/derives.c, src/print.c, src/reduce.c: To ease the
22351 translation, move some `\n' out of the translated strings.
22352
22353 2000-10-02 Akim Demaille <akim@epita.fr>
22354
22355 The location tracking mechanism is precious for parse error
22356 messages. Nevertheless, it is enabled only when `@n' is used in
22357 the grammar, which is a different issue (you can use it in error
22358 message, but not in the grammar per se). Therefore, there should
22359 be another means to enable it.
22360
22361 * src/getargs.c (getargs): Support `--locations'.
22362 (usage): Report it.
22363 * src/getargs.h (locationsflag): Export it.
22364 * src/lex.c (percent_table): Support `%locations'.
22365 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22366 with `locationsflag'.
22367 * doc/bison.texinfo: Document `--locations' and `%locations'.
22368 Sort the options.
22369 * tests/calc.m4: Test it.
22370
22371 For regularity of the names, replace each
22372 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22373 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22374 In addition replace each `flag' with `_flag'.
22375
22376 2000-10-02 Akim Demaille <akim@epita.fr>
22377
22378 Also test parse error messages, including with YYERROR_VERBOSE.
22379
22380 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22381 associative).
22382 Use it to check the computations.
22383 Use it to check `nonassoc' is honored.
22384 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22385 `--yyerror-verbose'.
22386 (_AT_CHECK_CALC): Adjust to this option.
22387 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22388
22389 2000-10-02 Akim Demaille <akim@epita.fr>
22390
22391 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22392 the latter demonstrates a flaw in the handling of non debugging
22393 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22394 was used in order to simplify:
22395
22396 #if YYDEBUG
22397 if (yydebug)
22398 {
22399 ...
22400 }
22401 #endif
22402
22403 into
22404
22405 if (yydebug)
22406 {
22407 ...
22408 }
22409
22410 unfortunately this leads to a CPP conflict when
22411 `--name-prefix=foo' is used since it produces `#define yydebug
22412 foodebug'.
22413
22414 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22415 (YYDPRINTF): New macro.
22416 Spread its use.
22417 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22418 the bison options.
22419 Also test `--verbose', `--defines' and `--name-prefix'.
22420
22421 2000-10-02 Akim Demaille <akim@epita.fr>
22422
22423 Improve the readability of the produced parsers.
22424
22425 * src/bison.s1: Formatting changes.
22426 Improve the comment related to the `$' mark.
22427 (yydefault): Don't fall through to `yyresume': `goto' there.
22428 * src/output.c (output_parser): When the `$' is met, skip the end
22429 of its line.
22430 New variable, `number_of_dollar_signs', to check there's exactly
22431 one `$' in the parser skeleton.
22432
22433 2000-10-02 Akim Demaille <akim@epita.fr>
22434
22435 * lib/xstrdup.c: New file, from the fileutils.
22436 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22437 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22438 instead of strlen + xmalloc + strcpy.
22439 * src/symtab.c (copys): Remove, use xstrdup instead.
22440
22441 2000-10-02 Akim Demaille <akim@epita.fr>
22442
22443 * src/gram.h (associativity): New enum type which replaces the
22444 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22445 `right_assoc', `left_assoc' and `non_assoc'.
22446 Adjust all dependencies.
22447 * src/reader.c: Formatting changes.
22448 (LTYPESTR): Don't define it, use it as a literal in
22449 `reader_output_yylsp'.
22450 * src/symtab.h (symbol_class): New enum type which replaces the
22451 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22452 `sunknown', `stoken and `snterm'.
22453
22454 2000-10-02 Akim Demaille <akim@epita.fr>
22455
22456 * src/getargs.c (fixed_outfiles): Rename as...
22457 (yaccflag): for consistency and accuracy.
22458 Adjust dependencies.
22459
22460 2000-10-02 Akim Demaille <akim@epita.fr>
22461
22462 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22463 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22464 difficult and introduced a lot of core dump. It turns out that
22465 Bison used an implementation of `xmalloc' based on `calloc', and
22466 at various places it does depend upon the initialization to 0. I
22467 have not tried to isolate the pertinent places, and all the former
22468 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22469 someone should address this issue.
22470
22471 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22472 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22473 files.
22474 Adjust dependencies.
22475 * src/warshall.h: New file.
22476 Propagate.
22477
22478 2000-10-02 Akim Demaille <akim@epita.fr>
22479
22480 Various anti-`extern in *.c' changes.
22481
22482 * src/system.h: Include `assert.h'.
22483
22484 2000-10-02 Akim Demaille <akim@epita.fr>
22485
22486 * src/state.h (nstates, final_state, first_state, first_shift)
22487 (first_reduction): Move their exportation from here...
22488 * src/LR0.h: to here.
22489 Adjust dependencies.
22490 * src/getargs.c (statisticsflag): New variable.
22491 Add support for `--statistics'.
22492 Adjust dependencies.
22493
22494 Remove a lot of now useless `extern' statements in most files.
22495
22496 2000-10-02 Akim Demaille <akim@epita.fr>
22497
22498 * src/LR0.h: New file.
22499 Propagate its use.
22500
22501 2000-10-02 Akim Demaille <akim@epita.fr>
22502
22503 * src/print.h: New file.
22504 Propagate its use.
22505 * src/print.c: Formatting and ordering changes.
22506 (verbose, terse): Replace with...
22507 (print_results): this new function.
22508 Adjust dependencies.
22509
22510 2000-10-02 Akim Demaille <akim@epita.fr>
22511
22512 * src/conflicts.c (conflict_report): New function.
22513 (conflict_log, verbose_conflict_log): Replace with...
22514 (print_conflicts): this function.
22515 Adjust dependencies.
22516 * src/conflicts.h: New file.
22517 Propagate its inclusion.
22518
22519 2000-10-02 Akim Demaille <akim@epita.fr>
22520
22521 * src/nullable.h: New file.
22522 Propagate its inclusion.
22523 * src/nullable.c: Formatting changes.
22524
22525 2000-10-02 Akim Demaille <akim@epita.fr>
22526
22527 * src/reduce.h: New file.
22528 Propagate its inclusion.
22529 * src/reduce.c: Topological sort and other formatting changes.
22530 (bool, TRUE, FALSE): Move their definition to...
22531 * src/system.h: here.
22532
22533 2000-10-02 Akim Demaille <akim@epita.fr>
22534
22535 * src/files.c: Formatting changes.
22536 (tryopen, tryclose, openfiles): Rename as...
22537 (xfopen, xfclose, open_files): this.
22538 (stringappend): static.
22539 * src/files.h: Complete the list of exported symbols.
22540 Propagate its use.
22541
22542 2000-10-02 Akim Demaille <akim@epita.fr>
22543
22544 * src/reader.h: New file.
22545 Propagate its use instead of tedious list of `extern' and
22546 prototypes.
22547 * src/reader.c: Formatting changes, topological sort,
22548 s/register//.
22549
22550 2000-10-02 Akim Demaille <akim@epita.fr>
22551
22552 * src/lex.h: Prototype `lex.c' exported functions.
22553 * src/reader.c: Adjust.
22554 * src/lex.c: Formatting changes.
22555 (safegetc): Rename as...
22556 (xgetc): this.
22557
22558 2000-10-02 Akim Demaille <akim@epita.fr>
22559
22560 * src/lalr.h: New file.
22561 Propagate its inclusion instead of prototypes and `extern'.
22562 * src/lalr.c: Formatting changes, topological sorting etc.
22563
22564 2000-10-02 Akim Demaille <akim@epita.fr>
22565
22566 * src/output.c (token_actions): Introduce a temporary array,
22567 YYDEFACT, that makes it possible for this function to use
22568 output_short_table.
22569
22570 2000-10-02 Akim Demaille <akim@epita.fr>
22571
22572 `user_toknums' is output as a `short[]' in `output.c', while it is
22573 defined as a `int[]' in `reader.c'. For consistency with the
22574 other output tables, `user_toknums' is now defined as a table of
22575 shorts.
22576
22577 * src/reader.c (user_toknums): Be a short table instead of an int
22578 table.
22579 Adjust dependencies.
22580
22581 Factor the short table outputs.
22582
22583 * src/output.c (output_short_table): New function.
22584 * src/output.c (output_gram, output_stos, output_rule_data)
22585 (output_base, output_table, output_check): Use it.
22586
22587 2000-10-02 Akim Demaille <akim@epita.fr>
22588
22589 * src/output.c (output): Topological sort of the functions, in
22590 order to get rid of the `static' prototypes.
22591 No longer use `register'.
22592 * src/output.h: New file.
22593 Propagate its inclusion in files explicitly prototyping functions
22594 from output.c.
22595
22596 2000-09-21 Akim Demaille <akim@epita.fr>
22597
22598 * src/atgeneral.m4: Update from Autoconf.
22599
22600 2000-09-21 Akim Demaille <akim@epita.fr>
22601
22602 * src/closure.h: New file.
22603 * src/closure.c: Formatting changes, topological sort over the
22604 functions, use of closure.h.
22605 (initialize_closure, finalize_closure): Rename as...
22606 (new_closure, free_closure): these. Adjust dependencies.
22607 * src/LR0.c: Formatting changes, topological sort, use of
22608 cloture.h.
22609 (initialize_states): Rename as...
22610 (new_states): this.
22611 * src/Makefile.am (noinst_HEADERS): Adjust.
22612
22613 2000-09-20 Akim Demaille <akim@epita.fr>
22614
22615 * src/acconfig.h: Don't protect config.h against multiple
22616 inclusion.
22617 Don't define PARAMS.
22618 * src/system.h: Define PARAMS.
22619 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22620 purpose of config.h. system.h must not try to fix wrong
22621 definitions in config.h.
22622
22623 2000-09-20 Akim Demaille <akim@epita.fr>
22624
22625 * src/derives.h: New file.
22626 * src/main.c, src/derives.h: Use it.
22627 Formatting changes.
22628 * src/Makefile.am (noinst_HEADERS): Adjust.
22629
22630 2000-09-20 Akim Demaille <akim@epita.fr>
22631
22632 * tests/atgeneral.m4: Update from Autoconf.
22633 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22634 (AT_CHECK_CALC): New macros.
22635 Use these macros to test bison with options `', `--raw',
22636 `--debug', `--yacc', `--yacc --debug'.
22637
22638 2000-09-19 Akim Demaille <akim@epita.fr>
22639
22640 * src/output.c: Formatting changes.
22641 * src/machine.h: Remove, leaving its contents in...
22642 * src/system.h: here.
22643 Include stdio.h.
22644 Adjust all dependencies on stdio.h and machine.h.
22645 * src/getargs.h: New file.
22646 Let all `extern' declarations about getargs.c be replaced with
22647 inclusion of `getargs.h'.
22648 * src/Makefile.am (noinst_HEADERS): Adjust.
22649
22650 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22651 scope.
22652 (yyerror): Returns void, not int.
22653 * doc/bison.texinfo: Formatting changes.
22654
22655 2000-09-19 Akim Demaille <akim@epita.fr>
22656
22657 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22658 portable.
22659
22660 2000-09-18 Akim Demaille <akim@epita.fr>
22661
22662 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22663 * src/Makefile.am (INCLUDES): Don't.
22664 Be ready to fetch headers in lib/.
22665
22666 2000-09-18 Akim Demaille <akim@epita.fr>
22667
22668 * doc/bison.texinfo: Update the copyright.
22669 ANSIfy and GNUify the examples.
22670 Remove the old menu.
22671
22672 2000-09-18 Akim Demaille <akim@epita.fr>
22673
22674 First set of tests: use the `calc' example from the documentation.
22675
22676 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22677 is defined only when YYDEBUG is.
22678 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22679 * src/files.c (tryopen, tryclose): Formatting changes.
22680 Move to the top and be static.
22681 * src/reader.c (read_signed_integer): Likewise.
22682 * tests/calc.m4: New file.
22683 * Makefile.am, suite.m4: Adjust.
22684 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22685
22686 2000-09-18 Akim Demaille <akim@epita.fr>
22687
22688 Add support for an Autotest test suite for Bison.
22689
22690 * m4/m4.m4, m4/atconfig.m4: New files.
22691 * m4/Makefile.am (EXTRA_DIST): Adjust.
22692 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22693 files.
22694 * src/getargs.c: Display a more standard --version message.
22695 * src/reader.c (reader): Formatting changes.
22696 No longer depend upon VERSION_STRING.
22697 * configure.in: No longer use `dnl'.
22698 Set up the test suite and the new directory `tests/.
22699 (VERSION_STRING): Remove.
22700
22701 2000-04-14 Akim Demaille <akim@epita.fr>
22702
22703 * src/reader.c (copy_comment2): New function, same as former
22704 `copy_comment', but outputs into two FILE *.
22705 (copy_comment): Use it.
22706 (parse_union_decl): Use it.
22707 (get_type, parse_start_decl): Use the same `invalid' message.
22708 (parse_start_decl, parse_union_decl): Use the same `multiple'
22709 message.
22710 (parse_union_decl, copy_guard, copy_action): Use the same
22711 `unmatched' message.
22712 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22713
22714 2000-03-31 Akim Demaille <akim@epita.fr>
22715
22716 * src/files.c (tryopen, tryclose): Move to the top.
22717 Be static.
22718
22719 2000-03-31 Akim Demaille <akim@epita.fr>
22720
22721 * src/main.c (main): Don't call `done', exit does it.
22722
22723 2000-03-31 Akim Demaille <akim@epita.fr>
22724
22725 * allocate.c: s/return (foo)/return foo/.
22726 * lalr.c: Likewise.
22727 * LR0.c: Likewise.
22728 * output.c: Likewise.
22729 * reader.c: Likewise.
22730 * symtab.c: Likewise.
22731 * vmsgetargs.c: Likewise.
22732
22733 2000-03-31 Akim Demaille <akim@epita.fr>
22734
22735 Clean up the error reporting functions.
22736
22737 * src/report.c: New file.
22738 * src/report.h: Likewise.
22739 * src/Makefile.am: Adjust.
22740 * m4/error.m4: New file.
22741 * m4/Makefile.am: Adjust.
22742 * configure.in (jm_PREREQ_ERROR): Call it.
22743 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22744 Remove.
22745 (fatal, fatals): Remove. All callers use complain.c::fatal.
22746 (warn, warni, warns, warnss, warnss): Remove. All callers use
22747 complain.c::complain.
22748 (toomany): Remove, use fatal instead.
22749 * src/files.c (done): No argument, use complain_message_count.
22750 * src/main.c (main): Register `done' to `atexit'.
22751
22752 * src/getargs.c (usage): More `fputs', less `fprintf'.
22753
22754 2000-03-28 Akim Demaille <akim@epita.fr>
22755
22756 * lib/: New directory.
22757 * Makefile.am (SUBDIRS): Adjust.
22758 * configure.in: Adjust.
22759 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22760 useless.
22761 * src/alloca.c: Moved to lib/.
22762 * src/getopt.c: Likewise.
22763 * src/getopt1.c: Likewise.
22764 * src/getopt.h: Likewise.
22765 * src/ansi2knr.c: Likewise.
22766 * src/ansi2knr.1: Likewise.
22767 * src/Makefile.am: Adjust.
22768 * lib/Makefile.am: New file.
22769
22770 2000-03-28 Akim Demaille <akim@epita.fr>
22771
22772 * src/getargs.c (usage): Refresh the help message.
22773
22774 2000-03-17 Akim Demaille <akim@epita.fr>
22775
22776 * src/getopt1.c: Updated from textutils 2.0e
22777 * src/getopt.c: Likewise.
22778 * src/getopt.h: Likewise.
22779
22780 2000-03-17 Akim Demaille <akim@epita.fr>
22781
22782 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22783 the file name, not the whole `#line LINE FILE'.
22784
22785 2000-03-17 Akim Demaille <akim@epita.fr>
22786
22787 On syntax errors, report the token on which we choked.
22788
22789 * src/bison.s1 (yyparse): In the label yyerrlab, when
22790 YYERROR_VERBOSE, add yychar in msg.
22791
22792 2000-03-17 Akim Demaille <akim@epita.fr>
22793
22794 * src/reader.c (copy_at): New function.
22795 (copy_guard): Use it.
22796 (copy_action): Use it.
22797
22798 2000-03-17 Akim Demaille <akim@epita.fr>
22799
22800 Be kind to translators, save some useless translations.
22801
22802 * src/main.c (banner): New function.
22803 (fatal_banner): Use it.
22804 (warn_banner): Use it.
22805
22806 2000-03-17 Akim Demaille <akim@epita.fr>
22807
22808 * src/reader.c (copy_definition): Use copy_string and
22809 copy_comment. Removed now unused `match', `ended',
22810 `cplus_comment'.
22811 (copy_comment, copy_string): Moved, to be visible from
22812 copy_definition.
22813
22814 2000-03-17 Akim Demaille <akim@epita.fr>
22815
22816 * src/reader.c (copy_string): Declare `static inline'. No
22817 problems with inline, since it is checked by configure.
22818 (copy_comment): Likewise.
22819
22820 2000-03-17 Akim Demaille <akim@epita.fr>
22821
22822 * src/reader.c (packsymbols): Formatting changes.
22823
22824 2000-03-17 Akim Demaille <akim@epita.fr>
22825
22826 * src/reader.c (copy_comment): New function, factored out from:
22827 (copy_action): Use it. Removed now unused `match', `ended',
22828 `cplus_comment'.
22829 (copy_guard): Likewise.
22830
22831 2000-03-17 Akim Demaille <akim@epita.fr>
22832
22833 * src/reader.c (copy_string): New function, factored out from:
22834 (copy_action): Use it.
22835 (copy_guard): Likewise.
22836
22837 2000-03-17 Akim Demaille <akim@epita.fr>
22838
22839 Change the handling of @s so that they behave exactly like $s.
22840 There is now a pseudo variable @$ (readble and writable), location
22841 of the lhs of the rule (by default ranging from the location of
22842 the first symbol of the rhs, to the location of the last symbol,
22843 or, if the rhs is empty, YYLLOC).
22844
22845 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22846 yyval.
22847 (yyparse): When providing a default semantic action, provide a
22848 default location action.
22849 (after the $): No longer change `*YYLSP', just stack YYLOC the
22850 same way you stack YYVAL.
22851 * src/reader.c (read_declarations): Use warns.
22852 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22853 (copy_action, case '@'): Likewise.
22854 Use a standard error message, to save useless work from
22855 translators.
22856
22857 2000-03-17 Akim Demaille <akim@epita.fr>
22858
22859 * src/bison.s1: Formatting and cosmetics changes.
22860 * src/reader.c: Likewise.
22861 Update the Copyright notice.
22862
22863 2000-03-17 Akim Demaille <akim@epita.fr>
22864
22865 * src/bison.s1 (#line): All set to `#line' only, since the
22866 Makefile now handles them.
22867
22868 2000-03-16 Akim Demaille <akim@epita.fr>
22869
22870 * src/output.c (output_rule_data): Output the documentation of
22871 some of the tables.
22872 (Copyright notice): Update.
22873 Formatting changes.
22874
22875 2000-03-16 Akim Demaille <akim@epita.fr>
22876
22877 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22878 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22879 One `#if YYDEBUG' remains, since it uses variables which are
22880 defined only if `YYDEBUG != 0'.
22881
22882 2000-03-16 Akim Demaille <akim@epita.fr>
22883
22884 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22885 and related variables so that the similarities are highlighted.
22886
22887 2000-03-16 Akim Demaille <akim@epita.fr>
22888
22889 * src/bison.s1: Properly indent CPP directives.
22890
22891 2000-03-16 Akim Demaille <akim@epita.fr>
22892
22893 * src/bison.s1: Properly indent the `alloca' CPP section.
22894
22895 2000-03-16 Akim Demaille <akim@epita.fr>
22896
22897 Do not hard code values of directories in `configure.in'.
22898 Update the `configure' tool chain.
22899
22900 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22901 src/makefile.am.
22902 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22903 (AC_OUTPUT): Add m4/Makefile.
22904 Bump to bison 1.28a, 1.29 has never been released.
22905 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22906 handled via src/Makefile.am.
22907 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22908 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22909 autoheader.
22910 * Makefile.am (SUBDIRS): Add m4.
22911 (ACLOCAL_AM_FLAGS): New variable.
22912 (AUTOMAKE_OPTIONS): Add check-news.
22913 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22914 the proper line number and file name.
22915 (DEFS): Propagate the location of bison library files and of the
22916 locale files.
22917 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22918 builddir.
22919 * acinclude.m4: Remove, replaced by the directory m4.
22920 * m4/Makefile.am (EXTRA_DIST): New variable.
22921 * m4/gettext.m4: New file, from the fileutils.
22922 * m4/lcmessage.m4: Likewise
22923 * m4/progtest.m4: Likewise.
22924 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22925
22926 2000-03-10 Akim Demaille <akim@epita.fr>
22927
22928 * src/closure.c:
22929 Formatting changes of various comments.
22930 Respect the GNU coding standards at various places.
22931 Don't use `_()' when no translation is needed.
22932
22933 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22934
22935 * src/files.c:
22936 OS/2 honors TMPDIR environment variable.
22937
22938 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22939
22940 * doc/bison.texinfo: Tweaked spelling and grammar.
22941 Updated ISBN.
22942 Removed reference to price of printed copy.
22943 Mention BISON_SIMPLE and BISON_HAIRY.
22944
22945 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22946
22947 * configure.in, NEWS:
22948 Bison 1.29 released.
22949
22950 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22951
22952 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22953 Added reference card.
22954
22955 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22956
22957 * po/ru.po: Added Russian translation.
22958
22959 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22960
22961 * configure.in: Added Russian translation.
22962
22963 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22964
22965 * configure.in, NEWS, README:
22966 Released version 1.28.
22967
22968 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22969
22970 * src/system.h:
22971 Squashed redefinition warning on some systems.
22972
22973 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22974 Have configure build version string instead of relying on ANSI string
22975 concatentation.
22976
22977 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22978
22979 * po/POTFILES.in: Got rid of version.c.
22980
22981 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22982
22983 * acconfig.h, configure.in:
22984 Have configure build version string instead of relying on ANSI string
22985 concatentation.
22986
22987 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22988
22989 * doc/bison.1:
22990 Dropped mention of `+' for long-named options.
22991
22992 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22993
22994 * src/files.c: Added <unistd.h> for unlink().
22995
22996 * src/Makefile.am, src/system.h:
22997 I18n fixes.
22998
22999 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23000
23001 * README: Added a FAQ list.
23002
23003 * configure.in, acconfig.h:
23004 I18n fixes.
23005
23006 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23007
23008 * doc/FAQ, doc/Makefile.am:
23009 Added a FAQ list.
23010
23011 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23012
23013 * src/alloc.h, src/symtab.h, src/version.c:
23014 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23015
23016 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23017
23018 * src/.cvsignore, src/Makefile.am:
23019 Reorganized: sources in `src', documentation in `doc'.
23020
23021 * src/lex.c (literalchar):
23022 fixed the code for escaping double quotes (thanks
23023 Jonathan Czisny.)
23024
23025 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23026
23027 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23028 Adjusted paths to reflect directory reorganization.
23029
23030 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23031
23032 * doc/.cvsignore, doc/Makefile.am:
23033 Reorganized: sources in `src', documentation in `doc'.
23034
23035 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23036
23037 * configure.in:
23038 Updated AC_INIT file to reflect directory reorganization.
23039
23040 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23041 Reorganized: sources in `src', documentation in `doc'.
23042
23043 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23044
23045 * src/allocate.c:
23046 Don't declare calloc() and realloc() if not necessary.
23047
23048 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23049
23050 * configure.in, acconfig.h, acinclude.m4:
23051 Don't declare calloc() and realloc() if not necessary.
23052
23053 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23054
23055 * po/.cvsignore: Added i18n support.
23056
23057 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23058
23059 * acconfig.h, configure.in, Makefile.am:
23060 Added i18n support.
23061
23062 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23063
23064 * src/bison.s1: Fixed #line numbers.
23065
23066 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23067
23068 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23069 Added PO files from Translation Project.
23070
23071 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23072
23073 * Makefile.am:
23074 Added support for non-ANSI compilers (ansi2knr).
23075
23076 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23077
23078 * configure.in: Bumped version number to 1.27.
23079
23080 * Makefile.am:
23081 Added `bison.simple' to list of files removed by `make distclean'.
23082
23083 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23084
23085 * src/files.c, src/files.h:
23086 Defined locations of parser files in config.h instead of Makefile.
23087
23088 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23089
23090 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23091 Defined locations of parser files in config.h instead of Makefile.
23092
23093 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23094
23095 * Makefile.am:
23096 Removed inappropriate use of $< macro.
23097
23098 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23099
23100 * po/Makefile.in.in, po/POTFILES.in:
23101 Add `po' directory skeleton.
23102
23103 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23104
23105 * README: Document help-bison list.
23106
23107 * configure.in: Add check for mkstemp().
23108
23109 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23110
23111 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23112 Hush a few compiler warnings.
23113
23114 * src/files.c:
23115 Add tryclose(), which verifies that fclose was successful.
23116 Hush a couple of compiler warnings.
23117
23118 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23119
23120 * Makefile.am, OChangeLog:
23121 ChangeLog is now automatically generated. Include the old version as
23122 OChangeLog.
23123
23124 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23125
23126 * 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:
23127 Update FSF address.
23128
23129 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23130
23131 * doc/bison.texinfo: Fix formatting glitch.
23132
23133 * doc/bison.texinfo: Update FSF address.
23134
23135 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23136
23137 * acconfig.h: Update FSF address.
23138
23139 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23140
23141 * src/system.h:
23142 Don't define PACKAGE here, since config.h defines it.
23143
23144 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23145
23146 * src/reader.c: Update copyright date.
23147
23148 * src/main.c:
23149 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23150 favor of output directly to stderr (avoids buffer overruns).
23151
23152 * src/reader.c: Some checks for premature EOF.
23153
23154 * 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:
23155 Use prototypes if the compiler understands them.
23156
23157 * src/files.c: Honor TMPDIR on Unix hosts.
23158 Use prototypes if the compiler understands them.
23159
23160 * src/reader.c:
23161 Fix a couple of buffer overrun bugs.
23162 Use prototypes if the compiler understands them.
23163
23164 * src/system.h: Include unistd.h and ctype.h.
23165 Use #ifdef instead of #if for NLS symbols.
23166
23167 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23168
23169 * doc/bison.texinfo:
23170 Delete comment "consider using @set for edition number, etc..." since
23171 we now are doing so.
23172
23173 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23174
23175 * configure.in:
23176 Use prototypes if the compiler understands them.
23177
23178 * NEWS: Document 1.26 highlights.
23179
23180 * Makefile.am: Require Automake 1.3 or later.
23181
23182 * acconfig.h:
23183 Use prototypes if the compiler understands them.
23184
23185 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23186
23187 * src/version.c:
23188 Use VERSION symbol from automake for version number.
23189
23190 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23191
23192 * acconfig.h, configure.in, version.cin:
23193 Use VERSION symbol from automake for version number.
23194
23195 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23196
23197 * Makefile.am:
23198 Distribute original version of simple parser (bison.s1), not built
23199 version (bison.simple).
23200
23201 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23202
23203 * doc/bison.texinfo: Add info dir entry.
23204
23205 * doc/bison.texinfo:
23206 Let automake put version number into documentation.
23207
23208 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23209
23210 * src/bison.cld, src/build.com, src/vmshlp.mar:
23211 Add non-RCS files from /gd/gnu/bison.
23212
23213 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23214
23215 * doc/bison.1:
23216 Document the BISON_HAIRY and BISON_SIMPLE variables.
23217
23218 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23219
23220 * src/version.c: Build version.c automatically.
23221
23222 * src/reader.c:
23223 Fix token numbering (used to start at 258, not 257).
23224
23225 * src/system.h: Include config.h.
23226
23227 * src/getargs.c: Update bug report address.
23228
23229 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23230 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23231
23232 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23233
23234 * Makefile.am:
23235 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23236
23237 * configure.in, version.cin:
23238 Build version.c automatically.
23239
23240 * AUTHORS: Add AUTHORS file.
23241
23242 * README: Update bug report address.
23243
23244 * bison.simple:
23245 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23246
23247 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23248 Add automake stuff.
23249
23250 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23251
23252 * doc/bison.texinfo: Clean up some formatting.
23253
23254 1998-05-05 Richard Stallman <rms@gnu.org>
23255
23256 * doc/bison.texinfo:
23257 Explain better why to make a pure parser.
23258
23259 1998-01-05 Richard Stallman <rms@gnu.org>
23260
23261 * src/files.c (openfiles):
23262 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23263 find a temporary directory, if possible. Do not unlink files while
23264 they are open.
23265
23266 1997-08-25 Richard Stallman <rms@gnu.org>
23267
23268 * src/reader.c (stack_offset;):
23269 Change some warni to warns.
23270
23271 * src/lex.c (literalchar): Use warns, not warni.
23272
23273 1997-06-28 Richard Stallman <rms@gnu.org>
23274
23275 * src/bison.s1: Add a Bison version comment.
23276
23277 * src/main.c (fatal, warn, berror):
23278 Use program_name.
23279
23280 1997-06-28 Richard Stallman <rms@gnu.org>
23281
23282 * Makefile.in (bison_version): New variable.
23283 (dist): Use that variable.
23284 (bison.s1): Substitute the Bison version into bison.simple.
23285
23286 * bison.simple: Add a Bison version comment.
23287
23288 1997-06-18 Richard Stallman <rms@gnu.org>
23289
23290 * src/main.c (fatal, warn, berror):
23291 Make error messages standard.
23292 (toomany): Improve error message text.
23293
23294 * 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:
23295 new.h renamed to alloc.h.
23296
23297 1997-06-18 Richard Stallman <rms@gnu.org>
23298
23299 * Makefile.in: new.h renamed to alloc.h.
23300
23301 1997-05-24 Richard Stallman <rms@gnu.org>
23302
23303 * src/lex.c (literalchar):
23304 Fix the code for escaping \, " and '.
23305
23306 (lex): Avoid trouble when there are many chars
23307 to discard in a char literal with just several chars in it.
23308
23309 1997-05-17 Richard Stallman <rms@gnu.org>
23310
23311 * src/bison.s1:
23312 Use malloc, if using alloca is troublesome.
23313 (YYSTACK_USE_ALLOCA): New flag macro.
23314 Define it for some systems and compilers.
23315 (YYSTACK_ALLOC): New macro.
23316 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23317 If it was malloc'd, free it.
23318
23319 1997-05-17 Richard Stallman <rms@gnu.org>
23320
23321 * bison.simple:
23322 Use malloc, if using alloca is troublesome.
23323 (YYSTACK_USE_ALLOCA): New flag macro.
23324 Define it for some systems and compilers.
23325 (YYSTACK_ALLOC): New macro.
23326 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23327 If it was malloc'd, free it.
23328
23329 1997-04-23 Richard Stallman <rms@gnu.org>
23330
23331 * src/bison.s1:
23332 (alloca) [__hpux]: Always define as __builtin_alloca.
23333
23334 1997-04-23 Richard Stallman <rms@gnu.org>
23335
23336 * bison.simple:
23337 (alloca) [__hpux]: Always define as __builtin_alloca.
23338
23339 1997-04-22 Richard Stallman <rms@gnu.org>
23340
23341 * src/bison.s1:
23342 [__hpux]: Include alloca.h (right for HPUX 10)
23343 instead of declaring alloca (right for HPUX 9).
23344
23345 * src/bison.s1 (__yy_memcpy):
23346 Declare arg `count' as unsigned int.
23347 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23348
23349 1997-04-22 Richard Stallman <rms@gnu.org>
23350
23351 * bison.simple:
23352 [__hpux]: Include alloca.h (right for HPUX 10)
23353 instead of declaring alloca (right for HPUX 9).
23354
23355 * bison.simple (__yy_memcpy):
23356 Declare arg `count' as unsigned int.
23357 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23358
23359 1997-01-03 Richard Stallman <rms@gnu.org>
23360
23361 * src/allocate.c: [__STDC__ or _MSC_VER]:
23362 Declare calloc and realloc to return void *.
23363
23364 1997-01-02 Richard Stallman <rms@gnu.org>
23365
23366 * src/system.h:
23367 [_MSC_VER]: Include stdlib.h and process.h.
23368 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23369
23370 * src/main.c (main): Return FAILURE as a value.
23371 (printable_version): Declare arg as int, not char.
23372
23373 1997-01-02 Richard Stallman <rms@gnu.org>
23374
23375 * Makefile.in (dist):
23376 Explicitly check for symlinks, and copy them.
23377
23378 1996-12-19 Richard Stallman <rms@gnu.org>
23379
23380 * src/files.c:
23381 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23382
23383 1996-12-18 Paul Eggert <eggert@gnu.org>
23384
23385 * src/bison.s1 (yyparse):
23386 If __GNUC__ and YYPARSE_PARAM are both defined,
23387 declare yyparse to have a void * argument.
23388
23389 1996-12-18 Paul Eggert <eggert@gnu.org>
23390
23391 * bison.simple (yyparse):
23392 If __GNUC__ and YYPARSE_PARAM are both defined,
23393 declare yyparse to have a void * argument.
23394
23395 1996-12-17 Richard Stallman <rms@gnu.org>
23396
23397 * src/reduce.c (nbits): Add some casts.
23398
23399 1996-08-12 Richard Stallman <rms@gnu.org>
23400
23401 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23402
23403 1996-08-12 Richard Stallman <rms@gnu.org>
23404
23405 * bison.simple: Test _MSDOS as well as _MSDOS_.
23406
23407 1996-07-31 Richard Stallman <rms@gnu.org>
23408
23409 * src/bison.s1:
23410 [__sun && __i386]: Include alloca.h.
23411
23412 1996-07-31 Richard Stallman <rms@gnu.org>
23413
23414 * bison.simple:
23415 [__sun && __i386]: Include alloca.h.
23416
23417 1996-07-30 Richard Stallman <rms@gnu.org>
23418
23419 * src/bison.s1: Comment change.
23420
23421 * src/bison.s1: Test _MSDOS_, not MSDOS.
23422
23423 1996-07-30 Richard Stallman <rms@gnu.org>
23424
23425 * bison.simple: Comment change.
23426
23427 * bison.simple: Test _MSDOS_, not MSDOS.
23428
23429 1996-06-01 Richard Stallman <rms@gnu.org>
23430
23431 * 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:
23432 Insert `_' macro around many string constants.
23433
23434 * src/main.c:
23435 Insert `_' macro around many string constants.
23436
23437 (main): Call setlocale, bindtextdomain and textdomain.
23438
23439 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23440 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23441 [ENABLE_NLS]: Include libintl.h.
23442 [ENABLE_NLS] (gettext): Define.
23443 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23444 (N_, PACKAGE, LOCALEDIR): New macros.
23445
23446 1996-06-01 Richard Stallman <rms@gnu.org>
23447
23448 * POTFILES.in: New file.
23449
23450 * Makefile.in (allocate.o):
23451 Define target explicitly.
23452
23453 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23454 (LDFLAGS): Set to @LDFLAGS@.
23455 (configure): Run autoconf only if preceding `cd' succeeds.
23456 (bison.s1): Redirect output to temporary file then move the
23457 temporary to the target, rather than redirecting directly to bison.s1.
23458 (clean): Remove config.status and config.log.
23459 (distclean): Don't remove config.status here.
23460
23461 1996-05-12 Richard Stallman <rms@gnu.org>
23462
23463 * src/bison.s1:
23464 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23465
23466 1996-05-12 Richard Stallman <rms@gnu.org>
23467
23468 * bison.simple:
23469 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23470
23471 1996-05-11 Richard Stallman <rms@gnu.org>
23472
23473 * src/bison.s1 (__yy_memcpy):
23474 Really reorder the args, as was supposedly done on Feb 14 1995.
23475 (yyparse): Calls changed accordingly.
23476
23477 1996-05-11 Richard Stallman <rms@gnu.org>
23478
23479 * Makefile.in (dist): Don't use $(srcdir).
23480
23481 * bison.simple (__yy_memcpy):
23482 Really reorder the args, as was supposedly done on Feb 14 1995.
23483 (yyparse): Calls changed accordingly.
23484
23485 1996-01-27 Richard Stallman <rms@gnu.org>
23486
23487 * src/output.c (output_rule_data):
23488 Test YYERROR_VERBOSE in the conditional
23489 around the definition of ttyname.
23490
23491 1995-12-29 Richard Stallman <rms@gnu.org>
23492
23493 * src/bison.s1:
23494 Fix line numbers in #line commands.
23495
23496 1995-12-29 Richard Stallman <rms@gnu.org>
23497
23498 * bison.simple:
23499 Fix line numbers in #line commands.
23500
23501 1995-12-27 Richard Stallman <rms@gnu.org>
23502
23503 * src/bison.s1 (YYPARSE_PARAM_DECL):
23504 In C++, make it always null.
23505 (YYPARSE_PARAM_ARG): New macro.
23506 (yyparse): Use YYPARSE_PARAM_ARG.
23507
23508 1995-12-27 Richard Stallman <rms@gnu.org>
23509
23510 * bison.simple (YYPARSE_PARAM_DECL):
23511 In C++, make it always null.
23512 (YYPARSE_PARAM_ARG): New macro.
23513 (yyparse): Use YYPARSE_PARAM_ARG.
23514
23515 1995-11-29 Richard Stallman <rms@gnu.org>
23516
23517 * doc/bison.texinfo:
23518 Describe literal string tokens, %raw, %no_lines, %token_table.
23519
23520 1995-11-29 Daniel Hagerty <hag@gnu.org>
23521
23522 * doc/bison.texinfo: Fixed update date
23523
23524 1995-10-16 Richard Stallman <rms@gnu.org>
23525
23526 * src/version.c: Version 1.25.
23527
23528 1995-10-16 Richard Stallman <rms@gnu.org>
23529
23530 * NEWS: *** empty log message ***
23531
23532 1995-10-16 Richard Stallman <rms@gnu.org>
23533
23534 * doc/bison.1, doc/bison.rnh:
23535 Add new options.
23536
23537 1995-10-15 Richard Stallman <rms@gnu.org>
23538
23539 * src/vmsgetargs.c, src/getargs.c:
23540 Added -n, -k, and -raw switches.
23541 (noparserflag, toknumflag, rawtoknumflag): New variables.
23542
23543 * src/symtab.h (SALIAS):
23544 New #define for adding aliases to %token.
23545 (struct bucket): Added `alias' field.
23546
23547 * src/reduce.c (reduce_grammar):
23548 Revise error message.
23549 (print_notices): Remove final `.' from error message.
23550
23551 * src/reader.c (reader_output_yylsp):
23552 New function.
23553 (readgram): Use `#if 0' around code that accepted %command
23554 inside grammar rules: The documentation doesn't allow it,
23555 and it will fail since the %command processors scan for the next %.
23556 (parse_token_decl): Extended the %token
23557 declaration to allow a multi-character symbol as an alias.
23558 (parse_thong_decl): New function.
23559 (read_declarations): Added %thong declarations.
23560 (read_declarations): Handle NOOP to deal with allowing
23561 % declarations as another means to specify the flags.
23562 (readgram): Allow %prec prior to semantics embedded in a rule.
23563 (skip_to_char, read_declarations, copy_definition)
23564 (parse_token_decl, parse_start_decl, parse_type_decl)
23565 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23566 (get_type_name, copy_guard, copy_action, readgram)
23567 (get_type, packsymbols): Revised most error messages.
23568 Changed `fatal' to `warnxxx' to avoid aborting for error.
23569 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23570 (read_declarations): Improve the error message for
23571 an invalid character. Do not abort.
23572 (read_declarations, copy_guard, copy_action): Use
23573 printable_version to avoid unprintable characters in printed output.
23574 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23575 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23576 Allow the type of a non-terminal can be given
23577 more than once, as long as all specifications give the same type.
23578
23579 * src/output.c:
23580 (output_headers, output_trailers, output, output_gram)
23581 (output_rule_data): Implement noparserflag variable.
23582 Implement toknumflag variable.
23583 (output): Call reader_output_yylsp to output LTYPESTR.
23584
23585 * src/main.c (main):
23586 If reader sees an error, don't process the grammar.
23587 (fatals): Updated to not use VARARGS1.
23588 (printable_version, int_to_string, warn, warni, warns, warnss)
23589 (warnsss): New error reporting functions. Avoid abort for error.
23590
23591 * src/lex.h:
23592 Added THONG and NOOP for alias processing.
23593 Added SETOPT for the new code that allows setting options with %flags.
23594
23595 * src/lex.c:
23596 Include getopt.h. Add some extern decls.
23597 (safegetc): New function to deal with EOF gracefully.
23598 (literalchar); new function to deal with reading \ escapes.
23599 (lex): Use literalchar.
23600 (lex): Implemented "..." tokens.
23601 (literalchar, lex, parse_percent_token): Made tokenbuffer
23602 always contain the token. This includes growing the token
23603 buffer while reading an integer.
23604 (parse_percent_token): Replaced if-else statement with percent_table.
23605 (parse_percent_token): Added % declarations as another
23606 way to specify the flags -n, -l, and -r. Also added hooks for
23607 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23608 major changes to files.c.
23609 (lex) Retain in the incoming stream a character following
23610 an incorrect '/'.
23611 (skip_white_space, lex): Revised most error messages
23612 and changed fatal to warn to avoid aborting.
23613 (percent_table): Added %thong declarations.
23614
23615 * src/gram.h: Comment changes.
23616
23617 * src/files.c (openfiles, open_extra_files, done):
23618 Add faction flag
23619 and actfile file. Handle noparserflag. Both for -n switch.
23620
23621 * src/conflicts.c (resolve_sr_conflict):
23622 Remove use of alloca.
23623
23624 1995-06-01 Jim Meyering <meyering@gnu.org>
23625
23626 * doc/bison.texinfo: *** empty log message ***
23627
23628 1995-05-06 Richard Stallman <rms@gnu.org>
23629
23630 * src/bison.s1: Comment change.
23631
23632 1995-05-06 Richard Stallman <rms@gnu.org>
23633
23634 * bison.simple: Comment change.
23635
23636 1995-05-03 Richard Stallman <rms@gnu.org>
23637
23638 * src/version.c: Version now 1.24.
23639
23640 * src/bison.s1: Change distribution terms.
23641
23642 * src/version.c: Version now 1.23.
23643
23644 1995-05-03 Richard Stallman <rms@gnu.org>
23645
23646 * doc/bison.texinfo:
23647 Rewrite "Conditions for Using Bison".
23648 Update version to 1.24.
23649
23650 1995-05-03 Richard Stallman <rms@gnu.org>
23651
23652 * bison.simple: Change distribution terms.
23653
23654 1995-02-23 Richard Stallman <rms@gnu.org>
23655
23656 * src/files.c: Test __VMS_POSIX as well as VMS.
23657
23658 1995-02-14 Jim Meyering <meyering@gnu.org>
23659
23660 * src/bison.s1 (__yy_memcpy):
23661 Renamed from __yy_bcopy to avoid
23662 confusion. Reverse FROM and TO arguments to be consistent with
23663 those of memcpy.
23664
23665 1995-02-14 Jim Meyering <meyering@gnu.org>
23666
23667 * bison.simple (__yy_memcpy):
23668 Renamed from __yy_bcopy to avoid
23669 confusion. Reverse FROM and TO arguments to be consistent with
23670 those of memcpy.
23671
23672 1994-11-10 David J. MacKenzie <djm@gnu.org>
23673
23674 * NEWS: reformat
23675
23676 * NEWS: New file.
23677
23678 * Makefile.in (DISTFILES): Include NEWS.
23679
23680 * Makefile.in (DISTFILES):
23681 Include install-sh, not install.sh.
23682
23683 * configure.in: Update to Autoconf v2 macro names.
23684
23685 1994-10-05 David J. MacKenzie <djm@gnu.org>
23686
23687 * Makefile.in: fix typo
23688
23689 * Makefile.in (prefix, exec_prefix):
23690 Let configure set them.
23691
23692 1994-09-28 David J. MacKenzie <djm@gnu.org>
23693
23694 * Makefile.in: Set datadir to $(prefix)/share.
23695
23696 1994-09-15 Richard Stallman <rms@gnu.org>
23697
23698 * src/bison.s1:
23699 Update copyright notice and GPL version.
23700
23701 1994-09-15 Richard Stallman <rms@gnu.org>
23702
23703 * bison.simple:
23704 Update copyright notice and GPL version.
23705
23706 1994-07-12 Richard Stallman <rms@gnu.org>
23707
23708 * src/reduce.c, src/reader.c:
23709 entered into RCS
23710
23711 1994-05-05 David J. MacKenzie <djm@gnu.org>
23712
23713 * Makefile.in: entered into RCS
23714
23715 1994-03-26 Richard Stallman <rms@gnu.org>
23716
23717 * src/bison.s1: entered into RCS
23718
23719 1994-03-26 Richard Stallman <rms@gnu.org>
23720
23721 * bison.simple: entered into RCS
23722
23723 1994-03-25 Richard Stallman <rms@gnu.org>
23724
23725 * src/main.c: entered into RCS
23726
23727 1994-03-24 Richard Stallman <rms@gnu.org>
23728
23729 * src/conflicts.c: entered into RCS
23730
23731 1994-01-02 Richard Stallman <rms@gnu.org>
23732
23733 * Makefile.in: *** empty log message ***
23734
23735 1993-11-21 Richard Stallman <rms@gnu.org>
23736
23737 * src/bison.s1: *** empty log message ***
23738
23739 1993-11-21 Richard Stallman <rms@gnu.org>
23740
23741 * doc/bison.texinfo: entered into RCS
23742
23743 * doc/bison.texinfo: *** empty log message ***
23744
23745 1993-11-21 Richard Stallman <rms@gnu.org>
23746
23747 * bison.simple: *** empty log message ***
23748
23749 1993-10-25 David J. MacKenzie <djm@gnu.org>
23750
23751 * doc/bison.texinfo: *** empty log message ***
23752
23753 1993-10-19 Richard Stallman <rms@gnu.org>
23754
23755 * src/bison.s1: *** empty log message ***
23756
23757 1993-10-19 Richard Stallman <rms@gnu.org>
23758
23759 * bison.simple: *** empty log message ***
23760
23761 1993-10-14 Richard Stallman <rms@gnu.org>
23762
23763 * src/bison.s1: *** empty log message ***
23764
23765 1993-10-14 Richard Stallman <rms@gnu.org>
23766
23767 * bison.simple: *** empty log message ***
23768
23769 1993-09-14 David J. MacKenzie <djm@gnu.org>
23770
23771 * doc/bison.texinfo: *** empty log message ***
23772
23773 1993-09-13 Noah Friedman <friedman@gnu.org>
23774
23775 * Makefile.in: *** empty log message ***
23776
23777 1993-09-10 Richard Stallman <rms@gnu.org>
23778
23779 * src/conflicts.c: *** empty log message ***
23780
23781 * src/system.h: entered into RCS
23782
23783 1993-09-10 Richard Stallman <rms@gnu.org>
23784
23785 * doc/bison.1: entered into RCS
23786
23787 1993-09-06 Noah Friedman <friedman@gnu.org>
23788
23789 * src/version.c: entered into RCS
23790
23791 1993-09-06 Noah Friedman <friedman@gnu.org>
23792
23793 * Makefile.in: *** empty log message ***
23794
23795 1993-07-30 David J. MacKenzie <djm@gnu.org>
23796
23797 * Makefile.in: *** empty log message ***
23798
23799 1993-07-24 Richard Stallman <rms@gnu.org>
23800
23801 * src/bison.s1: *** empty log message ***
23802
23803 1993-07-24 Richard Stallman <rms@gnu.org>
23804
23805 * bison.simple: *** empty log message ***
23806
23807 1993-07-08 David J. MacKenzie <djm@gnu.org>
23808
23809 * Makefile.in: *** empty log message ***
23810
23811 1993-07-04 Richard Stallman <rms@gnu.org>
23812
23813 * src/bison.s1: *** empty log message ***
23814
23815 1993-07-04 Richard Stallman <rms@gnu.org>
23816
23817 * bison.simple: *** empty log message ***
23818
23819 1993-06-26 David J. MacKenzie <djm@gnu.org>
23820
23821 * src/getargs.c: entered into RCS
23822
23823 1993-06-26 David J. MacKenzie <djm@gnu.org>
23824
23825 * doc/bison.texinfo: *** empty log message ***
23826
23827 * doc/bison.1: New file.
23828
23829 1993-06-25 Richard Stallman <rms@gnu.org>
23830
23831 * src/getargs.c: New file.
23832
23833 1993-06-16 Richard Stallman <rms@gnu.org>
23834
23835 * src/bison.s1: *** empty log message ***
23836
23837 1993-06-16 Richard Stallman <rms@gnu.org>
23838
23839 * bison.simple: *** empty log message ***
23840
23841 1993-06-03 Richard Stallman <rms@gnu.org>
23842
23843 * src/bison.s1: New file.
23844
23845 1993-06-03 Richard Stallman <rms@gnu.org>
23846
23847 * doc/bison.texinfo: *** empty log message ***
23848
23849 1993-06-03 Richard Stallman <rms@gnu.org>
23850
23851 * bison.simple: New file.
23852
23853 1993-05-19 Richard Stallman <rms@gnu.org>
23854
23855 * doc/bison.texinfo: New file.
23856
23857 1993-05-07 Noah Friedman <friedman@gnu.org>
23858
23859 * Makefile.in: *** empty log message ***
23860
23861 1993-04-28 Noah Friedman <friedman@gnu.org>
23862
23863 * src/reader.c: *** empty log message ***
23864
23865 1993-04-23 Noah Friedman <friedman@gnu.org>
23866
23867 * src/alloc.h: entered into RCS
23868
23869 1993-04-20 David J. MacKenzie <djm@gnu.org>
23870
23871 * src/version.c: *** empty log message ***
23872
23873 * src/files.c, src/allocate.c:
23874 entered into RCS
23875
23876 * src/reader.c: *** empty log message ***
23877
23878 * src/lex.c: entered into RCS
23879
23880 * src/conflicts.c: New file.
23881
23882 * src/symtab.c: entered into RCS
23883
23884 * src/alloc.h: New file.
23885
23886 * src/LR0.c: entered into RCS
23887
23888 1993-04-18 Noah Friedman <friedman@gnu.org>
23889
23890 * src/reader.c: New file.
23891
23892 * src/version.c: *** empty log message ***
23893
23894 1993-04-18 Noah Friedman <friedman@gnu.org>
23895
23896 * Makefile.in: *** empty log message ***
23897
23898 1993-04-17 Noah Friedman <friedman@gnu.org>
23899
23900 * Makefile.in: *** empty log message ***
23901
23902 1993-04-15 Richard Stallman <rms@gnu.org>
23903
23904 * src/main.c, src/files.c:
23905 New file.
23906
23907 1993-04-15 Noah Friedman <friedman@gnu.org>
23908
23909 * configure.in: entered into RCS
23910
23911 * configure.in: *** empty log message ***
23912
23913 * configure.in: New file.
23914
23915 1993-04-14 Richard Stallman <rms@gnu.org>
23916
23917 * Makefile.in: New file.
23918
23919 1993-04-13 Richard Stallman <rms@gnu.org>
23920
23921 * src/version.c: New file.
23922
23923 1993-03-25 Richard Stallman <rms@gnu.org>
23924
23925 * src/output.c: entered into RCS
23926
23927 1992-09-25 Richard Stallman <rms@gnu.org>
23928
23929 * configure.bat: entered into RCS
23930
23931 1992-06-22 Richard Stallman <rms@gnu.org>
23932
23933 * src/vmsgetargs.c: entered into RCS
23934
23935 1992-06-22 Richard Stallman <rms@gnu.org>
23936
23937 * doc/bison.rnh: entered into RCS
23938
23939 1992-04-20 David J. MacKenzie <djm@gnu.org>
23940
23941 * README: entered into RCS
23942
23943 1992-01-22 Richard Stallman <rms@gnu.org>
23944
23945 * src/machine.h: entered into RCS
23946
23947 1991-12-21 Richard Stallman <rms@gnu.org>
23948
23949 * src/lalr.c, src/closure.c:
23950 entered into RCS
23951
23952 1991-12-20 Richard Stallman <rms@gnu.org>
23953
23954 * src/state.h: entered into RCS
23955
23956 1991-12-18 Richard Stallman <rms@gnu.org>
23957
23958 * src/print.c, src/nullable.c, src/derives.c:
23959 entered into RCS
23960
23961 1991-11-03 David J. MacKenzie <djm@gnu.org>
23962
23963 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23964 entered into RCS
23965
23966 1988-09-09 Richard Stallman <rms@gnu.org>
23967
23968 * src/bison.hairy: entered into RCS
23969
23970 1987-12-16 Richard Stallman <rms@gnu.org>
23971
23972 * REFERENCES: entered into RCS
23973
23974
23975 -----
23976
23977 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23978 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
23979 2008, 2009 Free Software Foundation, Inc.
23980
23981 Copying and distribution of this file, with or without
23982 modification, are permitted provided the copyright notice and this
23983 notice are preserved.