]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Fix a --enable-gcc-warnings problem.
[bison.git] / ChangeLog
... / ...
CommitLineData
12009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Fix a --enable-gcc-warnings problem.
4 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
5 variable.
6
72009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
8
9 Warn about character literals not of length one.
10 * NEWS (2.5): Document.
11 * src/scan-gram.l (INITIAL): Remove comment that we don't check
12 the length.
13 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
14 * tests/input.at (Bad character literals): New test group.
15
162009-07-24 Alex Rozenman <rozenmam@gmail.com>
17
18 Fix some memory leaks.
19 * src/named-ref.c: Add a pointer check (named_ref_free).
20 * src/scan-code.l: New function (variant_table_free). Called in
21 code_scanner_free.
22 * src/symlist.c: Call to named_ref_free (symbol_list_free).
23
242009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
25
26 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
27
282009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
29
30 Some M4 cleanup in the testsuite.
31 Suggested by Eric Blake at
32 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
33 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
34 complicate the code by distinguishing between a missing value
35 and an empty string value for an optional argument. This fix is
36 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
37 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
38 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
39 arguments are not needed because of the following changes.
40 Fix stale comments.
41 Bison developers should use GNU M4 and should not use
42 POSIXLY_CORRECT when building the test suite, so do not
43 complicate the code by avoiding $10 and above.
44 Do not quote an empty string value for an optional argument, and
45 do not distinguish between a missing value and an empty string
46 value.
47
482009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
49
50 Revert unnecessary column realignment in --help output.
51 Reported by Akim Demaille at
52 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
53 * src/getargs.c (usage): Here.
54
552009-07-04 Alex Rozenman <rozenman@gmail.com>
56
57 Alphabetical order in src/local.mk.
58 * src/local.mk: Adjust.
59
602009-07-04 Alex Rozenman <rozenman@gmail.com>
61
62 Style changes and factoring.
63 * src/named-ref.h: Add comments.
64 * src/parse-gram.y: Readability and style changes.
65 * src/reader.c: Factoring: assign_named_ref function.
66 * src/scan-code.l: Factoring and style changes. Rename
67 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
68 Use "unsigned" type for variant index. Improve readablity.
69 * src/scan-gram.l: Change error messages and add comments.
70 * src/symlist.h: symbol_list_null: New function decl.
71 * src/symlist.c: symbol_list_null: Implement here.
72 * tests/named-refs.at: Adjust for new error messages.
73
742009-06-29 Eric Blake <ebb9@byu.net>
75
76 scan-code: avoid compiler warnings
77 * src/scan-code.l (parse_named_ref): Use correct specifiers.
78
792009-06-29 Akim Demaille <demaille@gostai.com>
80
81 build: avoid concurrent extraction of calc++.
82 * examples/calc++/Makefile.am (calc.stamp): New.
83 Depend on it to create the sources of calc++ so that concurrent
84 builds don't launch several "extexi" in parallel.
85 Not only this is inefficient, this also builds incorrect sources
86 with several extractions mixed together.
87
882009-06-29 Akim Demaille <demaille@gostai.com>
89
90 parse.error: fix.
91 * data/bison.m4: Move code related to specific variables after the
92 definition of the variable-maintaining macros so that we don't
93 "invoke" b4_percent_define_check_values before it is defined.
94
952009-06-29 Akim Demaille <demaille@gostai.com>
96
97 variables: parse.error
98
99 Implement, document, and test the replacement of %error-verbose
100 by %define parse.error "verbose".
101 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
102 values of the parse.error variable.
103 Make "simple" its default value.
104 Check the valid values.
105 * src/parse-gram.y: Use %define parse.error.
106 (PERCENT_ERROR_VERBOSE): New token.
107 Support it.
108 * src/scan-gram.l: Support %error-verbose.
109
110 * doc/bison.texinfo (Decl Summary): Replace the documentation of
111 %define error-verbose by that of %define parse.error.
112 * NEWS: Document it.
113
114 * tests/actions.at, tests/calc.at: Use parse.error instead of
115 %error-verbose.
116
1172009-06-27 Alex Rozenman <rozenman@gmail.com>
118
119 Implement support for named symbol references.
120 * src/parse-gram.y: Add new syntax (named_ref.opt).
121 * src/reader.c: Store named refs in symbol lists.
122 * src/reader.h: New argument for symbol_append and
123 action_append functions.
124 * src/scan-code.h: Add new field (named_ref) into
125 code_props data structure. Keeps named ref of midrule
126 actions.
127 * src/scan-code.l: Support for named refs in semantic
128 action code. New function 'parse_named_ref'.
129 * src/scan-gram.l: Support bracketed id.
130 * src/symlist.c: Store named refs in symbol lists.
131 * src/symlist.h: New field in symbol list: named_ref.
132 * src/named-ref.h: New file, a struct for named_ref.
133 * src/named-ref.cp: New file, named_ref_new function.
134 * src/local.mk: Add two new files.
135 * tests/testsuite.at: Include new test group:
136 * tests/named-refs.at: this new file.
137
1382009-06-25 Akim Demaille <demaille@gostai.com>
139
140 hash: check insertion for memory exhaustion.
141 * src/uniqstr.c (uniqstr_new): New.
142
1432009-06-24 Akim Demaille <demaille@gostai.com>
144
145 variables: rename namespace as api.namespace.
146 Discussed in
147 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
148
149 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
150 New.
151 (b4_percent_define_use): New.
152 Use it where applicable.
153 * data/c++.m4: Replace uses of the variable "namespace" by
154 "api.namespace".
155 Default the latter to the former.
156 * doc/bison.texinfo (Decl Summary): Document "namespace" as
157 obsolete.
158 Document api.namespace.
159 Use @samp to document %define uses, keep @code for identifiers.
160 * NEWS: Likewise.
161 * tests/c++.at, tests/input.at: Test api.namespace instead of
162 namespace. (The tests passed with namespace.)
163
1642009-06-11 Akim Demaille <demaille@gostai.com>
165
166 style changes.
167 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
168 * src/print-xml.c: Style changes.
169 * tests/conflicts.at: Comment changes.
170
1712009-06-11 Akim Demaille <demaille@gostai.com>
172
173 xml: beware of user strings used to give a %prec to rules.
174 * tests/conflicts.at (%prec with user strings): New.
175 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
176 XML output.
177
1782009-06-11 Akim Demaille <demaille@gostai.com>
179
180 hash: check insertion for memory exhaustion.
181 * src/muscle-tab.c (muscle_insert, muscle_grow)
182 * src/state.c (state_hash_insert): Check the return value of
183 hash_insert.
184
1852009-06-11 Akim Demaille <demaille@gostai.com>
186
187 tests: honor TESTSUITEFLAGS in every check target.
188 * tests/local.mk (RUN_TESTSUITE): New.
189 (check-local, installcheck-local, maintainer-check-g++)
190 (maintainer-check-posix, maintainer-check-valgrind): Use it.
191
1922009-06-10 Akim Demaille <demaille@gostai.com>
193
194 deterministic test suite.
195 Some consistency checks on symbols are performed after all the
196 symbols were read, by an iteration over the symbol table. This
197 traversal is nondeterministic, which can be a problem for test
198 cases.
199 Avoid this.
200 Addresses another form of nondeterminism reported by Joel E. Denny.
201 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
202
203 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
204 test in two.
205 Use different file names for the three tests to make the
206 maintenance easier.
207
2082009-06-10 Akim Demaille <demaille@gostai.com>
209
210 gnulib: update.
211 * gnulib: Update to latest.
212 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
213 * m4/.gitignore: Regen.
214 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
215 Call xalloc_die on hash_insert failures.
216 Requested by the new __warn_unused_result__ attribute of
217 hash_insert.
218
2192009-06-10 Akim Demaille <demaille@gostai.com>
220
221 deterministic user-token-number redeclaration errors.
222 Address nondeterminism reported by Joel E. Denny.
223 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
224
225 * src/uniqstr.h: Comment changes.
226 * src/location.h (boundary_cmp, location_cmp): New.
227 * src/symtab.c (user_token_number_redeclaration): New.
228 (symbol_translation): Use it.
229 * tests/input.at (Numbered tokens): Adjust the expected output.
230
2312009-05-25 Akim Demaille <demaille@gostai.com>
232
233 build: avoid ignored errors.
234 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
235 errors, they pollute the output.
236
2372009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
238
239 Convert multiple variable definition warnings to complaints.
240 * NEWS (2.5): Add a new entry for that change.
241 * doc/bison.texinfo (Decl Summary): Update %define entry.
242 (Bison Options): Update -D/--define/-F/--force-define entry.
243 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
244 * src/muscle-tab.h (muscle_percent_define_insert): Update
245 comments.
246 * tests/input.at (`%define errors'): Update.
247 (`%define, --define, --force-define'): Update.
248
2492009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
250
251 -F/--force-define and relative %define/-D/--define priorities.
252 * NEWS (2.5): Add documentation to -D/--define entry.
253 * build-aux/cross-options.pl: Hard-code association of
254 --force-define with %define.
255 * doc/bison.texinfo (Decl Summary): In %define entry,
256 cross-reference command-line options.
257 (Bison Options): Add documentation to -D/--define entry.
258 (Option Cross Key): Widen column for --force-define row.
259 * src/getargs.c (usage): Document -F/--force-define. Realign
260 options in output.
261 (short_options, long_options, getargs): Parse -F/--force-define,
262 and update muscle_percent_define_insert invocations.
263 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
264 (muscle_percent_define_insert): Add argument with that type.
265 * src/muscle-tab.c (muscle_percent_define_insert): Implement
266 -F/--force-define behavior and priorities.
267 (muscle_percent_define_ensure): Update
268 muscle_percent_define_insert invocation.
269 * src/parse-gram.y (prologue_declaration): Update
270 muscle_percent_define_insert invocations.
271 * tests/input.at (`%define, --define'): Rename to...
272 (`%define, --define, --force-define'): ... this and extend.
273
2742009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
275
276 Update some comments to make sense for -D.
277 * data/bison.m4 (b4_check_user_names): In header comments, say
278 "user occurrence" instead of "grammar occurrence".
279 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
280 (muscle_percent_code_grow): Likewise just for consistency.
281
2822009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
283
284 * data/c++.m4 (b4_namespace_close): Simplify slightly.
285
2862009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
287
288 Handle a trailing `:' in a user-supplied C++ namespace better.
289 * data/c++.m4 (b4_namespace_close): Don't let it be printed
290 among the closing braces here. This fix might make the
291 generated code easier to debug, but otherwise it should be
292 insignificant because a trailing `:' is a C++ error already.
293
2942009-05-19 Akim Demaille <demaille@gostai.com>
295
296 remove useless variable.
297 * src/getargs.c (skeleton_arg): Remove now useless variable.
298 Should help the compiler see that this printf-like call is sane.
299
3002009-05-15 Akim Demaille <demaille@gostai.com>
301
302 Rename token.prefix as api.tokens.prefix.
303 Discussed here.
304 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
305
306 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
307 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
308 (token.prefix): Rename as...
309 (api.tokens.prefix): this.
310
3112009-05-11 Akim Demaille <demaille@gostai.com>
312
313 doc: use C++ headers.
314 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
315 headers.
316
3172009-05-11 Akim Demaille <demaille@gostai.com>
318
319 doc: token.prefix
320 * doc/bison.simple (Decl Summary): Document token.prefix.
321 (Calc++ Parser): Various fixes.
322 Formatting changes.
323 Use token.prefix.
324 Introduce a macro TOKEN to shorten the code and make it more
325 readable.
326 (Calc++ Scanner): Adjust.
327 * NEWS (Variable token.prefix): New.
328
3292009-05-04 Akim Demaille <demaille@gostai.com>
330
331 bison: catch bad symbol names.
332 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
333 * tests/input.at: Adjust.
334
3352009-05-04 Akim Demaille <demaille@gostai.com>
336
337 identifiers: dashes are letters.
338 Dashes can now start identifiers (symbols and directives).
339
340 * src/scan-gram.l ({letter}): Add dash.
341 ({id}): Remove it.
342 * tests/input.at (Symbols): Adjust.
343 Remove stray comment.
344 * tests/regression.at (Invalid inputs): Adjust error message.
345 * doc/bison.texinfo (Symbols): Update.
346
3472009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
348
349 Declare %code to be a permanent feature.
350 * NEWS (2.4.2): Here.
351 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
352 experimental.
353 (Decl Summary): Likewise.
354
3552009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
356
357 Convert underscores to dashes in some %define variable names.
358 For now, just api.push-pull and lr.keep-unreachable-states.
359 Maintain old names for backward compatibility.
360 * NEWS (2.5): Document.
361 * data/c.m4 (b4_identification): Update comment.
362 * data/yacc.c: Update access.
363 * doc/bison.texinfo: Update.
364 * etc/bench.pl.in (bench_push_parser): Update use.
365 * src/files.c (tr): Move to...
366 * src/getargs.c, src/getargs.h (tr): ... here because I can't
367 think of a better place to expose it. My logic is that, for all
368 uses of tr so far, command-line arguments can be involved, and
369 getargs.h is already included.
370 * src/main.c (main): Update access.
371 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
372 variable names to new variable names before assigning value.
373 * src/reader.c (reader): Update setting default.
374 * tests/calc.at: Update uses.
375 * tests/conflicts.at (Unreachable States After Conflict
376 Resolution): Update use.
377 * tests/input.at (%define enum variables): Update use.
378 (%define backward compatibility): New test group.
379 * tests/push.at: Update uses.
380 * tests/reduce.at: Update uses.
381 * tests/torture.at: Update uses.
382
3832009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
384
385 Set all front-end %define defaults in one place.
386 * src/main.c (main): Move lr.keep_unreachable_states default...
387 * src/reader.c (reader): ... to here.
388
3892009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
390
391 Rename lr.default_reductions to lr.default-reductions.
392 * NEWS (2.5): Here.
393 * doc/bison.texinfo: Here.
394 * src/lalr.c (initialize_LA): Here.
395 * src/print.c (print_reductions): Here.
396 * src/reader.c (reader): Here.
397 * src/tables.c (action_row): Here.
398 * tests/input.at (%define enum variables): Here.
399 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
400
4012009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
402
403 Pacify ./configure --enable-gcc-warnings.
404 * tests/input.at (Symbols): Prototype yyerror and yylex.
405
4062009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
407
408 Document how `%define "var" "value"' is not M4-friendly.
409 * src/parse-gram.y (variable): In comments here.
410
4112009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
412
413 Clean up recent patches a little.
414 Reported by Akim Demaille.
415 * doc/bison.texinfo (Understanding): Fix typos.
416 * src/print.c (print_reductions): Don't use negated variable.
417
4182009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
419
420 List accepted values for a %define enum variable with an invalid value.
421 Suggested by Akim Demaille at
422 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
423 * data/bison.m4 (_b4_percent_define_check_values): Implement.
424 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
425 * tests/input.at (%define lr.default_reductions invalid values): Merge
426 into...
427 (%define enum variables): ... here, and update output.
428
4292009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
430
431 Rename "default rule" to "default reduction".
432 This includes changing variable names in code, changing
433 comments, and renaming %define lr.default_rules to %define
434 lr.default_reductions.
435 * NEWS (2.5): Update IELR documentation.
436 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
437 documentation.
438 * data/glr.c, data/lalr1.java: Sync copyright dates.
439 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
440 and lr.type documentation. Make some other wording
441 improvements.
442 (Glossary): Adjust cross-references and Default Reduction
443 definition.
444 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
445 Remove a confusing comment pointed out by Akim Demaille.
446 (initialize_LA): Adjust code.
447 * src/print-xml.c (print_reductions): Adjust code.
448 * src/print.c (print_reductions): Adjust code.
449 * src/reader.c (reader): Adjust code.
450 * src/tables.c (action_row): Adjust code.
451 (token_actions): Adjust code.
452 * src/tables.h: Adjust YYDEFACT documentation.
453 * tests/input.at (%define lr.default_rules invalid values):
454 Rename test group to...
455 (%define lr.default_reductions invalid values): ... this, and
456 update grammar file and expected output.
457 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
458 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
459
4602009-04-21 Akim Demaille <demaille@gostai.com>
461
462 tests: check the use of dashes and periods in symbols.
463 * tests/input.at (Symbol): New test group.
464
4652009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
466
467 Document %define lr.type and lr.default_rules.
468 * NEWS (2.5): Add an entry.
469 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
470 besides just LALR(1) and GLR(1).
471 * doc/bison.texinfo (Introduction): Likewise.
472 (Language and Grammar): Bison is no longer limited to LALR(1)
473 restrictions.
474 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
475 when trying to distinguish from GLR. Talk about LR(1) grammars
476 rather than LALR(1) grammars.
477 (Decl Summary): In %define api.push_pull entry, say it applies
478 to deterministic parsers in C rather than LALR(1) parsers in C.
479 Add lr.default_rules entry.
480 Add lr.type entry.
481 (Mystery Conflicts): Bison is no longer limited to LALR(1)
482 restrictions.
483 (Generalized LR Parsing): Same changes as for the previous GLR
484 section.
485 (Memory Management): Say deterministic rather than LALR(1).
486 (Understanding): Correct some bison output.
487 Index discussion of "accepting state".
488 Say deterministic rather than LALR(1).
489 (Bison Options): In --yacc entry, say deterministic rather than
490 LALR(1).
491 In --report, --graph, and --xml entries, just don't mention
492 LALR(1).
493 (C++ Parsers): Say deterministic rather than LALR(1).
494 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
495 (Glossary): Add Accepting State, Consistent State, Default Rule,
496 and IELR(1) definitions.
497 In Generalized LR (GLR) definition, make same changes as in
498 previous GLR sections.
499 In LALR(1) definition, say Bison uses LALR(1) by default rather
500 than implying Bison is limited to LALR(1).
501 (LocalWords): Add IELR.
502
5032009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
504
505 Finish implementing %define lr.type.
506 Its value can be "LALR", "IELR", or "canonical LR".
507 * lib/timevar.def (TV_IELR_PHASE1): New var.
508 (TV_IELR_PHASE2): New var.
509 (TV_IELR_PHASE3): New var.
510 (TV_IELR_PHASE4): New var.
511 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
512 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
513 Sbitset.h, ielr.h, and ielr.c.
514 * src/getargs.h, src/getargs.c (enum trace, trace_args,
515 trace_types): Add trace_ielr.
516 * src/lalr.h, src/lalr.c (ngotos): Export it.
517 (F): Rename to...
518 (goto_follows): ... this, update all uses, and export it.
519 (set_goto_map): Export it.
520 (map_goto): Export it.
521 (compute_lookahead_tokens): Don't free goto_follows yet. Now
522 handled in ielr.
523 (initialize_LA): Export it. Move lookback allocation to...
524 (lalr): ... here because, for canonical LR, initialize_LA must
525 be invoked but lookback and much of the rest of LALR isn't
526 needed.
527 * main.c (main): Instead of lalr, invoke ielr, which invokes
528 lalr.
529 * src/reader.c (reader): Default lr.type to "LALR".
530 Default lr.default_rules to "accepting" if lr.type is "canonical
531 LR". Leave the default as "all" otherwise.
532 Check for a valid lr.type value.
533 * src/state.h, src/state.c (struct state_list): Add state_list
534 member.
535 (state_new): Initialize state_list member to NULL.
536 (state_new_isocore): New function, exported.
537 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
538 exercises all values of lr.type.
539 (GNU AWK Grammar): Rename test group to...
540 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
541 AT_TEST_EXISTING_GRAMMAR.
542 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
543 (GNU pic Grammar): Rename test group to...
544 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
545 AT_TEST_EXISTING_GRAMMAR.
546 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
547 all values of lr.type.
548 (Single State Split): New test groups using AT_TEST_LR_TYPE.
549 (Lane Split): Likewise.
550 (Complex Lane Split): Likewise.
551 (Split During Added Lookahead Propagation): Likewise.
552
5532009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
554
555 Add new files for IELR and canonical LR implementation.
556 * src/AnnotationList.c: New.
557 * src/AnnotationList.h: New.
558 * src/InadequacyList.c: New.
559 * src/InadequacyList.h: New.
560 * src/Sbitset.c: New.
561 * src/Sbitset.h: New.
562 * src/ielr.c: New.
563 * src/ielr.h: New.
564
5652009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
566
567 Implement %define lr.default_rules.
568 Its value describes the states that are permitted to contain
569 default rules: "all", "consistent", or "accepting".
570 * src/reader.c (reader): Default lr.default_rules to "all".
571 Check for a valid lr.default_rules value.
572 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
573 is "accepting", then only mark the accepting state as
574 consistent.
575 (initialize_LA): Tell state_lookahead_tokens_count whether
576 lr.default_rules is "accepting".
577 * src/tables.c (action_row): If lr.default_rules is not "all",
578 then disable default rules in inconsistent states.
579 * src/print.c (print_reductions): Use this opportunity to
580 perform some assertions about whether lr.default_rules was
581 obeyed correctly.
582 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
583 helps with checking the parser tables for a grammar.
584 * tests/input.at (%define lr.default_rules invalid values): New
585 test group.
586 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
587 AT_TEST_TABLES_AND_PARSE.
588 (`no %define lr.default_rules'): New test group generated by
589 AT_TEST_LR_DEFAULT_RULES.
590 (`%define lr.default_rules "all"'): Likewise.
591 (`%define lr.default_rules "consistent"'): Likewise.
592 (`%define lr.default_rules "accepting"'): Likewise.
593
5942009-04-20 Akim Demaille <demaille@gostai.com>
595
596 Formatting change.
597
5982009-04-20 Akim Demaille <demaille@gostai.com>
599
600 bison: factoring.
601 * src/output.c (token_definitions_output): Use symbol_id_get
602 instead of duplicating its logic.
603 * TODO (YYERRCODE): Extend.
604
6052009-04-20 Akim Demaille <demaille@gostai.com>
606
607 variables: prefer error-verbose to error_verbose.
608 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
609 instead of error_verbose.
610 * src/scan-gram.l (%error-verbose): Map to the error-verbose
611 variable.
612 * doc/bison.texinfo: Promote %define error-verbose instead of
613 %error-verbose.
614 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
615
6162009-04-15 Akim Demaille <demaille@gostai.com>
617
618 variables: accept dashes.
619 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
620 underscores.
621 * src/scan-gram.l ({id}): Also accept dashes after the initial
622 letter.
623 ({directive}): Use {id}.
624 * src/parse-gram.y: Comment and formatting changes.
625 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
626 symbols.
627 * src/complain.h, src/complain.c (yacc_at): New.
628 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
629 symbol names.
630 * src/output.c (token_definitions_output): Do not #define token
631 names with dashes.
632
6332009-04-20 Akim Demaille <demaille@gostai.com>
634
635 Consistently refer to Yacc, not YACC.
636 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
637
6382009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
639
640 Pacify make maintainer-check-posix.
641 * tests/input.at (%define, --define): Move bison command-line
642 options before grammar file name.
643
6442009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
645
646 Document semicolon warnings.
647 * NEWS (2.5): Here.
648
6492009-04-14 Akim Demaille <demaille@gostai.com>
650
651 variables: use `parse.assert' instead of `assert'.
652 * TODO (assert): Remove.
653 * data/bison.m4 (b4_assert_if): Replace with...
654 (b4_parse_assert_if): this.
655 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
656 * doc/bison.texinfo (Decl Summary): Document parse.assert.
657
6582009-04-14 Akim Demaille <demaille@gostai.com>
659
660 variables: use `parse.trace' instead of `debug'.
661 * src/getargs.c (getargs): Map -t to %define trace.parse.
662 * src/scan-gram.l (%debug): Map to %define trace.parse.
663 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
664 names to `_' in macro names.
665 (b4_debug_if): Replace with...
666 (b4_parse_trace_if): this.
667 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
668 * data/yacc.c: Adjust.
669 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
670 Use @code to label the variable list.
671 Document the variable parse.trace.
672 (Tracing): Promote the parse.trace variable.
673 * TODO: %printer is not documented.
674
6752009-04-14 Akim Demaille <demaille@gostai.com>
676
677 doc: minor fixes.
678 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
679 (Table of Symbols): Remove duplicate entry for %debug.
680
6812009-04-10 Eric Blake <ebb9@byu.net>
682
683 submodules: update to latest
684 * submodules/autoconf: Use latest upstream Autoconf.
685
6862009-04-06 Eric Blake <ebb9@byu.net>
687
688 Work around autoconf 2.63b bug in testsuite.
689 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
690 autoconf bug related to # in test.
691
6922009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
693
694 * NEWS (2.5): New section. Describe new -D/--define feature.
695
6962009-04-06 Akim Demaille <demaille@gostai.com>
697
698 Regen.
699 * src/parse-gram.h, src/parse-gram.c: Regen.
700
7012009-04-06 Akim Demaille <demaille@gostai.com>
702
703 rename muscle_tab.* as muscle-tab.* for consistency.
704 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
705 * src/muscle-tab.h, src/muscle-tab.c: these.
706 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
707 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
708
7092009-04-06 Akim Demaille <demaille@gostai.com>
710
711 Makefile: introduce $(BISON).
712 * src/local.mk (BISON): New.
713 (YACC): Use it.
714
7152009-04-06 Akim Demaille <demaille@gostai.com>
716
717 parser: handle %locations as %define locations.
718 * src/getargs.h, src/getargs.c (locations_flag): Remove.
719 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
720 to set "locations" to true.
721 * src/output.c (prepare): Don't output "locations".
722 * src/scan-gram.l (%locations): Handle it as a %<flag>.
723 * src/parse-gram.y: It's no longer a token.
724 Don't handle it.
725 * data/bison.m4 (b4_locations_if): Define it with
726 b4_percent_define_if_define.
727 * data/c.m4, data/glr.cc: Adjust.
728
7292009-04-06 Akim Demaille <demaille@gostai.com>
730
731 Regen.
732 * src/parse-gram.c: Regen.
733
7342009-04-06 Akim Demaille <demaille@gostai.com>
735
736 muscle: factor the handling of obsolete of obsolete directives.
737 Suggested by Joel E. Denny.
738
739 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
740 New, extracted from...
741 * src/parse-gram.y (prologue_declaration: pure-parser): here.
742 Remove it.
743 (prologue_declaration: "%<flag>"): Use
744 muscle_percent_define_ensure.
745 (%error-verbose, %pure-parser): No longer tokens.
746 * src/scan-gram.l (pure-parser): Return as a %<flag>.
747
7482009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
749
750 Fix options documentation.
751 * build-aux/cross-options.pl: As in --help output, write optional
752 arguments as [=ARG] not =[ARG].
753 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
754
7552009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
756
757 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
758 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
759 requirements for a correct m4 are stricter.
760 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
761 * configure.ac: Update to use AC_PROG_GNU_M4.
762 Reported by Eric Blake.
763
7642009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
765
766 Help with updating web manual.
767 * HACKING: Incorporate instructions from gnulib/doc/README.
768 * bootstrap.conf (gnulib_modules): Add gendocs.
769
7702009-04-03 Akim Demaille <demaille@gostai.com>
771
772 Regen.
773 * src/parse-gram.h, src/parse-gram.c: Regen.
774
7752009-04-03 Akim Demaille <demaille@gostai.com>
776
777 Factor %FLAG at scan level.
778 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
779 definitions and associated rules, replaced by....
780 (PERCENT_FLAG): this new token type, and rule.
781 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
782 Use it for %debug and %error-verbose.
783
7842009-04-03 Akim Demaille <demaille@gostai.com>
785
786 Regen.
787 * src/parse-gram.h, src/parse-gram.c: Regen.
788
7892009-04-03 Akim Demaille <demaille@gostai.com>
790
791 Treat %debug as %define debug.
792 * data/bison.m4 (b4_debug_if): New.
793 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
794 * data/lalr1.java: Use it instead of b4_debug_flag.
795 * src/getargs.h, src/getargs.c (debug_flag): Remove.
796 * src/output.c (prepare): Don't output it.
797 * src/parse-gram.y: Treat %debug as %define debug.
798
7992009-04-03 Akim Demaille <demaille@gostai.com>
800
801 Treat %error-verbose as %define error_verbose.
802 This allows to pass -Derror_verbose on the command line. Better
803 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
804 ERROR_VERBOSE being defined as false or true.
805 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
806 on b4_percent_define_ifdef, for does not check the defined value,
807 but only whether the symbol is defined, rely on
808 b4_percent_define_flag_if, so that a value of "false" is processed
809 as a false.
810 If not defined, define the flag to "false".
811 (b4_error_verbose_if): New.
812 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
813 b4_error_verbose_flag.
814 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
815 * src/output.c (prepare): Don't output it.
816 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
817
8182009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
819
820 Fix strange %define locations for default values.
821 Reported by Akim Demaille at
822 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
823 and discussed again starting at
824 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
825 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
826 because location information is bogus.
827 Use angle brackets to delimit fake file name because square brackets
828 look like underexpanded m4. Choose a better fake file name.
829 Use negative line numbers.
830 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
831 * src/location.c (location_print): If line for a boundary is negative,
832 only print that boundary's file name.
833 * src/location.h: Document that.
834 * tests/skeletons.at (%define Boolean variables: invalid skeleton
835 defaults): Update output.
836
8372009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
838
839 Pacify ./configure --enable-gcc-warnings.
840 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
841 in lib won't compile with it.
842 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
843
8442009-03-31 Akim Demaille <demaille@gostai.com>
845
846 bootstrap: --help to stdout.
847 * bootstrap (usage): Don't send --help to stderr.
848 Use a here doc instead of a long string.
849
8502009-03-31 Akim Demaille <demaille@gostai.com>
851
852 bootstrap: README-hacking no longer exists
853 * bootstrap (checkout_only_file): Set to HACKING.
854
8552009-03-26 Akim Demaille <demaille@gostai.com>
856
857 doc: merge HACKING and README-hacking.
858 Two files is confusing.
859 Reported by Alexandre Duret-Lutz.
860
861 * README-hacking: Merge into...
862 * HACKING (Working from the repository): here.
863
8642009-03-26 Akim Demaille <demaille@gostai.com>
865
866 doc: update README-hacking.
867 * README-hacking: We now use git and git submodules.
868 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
869
8702009-03-26 Akim Demaille <demaille@gostai.com>
871
872 lalr1.cc: avoid GCC 4.3 warnings.
873 GCC 4.3 now warns about "a || b && c" and asks for explicit
874 parentheses.
875 Reported by Alexandre Duret-Lutz.
876 * data/location.cc: Update copyright years.
877 (Position::operator==): Use parens to make precedence explicit.
878 Compare lines and columns first, as they are more likely to be
879 different, and they are faster to compare.
880
8812009-03-26 Akim Demaille <demaille@gostai.com>
882
883 gnulib: update.
884 * gnulib: Update to latest.
885 * src/local.mk (AM_CFLAGS): Move to...
886 * Makefile.am: here.
887 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
888 AM_CFLAGS.
889
8902009-03-02 Akim Demaille <demaille@gostai.com>
891
892 Comment changes.
893
8942009-03-02 Akim Demaille <demaille@gostai.com>
895
896 Share b4_yytranslate_define.
897 * data/lalr1.cc (b4_yytranslate_define): Move to...
898 * data/c++.m4: here.
899
9002009-03-02 Akim Demaille <demaille@gostai.com>
901
902 Use locations in the variant example.
903 Yes, this obfuscates the point of this example, variants only.
904 But glr.cc cannot work (yet?) without locations. This change
905 makes it easier to use this example with glr.cc.
906
907 * examples/variant.yy (assert): %define it.
908 (locations): Request them.
909 (yylex): Bind the location to the stage.
910
9112009-03-02 Akim Demaille <demaille@gostai.com>
912
913 Dub make_TOKEN as a public type interface.
914 * data/c++.m4 (b4_symbol_constructor_declare)
915 (b4_symbol_constructor_define): New empty stubs.
916 (b4_public_types_declare, b4_public_types_define): Use them.
917 * data/lalr1.cc (b4_symbol_constructor_declare)
918 (b4_symbol_constructor_declare_)
919 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
920 Move to...
921 * data/variant.hh: here.
922 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
923 needed.
924 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
925 b4_symbol_constructor_declare, as it is now done by
926 b4_public_types_define and b4_public_types_declare.
927
9282009-03-02 Akim Demaille <demaille@gostai.com>
929
930 Coding style changes.
931 * data/lalr1.cc (b4_symbol_constructor_declaration_)
932 (b4_symbol_constructor_declarations)
933 (b4_symbol_constructor_definition_)
934 (b4_symbol_constructor_definitions)
935 (b4_yytranslate_definition): Rename as...
936 (b4_symbol_constructor_declare_)
937 (b4_symbol_constructor_declare)
938 (b4_symbol_constructor_define_)
939 (b4_symbol_constructor_define)
940 (b4_yytranslate_define): these.
941 * data/variant.hh (b4_variant_definition): Rename as...
942 (b4_variant_define): this.
943
9442009-03-02 Akim Demaille <demaille@gostai.com>
945
946 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
947 * data/bison.m4 (b4_percent_define_if_define): New.
948 * data/c++.m4 (b4_variant_if): Move to...
949 * data/bison.m4: Here, using b4_percent_define_if_define.
950 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
951 * data/bison.m4: Here, using b4_percent_define_if_define.
952
9532009-03-02 Akim Demaille <demaille@gostai.com>
954
955 Dub symbol_type_base as a public type.
956 * data/c++.m4 (b4_public_types_declare): Now define
957 symbol_type_base and symbol_type.
958 (b4_public_types_define): New.
959 In both cases, the definitions are taken verbatim from lalr1.cc.
960 * data/lalr1.cc: Adjust.
961
9622009-03-02 Akim Demaille <demaille@gostai.com>
963
964 b4_public_types_declare.
965 * data/c++.m4 (b4_public_types_declare): New.
966 * data/glr.cc, data/lalr1.cc: Use it.
967
9682009-03-02 Akim Demaille <demaille@gostai.com>
969
970 b4_semantic_type_declare.
971 * data/c++.m4 (b4_semantic_type_declare): New.
972 Factors and generalizes what was in glr.cc and lalr1.cc.
973 * data/variant.hh (b4_semantic_type_declare): Redefine it for
974 variants.
975 * data/lalr1.cc, data/glr.cc: Use it.
976
9772009-02-26 Akim Demaille <demaille@gostai.com>
978
979 Upgrade gnulib.
980 * gnulib: Upgrade from master.
981 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
982 Regen.
983
9842009-02-25 Akim Demaille <demaille@gostai.com>
985
986 Remove useless arguments.
987 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
988 relevant.
989
9902009-02-25 Akim Demaille <demaille@gostai.com>
991
992 Comment changes.
993 * data/lalr1.cc: here.
994
9952009-02-25 Akim Demaille <demaille@gostai.com>
996
997 Fix glr.cc's debug level handling.
998 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
999 glr.c which is used.
1000 (debug_level, set_debug_level): Adjust.
1001
10022009-02-25 Akim Demaille <demaille@gostai.com>
1003
1004 Copyright years.
1005 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1006
10072009-02-25 Akim Demaille <demaille@gostai.com>
1008
1009 Style changes.
1010 * etc/bench.pl.in (generate_grammar_list): Consitently use
1011 location_type, not yy::location.
1012
10132009-02-25 Akim Demaille <demaille@gostai.com>
1014
1015 Comment change.
1016 * data/lalr1.cc: here.
1017
10182009-02-19 Akim Demaille <demaille@gostai.com>
1019
1020 Make yyparser::error public.
1021 * data/lalr1.cc: here.
1022 There is no good reason to keep it private (and it is convenient
1023 to use it from the scanner for instance). It is already public in
1024 glr.cc.
1025
10262009-02-19 Akim Demaille <demaille@gostai.com>
1027
1028 Comment changes.
1029 * data/glr.cc: here.
1030
10312009-02-19 Akim Demaille <demaille@gostai.com>
1032
1033 Remove trailing blanks.
1034 The epilogue has its own ending \n, no need to add another.
1035
1036 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1037 epilogue.
1038 * data/glr.cc: dnl when extending the epilogue.
1039 Remove stray "private:".
1040
10412009-02-19 Akim Demaille <demaille@gostai.com>
1042
1043 Use b4_c_modern.
1044 * data/c.m4 (b4_c_function_decl): Here.
1045
10462009-02-19 Akim Demaille <demaille@gostai.com>
1047
1048 Comment changes.
1049 * data/lalr1.cc: here.
1050
10512009-02-19 Akim Demaille <demaille@gostai.com>
1052
1053 Extract variant.hh
1054 * data/variant.hh: New, extracted from...
1055 * data/lalr1.cc: here.
1056 Adjust.
1057 * data/local.mk: Adjust.
1058
10592009-02-19 Akim Demaille <demaille@gostai.com>
1060
1061 Extract stack.hh from lalr1.cc.
1062 * data/stack.hh: New.
1063 * data/lalr1.cc: Extract from here.
1064 * data/local.mk: Adjust.
1065
10662009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1067
1068 Add reminder about uploading public key to keys.gnupg.net.
1069 * HACKING (Release Procedure): Here.
1070
10712009-01-28 Akim Demaille <demaille@gostai.com>
1072
1073 * NEWS: Update information about 2.4.1 and 2.4.2.
1074
10752008-11-04 Akim Demaille <demaille@gostai.com>
1076
1077 Reformat NEWS.
1078 * NEWS: Use more outline-mode markup.
1079 Suggested by Jim Meyering.
1080
10812009-01-08 Akim Demaille <demaille@gostai.com>
1082
1083 Fix grep portability issues.
1084 Grep on Solaris does not support -q.
1085 Reported by Summum Bonum.
1086
1087 * NEWS: Add a stub for 2.4.2.
1088 * THANKS: Add Summum Bonum.
1089 * tests/atlocal.in (EGREP): New.
1090 (CC, CXX, XSLTPROC): Make it possible to override them via
1091 envvars.
1092 * tests/java.at: Use $EGREP instead of egrep.
1093 Use AT_CHECK's ignore instead of grep's -q.
1094
10952008-12-11 Akim Demaille <demaille@gostai.com>
1096
1097 Pass the token type to yysyntax_error.
1098 * data/yacc.c (yysyntax_error): Take the transated token instead
1099 of the raw number.
1100 Adjust callers.
1101 * TODO: Update.
1102
11032008-12-11 Akim Demaille <demaille@gostai.com>
1104
1105 Formatting changes.
1106 * data/glr.c: Formatting changes.
1107
11082008-12-11 Akim Demaille <demaille@gostai.com>
1109
1110 Propagate i18n changes into glr.c.
1111 * TODO: Update.
1112 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1113 building the error message format dynamically.
1114 * data/lalr1.java: Formatting changes.
1115
11162008-12-11 Akim Demaille <demaille@gostai.com>
1117
1118 Use testsuite -C.
1119 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1120 Solves problems when top_srcdir is an absolute path.
1121 Suggested by Eric Blake.
1122 * configure.ac: Require Autoconf 2.62.
1123
11242008-12-11 Akim Demaille <demaille@gostai.com>
1125
1126 Simplify the i18n of the error messages.
1127 * data/lalr1.cc: Comment changes.
1128 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1129 lalr1.cc instead of building dynamically the format string.
1130
11312008-12-08 Akim Demaille <demaille@gostai.com>
1132
1133 Fix portability issue in the test suite.
1134 * tests/local.at (AT_MATCHES_CHECK): New.
1135 Based on Perl instead of Sed. Sed has too many portability
1136 pitfalls, not ever Sed is GNU Sed.
1137 * tests/actions.at (Fix user actions without a trailing semicolon):
1138 Use it.
1139
11402008-12-08 Akim Demaille <demaille@gostai.com>
1141
1142 Update data/README.
1143 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1144
11452008-12-08 Akim Demaille <demaille@gostai.com>
1146
1147 Install autoconf as a submodule to get m4sugar.
1148 * .gitmodules: Add submodules/autoconf.
1149 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1150 submodules/autoconf.
1151
11522008-12-08 Akim Demaille <demaille@gostai.com>
1153
1154 Test token.prefix in all the skeletons.
1155 * data/java.m4 (b4_token_enum): Use the token.prefix.
1156 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1157 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1158 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1159 * tests/java.at: Comment changes.
1160 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1161 (Java parser class and package names): Add token.prefix check.
1162
11632008-12-08 Akim Demaille <demaille@gostai.com>
1164
1165 Fix regeneration of atconfig.
1166 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1167 remove it: now that there is no tests/Makefile.am, the top-level
1168 Makefile properly updates atconfig when needed.
1169
11702008-12-07 Di-an Jan <dianj@freeshell.org>
1171
1172 Implement the FIXME that ends an user action with a semicolon
1173 if it seems necessary.
1174 * src/scan-code.l (flex rules section): Flag cpp directive from
1175 any `#' to the first unescaped end-of-line. Semicolon is not
1176 needed after `;', `{', '}', or cpp directives and is needed after
1177 any other token (whitespaces and comments have no effect).
1178 * tests/actions.at (Fix user actions without a trailing semicolon):
1179 New test.
1180 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1181 to make user actions complete statements.
1182 Adjust column numbers in error messages.
1183 * tests/regression.at (Fix user actions without a trailing semicolon):
1184 Remove. Covered by new test.
1185
11862008-12-07 Akim Demaille <demaille@gostai.com>
1187
1188 Update gnulib.
1189 * gnulib: Update from master.
1190
11912008-12-05 Eric Blake <ebb9@byu.net>
1192
1193 Avoid compiler warning.
1194 * src/output.c (muscle_insert_item_number_table): Delete unused
1195 function.
1196
11972008-12-02 Eric Blake <ebb9@byu.net>
1198
1199 Build testsuite with newer autoconf.
1200 * tests/output.at (m4_expand): Don't override in newer autoconf,
1201 where the underlying implementation changed.
1202 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1203 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1204 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1205 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1206 since some of them contain unbalanced ')'.
1207
12082008-12-01 Akim Demaille <demaille@gostai.com>
1209
1210 Use b4_symbol for printers and destructors everywhere.
1211 * data/bison.m4 (b4_symbol_action_location): New.
1212 * data/c.m4 (b4_symbol_actions): Remove.
1213 Adjust all callers to use by b4_symbol_foreach and the corresponding
1214 b4_symbol_printer/destructor macro.
1215 * data/glr.cc: Adjust.
1216 * data/lalr1.java: Adjust the %destructor sanity check.
1217 * src/output.c (symbol_code_props_output): Remove, we no longer
1218 need the b4_symbol_printers/destructors tables.
1219
12202008-12-01 Akim Demaille <demaille@gostai.com>
1221
1222 Use b4_symbol_case_.
1223 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1224 b4_symbol_case_.
1225
12262008-12-01 Akim Demaille <demaille@gostai.com>
1227
1228 Move b4_symbol based macro to bison.m4.
1229 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1230 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1231 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1232 (b4_type_foreach): Move to...
1233 * data/bison.m4: Here.
1234 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1235 b4_symbol_value_template instead of b4_symbol_value.
1236
12372008-12-01 Akim Demaille <demaille@gostai.com>
1238
1239 b4_symbol/type_foreach.
1240 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1241 Use them.
1242
12432008-12-01 Akim Demaille <demaille@gostai.com>
1244
1245 Use the symbol properties to output the printer/destructor for lalr1.cc.
1246 Instead of defining complex list of tuples to define various
1247 properties of the symbols, we now prefer to define symbols as
1248 "structs" in m4: using the symbol key (its number), and the
1249 property name, b4_symbol gives it value. Use this to handle
1250 destructors and printers.
1251
1252 * src/output.c (CODE_PROP): New.
1253 (prepare_symbol_definitions): Use it to define the printer and
1254 destructor related attributes of the symbols.
1255 * data/lalr1.cc (b4_symbol_actions): Rename as...
1256 (b4_symbol_action): this.
1257 Use b4_symbol instead of 6 arguments.
1258 (b4_symbol_printer, b4_symbol_destructor): New.
1259 Use them instead of b4_symbol_actions.
1260
12612008-12-01 Akim Demaille <demaille@gostai.com>
1262
1263 Avoid capturing variables too easily.
1264 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
1265 v__ and p__ instead of v and p.
1266
12672008-12-01 Akim Demaille <demaille@gostai.com>
1268
1269 Remove spurious empty line before syncline.
1270 * data/bison.m4 (b4_syncline): Don't output an empty line before
1271 the output.
1272
12732008-11-26 Akim Demaille <demaille@gostai.com>
1274
1275 Convert lib/Makefile.am into lib/local.mk.
1276 The real problem is rather gnulib.mk, which itself is extracted
1277 from a Makefile.am that gnulib expects to the "recursive". The
1278 tool prefix-gnulib-mk converts such a gnulib.mk to be
1279 non-recursive. Also, some AC_SUBST variables need to be adjusted.
1280
1281 * etc/prefix-gnulib-mk: New.
1282 * bootstrap (slurp): Use it to convert further gnulib.mk.
1283 No longer try to avoid re-creation of lib/gnulib.mk as the changes
1284 are deeper.
1285 * lib/Makefile.am: Rename as...
1286 * lib/local.mk: this.
1287 Adjust to be prefixed.
1288 * Makefile.am, configure.ac: Adjust.
1289 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
1290
12912008-11-26 Akim Demaille <demaille@gostai.com>
1292
1293 s/_FLAGS/FLAGS/.
1294 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1295 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1296 Reported by Eric Blake.
1297
12982008-11-26 Akim Demaille <demaille@gostai.com>
1299
1300 Use b4_parser_tables_define in glr.cc.
1301 * data/glr.c: Use b4_parser_tables_define instead of defining the
1302 (deterministic integral) tables by hand.
1303
13042008-11-26 Akim Demaille <demaille@gostai.com>
1305
1306 Use b4_parser_tables_define in Java.
1307 * data/java.m4 (b4_typed_parser_table): Rename as...
1308 (b4_typed_parser_table_define): this, for consistency.
1309 Accept a comment as $4.
1310 Move $2 into yy*_.
1311 (b4_integral_parser_table): Rename as...
1312 (b4_integral_parser_table_define): this.
1313 * data/lalr1.java: Adjust all uses.
1314 Use b4_parser_tables_define instead of generation by hand.
1315
13162008-11-26 Akim Demaille <demaille@gostai.com>
1317
1318 Prepare the convergence bw C style and Java table generation.
1319 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1320 (b4_tables_define): Rename as...
1321 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1322 (b4_parser_tables_define): these.
1323 * data/c.m4 (b4_table_define): Rename as...
1324 (b4_integral_parser_table_define): this.
1325 * data/lalr1.cc: Adjust.
1326 (b4_table_define, b4_table_declare): Rename as...
1327 (b4_integral_parser_table_define)
1328 (b4_integral_parser_table_declare): these.
1329 (yyrline_): Move the comment where it is actually used.
1330 * data/yacc.c: Adjust.
1331 (yyrline): Use b4_integral_parser_table_define.
1332
13332008-11-26 Akim Demaille <demaille@gostai.com>
1334
1335 Regen.
1336 * src/parse-gram.h, src/parse-gram.c: Regen.
1337
13382008-11-26 Akim Demaille <demaille@gostai.com>
1339
1340 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1341 * data/lalr1.cc (b4_tables_map): Move to...
1342 * data/bison.m4: here.
1343 Update the comment for yytable during the flight.
1344 (b4_tables_declare, b4_tables_define): New.
1345 * data/lalr1.cc: Use them.
1346 * data/c.m4 (b4_table_define): New.
1347 * data/yacc.c: Use b4_tables_define instead of output the tables
1348 by hand.
1349 * tests/regression.at (Web2c Actions): Adjust the expected output,
1350 the order of the tables changed.
1351
13522008-11-26 Akim Demaille <demaille@gostai.com>
1353
1354 Get rid of (yy)rhs and (yy)prhs.
1355 These tables are no longer needed in the parsers, and they don't seem to
1356 be useful. They are not documented either.
1357
1358 * src/output.c (prepare_rules): Get rid of rhs and prhs.
1359 Adjust the computation of (yy)r2.
1360
13612008-11-26 Akim Demaille <demaille@gostai.com>
1362
1363 Rule length is unsigned.
1364 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
1365
13662008-11-26 Akim Demaille <demaille@gostai.com>
1367
1368 Get rid of lalr1-split.cc.
1369 It was no longer maintainer.
1370
1371 * data/lalr1-split.cc: Remove.
1372 * etc/bench.pl.in (bench_fusion_parser): Remove.
1373 Adjust.
1374
13752008-11-26 Akim Demaille <demaille@gostai.com>
1376
1377 Use yy* consistently.
1378 * data/glr.c: Now that yyrhs no longer exists as a global
1379 variable, rename local "rhs" variables into "yyrhs" for
1380 consistency.
1381
13822008-11-25 Akim Demaille <demaille@gostai.com>
1383
1384 Get rid of yyrhs and yyprhs in glr.c.
1385 * data/glr.c (yyrhs, yyprhs): Remove.
1386 Instead, use the state stack and yystos.
1387
13882008-11-25 Akim Demaille <demaille@gostai.com>
1389
1390 Flag glr tests.
1391 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
1392 as an Autotest keyword.
1393
13942008-11-25 Akim Demaille <demaille@gostai.com>
1395
1396 Prefer TESTSUITE_FLAGS.
1397 TESTSUITEFLAGS is barely readable.
1398
1399 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
1400 for backward compatibility.
1401 Use the former instead of the latter.
1402
14032008-11-25 Akim Demaille <demaille@gostai.com>
1404
1405 Get rid of yyrhs and yyprhs in larl1.java.
1406 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
1407 (yy_reduce_print): Rather, use yystos_ and the state stack.
1408
14092008-11-25 Akim Demaille <demaille@gostai.com>
1410
1411 Formatting changes.
1412
14132008-11-25 Akim Demaille <demaille@gostai.com>
1414
1415 Get rid of yyrhs and yyprhs in yacc.c.
1416 They were used to get the symbol types, given a rule number, when
1417 displaying the top of the stack before a reduction. But the
1418 symbol type is available from the state stack. This has two be
1419 benefits: two tables less in the parser (making it smaller), and a
1420 more consistent use of the three stacks which will help to fuse
1421 them.
1422
1423 * data/yacc.c (yyprhs, yyrhs): Remove.
1424 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
1425 (yy_reduce_print): Take yyssp as argument.
1426 Use it, together with yystos, to get the symbol type.
1427 * tests/regression.at (Web2c Report): Remove these tables from the
1428 expected output.
1429
14302008-11-25 Akim Demaille <demaille@gostai.com>
1431
1432 b4_tables_map.
1433 The point is to factor the generation of the tables across skeletons.
1434 This is language dependant.
1435
1436 * data/c.m4 (b4_comment_): New.
1437 Should be usable to define how to generate tables independently of
1438 the language.
1439 (b4_c_comment): New.
1440 (b4_comment): Bounce to b4_c_comment.
1441 Now support $2 = [PREFIX] for indentation.
1442 * data/lalr1.cc (b4_table_declare): Don't output a comment if
1443 there is no comment.
1444 Indent it properly when there is one.
1445 Output the ending semicolon.
1446 (b4_table_define): Space changes.
1447 Output the ending semicolon.
1448 (b4_tables_map): New.
1449 Use it twice instead of declaring and defining the (integral)
1450 tables by hand.
1451
14522008-11-25 Akim Demaille <demaille@gostai.com>
1453
1454 b4_table_declare.
1455 * data/lalr1.cc (b4_table_declare): New.
1456 Use it to declare the tables defined with b4_table_define.
1457 (b4_table_define): Declare a third arg to match b4_table_declare
1458 signature.
1459 Move all the comments around invocations of b4_table_define into
1460 the invocations itselves.
1461 Move things around to have the order for declarations and
1462 definitions.
1463
14642008-11-25 Akim Demaille <demaille@gostai.com>
1465
1466 Formatting changes.
1467 * data/lalr1.java: here.
1468
14692008-11-25 Akim Demaille <demaille@gostai.com>
1470
1471 b4_args is more general than only C++.
1472 * data/lalr1.cc (b4_args, _b4_args): Move to...
1473 * data/bison.m4: here.
1474
14752008-11-21 Di-an Jan <dianj@freeshell.org>
1476
1477 Implement no-XXX arguments for --warnings, --report, --trace.
1478 * src/getargs.c (flags_argmatch): Handles no-XXX.
1479 Fix typo in doxygen comment.
1480
14812008-11-21 Akim Demaille <demaille@gostai.com>
1482
1483 Display the changes in cross-options.texi.
1484 * build-aux/cross-options.pl ($sep): New, to separate items.
1485 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
1486 changes.
1487
14882008-11-20 Di-an Jan <dianj@freeshell.org>
1489
1490 Improves options in the manual.
1491 * doc/bison.texinfo (-g, -x): Add space before argument.
1492 (Option Cross Key): Implement FIXME: listing directives also.
1493 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1494 (Short Option): Special case -d. Put arguments inside @option.
1495 (Bison Directive): Add column, automatically extracted from
1496 src/scan-gram.l (actual name passed as the first argument)
1497 with special case for %define.
1498 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
1499 to build-aux/cross-options.pl.
1500 * src/getargs.c (usage): Document limitations of cross-options.pl.
1501 * src/scan-gram.l: Likewise.
1502
15032008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1504
1505 Fix unexpanded macros in GLR defines file.
1506 Reported by Csaba Raduly at
1507 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1508 * THANKS (Csaba Raduly): Add.
1509 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1510 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1511 lexer in a separate module that includes the defines file.
1512 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
1513 source.
1514 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1515 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1516 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1517 (AT_DATA_SOURCE_PROLOGUE): New.
1518 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1519 (AT_DATA_SOURCE): New.
1520 (AT_FULL_COMPILE): Extend to support an additional source file.
1521
15222008-11-18 Akim Demaille <demaille@gostai.com>
1523
1524 More TODO.
1525 * TODO: More short term issues.
1526
15272008-11-18 Akim Demaille <demaille@gostai.com>
1528
1529 Regen.
1530 * src/parse-gram.h, src/parse-gram.c: Regen.
1531
15322008-11-18 Akim Demaille <demaille@gostai.com>
1533
1534 Use b4_subtract where possible.
1535 * data/lalr1.cc (b4_subtract): Move to...
1536 * data/bison.m4: here.
1537 * data/glr.c (b4_rhs_data): Use it.
1538 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
1539
15402008-11-18 Akim Demaille <demaille@gostai.com>
1541
1542 Remove incorrect mode specification.
1543 * data/glr.cc: Don't pretend it's C code.
1544
15452008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1546
1547 Simplify last patch slightly.
1548 * src/getargs.c (getargs): Here.
1549
15502008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1551
1552 Fix last warning from --enable-gcc-warnings.
1553 * src/getargs.c (getargs): Don't assign const address to non-const
1554 pointer.
1555
15562008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1557
1558 Don't let maintainer-*-check targets force a version update.
1559 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1560 handled.
1561
15622008-11-17 Di-an Jan <dianj@freeshell.org>
1563
1564 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1565 Align menus. Adjust word wrapping. Use node names for menu names.
1566 (Examples): Don't abbreviate node names.
1567 (LocalWords): Remove abbreviations.
1568 (Copying): Make description a sentence.
1569 (Java Action Features): Remove period to match the rest of menu.
1570
15712008-11-17 Di-an Jan <dianj@freeshell.org>
1572
1573 Handles several --enable-gcc-warnings.
1574 * src/getargs.c (command_line_location): Set parameters to void.
1575 * src/output.c (symbol_type_name_cmp): Make static.
1576 (symbols_by_type_name): Set parameters to void.
1577 (symbol_definitions_output): Remove unused parameter. Rename as...
1578 (prepare_symbol_definitions): this.
1579 (muscles_output): Move symbol_definitions_output to...
1580 (output): here as prepare_symbol_definitions.
1581 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
1582 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
1583
15842008-11-17 Di-an Jan <dianj@freeshell.org>
1585
1586 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
1587 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
1588
15892008-11-16 Akim Demaille <demaille@gostai.com>
1590
1591 Add missing $(EXEEXT).
1592 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
1593 "src/bison$(EXEEXT)".
1594 Reported by Di-an Jan.
1595
15962008-11-15 Akim Demaille <demaille@gostai.com>
1597
1598 * TODO: Update.
1599
16002008-11-15 Akim Demaille <demaille@gostai.com>
1601
1602 Formatting changes.
1603 * tests/input.at: here.
1604
16052008-11-15 Akim Demaille <demaille@gostai.com>
1606
1607 Remove duplicate header inclusion.
1608 * src/LR0.c: here.
1609
16102008-11-15 Akim Demaille <demaille@gostai.com>
1611
1612 * src/parse-gram.h, src/parse-gram.c: Regen.
1613
16142008-11-15 Akim Demaille <demaille@gostai.com>
1615
1616 Support parametric types.
1617
1618 There are two issues to handle: first scanning nested angle
1619 bracket pairs to support types such as std::pair< std::string,
1620 std::list<std::string> > >.
1621
1622 Another issue is to address idiosyncracies of C++: do not glue two
1623 closing angle brackets together (otherwise it's operator>>), and
1624 avoid sticking blindly a TYPE to the opening <, as it can result
1625 in '<:' which is a digraph for '['.
1626
1627 * src/scan-gram.l (brace_level): Rename as...
1628 (nesting): this.
1629 (SC_TAG): New.
1630 Implement support for complex tags.
1631 (tag): Accept
1632 , but not <.
1633 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
1634 (b4_symbol_variant): Leave space around types as parameters.
1635 * examples/variant.yy: Use nested template types and leading ::.
1636 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
1637 Rename as...
1638 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
1639 * tests/c++.at: Test parametric types.
1640
16412008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1642
1643 Test token.prefix.
1644 This is not sufficient, but we test at least that the make_SYMBOL
1645 interface is not affected by token.prefix. A more general test
1646 will be implemented when the support of token.prefix is generalized
1647 to more skeletons.
1648
1649 * tests/c++.at: One more variant test, using token.prefix.
1650
16512008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1652
1653 Test the make_TOKEN interface.
1654 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
1655 Factor the common code in yylex.
1656 Use it to test "%define lex_symbol".
1657
16582008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1659
1660 Formatting change.
1661
16622008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1663
1664 Simplify code for variants bench marks.
1665 * etc/bench.pl.in (&generate_grammar_list): Define and use
1666 location_type.
1667 Factor the common code in yylex.
1668
16692008-11-15 Akim Demaille <demaille@gostai.com>
1670
1671 Better error message.
1672 * bootstrap (find_tool): Fix the error message.
1673
16742008-11-15 Akim Demaille <demaille@gostai.com>
1675
1676 Update variant.yy to newest interface.
1677 * examples/variant.yy: Define lex_symbol.
1678 Adjust.
1679
16802008-11-15 Akim Demaille <demaille@gostai.com>
1681
1682 Don't use locations in variant.yy.
1683 * examples/variant.yy: Adjust to not using locations.
1684
16852008-11-15 Akim Demaille <demaille@gostai.com>
1686
1687 Comment changes.
1688 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
1689 comments for the license.
1690
16912008-11-15 Akim Demaille <demaille@gostai.com>
1692
1693 Remove tests/Makefile.am.
1694 * tests/Makefile.am: Rename as...
1695 * tests/local.mk: this.
1696 * Makefile.am, configure.ac: Adjust.
1697 * Makefile.am (DISTCLEANFILES): Define.
1698 (maintainer-check, maintainer-xml-check, maintainer-push-check):
1699 Remove, we no longer need to bounce to the real targets.
1700
17012008-11-15 Akim Demaille <demaille@gostai.com>
1702
1703 Comment changes.
1704
17052008-11-15 Akim Demaille <demaille@gostai.com>
1706
1707 djgpp/local.mk.
1708 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
1709 * djgpp/local.mk: this new file.
1710
17112008-11-15 Akim Demaille <demaille@gostai.com>
1712
1713 Remove doc/Makefile.am.
1714 * doc/Makefile.am: Rename as...
1715 * doc/local.mk: this.
1716 Adjust paths
1717 * Makefile.am, configure.ac: Adjust.
1718 * Makefile.am (MOSTLYCLEANFILES): New.
1719 * src/local.mk: Adjust.
1720
17212008-11-15 Akim Demaille <demaille@gostai.com>
1722
1723 Move sc_tight_scope into maint.mk.
1724 It does not work, and I don't know how it was supposed to work: it
1725 seems to be looking for sources in the build tree. I just moved
1726 it at a better place, fixing it is still required.
1727
1728 * src/local.mk (echo): Remove.
1729 (sc_tight_scope): Move to...
1730 * maint.mk: here.
1731
17322008-11-15 Akim Demaille <demaille@gostai.com>
1733
1734 Regen.
1735 * src/parse-gram.h, src/parse-gram.h: Regen.
1736
17372008-11-15 Akim Demaille <demaille@gostai.com>
1738
1739 Remove src/Makefile.am.
1740 * src/Makefile.am: Rename as...
1741 * src/local.mk: this.
1742 Prefix all the paths with src/.
1743 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
1744 (AM_CPPFLAGS): Find find in builddir/src.
1745 (YACC): Move the flags into...
1746 (AM_YFLAGS): here.
1747 * maint.mk (sc_tight_scope): Disable.
1748 It used to bounce to the version in src/Makefile.am which is now
1749 part of this very Makefile.
1750 * Makefile.am, configure.ac: Adjust.
1751 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
1752 include "..." to find files "here": we are no longer in src/, so
1753 qualify the includes with src/.
1754 * doc/Makefile.am (PREPATH): No longer include the top_builddir
1755 prefix.
1756 (.x.1): Adjust to be able to create src/foo from the top level
1757 Makefile, instead of going bounce to src/Makefile the creation of
1758 foo.
1759
17602008-11-15 Akim Demaille <demaille@gostai.com>
1761
1762 Remove useless variable.
1763 * doc/Makefile.am (srcsrcdir): Remove.
1764
17652008-11-15 Akim Demaille <demaille@gostai.com>
1766
1767 Remove data/Makefile.am.
1768 * data/Makefile.am: Rename as...
1769 * data/local.mk: this.
1770 Adjust paths.
1771 * Makefile.am, configure.ac: Adjust.
1772
17732008-11-15 Akim Demaille <demaille@gostai.com>
1774
1775 Remove etc/Makefile.am.
1776 * etc/Makefile.am: Rename as...
1777 * etc/local.mk: this.
1778 Adjust.
1779 * Makefile.am, configure.ac: Adjust.
1780
17812008-11-15 Akim Demaille <demaille@gostai.com>
1782
1783 Remove examples/local.mk.
1784 examples/calc++/Makefile.am might be interesting to keep as is, since
1785 it is an example in itself.
1786
1787 * examples/Makefile.am: Rename as...
1788 * examples/local.mk: this.
1789 Adjust.
1790 * Makefile.am, configure.ac: Adjust.
1791
17922008-11-15 Akim Demaille <demaille@gostai.com>
1793
1794 Remove build-aux/Makefile.am.
1795 Recursive Makefiles are really way too slow, let's get rid of some of
1796 them.
1797
1798 * build-aux/Makefile.am: Rename as...
1799 * build-aux/local.mk: this.
1800 Adjust paths.
1801 * Makefile.am, configure.ac: Adjust.
1802
18032008-11-15 Akim Demaille <demaille@gostai.com>
1804
1805 Provide convenience constructors for locations and positions.
1806 * data/location.cc (position::position): Accept file, line and
1807 column as arguments with default values.
1808 Always qualify initial line and column literals as unsigned.
1809 (location::location): Provide convenience constructors.
1810
18112008-11-15 Akim Demaille <demaille@gostai.com>
1812
1813 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
1814 token type.
1815 Using template buys us nothing, and makes it uselessly complex to
1816 construct a symbol. Besides, it could not be generalized to other
1817 languages, while make_FOO would work in C/Java etc.
1818
1819 * data/lalr1.cc (b4_symbol_): New.
1820 (b4_symbol): Use it.
1821 (b4_symbol_constructor_declaration_)
1822 (b4_symbol_constructor_definition_): Instead of generating
1823 specializations of an overloaded template function, just generate
1824 several functions whose names are forged from the token names
1825 without the token.prefix.
1826 (b4_symbol_constructor_declarations): Generate them for all the
1827 symbols, not just by class of symbol type, now that instead of
1828 specializing a function template by the token, we generate a
1829 function named after the token.
1830 (b4_symbol_constructor_specialization_)
1831 (b4_symbol_constructor_specializations): Remove.
1832 * etc/bench.pl.in: Adjust to this new API.
1833
18342008-11-13 Akim Demaille <demaille@gostai.com>
1835
1836 %define token.prefix.
1837 Provide a means to add a prefix to the name of the tokens as
1838 output in the generated files. Because of name clashes, it is
1839 good to have such a prefix such as TOK_ that protects from names
1840 such as EOF, FILE etc. But it clutters the grammar itself.
1841
1842 * data/bison.m4 (token.prefix): Empty by default.
1843 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
1844 * data/lalr1.cc (b4_symbol): Ditto.
1845
18462008-11-13 Akim Demaille <demaille@gostai.com>
1847
1848 Compute at M4 time some of the subtractions.
1849 * data/lalr1.cc (b4_subtract): New.
1850 (b4_rhs_data): Use it.
1851
18522008-11-13 Akim Demaille <demaille@gostai.com>
1853
1854 symbol::token.
1855 This allows the user to get the type of a token returned by yylex.
1856
1857 * data/lalr1.cc (symbol::token): New.
1858 (yytoknum_): Define when %define lex_symbol, independently of
1859 %debug.
1860 (yytoken_number_): Move into...
1861 (symbol::token): here, since that's the only use.
1862 The other one is YYPRINT which was not officially supported
1863 by lalr1.cc, and anyway it did not work since YYPRINT uses this
1864 array under a different name (yytoknum).
1865
18662008-11-13 Akim Demaille <demaille@gostai.com>
1867
1868 YYERRCODE.
1869 * TODO (YYERRCODE): Mention the case of $undef.
1870
18712008-11-13 Akim Demaille <demaille@gostai.com>
1872
1873 TODO: YYPRINT.
1874 * TODO (YYPRINT): New.
1875
18762008-11-13 Akim Demaille <demaille@gostai.com>
1877
1878 Comment changes.
1879 * data/lalr1.cc, data/yacc.c: Fix the description of the
1880 yytranslate and yytoknum tables.
1881
18822008-11-13 Akim Demaille <demaille@gostai.com>
1883
1884 Define make_symbol in the header.
1885 To reach good performances these functions should be inlined (yet
1886 this is to measure precisely). To this end they must be available
1887 to the caller.
1888
1889 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
1890 location_type with the class name.
1891 Since will now be output in the header, declare "inline".
1892 No longer use b4_symbol_constructor_specializations, but
1893 b4_symbol_constructor_definitions in the header.
1894 Don't call it in the *.cc file.
1895
18962008-11-13 Akim Demaille <demaille@gostai.com>
1897
1898 Define yytranslate in the header for lex_symbol.
1899 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
1900 into the header file when using %define lex_symbol.
1901 (yytranslate_): Declare inline.
1902
19032008-11-13 Akim Demaille <demaille@gostai.com>
1904
1905 Define the constructors of symbol_type in
1906 b4_symbol_constructor_definitions.
1907 The constructors are called by the make_symbol functions, which a
1908 forthcoming patch will move elsewhere. Hence the interest of
1909 putting them together.
1910
1911 The stack_symbol_type does not need to be moved, it is used only
1912 by the parser.
1913
1914 * data/lalr1.cc: Move symbol_type and symbol_base_type
1915 constructors into...
1916 (b4_symbol_constructor_definitions): here.
1917 Adjust.
1918
19192008-11-13 Akim Demaille <demaille@gostai.com>
1920
1921 Make it easier to move the definition of yytranslate_.
1922 Forthcoming changes will make it possible to use yytranslate_
1923 from outside the parser implementation file.
1924
1925 * data/lalr1.cc (b4_yytranslate_definition): New.
1926 Use it.
1927
19282008-11-13 Akim Demaille <demaille@gostai.com>
1929
1930 Remove useless class specification.
1931 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1932 to refer to the class name to use a type defined by the class for
1933 arguments of member functions.
1934
19352008-11-13 Akim Demaille <demaille@gostai.com>
1936
1937 Finer input type for yytranslate.
1938 This patch is debatable: the tradition expects yylex to return an int
1939 which happens to correspond to token_number (which is an enum). This
1940 allows for instance to return characters (such as '*' etc.). But this
1941 goes against the stronger typing I am trying to have with the new
1942 lex interface which return a symbol_type. So in this case, feed
1943 yytranslate_ with a token_type.
1944
1945 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1946 expect a token_type.
1947
19482008-11-13 Akim Demaille <demaille@gostai.com>
1949
1950 Honor lex-params in %define lex_symbol mode.
1951 * data/lalr1.cc: Use b4_lex_param.
1952
19532008-11-13 Akim Demaille <demaille@gostai.com>
1954
1955 Simplify names.
1956 * src/output.c (symbol_definitions_output): Rename symbol
1957 attributes type_name and has_type_name as type and has_type.
1958 * data/lalr1.cc: Adjust uses.
1959
19602008-11-13 Akim Demaille <demaille@gostai.com>
1961
1962 Use b4_type_names for the union type.
1963 The union used to compute the size of the variant used to iterate
1964 over the type of all the symbols, with a lot of redundancy. Now
1965 iterate over the lists of symbols having the same type-name.
1966
1967 * data/lalr1.cc (b4_char_sizeof_): New.
1968 (b4_char_sizeof): Use it.
1969 Adjust to be called with a list of numbers instead of a single
1970 number.
1971 Adjust its caller for new-line issues.
1972
19732008-11-13 Akim Demaille <demaille@gostai.com>
1974
1975 Define the "identifier" of a symbol.
1976 Symbols may have several string representations, for instance if
1977 they have an alias. What I call its "id" is a string that can be
1978 used as an identifier. May not exist.
1979
1980 Currently the symbols which have the "tag_is_id" flag set are
1981 those that don't have an alias. Look harder for the id.
1982
1983 * src/output.c (is_identifier): Move to...
1984 * src/symtab.c (is_identifier): here.
1985 * src/symtab.h, src/symtab.c (symbol_id_get): New.
1986 * src/output.c (symbol_definitions_output): Use it to define "id"
1987 and "has_id".
1988 Remove the definition of "tag_is_id".
1989 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
1990 "tag_is_id" were used to produce code.
1991 We still use "tag" for documentation.
1992
19932008-11-11 Akim Demaille <demaille@gostai.com>
1994
1995 Locations are no longer required by lalr1.cc.
1996 * data/lalr1.cc (_b4_args, b4_args): New.
1997 Adjust all uses of locations to make them optional.
1998 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
1999 (AT_CHECK_NAMESPACE): Check the use of locations.
2000 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
2001 without locations with lalr1.cc.
2002 Test these cases.
2003 * tests/output.at: Check lalr1.cc with and without location
2004 support.
2005 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2006 Don't use locations.
2007
20082008-11-11 Akim Demaille <demaille@gostai.com>
2009
2010 AT_FULL_COMPILE.
2011 * tests/local.at (AT_FULL_COMPILE): New.
2012 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2013
20142008-11-11 Akim Demaille <demaille@gostai.com>
2015
2016 Support parens in calc++.
2017 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2018 * examples/calc++/test (run): Check the expected output.
2019 Adjust callers.
2020 Check parens too.
2021
20222008-11-11 Akim Demaille <demaille@gostai.com>
2023
2024 Simplify lalr1.cc since %defines is mandatory.
2025 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2026
20272008-11-11 Akim Demaille <demaille@gostai.com>
2028
2029 TODO: yyfmt.
2030 * TODO (yysyntax_error): New item.
2031
20322008-11-11 Akim Demaille <demaille@gostai.com>
2033
2034 Prefer M4 to CPP.
2035 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2036 YYERROR_VERBOSE.
2037
20382008-11-11 Akim Demaille <demaille@gostai.com>
2039
2040 Support i18n of the parse error messages.
2041 * TODO (lalr1.cc/I18n): Remove.
2042 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2043 error messages, as done in yacc.c.
2044 Stay within the yy* pseudo namespace.
2045
20462008-11-11 Akim Demaille <demaille@gostai.com>
2047
2048 More TODO.
2049 * TODO (single stack, yysyntax_error): New.
2050
20512008-11-11 Akim Demaille <demaille@gostai.com>
2052
2053 Make it possible to return a symbol_type from yylex.
2054 * data/lalr1.cc (b4_lex_symbol_if): New.
2055 (parse): When lex_symbol is defined, expected yylex to return the
2056 complete lookahead.
2057 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2058 yylex interface.
2059 (bench_variant_parser): Exercise it.
2060
20612008-11-11 Akim Demaille <demaille@gostai.com>
2062
2063 Remove useless bench case.
2064 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2065 no longer used.
2066
20672008-11-11 Akim Demaille <demaille@gostai.com>
2068
2069 Improve display of directives.
2070 * etc/bench.pl.in (parse_term): Don't add useless eol.
2071
20722008-11-11 Akim Demaille <demaille@gostai.com>
2073
2074 Use string_cast in the bench.
2075 * etc/bench.pl.in (generate_grammar_list): Define and use
2076 string_cast.
2077
20782008-11-11 Akim Demaille <demaille@gostai.com>
2079
2080 Replace yychar with a Boolean.
2081 * data/lalr1.cc (parse::yychar): Replace by...
2082 (parse::yyempty): this.
2083
20842008-11-11 Akim Demaille <demaille@gostai.com>
2085
2086 Factor the tables.
2087 * TODO: New item.
2088
20892008-11-11 Akim Demaille <demaille@gostai.com>
2090
2091 Let yytranslate handle the eof case.
2092 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2093 Adjust callers.
2094 No longer expect yychar to be equal to yyeof_, rather, test the
2095 lookahead's (translated) kind.
2096
20972008-11-11 Akim Demaille <demaille@gostai.com>
2098
2099 yychar cannot be empty in yyerrlab.
2100 * TODO (yychar == yyempty_): New.
2101 * data/lalr1.cc: Remove the handling of this case.
2102 This eases forthcoming changes related to yychar and yytranslate.
2103
21042008-11-11 Akim Demaille <demaille@gostai.com>
2105
2106 Bench: syntactic sugar for %define/#define.
2107 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2108 (&bench_push_parser, bench_variant_parser): Use this feature.
2109 (&eat): New.
2110 Use it.
2111
21122008-11-11 Akim Demaille <demaille@gostai.com>
2113
2114 Less memory pressure on the "list" bench.
2115 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2116 the values, to limit memory pressure.
2117
21182008-11-11 Akim Demaille <demaille@gostai.com>
2119
2120 Introduce make_symbol.
2121 make_symbol provides a means to construct a full symbol (kind,
2122 value, location) in a single shot. It is meant to be a Symbol
2123 constructor, parameterized by the symbol kind so that overloading
2124 would prevent incorrect kind/value pairs. Unfortunately
2125 parameterized constructors do not work well in C++ (unless the
2126 parameter also appears as an argument, which is not acceptable),
2127 hence the use of a function instead of a constructor.
2128
2129 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2130 (b4_symbol_constructor_declarations)
2131 (b4_symbol_constructor_specialization_)
2132 (b4_symbol_constructor_specializations)
2133 (b4_symbol_constructor_definition_)
2134 (b4_symbol_constructor_definitions): New.
2135 Use them where appropriate to generate declaration, declaration of
2136 the specializations, and implementations of the templated
2137 overloaded function "make_symbol".
2138 (variant::variant): Always define a default ctor.
2139 Also provide a copy ctor.
2140 (symbol_base_type, symbol_type): New ctor overloads for value-less
2141 symbols.
2142 (symbol_type): Now public, so that functions such as yylex can use
2143 it.
2144
21452008-11-11 Akim Demaille <demaille@gostai.com>
2146
2147 Inform m4 whether a tag is a valid id.
2148 * src/output.c (is_identifier): New.
2149 (symbol_definitions_output): Use it to define tag_is_id.
2150 But maybe this should be done at m4 level?
2151
21522008-11-11 Akim Demaille <demaille@gostai.com>
2153
2154 Test 214 was failing: it greps with a pattern containing [ ]*
2155 which obviously meant to catch spaces and tabs, but contained only
2156 spaces. Tabulations in sources are a nuisance, so to simplify the
2157 matter, get rid of all the tabulations in the Java sources. The
2158 other skeletons will be treated equally later.
2159
2160 * data/java.m4, data/lalr1.java: Untabify.
2161 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2162 tabulations are no longer generated.
2163
21642008-11-11 Paolo Bonzini <bonzini@gnu.org>
2165
2166 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2167 * configure.ac: Adjust usage.
2168 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2169 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2170 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2171
21722008-11-10 Di-an Jan <dianj@freeshell.org>
2173
2174 Workaround Java's ``code too large'' problem for parser tables
2175 in most cases, by using one function per initialization.
2176 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2177 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2178 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2179 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2180 (yytname_): Use b4_typed_parser_table.
2181 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2182 ``code too large'' error.
2183
21842008-11-10 Di-an Jan <dianj@freeshell.org>
2185
2186 * NEWS: Document them.
2187
2188 General Java skeleton improvements.
2189 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2190 using gcj < 4.3 in the testsuite, according to comments in
2191 gnulib/m4/javacomp.m4.
2192 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2193 location_type, position_type): Remove extraneous brackets from
2194 b4_percent_define_default.
2195 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2196 m4_define and m4_define_default.
2197 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2198 which marks the end of user code with appropriate syncline, like all
2199 the other skeletons.
2200 (b4_user_post_prologue): Add. Don't silently drop.
2201 (yylex): Remove.
2202 (parse): Inline yylex.
2203 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2204 (%{...%}): Fix typo of %code imports.
2205 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2206
2207 Support annotations on parser class with %define annotations.
2208 * data/lalr1.java (annotations): Add to parser class modifier.
2209 * doc/bison.texinfo (Java Parser Interface): Document
2210 %define annotations.
2211 (Java Declarations Summary): Document %define annotations.
2212 * tests/java.at (Java parser class modifiers): Test annotations.
2213
2214 Do not generate code for %error-verbose unless requested.
2215 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2216 Make private. Make conditional on %error-verbose.
2217 (getErrorVerbose, setErrorVerbose): New.
2218 (yytnamerr_): Make conditional on %error-verbose.
2219 (yysyntax_error): Make some code conditional on %error-verbose.
2220 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2221 about %error-verbose having no effect.
2222 (getErrorVerbose, setErrorVerbose): Document.
2223
2224 Move constants for token names to Lexer interface.
2225 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2226 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2227 (parse): Qualify EOF to Lexer.EOF.
2228 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2229 EOF and token names to Java Lexer Interface.
2230 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2231
2232 Make yyerror public.
2233 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2234 (yyerror): Change to public. Add Javadoc comments. Use longer
2235 parameter names. Make the body rather than the declarator
2236 conditional on %locations.
2237 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2238
2239 Allow user to add code to the constructor with %code init.
2240 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2241 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2242 Add %code init to the front of the constructor body.
2243 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2244 and %define init_throws.
2245 (Java Declarations Summary): Document %code init and
2246 %define init_throws.
2247 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2248 (Java constructor init and init_throws): Add tests.
2249
22502008-11-10 Akim Demaille <demaille@gostai.com>
2251
2252 Update TODO.
2253 * TODO (-D): is implemented.
2254 (associativity): Same precedence must have the same associativity.
2255 For instance, how can a * b / c be parsed if * is %left and / is
2256 %right?
2257 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2258
22592008-11-10 Akim Demaille <demaille@gostai.com>
2260
2261 Formatting changes.
2262
22632008-11-10 Akim Demaille <demaille@gostai.com>
2264
2265 More information about the symbols.
2266 * src/output.c (type_names_output): Document all the symbols,
2267 including those that don't have a type-name.
2268 (symbol_definitions_output): Define "is_token" and
2269 "has_type_name".
2270 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
2271 type-name, now that they are defined too in b4_type_names.
2272
22732008-11-10 Akim Demaille <demaille@gostai.com>
2274
2275 Regen.
2276
22772008-11-10 Akim Demaille <demaille@gostai.com>
2278
2279 Make parser::yytranslate static.
2280 Small speedup (1%) on the list grammar. And makes yytranslate_
2281 available in non member functions.
2282
2283 * data/lalr1.cc (yytranslate_): Does not need to be a instance
2284 function.
2285
22862008-11-10 Akim Demaille <demaille@gostai.com>
2287
2288 Avoid trailing spaces.
2289 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
2290 * data/lalr1.cc: Don't indent before rule and symbol actions, as
2291 they can be empty, and anyway this incorrectly indents the first
2292 action.
2293
22942008-11-10 Akim Demaille <demaille@gostai.com>
2295
2296 Comment changes.
2297
22982008-11-10 Akim Demaille <demaille@gostai.com>
2299
2300 Use "enum" for integral constants.
2301 This is just nicer to read, I observed no speedup.
2302
2303 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2304 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2305 (yyuser_token_number_max_, yyundef_token_): Move into...
2306 (yytranslate_): here.
2307
23082008-11-10 Akim Demaille <demaille@gostai.com>
2309
2310 Shortcuts in bench directives.
2311 * etc/bench.pl.in (parse_dirs): New.
2312 Use it.
2313 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2314 Create the benches in "benches/".
2315
23162008-11-10 Akim Demaille <demaille@gostai.com>
2317
2318 Formatting changes.
2319 * data/lalr1.cc: here.
2320
23212008-11-10 Akim Demaille <demaille@gostai.com>
2322
2323 Adjust verbose message to using emacs.
2324 * etc/bench.pl.in: Inform compilation-mode when we change the
2325 directory.
2326 (generate_grammar_list): Recognize %define "variant" in addition
2327 to %define variant.
2328
23292008-11-10 Akim Demaille <demaille@gostai.com>
2330
2331 Classify symbols by type-name.
2332 * src/uniqstr.h (UNIQSTR_CMP): New.
2333 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2334 (type_names_output): New.
2335 (muscles_output): Use it.
2336 * data/lalr1.cc (b4_symbol_action_): Remove.
2337 (b4_symbol_case_, b4_type_action_): New.
2338 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2339
23402008-11-10 Akim Demaille <demaille@gostai.com>
2341
2342 Change the handling of the symbols in the skeletons.
2343 Before we were using tables which lines were the symbols and which
2344 columns were things like number, tag, type-name etc. It is was
2345 difficult to extend: each time a column was added, all the numbers had
2346 to be updated (you asked for colon $2, not for "tag"). Also, it was
2347 hard to filter these tables when only a subset of the symbols (say the
2348 tokens, or the nterms, or the tokens that have and external number
2349 *and* a type-name) was of interest.
2350
2351 Now instead of monolithic tables, we define one macro per cell. For
2352 instance "b4_symbol(0, tag)" is a macro name which contents is
2353 self-decriptive. The macro "b4_symbol" provides easier access to
2354 these cells.
2355
2356 * src/output.c (type_names_output): Remove.
2357 (symbol_numbers_output, symbol_definitions_output): New.
2358 (muscles_output): Call them.
2359 (prepare_symbols): Define b4_symbols_number.
2360
23612008-11-10 Akim Demaille <demaille@gostai.com>
2362
2363 --trace=muscles
2364 * src/getargs.h, src/getargs.c (trace_muscle): New.
2365 (trace_types, trace_args): Support it.
2366 * src/output.c (output_skeleton): Use it.
2367
23682008-11-10 Akim Demaille <demaille@gostai.com>
2369
2370 muscles_output.
2371 * src/output.c (muscles_output): New, extracted from...
2372 (output_skeleton): here.
2373 Adjust.
2374
23752008-11-10 Akim Demaille <demaille@gostai.com>
2376
2377 Formatting changes.
2378
23792008-11-10 Akim Demaille <demaille@gostai.com>
2380
2381 Update the variant example.
2382 * examples/variant.yy: Formatting changes.
2383 One stage build.
2384
23852008-11-10 Akim Demaille <demaille@gostai.com>
2386
2387 Support constructor with an argument.
2388 This improves the "list" bench by 2%.
2389
2390 * data/lalr1.cc (variant::build): Add an overloaded version with
2391 an argument.
2392 * tests/c++.at (AT_CHECK_VARIANT): Check it.
2393
23942008-11-10 Akim Demaille <demaille@gostai.com>
2395
2396 Test variants.
2397 * tests/c++.at (AT_CHECK_VARIANTS): New.
2398 Use it with and without %define assert.
2399
24002008-11-10 Akim Demaille <demaille@gostai.com>
2401
2402 Add %precedence support.
2403 Unfortunately it is not possible to reuse the %prec directive. This
2404 is because to please POSIX, we do not require to end the rules with a
2405 semicolon. As a result,
2406
2407 foo: bar %prec baz
2408
2409 is ambiguous: either a rule which precedence is that of baz, or a rule,
2410 and then a declaration of the precedence of the token baz.
2411
2412 * doc/bison.texinfo: Document %precedence.
2413 (Precedence Only): New.
2414 * src/assoc.h, src/assoc.c (precedence_assoc): New.
2415 * src/conflicts.c (resolve_sr_conflict): Support it.
2416 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
2417 Parse it.
2418 * tests/calc.at: Use %precedence for NEG.
2419 * tests/conflicts.at (%precedence does not suffice)
2420 (%precedence suffices): New tests.
2421
24222008-11-09 Akim Demaille <demaille@gostai.com>
2423
2424 Make benches in a sub dirs.
2425 * etc/bench.pl.in ($dir): New.
2426 Use it.
2427 Check the use of constructors with an argument.
2428 (bench_variant_parser): Fix.
2429
24302008-11-09 Akim Demaille <demaille@gostai.com>
2431
2432 fix eof condition
2433
24342008-11-09 Akim Demaille <demaille@gostai.com>
2435
2436 Fix --help.
2437
24382008-11-09 Akim Demaille <demaille@gostai.com>
2439
2440 Require the generation of parse-gram.output.
2441 * src/Makefile.am (YACC): Pass --report=all.
2442
24432008-11-09 Akim Demaille <demaille@gostai.com>
2444
2445 Formatting changes.
2446
24472008-11-09 Akim Demaille <demaille@gostai.com>
2448
2449 Update TODO.
2450 * TODO: Remove obsolete items.
2451 Update others.
2452
24532008-11-09 Akim Demaille <demaille@gostai.com>
2454
2455 Enhance bench.pl.
2456 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
2457 (@token, $grammar, $bench): New.
2458 (generate_grammar_variant): Rename as...
2459 (generate_grammar_list): this.
2460 (generate_grammar): Adjust.
2461 (bench_grammar): Rename as...
2462 (bench): this.
2463 Use it in the various bench-marking routines.
2464 (-b, -g): New options.
2465
24662008-11-09 Akim Demaille <demaille@gostai.com>
2467
2468 Use a static hierarchy for symbols in the C++ parser.
2469 * data/lalr1.cc (symbol_base_type, symbol_type)
2470 (stack_symbol_type): Make it a static hierarchy.
2471 Adjust dependencies.
2472
24732008-11-09 Akim Demaille <demaille@gostai.com>
2474
2475 bench.pl -d, --directive.
2476 * etc/bench.pl.in (@directive): New.
2477 (&bench_grammar): Use it.
2478 (&bench_list_grammar): New, to provide access to the "variant"
2479 grammar.
2480 Use it.
2481 (getopts): Support -d, --directive.
2482
24832008-11-09 Akim Demaille <demaille@gostai.com>
2484
2485 Use inline for small operations.
2486 * data/lalr1.cc (symbol_base_type, symbol_type)
2487 (stack_symbol_type): Declare constructor and other operations as
2488 inline.
2489 (yy_destroy_): Inline.
2490
24912008-11-09 Akim Demaille <demaille@gostai.com>
2492
2493 Introduce a hierarchy for symbols.
2494 * data/lalr1.cc (symbol_base_type, symbol_type): New.
2495 (data_type): Rename as...
2496 (stack_symbol_type): this.
2497 Derive from symbol_base_type.
2498 (yy_symbol_value_print_): Merge into...
2499 (yy_symbol_print_): this.
2500 Rename as...
2501 (yy_print_): this.
2502 (yydestruct_): Rename as...
2503 (yy_destroy_): this.
2504 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
2505 (parser::parse): yyla is now of symbol_type.
2506 Use its type member instead of yytoken.
2507
25082008-11-09 Akim Demaille <demaille@gostai.com>
2509
2510 Rename data_type and stack_symbol_type.
2511 * data/lalr1.cc (data_type): Rename as...
2512 (stack_symbol_type): this.
2513
25142008-11-09 Akim Demaille <demaille@gostai.com>
2515
2516 Handle semantic value and location together.
2517 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
2518 yydata.value and yydata.location.
2519 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
2520 (YY_SYMBOL_PRINT): Now take semantic value and location as a
2521 single arg.
2522 Adjust all callers.
2523 (yydestruct_): New overload for a stack symbol.
2524
25252008-11-09 Akim Demaille <demaille@gostai.com>
2526
2527 Push a complete symbol, not connected parts.
2528 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
2529 state, value and location.
2530 Adjust callers.
2531
25322008-11-09 Akim Demaille <demaille@gostai.com>
2533
2534 Agregate yylval and yylloc.
2535 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
2536 (parser::yyla): this.
2537
25382008-11-09 Akim Demaille <demaille@gostai.com>
2539
2540 Rely on the state stack to display reduction traces.
2541 To display rhs symbols before a reduction, we used information
2542 about the rule reduced, which required the tables yyrhs and
2543 yyprhs. Now use rely only on the state stack to get the same
2544 information.
2545
2546 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
2547 Use them.
2548 (parser::yyrhs_, parser::yyprhs_): Remove.
2549 (parser::yy_reduce_print_): Use the state stack.
2550
25512008-11-09 Akim Demaille <demaille@gostai.com>
2552
2553 Fuse yyval and yyloc into yylhs.
2554 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
2555 yylhs.
2556 (parse): Replace yyval and yyloc with yylhs.value and
2557 yylhs.location.
2558 After a user action, compute yylhs.state earlier.
2559 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
2560 fresh error_token.
2561
25622008-11-09 Di-an Jan <dianj@freeshell.org>
2563
2564 Remove unused variable.
2565 * src/output.c (type_names_output): Remove unused variable sep.
2566
25672008-11-09 Paolo Bonzini <bonzini@gnu.org>
2568
2569 Change tests/output.at quoting.
2570 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
2571 expanding arguments.
2572
25732008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2574
2575 Don't add a semicolon to actions for %skeleton or %language.
2576 It breaks Java test cases as reported by Akim Demaille.
2577 * src/scan-code.l: Implement.
2578
25792008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2580
2581 Clean up %skeleton and %language priority implementation.
2582 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2583 remove static qualifier because others will soon need to see it.
2584 (language_prio): Likewise.
2585 (getargs): Use command_line_prio rather than 0.
2586 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2587 enum fields.
2588 (skeleton_prio): Extern it.
2589 (language_prio): Extern it.
2590 * src/parse-gram.y: Use grammar_prio rather than 1.
2591
25922008-11-07 Akim Demaille <demaille@gostai.com>
2593
2594 Moving push traces into yypush_.
2595 * data/lalr1.cc (yypush_): Now takes a optional trace message.
2596 Adjust all uses.
2597
25982008-11-07 Akim Demaille <demaille@gostai.com>
2599
2600 The single-stack C++ parser is now the standard one.
2601 * data/lalr1.cc: Rename as...
2602 * data/lalr1-split.cc: this.
2603 * data/lalr1-fusion.cc: Rename as...
2604 * data/lalr1.cc: this.
2605 * etc/bench.pl.in: Adjust.
2606
26072008-11-07 Akim Demaille <demaille@gostai.com>
2608
2609 Avoid empty-if warnings.
2610 Reported by Quentin Hocquet.
2611
2612 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
2613 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
2614
26152008-11-07 Akim Demaille <demaille@gostai.com>
2616
2617 Pass command line location to skeleton_arg and language_argmatch.
2618 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2619 The location argument is now mandatory.
2620 Adjust all dependencies.
2621 (getargs): Use command_line_location.
2622
26232008-11-07 Akim Demaille <demaille@gostai.com>
2624
2625 -D, --define.
2626 * src/getargs.c (usage): Document -D.
2627 Fix help string for --locations.
2628 (command_line_location): New.
2629 (short_options, long_options, getargs): Support -D, --define.
2630 (getargs): Move -d support at the right place.
2631 * doc/bison.texinfo (Bison Options): Update.
2632 * tests/input.at (%define, --define): New.
2633
26342008-11-07 Akim Demaille <demaille@gostai.com>
2635
2636 Initialize the muscle table before parsing the command line.
2637 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2638 (getargs): Define file_name.
2639 * src/main.c (main): Initialize muscle_tab before calling
2640 getargs.
2641 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2642 its value is not available yet.
2643
26442008-11-07 Akim Demaille <demaille@gostai.com>
2645
2646 Locations without columns for command line arguments.
2647 * src/location.c (location_print): Don't display negative columns.
2648 * src/location.h: Document this.
2649
26502008-11-07 Akim Demaille <demaille@gostai.com>
2651
2652 Fix --help.
2653 * src/getargs.c (usage): Fix help string for -W.
2654
26552008-11-07 Akim Demaille <demaille@gostai.com>
2656
2657 Handle more general types of option arguments.
2658 * build-aux/cross-options.pl: The argument ends at the first
2659 space, not the first non-symbol character.
2660 Use @var for each word appearing the argument description.
2661
26622008-11-07 Akim Demaille <demaille@gostai.com>
2663
2664 Destroy the variants that remain on the stack in case of error.
2665 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
2666 destructor.
2667 Display the value only if yymsg is nonnull.
2668 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
2669
26702008-11-07 Akim Demaille <demaille@gostai.com>
2671
2672 Add "%define assert" to variants.
2673 This is used to help the user catch cases where some value gets
2674 ovewritten by a new one. This should not happen, as this will
2675 probably leak.
2676
2677 Unfortunately this uncovered a bug in the C++ parser itself: the
2678 lookahead value was not destroyed between two calls to yylex. For
2679 instance if the previous lookahead was a std::string, and then an int,
2680 then the value of the std::string was correctly taken (i.e., the
2681 lookahead was now an empty string), but std::string structure itself
2682 was not reclaimed.
2683
2684 This is now done in variant::build(other&) (which is used to take the
2685 value of the lookahead): other is not only stolen from its value, it
2686 is also destroyed. This incurs a new performance penalty of a few
2687 percent, and union becomes faster again.
2688
2689 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
2690 (b4_variant_if): New.
2691 (variant::built): New.
2692 Use it whereever the status of the variant changes.
2693 * etc/bench.pl.in: Check the penalty of %define assert.
2694
26952008-11-07 Akim Demaille <demaille@gostai.com>
2696
2697 Use "%define variant" in bench.pl.
2698 * etc/bench.pl.in: No longer use the pseudo directive %variants,
2699 just use %define variants.
2700
27012008-11-07 Akim Demaille <demaille@gostai.com>
2702
2703 Regen.
2704 * src/parse-gram.h, src/parse-gram.c: Regen.
2705
27062008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2707
2708 Fix user actions without a trailing semicolon.
2709 Reported by Sergei Steshenko at
2710 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2711 * THANKS (Sergei Steshenko): Add.
2712 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2713 * tests/regression.at (Fix user actions without a trailing semicolon):
2714 New test case.
2715
27162008-11-04 Akim Demaille <demaille@gostai.com>
2717
2718 Use b4_copyright_years.
2719 * data/yacc.c (b4_copyright_years): New.
2720 Fix its value according to the comments in the file.
2721 Use it and undefine it.
2722
27232008-11-04 Akim Demaille <demaille@gostai.com>
2724
2725 Formatting changes.
2726 * data/lalr1-fusion.cc, src/parse-gram.y: here.
2727
27282008-11-04 Akim Demaille <demaille@gostai.com>
2729
2730 Formatting changes.
2731 * data/lalr1-fusion.cc: here.
2732
27332008-11-04 Akim Demaille <demaille@gostai.com>
2734
2735 Use strict on bench.pl.
2736 * etc/bench.pl.in (&run, &generate_grammar): New.
2737 Rename the grammar generating functions for consistency.
2738 Change the interface so that the list of benches to run is passed
2739 as (optionless) arguments.
2740 (&compile): Use &run.
2741
27422008-11-04 Akim Demaille <demaille@gostai.com>
2743
2744 Remove spurious initial empty lines.
2745 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2746 * data/yacc.c: End the @output lines with an @.
2747
27482008-11-04 Akim Demaille <demaille@gostai.com>
2749
2750 Improve the display of sizes.
2751 * etc/bench.p.in: Higher precision.
2752 Sort by decreasing size.
2753
27542008-11-04 Akim Demaille <demaille@gostai.com>
2755
2756 Don't memcpy C++ structures.
2757 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
2758 arguments.
2759 (variant::build): New overload for
2760 copy-construction-that-destroys.
2761 (variant::swap): New.
2762 (parser::yypush_): Use it in variant mode.
2763
27642008-11-04 Akim Demaille <demaille@gostai.com>
2765
2766 Better defaults for bench.pl.
2767 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
2768 default values.
2769 Adjust &verbose uses.
2770 (-q, --quiet): New.
2771
27722008-11-04 Akim Demaille <demaille@gostai.com>
2773
2774 Make variant.yy more complex.
2775 std::list cannot be copied via memcpy, they are more demanding than
2776 std::string. Use one std::list to strengthen the test.
2777
2778 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
2779 Adjust.
2780 Create a list of strings, instead of a single large string.
2781
27822008-11-04 Akim Demaille <demaille@gostai.com>
2783
2784 bench.pl --bench.
2785 * etc/bench.pl.in (--bench, $bench): New.
2786
27872008-11-04 Akim Demaille <demaille@gostai.com>
2788
2789 Sort methods.
2790 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
2791 Define it after as().
2792
27932008-11-04 Akim Demaille <demaille@gostai.com>
2794
2795 Useless parens.
2796 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
2797
27982008-11-04 Akim Demaille <demaille@gostai.com>
2799
2800 Issue missing synclines after user actions.
2801 * data/c.m4 (b4_case): Issue synclines on the output file.
2802
28032008-11-04 Akim Demaille <demaille@gostai.com>
2804
2805 Remove trailing empty line.
2806 * data/lalr1-fusion.cc: Don't add an empty line after the user's
2807 epilogue.
2808
28092008-11-04 Akim Demaille <demaille@gostai.com>
2810
2811 Fix output of copyright years.
2812 * data/bison.m4 (b4_copyright): Fix the indentation of the
2813 copyright year paragraph.
2814 Use b4_copyright_years when no years are given.
2815 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
2816 (b4_copyright_years): New.
2817 Use it.
2818
28192008-11-04 Akim Demaille <demaille@gostai.com>
2820
2821 Avoid the spurious initial empty line.
2822 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
2823 the end of @output request to suppress the empty line that
2824 results.
2825
28262008-11-04 Akim Demaille <demaille@gostai.com>
2827
2828 Remove parser::rhs_number_type.
2829 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
2830 (yyrhs_): Use b4_table_define.
2831
28322008-11-04 Akim Demaille <demaille@gostai.com>
2833
2834 Fix iteration type.
2835 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
2836
28372008-11-04 Akim Demaille <demaille@gostai.com>
2838
2839 Factor the declaration of the integer tables.
2840 * data/lalr1-fusion.cc (b4_table_define): New.
2841 Use it.
2842
28432008-11-03 Akim Demaille <demaille@gostai.com>
2844
2845 Fix indentation of tables in lalr1.cc
2846 * data/lalr1-fusion.cc: Fix the indentation.
2847
28482008-11-03 Akim Demaille <demaille@gostai.com>
2849
2850 Destroy the lhs symbols after reduction.
2851 * data/lalr1-fusion.cc (parse): After the user action, when in
2852 variant mode, destroy the lhs symbols.
2853
28542008-11-03 Akim Demaille <demaille@gostai.com>
2855
2856 Simplify yysyntax_error_ use.
2857 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
2858 type, but make it unnamed in the declaration when it is not used.
2859
28602008-11-03 Akim Demaille <demaille@gostai.com>
2861
2862 Let yy::variant::build return an lvalue.
2863 * data/lalr1-fusion.cc (variant::build): Return a reference to the
2864 object.
2865
28662008-11-03 Akim Demaille <demaille@gostai.com>
2867
2868 Define yy::variant only when needed.
2869 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
2870 used.
2871
28722008-11-03 Akim Demaille <demaille@gostai.com>
2873
2874 Bench the three-stack lalr1.cc.
2875 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
2876 one-stack one.
2877
28782008-11-03 Akim Demaille <demaille@gostai.com>
2879
2880 Fail on parse error in calc++.
2881 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2882 status.
2883 * examples/calc++/test ($me, $number, $exit, run): New.
2884 Use them to propagate errors to the exit status.
2885
28862008-11-03 Akim Demaille <demaille@gostai.com>
2887
2888 Don't specify the skeleton twice in the example.
2889 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
2890 file does what is needed.
2891
28922008-11-03 Akim Demaille <demaille@gostai.com>
2893
2894 bench: Improve output.
2895 * etc/bench.pl.in (bench_grammar): Tune the printf format.
2896
28972008-11-03 Akim Demaille <demaille@gostai.com>
2898
2899 bench: check impact of %debug on variants.
2900 * etc/bench.pl.in (variant_grammar): Fix the computation of
2901 $variant.
2902 Generate a grammar file that can work with or without %debug.
2903 Do use the @directive.
2904 (bench_variant_parser): Check impact of %debug.
2905 (@directives): Rename all the occurrences to...
2906 (@directive): this, for consistency.
2907
29082008-11-03 Akim Demaille <demaille@gostai.com>
2909
2910 bench: report the size too.
2911 * etc/bench.pl.in ($iterations): Defaults to -3.
2912 (&bench_grammar): Require hireswallclock.
2913 Compute and display the size of the result.
2914 More comments.
2915
29162008-11-03 Akim Demaille <demaille@gostai.com>
2917
2918 bench: More use of the verbosity level.
2919 * etc/bench.pl.in ($verbose, &verbose): New.
2920 Use them.
2921 More POD documentation.
2922
29232008-11-03 Akim Demaille <demaille@gostai.com>
2924
2925 bench.pl: a command line interface
2926 * etc/bench.pl.in: More doc.
2927 Some fixes in the documentation.
2928 ($cflags, $iterations, &help, &getopt): New.
2929 Use them.
2930 (&variant_grammar): Let the number of stages be 10 times what is
2931 specified.
2932
29332008-11-03 Akim Demaille <demaille@gostai.com>
2934
2935 Bench the use of Boost.Variants.
2936 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2937 New.
2938 (&compile): Be ready to compile C++ parsers.
2939 (&bench_push_parser): Move debug information to the outermost
2940 level.
2941 * THANKS: Add Michiel De Wilde.
2942
29432008-11-03 Akim Demaille <demaille@gostai.com>
2944
2945 bench.pl: Pass directives as a list instead of as a string.
2946 * etc/bench.pl.in (&directives): New.
2947 (&triangular_grammar, &calc_grammar): Use it to format the Bison
2948 directives.
2949 (&triangular_grammar): Do use the directives (were ignored).
2950 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2951 directives.
2952
29532008-11-03 Akim Demaille <demaille@gostai.com>
2954
2955 Improve genericity of bench.pl.
2956 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2957 argument.
2958 (&bench_push_parser): New.
2959 Call it.
2960
29612008-11-03 Akim Demaille <demaille@gostai.com>
2962
2963 Add documentation to bench.pl.
2964 * etc/bench.pl.in: Comment changes.
2965
29662008-11-03 Akim Demaille <demaille@gostai.com>
2967
2968 Fuse the three stacks into a single one.
2969
2970 In order to make it easy to perform benchmarks to ensure that
2971 there are no performance loss, lalr1.cc is forked into
2972 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
2973 lalr1.cc.
2974
2975 Meanwhile, to make sure that lalr1-fusion.cc is correctly
2976 exercized by the test suite, the user must install a symbolic link
2977 from lalr1.cc to it.
2978
2979 Instead of having three stacks (state, value, location), use a
2980 stack of triples. This considerably simplifies the code (and it
2981 will be easier not to require locations as currently does the C++
2982 parser), and also gives a 10% speedup according to
2983 etc/bench (probably mainly since memory allocation is done once
2984 instead of three times).
2985
2986 Another motivation is to make it easier to destruct properly
2987 semantic values: now that they are bound to their state (hence
2988 symbol type) it will be easier to call the appropriate destructor.
2989
2990 These changes should probably benefit the C parser too.
2991
2992 * data/lalr1.cc: Copy as...
2993 * data/lalr1-fusion.cc: this new file.
2994 (b4_rhs_value, b4_rhs_location): New definitions overriding those
2995 from c++.m4.
2996 (state_stack_type, semantic_stack_type, location_stack_type)
2997 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
2998 (data_type, stack_type, yystack_): New.
2999 (YYLLOC_DEFAULT, yypush_): Adjust.
3000 (yyerror_range): Now based on data_type, not location_type.
3001
30022008-11-03 Akim Demaille <demaille@gostai.com>
3003
3004 Push the state, value, and location at the same time.
3005 This is needed to prepare a forthcoming patch that fuses the three
3006 stacks into one.
3007
3008 * data/lalr1.cc (parser::yypush_): New.
3009 (parser::yynewstate): Change the semantics: instead of arriving to
3010 this label when value and location have been pushed, but yystate
3011 is to be pushed on the state stack, now the three of them must
3012 have been pushed before. yystate still must be the new state.
3013 This allows to use yypush_ everywhere instead of individual
3014 handling of the stacks.
3015
30162008-11-03 Akim Demaille <demaille@gostai.com>
3017
3018 Prefer references to pointers.
3019 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3020 definition to use references instead of pointers.
3021 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3022 Take the value and location as references.
3023 Adjust callers.
3024
30252008-11-03 Akim Demaille <demaille@gostai.com>
3026
3027 stack::size instead of stack::height.
3028 * data/lalr1.cc (stack::height): Rename as...
3029 (stack::size): this.
3030 Fix the output type.
3031 Comment changes.
3032
30332008-11-03 Akim Demaille <demaille@gostai.com>
3034
3035 Use variants to support objects as semantic values.
3036 This patch was inspired by work by Michiel De Wilde. But he used
3037 Boost variants which (i) requires Boost on the user side, (ii) is
3038 slow, and (iii) has useless overhead (the parser knows the type of
3039 the semantic value there is no reason to duplicate this
3040 information as Boost.Variants do).
3041
3042 This implementation reserves a buffer large enough to store the
3043 largest objects. yy::variant implements this buffer. It was
3044 implemented with Quentin Hocquet.
3045
3046 * src/output.c (type_names_output): New.
3047 (output_skeleton): Invoke it.
3048 * data/c++.m4 (b4_variant_if): New.
3049 (b4_symbol_value): If needed, provide a definition for variants.
3050 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3051 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3052 (b4_char_sizeof, yy::variant): New.
3053 (parser::parse): If variants are requested, define
3054 parser::union_type, parser::variant, change the definition of
3055 semantic_type, construct $$ before running the user action instead
3056 of performing a default $$ = $1.
3057 * examples/variant.yy: New.
3058 Based on an example by Michiel De Wilde.
3059
30602008-11-03 Akim Demaille <demaille@gostai.com>
3061
3062 Parameterize the extraction of semantic values.
3063 To make future changes easier, no longer rely on ".TYPE" being the
3064 way to get a semantic value.
3065
3066 * data/c.m4 (b4_symbol_value): New.
3067 Use it.
3068 * data/c++.m4, data/yacc.c: Use it.
3069 * data/glr.c: Use b4_symbol_value.
3070 (b4_rhs_data): New.
3071 Use it.
3072
30732008-11-03 Akim Demaille <demaille@gostai.com>
3074
3075 Prepare easier M4 changes.
3076 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3077 future changes.
3078
30792008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3080
3081 Initiate further development.
3082 * NEWS: Create an empty section for new entries.
3083 * gnulib: Update submodule to HEAD.
3084
30852008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3086
3087 * NEWS: Version 2.4.
3088
30892008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3090
3091 Prepare for next release.
3092 * NEWS: Briefly mention changes since 2.3b.
3093 * README: Say GNU m4 1.4.6, which we've been requiring in release
3094 announcements already, not 1.4.3, which breaks the build.
3095
30962008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3097
3098 Say %language is experimental.
3099 We're thinking of extending it's effect on output file naming. See the
3100 thread at
3101 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3102 * NEWS: Say it's experimental.
3103 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3104 recommend it over %skeleton for now.
3105 (Bison Options): Likewise.
3106 (C++ Bison Interface): Use %skeleton not %language.
3107 (Calc++ Parser): Use %skeleton not %language.
3108 * src/getargs.c (usage): Say it's experimental.
3109
31102008-11-01 Di-an Jan <dianj@freeshell.org>
3111 Paolo Bonzini <bonzini@gnu.org>
3112
3113 Support all Java parser class modifiers.
3114 * data/java.m4 (b4_percent_define_get3): New.
3115 (b4_final_if, b4_strictfp_if): New.
3116 * data/lalr1.java (final, strictfp, extends, implements): Support.
3117 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3118 documentation.
3119 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3120 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3121 (AT_CHECK_JAVA_GREP): New.
3122 (Java parser class modifiers): New test.
3123 (Java parser class extends and implements): New test.
3124
3125 Model exception propagation better with throws and lex_throws.
3126 * data/java.m4 (b4_list2): New.
3127 (throws): Change default.
3128 * data/lalr1.java (yyaction): Add throws.
3129 (parse): Add lex_throws in addition to throws.
3130 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3131 * tests/java.at (Java throws specifications): New test.
3132
3133 Improve documentation for Java parsers.
3134 * doc/bison.texinfo (Java Parsers): Add subsections.
3135 Don't quote first argument of %define.
3136 (Java Bison Interface): Document output files. Move documentation
3137 of parser class and merge into Java Parser Interface. Document
3138 features that error out. Document directives with no effect.
3139 Move note about Javadoc higher.
3140 (Java Semantic Values): Explicitly mention stype.
3141 Document that generic types cannot be used.
3142 (Java Location Values): Use @deftypeivar. Document constructors.
3143 Correct return value for toString.
3144 (Java Parser Interface): List undocumented constants/fields.
3145 Move documentation of fields added by %parse-param closer to list
3146 of members. Document that token names are added as fields.
3147 Document constructors accurately. Remove error method.
3148 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3149 Interface. Describe %code lexer and yylex accutately.
3150 Remove documentation that does not match the code.
3151 (Java Action Features): New.
3152 (Java Differences): Add reference. Add item on semantic values.
3153 Add note about @{ ... @}. Clarify %% epilogue placement.
3154 (Java Declarations Summary): New.
3155
3156 Fix Java skeleton.
3157 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3158 (b4_remove_comma): Quote test argument.
3159 (b4_identification): Remove "bison" field.
3160 * tests/java.at (Java parser class and package names): New test.
3161 (Java %parse-param and %lex-param): New test.
3162 (Java stype, position_class and location_class): New test.
3163
31642008-10-31 Di-an Jan <dianj@freeshell.org>
3165
3166 * data/lalr1.jave: Update copyright years.
3167 (YYParser): Correct name of "generated from" file in Javadoc:
3168 use b4_file_name instead of @ofile@.
3169 (Location constructor): Correct Javadoc parameter name.
3170 (yylloc): Add missing opening m4 quote after b4_location_if.
3171 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3172 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3173 (YYParser constructor): Correct Javadoc parameter name.
3174
31752008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3176
3177 Always put auxiliary code files in the same dir as other output files.
3178 * src/files.c (compute_file_name_parts): When the user specifies
3179 --output but not --file-prefix, extract the directory prefix from the
3180 file prefix not from the grammar file name. This affects the location
3181 of files like location.hh generated by the C++ skeleton. The includes
3182 in the other output files require this fix.
3183 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3184 for expected output files.
3185 (Output files): Add a test for the above.
3186
31872008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3188
3189 * gnulib: Update submodule to HEAD.
3190
31912008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3192
3193 Update copyright year.
3194 * src/files.c: Here.
3195
31962008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3197
3198 Don't overwrite the input file.
3199 * src/files.c (output_file_name_check): Fatal error if using input file
3200 for output.
3201 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3202 argument.
3203 (Conflicting output files): Add test.
3204
32052008-10-28 Akim Demaille <demaille@gostai.com>
3206
3207 Space changes.
3208 * data/lalr1.cc: Formatting changes.
3209
32102008-10-28 Akim Demaille <demaille@gostai.com>
3211
3212 Don't define debugging functions when !YYDEBUG.
3213 * data/lalr1.cc (debug_stream, set_debug_stream)
3214 (debug_level_type, debug_level, set_debug_level): Don't
3215 declare them when YYDEBUG is not defined.
3216 The implementation are already YYDEBUG-aware.
3217
32182008-10-28 Akim Demaille <demaille@gostai.com>
3219
3220 Prefer "continue" for empty loop bodies.
3221 * etc/bench.pl.in: Use "continue" instead of {}.
3222
32232008-10-28 Akim Demaille <demaille@gostai.com>
3224
3225 Space and comments changes.
3226 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3227 * data/c.m4, data/lalr1.cc: Space changes.
3228
32292008-10-28 Akim Demaille <demaille@gostai.com>
3230
3231 Make gnulib a submodule.
3232 * gnulib: New.
3233 * .gitmodules (gnulib): New.
3234
32352008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3236
3237 Fix yyerror_range for user-defined location type in C++. Reported by
3238 Georg Sauthoff at
3239 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3240 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3241 * THANKS (Georg Sauthoff): Add.
3242
32432008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3244
3245 Update several administrative files mainly to facilitate releasing.
3246 * HACKING (Administrivia): Make the git-merge-changelog notes more
3247 helpful.
3248 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3249 (Release Procedure): Update for git and add numerous details that were
3250 previously missing.
3251 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3252 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3253 that announcements don't claim we bootstrapped with whatever bison
3254 happened to be in PATH. Add flex as a bootstrap tool.
3255 * Makefile.maint: Remove, previously replaced by maint.mk.
3256 * Makefile.cfg: Remove, and migrate settings to...
3257 * cfg.mk: ... here for the sake of `make announcement'.
3258 * bootstrap.conf (gnulib_modules): Add announce-gen.
3259 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3260 Berry.
3261
32622008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3263
3264 Small but important bugfixes for the Java skeleton.
3265 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3266 (yy_symbol_print): Call toString on yyvaluep.
3267
32682008-08-29 Akim Demaille <demaille@gostai.com>
3269
3270 Clarify UPDATED use.
3271 * doc/bison.texinfo: It refers to the last edition of this file,
3272 not to the release date of Bison.
3273 Reported by Joel E. Denny.
3274
32752008-08-29 Akim Demaille <demaille@gostai.com>
3276
3277 * README: Update FAQ pointer.
3278 Reported by Joel E. Denny.
3279
32802008-08-27 Eric Blake <ebb9@byu.net>
3281
3282 Resync m4sugar from autoconf.
3283 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3284 (m4_init): Adjust to latest m4.git changes.
3285 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3286 effects.
3287 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3288 (_m4_list_cmp): Reduce side effects.
3289
32902008-08-27 Akim Demaille <demaille@gostai.com>
3291
3292 Check yyerrok in calc.at.
3293 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3294 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3295 expected.
3296
32972008-08-27 Akim Demaille <demaille@gostai.com>
3298
3299 Support yyerrok in lalr1.cc.
3300 YYBACKUP is still to import back into lalr1.cc.
3301 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3302
33032008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3304
3305 For maintainer-check*, don't recompile for a $(VERSION) update.
3306 * cfg.mk: New file.
3307 (_is-dist-target): Override the one in GNUmakefile.
3308 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3309
33102008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3311
3312 Update for recent change to gnulib.
3313 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3314 string.h now.
3315
33162008-08-15 Eric Blake <ebb9@byu.net>
3317
3318 Remaining m4sugar merge from autoconf.
3319 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3320 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3321 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3322 * src/output.c (output_skeleton): Tell m4 how to find it.
3323
3324 Partial m4sugar merge from autoconf: m4_map.
3325 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3326 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3327 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3328 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3329 for empty list.
3330 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3331 Likewise.
3332 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3333 declares it.
3334
33352008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3336
3337 Keep .version and PACKAGE_VERSION in sync.
3338 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3339 dependency, and add comments justifying this in more detail. Discussed
3340 starting at
3341 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3342
33432008-08-06 Eric Blake <ebb9@byu.net>
3344
3345 Partial m4sugar merge from autoconf: m4_shiftn.
3346 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3347 (m4_shift2, m4_shift3): New macros.
3348 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3349 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3350 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3351 * data/java.m4 (b4_remove_comma): Likewise.
3352
3353 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3354 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3355 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3356 (m4_init): Consolidate wrapped text into single m4_wrap.
3357 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3358 in wrapped text.
3359
33602008-08-05 Eric Blake <ebb9@byu.net>
3361
3362 Partial m4sugar merge from autoconf: builtins, version.m4.
3363 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3364 (m4_prepend): Remove, as it is unused and inherently quadratic,
3365 whereas m4_append is linear in newer m4.
3366 (m4_mkstemp): New builtin.
3367 (m4_symbols): Make rename conditional.
3368 (m4_version_prereq): Ensure fatal error if used in bison, which
3369 intentionally lacks version.m4.
3370
3371 Fix comments in m4sugar.
3372 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3373
33742008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3375
3376 Update for recent .gitignore fix in Gnulib.
3377 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3378 anchored .gitignore entries.
3379
33802008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3381
3382 Set gnu or gnits strictness.
3383 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3384 development and gnits strictness for releases. Based on Eric Blake's
3385 suggestion at
3386 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3387
33882008-07-31 Paolo Bonzini <bonzini@gnu.org>
3389
3390 * NEWS: Clarify documentation of %language.
3391
33922008-07-31 Paolo Bonzini <bonzini@gnu.org>
3393
3394 Support usage of git-merge-changelog.
3395 * .gitattributes: New.
3396 * HACKING: Document usage of git-merge-changelog.
3397 * bootstrap: Install git-merge-changelog entries in .git/config
3398 if appropriate.
3399
34002008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3401
3402 Remove remaining dependence on CVS Id keyword.
3403 * ChangeLog: For the sake of people still using CVS, don't use dollars
3404 when mentioning Id.
3405 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3406 unusual anyway.
3407 * data/xslt/xml2dot.xsl: Likewise.
3408 * data/xslt/xml2text.xsl: Likewise.
3409 * data/xslt/xml2xhtml.xsl: Likewise.
3410 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3411 * doc/Makefile.am (neutralize): Remove, no longer needed.
3412 (.x.1): Don't use neutralize.
3413 (edit): Don't substitute for ID.
3414 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3415
34162008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3417
3418 Fix dependence on computed configure variables.
3419 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3420 $(top_srcdir)/configure.ac so that changes to computed variables, such
3421 as PACKAGE_VERSION, are seen.
3422 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3423
34242008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3425
3426 Update copyright dates for recent changes.
3427 * Makefile.am: Here.
3428 * src/Makefile.am: Here.
3429 * src/reduce.c: Here.
3430 * tests/reduce.at: Here.
3431
34322008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3433
3434 Use git-version-gen for version names between releases.
3435 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3436 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3437 * .prev-version: New.
3438 * .version.in: Remove.
3439 * ChangeLog: Remove the Id previously used for capturing the CVS
3440 revision.
3441 * GNUmakefile: Remove, now copied from Gnulib.
3442 * Makefile.am: Add code suggested by comments in
3443 build-aux/git-version-gen.
3444 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3445 .prev-version, and .version.
3446 * NEWS (2.3b+): Rename to...
3447 (?.?): ... this because we're dropping the "+" version naming scheme,
3448 but, in general, we still can't be sure of our next release name.
3449 * bootstrap: Add a quick hack to remove from .gitignore the
3450 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3451 entry. This should really be fixed in gnulib instead.
3452 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3453 * configure.ac (AC_INIT): Set version name by invoking
3454 build-aux/git-version-gen.
3455 (AC_CONFIG_FILES): Remove .version, now generated by
3456 build-aux/git-version-gen.
3457 * maint.mk: New, copied from coreutils.
3458 * doc/.cvsignore (bison.1): Add.
3459 * doc/.gitignore (/bison.1): Add.
3460 * doc/bison.1: Remove, generated.
3461 * src/.cvsignore (revision.c): Remove.
3462 * src/.gitignore (/revision.c): Remove.
3463 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3464 (BUILT_SOURCES): Remove revision.c.
3465 (revision.c): Remove.
3466 * src/getargs.c (version): Don't print revision after the VERSION.
3467 * src/revision.h: Remove.
3468
34692008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3470
3471 Fix untranslatable composition of sentences. Reported by Goran
3472 Uddeborg at
3473 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3474 * THANKS (Goran Uddeborg): Add.
3475 * src/reduce.c (reduce_print): Report the number of nonterminals and
3476 rules useless in the grammar in separate sentences.
3477 * tests/reduce.at (Useless Rules): Update output.
3478 (Reduced Automaton): Likewise.
3479 (Underivable Rules): Likewise.
3480 (Empty Language): Likewise.
3481
34822008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3483
3484 Fix some .gitignore and .cvsignore problems.
3485 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3486 (insert_vc_ignore): ... this new function, which prepends `/' to all
3487 .gitignore entries before passing them to insert_sorted_if_absent.
3488 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3489 .cvsignore files are maintained even though Bison developers run
3490 bootstrap while using Git.
3491 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3492 unneeded by Bison.
3493 (gnulib): Add.
3494 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3495 unneeded. Reported by Eric Blake.
3496 * lib/.gitignore (/*~): Add.
3497 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3498 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3499 Blake.
3500 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3501
35022008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3503
3504 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3505 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3506 * bootstrap.conf (gnulib_modules): Add unsetenv.
3507 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3508 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3509 (/setenv.m4): Add.
3510 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3511 the first argument because it may become position-dependent, and unset
3512 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3513 Add comments explaining these issues in more detail.
3514
35152008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3516
3517 Add .gitignore everywhere based on .cvsignore.
3518 * .gitignore: New.
3519 * build-aux/.gitignore: New.
3520 * data/.gitignore: New.
3521 * doc/.gitignore: New.
3522 * etc/.gitignore: New.
3523 * examples/.gitignore: New.
3524 * examples/calc++/.gitignore: New.
3525 * lib/.gitignore: New.
3526 * m4/.gitignore: New.
3527 * po/.gitignore: New.
3528 * runtime-po/.gitignore: New.
3529 * src/.gitignore: New.
3530 * tests/.gitignore: New.
3531
35322008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3533
3534 * NEWS (2.3b+): New section, empty for now.
3535 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3536
35372008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3538
3539 * NEWS (2.3b): Update release date since there has been a delay in
3540 getting the announcements and tarballs out.
3541
35422008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3543
3544 * NEWS: Version 2.3b.
3545 * configure.ac (AC_INIT): Likewise.
3546 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3547
35482008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3549
3550 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3551 been doing it for years.
3552 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3553 (Release Procedure): Add FIXME about make alpha being unmaintained.
3554
35552008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3556
3557 * data/yacc.c: Reformat m4 a little for readability.
3558 * src/lalr.c (build_relations): Correct comment.
3559
35602008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3561
3562 DJGPP specific issue.
3563 * djgpp/config.sed: Fixes required to run configure scripts generated
3564 by autoconf 2.62.
3565
35662008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3567
3568 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3569 coordinator@translationproject.org.
3570
35712008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3572
3573 * THANKS: Add Eric Blake.
3574
35752008-04-23 Eric Blake <ebb9@byu.net>
3576
3577 Revert prior patch, by working around autoconf regression.
3578 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3579 ("Output file name: ("): Uncomment test.
3580 ("Output file name: )"): Likewise.
3581 Based on an idea from Noah Misch.
3582
35832008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3584
3585 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3586 2.61. Reported by Juan Manuel Guerrero at
3587 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3588 * tests/output.at ("Output file name: ("): Comment out test case for
3589 now.
3590 ("Output file name: )"): Likewise.
3591
35922008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3593
3594 * GNUmakefile: Update git-version-gen invocation so make dist
3595 succeeds.
3596
35972008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3598
3599 Update to the current gnulib CVS repository, and fix trigraph handling
3600 in Bison.
3601 * bootstrap: Update gnulib CVS repository URL.
3602 (symlink_to_dir): Encapsulate the code that guarantees the destination
3603 directory exists into...
3604 (check_dst_dir): ... this new function, and...
3605 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3606 fail when copying files into lib/uniwidth/.
3607 * src/output.c (prepare_symbols): When writing yytname muscles, where
3608 symbol names will be encoded in C-string literals, tell quotearg to
3609 escape trigraphs. This used to be the default in gnulib.
3610 * tests/regression.at (Token definitions): Because of the change in
3611 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3612 escapes trigraphs in symbol names. Thus, yytname no longer has
3613 trigraphs unnecessarily doubly escaped. Update test case output.
3614 Extend test case to be sure Bison's own error messages will no longer
3615 have trigraphs in symbol names unnecessarily escaped once.
3616
36172008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3618
3619 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3620 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3621 * .cvsignore: Add .version.
3622 * .version.in: New.
3623 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3624 * configure.ac (AC_CONFIG_FILES): Add .version.
3625 * build-aux/.cvsignore: Add git-version-gen.
3626
36272008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3628
3629 * NEWS (2.3a+): Mention that -g now takes an argument.
3630 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3631 consistency. Update the -g and -x entries now that they take
3632 arguments. Use brackets to indicate optional arguments.
3633 * src/getargs.c (usage): Explain the relationship between arguments of
3634 long and short options more completely. Document --defines and -d
3635 separately since the former takes an argument but, for POSIX Yacc, the
3636 latter does not.
3637 (short_options): Let -W take an optional argument like --warnings.
3638 (getargs): Sort cases.
3639
36402008-02-28 Akim Demaille <demaille@gostai.com>
3641
3642 * doc/bison.texinfo: Fix a few typos.
3643
36442008-02-28 Akim Demaille <akim@epita.fr>
3645
3646 * doc/bison.texinfo (Bison Options): Document -W.
3647 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3648
36492008-02-28 Akim Demaille <akim@epita.fr>
3650
3651 * src/getargs.c (short_options): Split and sort for readability.
3652 -g and -x take optional arguments, just like their long options.
3653 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3654 understand.
3655 Fix the handling of $opt which resulted in all the argument to be
3656 considered as optional.
3657
36582008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3659
3660 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3661 say its interface is experimental.
3662 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3663 Java.
3664 (Bison Options): In the -L and --language entry, mention Java.
3665 (Java Bison Interface): Say the interface is experimental.
3666 * src/getargs.c (usage): Mention -L and --language.
3667
3668 * NEWS (2.3a+): Say the push parsing interface is experimental.
3669 * doc/bison.texinfo (Push Decl): Likewise.
3670 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3671 (Push Parser Function): Likewise.
3672 (Pull Parser Function): Likewise.
3673 (Parser Create Function): Likewise.
3674 (Parser Delete Function): Likewise.
3675 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3676 yypull_parse, and yypush_parse entries.
3677
3678 * NEWS (2.3a+): Mention XML support, and say the schema is
3679 experimental.
3680 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3681 * src/getargs.c (usage): Say the XML schema is experimental.
3682
3683 * NEWS (2.3a+): Say option instead of flag.
3684
36852008-02-21 Wojciech Polak <polak@gnu.org>
3686
3687 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3688 text.
3689
36902008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3691
3692 Fix impure push parser compile error reported by Bob Rossi at
3693 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3694 * data/yacc.c: Clean up whitespace in the output a little.
3695 (yypstate_allocated): Define for impure push parsers regardless of
3696 whether the pull interface is also requested.
3697 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3698 check impure push parsers without the pull interface.
3699
3700 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3701 yyerror takes arguments specified by %parse-param while yypstate_new
3702 does not.
3703 * doc/bison.texinfo (Parser Create Function): Document that
3704 yypstate_new returns 0 for multiple impure parser instances.
3705 * tests/push.at (Push Parsing: Multiple impure instances): Update
3706 expected stderr output.
3707
37082008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3709
3710 * runtime-po/POTFILES.in (push.c): Remove.
3711
37122008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3713
3714 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3715 * data/push.c: Rename to...
3716 * data/yacc.c: ... this, overwriting it.
3717 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3718 `%push-pull-parser' -> `%define api.push_pull "both"'.
3719 Remove old yacc.c tests, and update push.c tests to yacc.c.
3720
37212008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3722
3723 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3724 `"%code top" blocks' instead of `%code "top" blocks'.
3725 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3726 Clean up whitespace in the output a little.
3727
37282008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3729
3730 Fix documentation problems reported by Tim Josling at
3731 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3732 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3733 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3734 integers. Explain the effect of literal string aliases on error
3735 messages. Copy token 0 documentation from the C++ skeleton
3736 documentation.
3737
37382008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3739
3740 Accept a token number in a %left, %right, or %nonassoc for POSIX
3741 conformance. Reported by Tim Josling at
3742 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3743 * NEWS (2.3a+): Mention.
3744 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3745 and code numbers are treated by precedence declarations.
3746 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3747 of symbols.1.
3748 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3749 of symbol.
3750 (symbol.prec): New, just like symbol but allows INT.
3751 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3752 longer holds.
3753 * tests/regression.at (Token number in precedence declaration): New
3754 test case.
3755
37562008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3757
3758 DJGPP specific issues.
3759 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3760 be changed. Copyright timestamp adjusted.
3761 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3762 be changed. Copyright timestamp adjusted.
3763 * djgpp/config.site: Copyright timestamp adjusted.
3764 * djgpp/config_h.sed: Copyright timestamp adjusted.
3765 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3766 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3767 filename translation list.
3768 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3769 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3770 files shall be created. Before trying to use the temp dir where the
3771 environment variable points to check that the dir really exists. If
3772 not default to the cwd as temp dir. Copyright timestamp adjusted.
3773 * djgpp/subpipe.h: Copyright timestamp adjusted.
3774 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3775
37762008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3777
3778 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3779
37802008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3781
3782 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3783 Problem reported by Claudio Saavedra in
3784 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3785
37862008-01-05 Wojciech Polak <polak@gnu.org>
3787
3788 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3789 document's title with the input grammar file name.
3790
37912007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3792
3793 Automate regression testing of the XML/XSLT implementation. Discussed
3794 starting at
3795 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3796 * configure.ac (XSLTPROC): New substitution.
3797 * Makefile.am (maintainer-xml-check): New phony target invoking...
3798 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3799 invoking make maintainer-check with BISON_TEST_XML=1.
3800 * tests/atlocal.in (XSLTPROC): New.
3801 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3802 not to report reachable memory when Bison is expected to have a
3803 non-zero exit status and (2) to compare XML/XSLT output with --graph
3804 and --report=all output for every working grammar when
3805 BISON_TEST_XML=1.
3806 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3807 (AT_BISON_CHECK_XML): New.
3808 (AT_QUELL_VALGRIND): New.
3809 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3810 (AT_CHECK): ... don't redefine this since this was the old way to
3811 quell Valgrind.
3812 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3813 AT_BISON_CHECK invocations.
3814 * tests/c++.at: Likewise.
3815 * tests/calc.at: Likewise.
3816 * tests/conflicts.at: Likewise.
3817 * tests/cxx-type.at: Likewise.
3818 * tests/existing.at: Likewise.
3819 * tests/glr-regression.at: Likewise.
3820 * tests/headers.at: Likewise.
3821 * tests/input.at: Likewise.
3822 * tests/java.at: Likewise.
3823 * tests/output.at: Likewise.
3824 * tests/push.at: Likewise.
3825 * tests/reduce.at: Likewise.
3826 * tests/regression.at: Likewise.
3827 * tests/sets.at: Likewise.
3828 * tests/skeletons.at: Likewise.
3829 * tests/synclines.at: Likewise.
3830 * tests/torture.at: Likewise.
3831 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3832 tends to hang xsltproc.
3833 (Big horizontal): Likewise.
3834
38352007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3836
3837 In XML output, remove redundant class attribute on symbol element.
3838 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3839 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3840 look up a symbol to determine whether it's a nonterminal or terminal.
3841 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3842 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3843
3844 Add prec/assoc information to XML output.
3845 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3846 %prec, add a percent_prec attribute.
3847 * src/print-xml.c (print_grammar): For each terminal that has a
3848 precedence or associativity, add a prec or assoc attribute.
3849 (xml_indent): New.
3850 (xml_puts): Use xml_indent.
3851 (xml_printf): Use xml_indent.
3852 * src/print-xml.h (xml_indent): Prototype.
3853
3854 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3855 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3856
38572007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3858
3859 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3860 (bison:ruleByNumber): ... this for clarity.
3861 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3862 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3863 (xsl:template match="reduction"): Update.
3864 (xsl:template match="item"): Update.
3865 (xsl:template match="reduction"): Update.
3866
3867 In the XML output, don't print the list of rules where symbols appear.
3868 Compute it in XSLT instead. Discussed at
3869 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3870 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3871 (bison:ruleByRhs): New.
3872 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3873 bison:ruleByRhs.
3874 (xsl:template match="terminal/rule"): Remove.
3875 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3876 bison:ruleByRhs.
3877 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3878 Remove.
3879 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3880 bison:ruleByRhs and mode="number-link" for rule template.
3881 (xsl:template match="terminal/rule"): Remove.
3882 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3883 bison:ruleByRhs and mode="number-link" for rule template.
3884 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3885 Rewrite as...
3886 (xsl:template match="rule" mode="number-link"): ... this.
3887 * src/print-xml.c (print_grammar): Don't print the list of rules.
3888
38892007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3890
3891 Don't let --report affect XML output; always print all information.
3892 Discussed at
3893 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3894 * src/conflicts.c (log_resolution): Implement.
3895 * src/print-xml.c (print_core): Implement.
3896 (print_state): Implement.
3897 (print_xml): Implement.
3898
3899 * NEWS (2.3a+): Fix quotes.
3900 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3901 don't let %verbose clear the list specified by --report.
3902
39032007-11-26 Akim Demaille <akim@epita.fr>
3904
3905 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3906
39072007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3908
3909 In the XML output, list useless and unused symbols and rules with the
3910 useful ones and add a "usefulness" attribute. Discussed starting at
3911 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3912 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3913 (grammar_rules_print_xml): Print all rules instead of just those
3914 useful in the grammar, and add a "usefulness" attribute.
3915 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3916 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3917 (print_grammar): Print all nonterminals instead of just useful ones,
3918 and add a "usefulness" attribute to nonterminals and terminals.
3919 (print_xml): Don't print a separate "reductions" or
3920 "rules-useless-in-parser" element.
3921 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3922 (reduce_xml): Remove.
3923 (reduce_token_unused_in_grammar): New.
3924 (reduce_nonterminal_useless_in_grammar): New.
3925 * src/reduce.h (reduce_xml): Remove prototype.
3926 (reduce_token_unused_in_grammar): Add prototype.
3927 (reduce_nonterminal_useless_in_grammar): Add prototype.
3928 * data/xslt/xml2text.xsl: Update for XML changes.
3929 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3930 * tests/reduce.at (Useless Terminals): Update output.
3931 (Useless Rules): Update output.
3932 (Reduced Automaton): Update output.
3933
3934 Say "Terminals unused in grammar" instead of "Unused terminals".
3935 * NEWS (2.3a+): Update.
3936 * doc/bison.texinfo (Understanding): Update example output.
3937 * src/reduce.c (reduce_output): Implement.
3938 * data/xslt/xml2text.xsl: Implement.
3939 * data/xslt/xml2xhtml.xsl: Implement.
3940
39412007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3942
3943 Accept --report-file=FILE to override the default `.output' filename.
3944 * NEWS (2.3a+): Mention.
3945 * doc/bison.texinfo (Bison Options): Add an entry.
3946 * src/files.c (compute_output_file_names): Don't override
3947 spec_verbose_file if already set.
3948 * src/getargs.c (usage): Document --report-file.
3949 (REPORT_FILE_OPTION): New anonymous enum member.
3950 (long_options): Add entry for it.
3951 (getargs): Add case for it setting spec_verbose_file.
3952
3953 * build-aux/cross-options.pl: Don't record a short option just because
3954 there's an arg.
3955 * doc/.cvsignore: Add yacc.1.
3956
39572007-11-14 Akim Demaille <akim@epita.fr>
3958
3959 * doc/yacc.1.in: New.
3960 * configure.ac, doc/Makefile.am: Adjust.
3961 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3962 config.h symbol.
3963 Use AC_SUBST for assignments too.
3964 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3965
39662007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3967
3968 * src/gram.c: Remove comments that duplicate comments in gram.h.
3969
3970 When reporting useless rules and nonterminals, say "useless in grammar"
3971 instead of "useless", and say "useless in parser" instead of "never
3972 reduced". Discussed starting at
3973 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3974 * NEWS (2.3a+): Mention this change.
3975 * data/xslt/xml2text.xsl: Update output text and expected input XML
3976 element names to match changes below.
3977 * data/xslt/xml2xhtml.xsl: Likewise.
3978 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3979 Contents: "Rules useless in parser due to conflicts".
3980 * doc/bison.texinfo (Decl Summary): Reword a little.
3981 (Understanding): Update example output for changes below.
3982 * src/gram.c: (rule_useful_p): Rename to...
3983 (rule_useful_in_grammar_p): ... this.
3984 (rule_useless_p): Rename to...
3985 (rule_useless_in_grammar_p): ... this.
3986 (rule_never_reduced_p): Rename to...
3987 (rule_useless_in_parser_p): ... this.
3988 (grammar_rules_print): Update for renames.
3989 (grammar_rules_print_xml): Update for renames.
3990 (grammar_rules_never_reduced_report): Rename to...
3991 (grammar_rules_useless_report): ... this since it is used for either
3992 kind of useless rule.
3993 * src/gram.h: Reword comments and update function names in prototypes.
3994 * src/main.c (main): Say "rule useless in parser due to conflicts".
3995 * src/print-xml.c (print_rules_never_reduced): Rename to...
3996 (print_rules_useless_in_parser): ... this, and rename output XML
3997 element "rules-never-reduced" to "rules-useless-in-parser".
3998 (print_xml): Update for rename.
3999 * src/print.c (print_results): Say "Rules useless in parser due to
4000 conflicts".
4001 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4002 (nonterminals_reduce): Say "nonterminal useless in grammar".
4003 (reduce_output): Say "Nonterminals useless in grammar".
4004 Say "Rules useless in grammar".
4005 (reduce_xml): Rename output XML element "useless" to
4006 "useless-in-grammar".
4007 (reduce_print): Don't report the count of grammatically useless rules
4008 as "rules never reduced" just because %yacc is specified.
4009 In the correct report of this count, say nonterminal(s) and rule(s)
4010 "useless in grammar".
4011 * tests/conflicts.at (S/R in initial): Update expected output.
4012 (Defaulted Conflicted Reduction): Likewise.
4013 (Unreachable States After Conflict Resolution): Likewise.
4014 * tests/existing.at (GNU pic Grammar): Likewise.
4015 * tests/reduce.at (Useless Nonterminals): Likewise.
4016 (Useless Rules): Likewise.
4017 (Reduced Automaton): Likewise.
4018 (Underivable Rules): Likewise.
4019 (Empty Language): Likewise.
4020
40212007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4022
4023 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4024 here document and before the EOF so that BSD's implementation of Bourne
4025 shell doesn't parse the delimiter as part of the here document.
4026 * doc/.cvsignore: Add cross-options.texi.
4027 * src/getargs.c (usage): Add a blank line after the warning categories.
4028
40292007-11-08 Paolo Bonzini <bonzini@gnu.org>
4030
4031 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4032
40332007-11-05 Akim Demaille <akim@epita.fr>
4034
4035 Remove Id: from bison.1.
4036 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4037 (perl -0777 -pi -e 's/\.PP\nId): New.
4038 (.x.1): Use it to ignore the version control revision.
4039
40402007-11-05 Akim Demaille <demaille@gostai.com>
4041
4042 * build-aux/Makefile.am: Ship cross-options.pl.
4043 * doc/Makefile.am: Always refer to cross-options.texi with
4044 $(srcdir).
4045 (MAINTAINERCLEANFILES): Add it.
4046
40472007-11-04 Akim Demaille <demaille@gostai.com>
4048
4049 Generate the long/short option cross-table.
4050 * build-aux/cross-options.pl: New.
4051 * doc/Makefile.am (cross-options.texi): New.
4052 * doc/bison.texinfo: Use it.
4053
40542007-11-04 Akim Demaille <demaille@gostai.com>
4055
4056 Generate bison.1 using help2man.
4057 * doc/common.x, doc/bison.x: New.
4058 * doc/Makefile.am (bison.1, .x.1): New.
4059 The code is taken from autoconf-2.61/man/Makefile.am.
4060 * configure.ac: Look for help2man.
4061
40622007-11-04 Akim Demaille <demaille@gostai.com>
4063
4064 Complete --help.
4065 * src/getargs.c (usage): Document -W, make it clear that -d,
4066 -g and -x have optional arguments.
4067
40682007-11-04 Akim Demaille <demaille@gostai.com>
4069
4070 Find sha1sum when named gsha1sum.
4071 * bootstrap (find_tool): New.
4072 ($SHA1SUM): New.
4073
40742007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4075
4076 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4077 at
4078 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4079 * NEWS (2.3a+): Mention.
4080 * data/bison.m4 (b4_pure_if): Don't define it here.
4081 * data/c.m4 (b4_identification): Depend on individual skeletons to
4082 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4083 values of the %define variables api.pure or api.push_pull. Define
4084 YYPURE, YYPUSH, and YYPULL accordingly.
4085 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4086 glr.cc has already defined b4_pure_flag.
4087 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4088 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4089 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4090 * doc/bison.texinfo (Pure Decl): Update.
4091 (Push Decl): Update.
4092 (Decl Summary): Add api.pure to %define entry.
4093 In %pure-parser entry, say it's deprecated and reference %define.
4094 (Pure Calling): Update.
4095 (Error Reporting): Update.
4096 (C++ Scanner Interface): Update.
4097 (How Can I Reset the Parser): Update.
4098 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4099 reference %define.
4100 * src/getargs.c (pure_parser): Remove global variable.
4101 * src/getargs.h (pure_parser): Remove extern.
4102 * src/output.c (prepare): Don't define pure_flag muscle.
4103 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4104 wrapper around `%define api.pure'.
4105 * tests/calc.at (Simple LALR Calculator): Update.
4106 (Simple GLR Calculator): Update.
4107 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4108 Update.
4109 (GLR: Resolve ambiguity, pure, locations): Update.
4110 (GLR: Merge conflicting parses, pure, no locations): Update.
4111 (GLR: Merge conflicting parses, pure, locations): Update.
4112 * tests/glr-regression.at (Uninitialized location when reporting
4113 ambiguity): Update
4114 * tests/input.at (Unused %define api.pure): New test case.
4115 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4116 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4117 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4118
41192007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4120
4121 %define push_pull -> %define api.push_pull. Discussed starting at
4122 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4123 * data/push.c: Expect the new name.
4124 * data/yacc.c: Likewise.
4125 * doc/bison.texinfo (Push Decl): Update.
4126 (Decl Summary): Update %define entry.
4127 (Push Parser Function): Update.
4128 (Pull Parser Function): Update.
4129 (Parser Create Function): Update.
4130 (Parser Delete Function): Update.
4131 * tests/calc.at (Simple LALR Calculator): Update.
4132 * tests/input.at (%define enum variables): Update.
4133 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4134 (Push Parsing: Multiple impure instances): Update.
4135 (Push Parsing: Unsupported Skeletons): Update.
4136 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4137 (Exploding the Stack Size with Malloc): Update.
4138
4139 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4140 other entries some.
4141
41422007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4143
4144 For the XML output's terminal element, rename @number to @token-number,
4145 and add @symbol-number. In the nonterminal element, rename @number to
4146 @symbol-number. Discussed starting at
4147 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4148 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4149 renames.
4150 (xsl:template match="nonterminal"): Likewise.
4151 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4152 (xsl:template match="nonterminal"): Likewise.
4153 * src/print-xml.c (print_grammar): Implement.
4154
41552007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4156
4157 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4158 2007-10-11 change, the child elements here are items not rules.
4159 (xsl:template match="item"): New.
4160 (xsl:template match="rule"): Update for new reduced itemset.
4161 (xsl:template match="point"): Remove.
4162 (xsl:template match="empty"): For consistency with --graph, don't
4163 output "/* empty */".
4164 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4165 line-wrap, don't pass a negative value as first-line-length since this
4166 won't work with the following changes.
4167 (xsl:template name="line-wrap"): Simplify slightly.
4168 (xsl:template name="ws-search"): Eliminate recursion.
4169 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4170 set next to an item whose dot is not at the end of the RHS even if it
4171 happens to be associated with the same rule.
4172
41732007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4174
4175 Add %define lr.keep_unreachable_states.
4176 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4177 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4178 * src/main.c (main): Implement it.
4179 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4180 Extend to test it, and fix a typo.
4181
41822007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4183
4184 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4185 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4186 the example .output text.
4187 * tests/regression.at (Extra lookahead sets in report): Improve wording
4188 of comments.
4189
41902007-10-17 Wojciech Polak <polak@gnu.org>
4191
4192 * src/print-xml.c (print_grammar): Renamed
4193 <terminal> and <nonterminal> attributes:
4194 "type" to "number" and "symbol" to "name".
4195 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4196 Use new attribute names.
4197 (xsl:template match="nonterminal"): Likewise.
4198 * data/xslt/xml2xhtml.xsl: Likewise.
4199
42002007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4201
4202 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4203 (Option Cross Key): Likewise.
4204
4205 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4206 next to an item whose dot is not at the end of the RHS even if it
4207 happens to be associated with the same rule.
4208 * src/print.c (print_core): Likewise.
4209 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4210 (Resolved SR Conflicts): Update output.
4211 * tests/regression.at (Extra lookahead sets in report): New test case.
4212
42132007-10-11 Wojciech Polak <polak@gnu.org>
4214
4215 * src/print-xml.c (print_core): Remove item set
4216 redundancy.
4217 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4218 Improve processing time. Suggested by Joel E. Denny.
4219 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4220 Write xsl:param "required" attribute as comment.
4221 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4222 (xsl:template match="rule"): Support new reduced itemset.
4223 (xsl:template match="point"): Remove.
4224 * data/xslt/xml2xhtml.xsl: Likewise.
4225
42262007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4227
4228 * src/getargs.c (version): Update copyright year.
4229
42302007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4231
4232 Make xml2dot.xsl and --graph produce the same output.
4233 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4234 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4235 escaped later.
4236 (xsl:template name="output-node"): Use the new escape template instead
4237 of the string-replace template directly.
4238 (xsl:template name="output-edge"): Likewise.
4239 (xsl:template name="escape"): New, escapes backslashes and newlines in
4240 addition to quotation marks.
4241 * src/graphviz.c (start_graph, output_node, output_edge): Add
4242 whitespace to output for legibility.
4243
4244 Make xml2text.xsl and --report produce the same output, and remove the
4245 XML "conflicts" element since a conflict summary is easily extracted
4246 from the automaton.
4247 * data/xslt/bison.xsl: New.
4248 (xsl:template match="state" mode="bison:count-conflicts): New.
4249 * data/xslt/xml2text.xsl: Import bison.xsl.
4250 (xsl:template match="bison-xml-report"): Instead of styling the
4251 "conflicts" element, style the "automaton" element with mode
4252 "conflicts". Unlike the former, the latter lists S/R and R/R
4253 conflicts for a state on the same line.
4254 (xsl:template match="conflicts"): Remove.
4255 (xsl:template match="conflict"): Remove.
4256 (xsl:template match="terminal"): Line-wrap the list of rules in which
4257 the terminal is used.
4258 (xsl:template match="nonterminal"): Likewise for nonterminals.
4259 (xsl:template match="automaton" mode="conflicts"): New.
4260 (xsl:template match="state" mode="conflicts"): New.
4261 (xsl:template name="line-wrap"): New.
4262 (xsl:template name="ws-search"): New.
4263 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4264 (xsl:template match="bison-xml-report"): Instead of styling the
4265 "conflicts" element, style the "automaton" element with mode
4266 "conflicts."
4267 (xsl:template match="conflicts"): Remove.
4268 (xsl:template match="conflict"): Remove.
4269 (xsl:template match="automaton" mode="conflicts"): New.
4270 (xsl:template match="state" mode="conflicts): New.
4271 * src/conflicts.c (conflicts_output_xml): Remove.
4272 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4273 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4274 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4275 the corresponding XSLT is easier. Also, never wrap between a word and
4276 the comma that follows it.
4277
42782007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4279
4280 Improve C++ namespace support. Discussed starting at
4281 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4282 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4283 b4_namespace_close): New macros that interpret the %define variable
4284 "namespace" so its value can contain "::" to indicate nested
4285 namespaces.
4286 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4287 the above macros.
4288 * data/lalr1.cc (b4_namespace): Likewise.
4289 * data/location.cc (b4_namespace): Likewise.
4290 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4291 inside a new table in the general %define entry. Document `%define
4292 namespace' there as well. Point the %name-prefix entry to it since it
4293 explains it more completely in the case of C++.
4294 (C++ Bison Interface): Mention `%define namespace' instead of
4295 %name-prefix.
4296 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4297 entry suffices.
4298 * tests/c++.at (Relative namespace references): New test case.
4299 (Absolute namespace references): New test case.
4300 (Syntactically invalid namespace references): New test case.
4301 * tests/input.at (C++ namespace reference errors): New test case.
4302
43032007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4304
4305 Add syncline support and location accessor to internal %define
4306 interfaces.
4307 * data/bison.m4 (b4_percent_define_get_loc): New.
4308 (b4_percent_define_get_syncline): New.
4309 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4310 (b4_percent_define_default): Record defining location as line 1 rather
4311 than 0 for the sake of synchronizing #line's, and define
4312 b4_percent_define_syncline(VARIABLE).
4313 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4314 * src/muscle_tab.c (muscle_syncline_grow): New.
4315 (muscle_code_grow): Use muscle_syncline_grow.
4316 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4317 define b4_percent_define_syncline(VARIABLE).
4318 (muscle_percent_define_get_loc): New.
4319 (muscle_percent_define_get_syncline): New.
4320 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4321 remove some unused variables.
4322 (muscle_percent_define_default): Record defining location as line 1
4323 rather than 0 for the sake of synchronizing #line's, and define
4324 b4_percent_define_syncline(VARIABLE).
4325 (muscle_percent_define_check_values): Use
4326 muscle_percent_define_get_loc.
4327 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4328 (muscle_percent_define_get_syncline): Prototype.
4329 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4330 defaults): Update output for location change.
4331 (Complaining during macro argument expansion): Extend to test
4332 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4333
43342007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4335
4336 Fix some error-reporting macro bugs.
4337 * data/bison.m4 (b4_cat): New.
4338 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4339 to stdout so they don't become arguments to other macros. Update
4340 comments and add examples.
4341 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4342 add examples.
4343 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4344 after printing the error directive so that M4 doesn't report subsequent
4345 problems that are induced by this problem.
4346 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4347 instead of just in them. Recognize @\n in both places. Both expand to
4348 the empty string. Needed by b4_cat.
4349 * tests/skeletons.at (Complaining during macro argument expansion):
4350 New test case.
4351 (Fatal errors make M4 exit immediately): New test case.
4352
43532007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4354
4355 Implement --print-datadir.
4356 * src/getargs.c (usage): Mention.
4357 (PRINT_DATADIR_OPTION): New anonymous enum member.
4358 (long_options): Add entry for it.
4359 (getargs): Add case for it calling compute_pkgdatadir.
4360 * src/output.c (output_skeleton): Encapsulate data directory
4361 computation from here...
4362 (prepare): ... and from here...
4363 (compute_pkgdatadir): ... into this new function.
4364 * src/output.h (compute_pkgdatadir): Prototype.
4365
43662007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4367
4368 * src/print-xml.c (escape_bufs): New static global variable
4369 replacing...
4370 (xml_escape_n): ... the static local variable buf here.
4371 (print_xml): Free memory for escape_bufs.
4372 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4373
43742007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4375
4376 Replace `%push-parser' and `%push-pull-parser' with
4377 `%define push_pull "push"' and `%define push_pull "both"'.
4378 `%define push_pull "pull"' is the default.
4379 * doc/bison.texinfo (Push Decl, Push Parser Function,
4380 Pull Parser Function, Parser Create Function, Parser Delete Function):
4381 Update declarations.
4382 (Decl Summary, Table of Symbols): Replace %push-parser and
4383 %push-pull-parser entries with a %define push_pull entry.
4384 * data/bison.m4 (b4_percent_define_check_values): New macro.
4385 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4386 definitions...
4387 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4388 definitions...
4389 * data/push.c: ... to here and compute them from the value of the
4390 %define variable push_pull.
4391 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4392 parsing requests here...
4393 * data/yacc.c: ... hack this to switch to push.c any time
4394 b4_use_push_pull_flag or the %define variable push_pull is set. This
4395 will go away when we mv push.c yacc.c.
4396 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4397 push parsing is not supported since unused %define variables are
4398 reported anyway.
4399 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4400 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4401 comments for consistency with b4_percent_define_check_values.
4402 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4403 muscles.
4404 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4405 Remove.
4406 (prologue_declaration): Remove %push-parser and %push-pull-parser
4407 rules.
4408 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4409 * tests/calc.at: Update declarations.
4410 * tests/input.at (%define enum variables): New test case.
4411 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4412 declaration.
4413 (Push Parsing: Multiple impure instances): Update declaration.
4414 (Push Parsing: Unsupported Skeletons): New test case.
4415 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4416 declaration.
4417 (Exploding the Stack Size with Malloc): Update declaration.
4418
44192007-09-24 Wojciech Polak <polak@gnu.org>
4420
4421 Add XSLT transformations.
4422
4423 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4424 * data/xslt/xml2text.xsl: Transform XML into plain text.
4425 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4426 * data/Makefile.am (xsltdir): New variable.
4427 (dist_xslt_DATA): Add xslt/*.xsl files.
4428
44292007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4430
4431 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4432 Problem reported by Wojciech Polak.
4433 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4434 (xml_printf): Undo change I made on 21 September; that is,
4435 indent 2 spaces, not 1.
4436
44372007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4438
4439 Pacify ./configure --enable-gcc-warnings.
4440 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4441 `char const *' instead of `char *'.
4442 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4443 local variable `sep'.
4444
44452007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4446
4447 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4448 elsewhere.
4449 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4450 (xml_printf): Indent just 1 space for level.
4451 (e_char, xlate_char): Remove.
4452 (xml_escape_string): Rewrite to avoid undefined behavior (used
4453 storage that was freed from the stack).
4454 (xml_escape_n): Don't bother checking for subscript error.
4455
44562007-09-21 Wojciech Polak <polak@gnu.org>
4457
4458 Add Bison XML Automaton Report.
4459
4460 Add support for an -x option to generate an XML report.
4461 It is not documented yet.
4462 * src/print-xml.c: New file.
4463 * src/print-xml.h: Likewise.
4464 * lib/timevar.def (TV_XML): New var.
4465 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4466 * src/conflicts.c: Include print-xml.h.
4467 (solved_conflicts_xml_obstack): New var.
4468 (log_resolution, conflicts_solve, conflicts_free):
4469 Add support for XML report.
4470 (conflicts_output_val): New function.
4471 * src/conflicts.h (conflicts_output_val): New decl.
4472 * src/files.c (spec_xml_file): New var.
4473 (compute_output_file_names, output_file_names_free): Add XML support.
4474 * src/files.h (spec_xml_file): New decl.
4475 * src/getargs.c (xml_flag): New var.
4476 (usage, short_options, long_options, getargs): Add XML support.
4477 * src/getargs.h (xml_flag): New decl.
4478 * src/gram.c: Include print-xml.h.
4479 (rule_lhs_print_xml, rule_rhs_print_xml):
4480 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4481 New functions.
4482 * src/gram.h: Declare external ones.
4483 * src/main.c: Include print-xml.h.
4484 (main): Add XML support.
4485 * src/reduce.c: Include print-xml.h.
4486 (reduce_xml): New function.
4487 * src/reduce.h: Declare it.
4488 * src/state.c: Include print-xml.h.
4489 (state_new): Add XML support.
4490 (state_rule_lookahead_tokens_print_xml): New function.
4491 * src/state.h: Declare it.
4492 (struct state): New member solved_conflicts_xml.
4493 * src/symtab.c (symbol_class_get_string): New function.
4494 * src/symtab.h: Declare it.
4495
44962007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4497
4498 * GNUmakefile: Switch to coreutils's version.
4499 * bootstrap: Likewise.
4500 * Makefile.cfg: Adjust to new GNUmakefile.
4501 * README-hacking: Likewise.
4502
4503 Import from gnulib:
4504
4505 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4506 Bruno Haible <bruno@clisp.org>
4507
4508 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4509 and is a script that invokes bison. Tighten the code. Add comments.
4510
45112007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4512
4513 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4514 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4515 * doc/bison.texinfo (Decl Summary): Fix.
4516 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4517 * tests/input.at (Boolean %define variables): Update output.
4518 * tests/skeletons.at (%define boolean variables: invalid skeleton
4519 defaults): Rename to...
4520 (%define Boolean variables: invalid skeleton defaults): ... this and
4521 update output.
4522
45232007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4524
4525 In impure push mode, don't allow more than one yypstate to be allocated
4526 since multiple impure parsers would corrupt yynerrs.
4527 * data/push.c (yypstate_allocated): New static global variable
4528 initialized to 0.
4529 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4530 exhaustion if yypstate_allocated is 1, but still return 2.
4531 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4532 already 1. Otherwise, set it to 1.
4533 (yypstate_delete): Set it to 0.
4534 * tests/push.at (Push Parsing: Multiple impure instances): New test
4535 case.
4536
45372007-08-17 Bob Rossi <bob@brasko.net>
4538
4539 * doc/bison.texinfo (Push Decl): Document the push parser.
4540 (Table of Symbols): Ditto.
4541 (Pure Decl): Ditto.
4542 (Decl Summary): Ditto.
4543 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4544 Parser Create Function, Parser Delete Function):
4545 Add new push parser symbols.
4546 (Table of Symbols): Document push-parser, push-pull-parser,
4547 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4548
45492007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4550
4551 Update to GPLv3.
4552 * doc/gpl-3.0.texi: New file.
4553 * doc/gpl.texi: Remove.
4554 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4555 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4556 * README-hacking, TODO, bootstrap, bootstrap.conf:
4557 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4558 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4559 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4560 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4561 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4562 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4563 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4564 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4565 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4566 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4567 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4568 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4569 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4570 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4571 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4572 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4573 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4574 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4575 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4576 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4577 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4578 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4579 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4580 * src/complain.c, src/complain.h, src/conflicts.c:
4581 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4582 * src/files.h, src/flex-scanner.h, src/getargs.c:
4583 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4584 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4585 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4586 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4587 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4588 * src/print.c, src/print.h, src/print_graph.c:
4589 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4590 * src/reduce.h, src/relation.c, src/relation.h:
4591 * src/revision.h, src/scan-code.h, src/scan-code.l:
4592 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4593 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4594 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4595 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4596 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4597 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4598 * tests/existing.at, tests/glr-regression.at:
4599 * tests/headers.at, tests/input.at, tests/java.at:
4600 * tests/local.at, tests/output.at, tests/push.at:
4601 * tests/reduce.at, tests/regression.at, tests/sets.at:
4602 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4603 * tests/torture.at:
4604 Update to GPLv3.
4605
46062007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4607
4608 Get rid of broken %no-parser, -n, and --no-parser implementation and
4609 documentation.
4610 * TODO: Don't mention them.
4611 * doc/bison.1: Likewise.
4612 * doc/bison.texinfo (Decl Summary): Likewise.
4613 (Bison Options): Likewise.
4614 (Option Cross Key): Likewise.
4615 * src/getargs.c (no_parser_flag): Remove global variable.
4616 (usage): Don't print description of -n and --no-parser.
4617 (long_options): Remove --no-parser entry here.
4618 (getargs): Remove -n case in the switch here.
4619 * src/getargs.h (no_parser_flag): Remove extern.
4620 * tests/regression.at (Web2c Actions): Remove comment that mentions
4621 --no-parser.
4622
46232007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4624
4625 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4626 name user variables starting with `yy'. Just pass NULL instead of a
4627 dummy local &yylval to yypush_parse.
4628 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4629 starting with `yy'.
4630
46312007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4632
4633 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4634 true since it's then always used regardless of whether yyoverflow is
4635 defined. Reported by Christian Burger at
4636 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4637 * THANKS: Add Christian Burger.
4638
4639 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4640 node names: say "Decl Summary" not "Bison Declaration Summary".
4641
46422007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4643
4644 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4645 determine whether this function has already complained about an invalid
4646 value for a %define boolean variable, don't check whether Bison has
4647 ever examined the value. As written, the check was a tautology.
4648 Instead, record and check for this complaint using a separate muscle.
4649
46502007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4651
4652 Fix push parsing memory leak reported by Brandon Lucia at
4653 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4654 * THANKS: Add Brandon Lucia.
4655 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4656 but the parse never completed and thus freed it.
4657 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4658 * tests/testsuite.at: Include push.at.
4659 * test/push.at: New.
4660 (Push Parsing: Memory Leak for Early Deletion): New test case.
4661
46622007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4663
4664 Improve handling of multiple S/R conflicts in the same state and of S/R
4665 conflicts involving multiple reductions.
4666 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4667 set for a state here or Bison will abort if it is reassigned on a
4668 later conflicted reduction in the same state.
4669 Similarly, don't finalize and assign the solved conflicts report here
4670 or it will be lost if it is reassigned on a later conflicted reduction
4671 in the same state.
4672 (set_conflicts): Instead, assign them both here after all S/R conflicts
4673 in the state have been fully examined.
4674 * src/print.c (shift_set): Rename to...
4675 (no_reduce_set): ... this.
4676 (print_reductions): Update for rename, and add %nonassoc error action
4677 tokens to no_reduce_set so that, when printing the first remaining
4678 reduction on an error action token, the reduction is enclosed in
4679 brackets.
4680 (print_results): Update for rename.
4681 * tests/conflicts.at (Solved conflicts report for multiple reductions
4682 in a state): New test case.
4683 (%nonassoc error actions for multiple reductions in a state): New test
4684 case.
4685
4686 * src/main.c (main): Don't depend on C99 features.
4687
46882007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4689
4690 * build-aux/.cvsignore: Add compile.
4691 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4692 uniwidth.
4693
46942007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4695
4696 * bootstrap (slurp): Create target directories that don't exist.
4697 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4698
46992007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4700
4701 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4702 than item number.
4703 * closure.c (closure): Likewise.
4704 * state.h (reductions): Comment sorting of rules.
4705 (state): Comment sorting of items.
4706
47072007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4708
4709 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4710 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4711 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4712 definition in order to avoid Gnulib headers since we don't use config.h
4713 here.
4714 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4715 rather than AT_DATA so that config.h is included.
4716
47172007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4718
4719 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4720 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4721 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4722 and so that YYFPRINTF is guaranteed to be defined here.
4723
47242007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4725
4726 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4727 with...
4728 (muscle_percent_define_check_values): ... this more helpful function.
4729 Again, it's not used yet, but it will be.
4730 * src/muscle_tab.h: Likewise.
4731
4732 Improve some comments in parser table construction.
4733 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4734 (generate_states): Don't mention ruleset, which is internal to closure.
4735 * src/closure.c (closure): Explain sorting of core and itemset, which
4736 is required for this function to behave correctly.
4737 * src/closure.h (closure): Mention sorting.
4738
47392007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4740
4741 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4742 move the check for disabled transitions to an aver since conflict
4743 resolution hasn't happened yet.
4744
4745 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4746 labels a state as inconsistent just because it has error transitions.
4747 The original form of this check appeared in revision 1.1 of lalr.c,
4748 which was committed on 1991-12-21. Now (at least), changing the
4749 consistency label on such a state appears to have no useful effect in
4750 any of the places it is examined, which I enumerate below. The key
4751 point to understanding each item in this enumeration is that a state
4752 with an error transition is labelled consistent in the first place only
4753 if it has no rules, so the check cannot matter for states that have
4754 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4755 to try to identify its conflicts, and a state must have *rules* to have
4756 conflicts. (2) Labelling a state as inconsistent will affect how
4757 action_row sets the default *rule* for the state. (3) Labelling a
4758 state as inconsistent will cause build_relations to add lookback edges
4759 to *rules* in that state.
4760 * src/state.h (struct state): Word the comment for member consistent
4761 more carefully.
4762
47632007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4764
4765 Don't depend on C99 features.
4766 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4767 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4768 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4769 * src/state.c (state_mark_reachable_states): Fix for-loop.
4770 (state_remove_unreachable_states): Fix for-loop.
4771
4772 Don't widen struct state with member reachable just to temporarily
4773 record reachability. Instead, use a local bitset.
4774 * src/state.h (struct state): Remove member.
4775 * src/state.c (state_new): Don't initialize it.
4776 (state_mark_reachable_states): Rename to...
4777 (state_record_reachable_states): ... this, and use bitset.
4778 (state_remove_unreachable_states): Use bitset.
4779
47802007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4781
4782 * src/Makefile.am (yacc): Quote target action commands properly so
4783 that the yacc script isn't corrupt. Reported by Hans Aberg at
4784 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4785
4786 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4787 the case of pure parsers. Reported by Frans Englich at
4788 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4789 * THANKS: Add Frans Englich.
4790
4791 * NEWS (2.3a+): In the %code entry, reference section `Bison
4792 Declaration Summary' from the manual now since the %code summary has
4793 moved there.
4794 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4795 in the rules section must be terminated by semicolons.
4796
47972007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4798
4799 Extend the front-end API for %define variables to more completely
4800 mirror the back-end. This will be useful in the future.
4801 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4802 Update comments to mention the new front-end counterparts of these
4803 macros.
4804 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4805 for muscle_string_decode and muscle_location_decode.
4806 (muscle_string_decode): New static function.
4807 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4808 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4809 functions.
4810 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4811 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4812 implementation more closely.
4813 (muscle_percent_define_invalid_value): New function.
4814 * src/muscle_tab.h (muscle_percent_define_get,
4815 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4816 Prototype.
4817
48182007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4819
4820 * NEWS (2.3a+): Mention yesterday's state-removal change.
4821 (2.3a): Remove the %language entry, which was added after 2.3a.
4822 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4823 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4824 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4825 tests/existing.at: Update copyright date.
4826
48272007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4828
4829 If conflict resolution makes states unreachable, remove those states,
4830 report rules that are then unused, and don't report conflicts in those
4831 states.
4832 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4833 New global function.
4834 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4835 function.
4836 * src/main.c (main): After conflict resolution, remove the unreachable
4837 states and update all data structures that reference states by number.
4838 * src/state.c (state_new): Initialize each state's reachable member to
4839 false.
4840 (state_mark_reachable_states): New static function.
4841 (state_remove_unreachable_states): New global function.
4842 * src/state.h (struct state): Add member bool reachable.
4843 (state_remove_unreachable_states): Prototype.
4844 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4845 New test case.
4846 * tests/existing.at (GNU pic Grammar): Update test case output now that
4847 an unused rule is discovered.
4848
48492007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4850
4851 Minor code cleanup in parser table construction.
4852 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4853 (new_itemsets, save_reductions): Update for rename to nitemset.
4854 * src/closure.c (nritemset): Rename to...
4855 (nitemset): ... this since the "r" appears to meaningless and isn't
4856 used in the comments.
4857 (closure): Update for rename.
4858 * src/closure.h (nritemset): Update extern to...
4859 (nitemset): ... this.
4860 * src/lalr.c (LA): Fix a typo in comments.
4861 * src/print.c (print_core): Update for rename to nitemset.
4862 * src/print_graph.c (print_graph): Likewise.
4863 * src/state.h: Fix some typos in header comments.
4864
48652007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4866
4867 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4868 still sticks to ASCII. Sorry!
4869
4870 * README-hacking: New file, taken mostly from coreutils, with changes
4871 for Bison. Contains much of the contents of:
4872 * README-cvs: Remove.
4873 * bootstrap: Sync from gnulib.
4874 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4875 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4876
48772007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4878
4879 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4880 Setzer.
4881 (Java Differences): Fix some typos.
4882 * THANKS: Add Sebastian Setzer.
4883
48842007-03-07 Paolo Bonzini <bonzini@gnu.org>
4885
4886 * data/java.m4 (b4_single_class_if): Remove.
4887 (b4_abstract_if): Look at "%define abstract".
4888 (b4_lexer_if): New.
4889 (b4_union_name): Rename...
4890 (b4_yystype): ... to this. Map to "%define stype".
4891 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4892 b4_maybe_throws): Fix quoting.
4893 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4894 * data/lalr1.java (Lexer interface): Always define.
4895 (Lexer interface within parser class): Remove.
4896 (YYLexer class): New, used when "%code lexer" is present.
4897 (constructor): When "%code lexer" is used, pass %lex-param
4898 to the lexer constructor.
4899 (yylex, yyparse): Remove %lex-param from method invocations
4900 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4901
4902 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4903 abstract". Rename "%define union_name" to "%define stype".
4904 Rename method names according to previous patch.
4905 (Java Scanner Interface): Describe "%code lexer" instead of
4906 "%pure-parser" and "%define single_class".
4907 (Java Differences): Mention "%code lexer".
4908
4909 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4910 Include scanner here, using macros from tests/local.at.
4911 (AT_DATA_CALC_Y): Remove final argument.
4912 (_AT_CHECK_JAVA_CALC): Likewise.
4913 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4914 of %locations and %error-verbose.
4915 (main): Test with and without %lex-param.
4916 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4917 (AT_BISON_OPTION_POPDEFS): Pop it.
4918
49192007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4920
4921 DJGPP spefic issue. Inhibit the use of disallowed characters for
4922 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4923 and concern testsuite case 46.
4924 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4925 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4926 * djgpp/config.bat: Inhibit the use of disallowed characters.
4927
49282007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4929
4930 Miscellaneous %define and %code cleanup.
4931 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4932 values are interpreted.
4933 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4934 documentation a little more.
4935 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4936 muscle_percent_define_insert, muscle_percent_code_grow): New
4937 functions/macros.
4938 * src/muscle_tab.h (muscle_percent_define_insert,
4939 muscle_percent_code_grow): Prototype.
4940 * src/parse-gram.y (prologue_declaration): Use
4941 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4942 %define and %code directives.
4943
4944 Make it easy to share %define boolean variables between the front-end
4945 and back-end. Though not used yet, this will be useful in the future.
4946 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4947 Bison uses of names rather than just skeleton uses of names.
4948 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4949 b4_percent_define_skeleton_variables(VARIABLE) to
4950 b4_percent_define_bison_variables(VARIABLE).
4951 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4952 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4953 b4_percent_code_bison_qualifiers(QUALIFIER).
4954 (b4_check_user_names_wrap): Update for renames.
4955 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4956 muscle_percent_define_default): New functions mimicking
4957 b4_percent_define_flag_if and b4_percent_define_default.
4958
4959 For %define variables, report locations for invalid values and
4960 redefinitions.
4961 * data/bison.m4 (b4_percent_define_flag_if): Read
4962 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4963 value for VARIABLE.
4964 (b4_percent_define_default): Save a special location in
4965 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4966 must later be reported as invalid.
4967 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4968 functions.
4969 (muscle_percent_define_insert): Record the location of VARIABLE in
4970 muscle percent_define_loc(VARIABLE), and use it to report the previous
4971 location for a redefinition.
4972 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4973 (muscle_percent_define_default): Update like b4_percent_define_default.
4974 (muscle_grow_user_name_list): Rename to...
4975 (muscle_user_name_list_grow): ... this for consistency and use
4976 muscle_location_grow.
4977 * src/muscle_tab.h (muscle_location_grow): Prototype.
4978 * tests/input.at (%define errors): Update expected output.
4979 * tests/skeletons.at (%define boolean variables: invalid skeleton
4980 defaults): New test case.
4981
49822007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4983
4984 * src/print.c (lookahead_set, state_default_rule): Remove.
4985 (print_reductions): Replace state_default_rule invocation with
4986 equivalent use of yydefact, which was computed in token_actions in
4987 tables.c.
4988 (print_results): Don't allocate lookahead_set.
4989
49902007-02-27 Paolo Bonzini <bonzini@gnu.org>
4991
4992 * data/lalr1.java: Prefix all private members with yy.
4993
49942007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4995
4996 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4997 Sebastien Fricker at
4998 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4999 * THANKS: Add Sebastien Fricker.
5000 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5001 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5002 accept a variable number of arguments.
5003
50042007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5005
5006 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5007
50082007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5009
5010 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5011 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5012 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5013
50142007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5015
5016 Undo my 2007-02-07 change, switching back to the c-strcase module
5017 introduced in the 2007-02-03 change. Bruno Haible reported that
5018 the 2007-02-07 change would be dangerous in Turkish if we add a
5019 language whose name contains "i", since "i" is not lowercase "I"
5020 in Turkish.
5021 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5022 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5023 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5024 * m4/.cvsignore: Remove strcase.m4.
5025 * src/getargs.c: Revert 2007-02-07 change, as follows.
5026 Include c-strcase.h.
5027 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5028
50292007-02-11 Bruno Haible <bruno@clisp.org>
5030
5031 Enable the Java related testsuite tests when the only Java compiler
5032 found is a gcj < 4.3. Discussed at
5033 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5034 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5035
50362007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5037
5038 * data/Makefile.am: Update copyright date.
5039 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5040 yypstate_new returns NULL.
5041 (yypstate_new): Return NULL if malloc does.
5042 * src/reader.c (packgram): Move translation of rule actions from the
5043 beginning of packgram to...
5044 (check_and_convert_grammar): ... here right before packgram is invoked
5045 so it's easier to write more complete comments, and remove redundant
5046 code.
5047
50482007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5049
5050 As in semantic actions, make @$ in %initial-action, %destructor, and
5051 %printer imply %locations.
5052 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5053 scanning @$.
5054 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5055 (@$ in %initial-action implies %locations,
5056 @$ in %destructor implies %locations,
5057 @$ in %printer implies %locations): ... these new test cases.
5058
50592007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5060
5061 Undo most of the 2007-02-03 change, switching to the strcase module
5062 now that gnulib strcase has been fixed.
5063 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5064 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5065 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5066 * m4/.cvsignore: Add strcase.m4.
5067 * src/getargs.c: Revert 2007-02-03 change, as follows.
5068 Don't include c-strcase.h.
5069 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5070 strcasecmp has "unspecified behavior" outside the POSIX locale,
5071 but it works fine in practice if at least one argument is ASCII,
5072 as is the case in Bison.
5073
50742007-02-07 Paolo Bonzini <bonzini@gnu.org>
5075
5076 * tests/java.at: Skip tests if only one of javac/java is present.
5077 Reported by Joel E. Denny.
5078 * tests/atlocal.in: Adjust copyright years.
5079
50802007-02-05 Paolo Bonzini <bonzini@gnu.org>
5081
5082 * data/lalr1.java (Stack): Work around old verifiers that disallow
5083 access to the private fields of an inner class, from the outer class.
5084 We can make Stack's fields public because user code doesn't have access
5085 to the instance of Stack used by parse(). Reported by Paul Eggert.
5086
50872007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5088
5089 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5090 the right spot for these files?
5091 * bootstrap.conf (gnulib_modules): Add c-strcase.
5092 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5093 c-strncasecmp.c.
5094 * src/getargs.c: Include c-strcase.h.
5095 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5096 to avoid unspecified behavior.
5097
50982007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5099
5100 * doc/bison.texinfo (Decl Summary): Correct typo.
5101
51022007-01-30 Paolo Bonzini <bonzini@gnu.org>
5103
5104 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5105 Complain if the value does not match empty, "true" or "false".
5106 * data/c++.m4: Adjust default definitions of %define variables.
5107 * data/java.m4: Adjust default definitions of %define variables.
5108 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5109 to above behavior.
5110 * tests/input.at (Boolean %define variables): Test new behavior.
5111
51122007-01-29 Paolo Bonzini <bonzini@gnu.org>
5113
5114 * NEWS: Mention java.
5115 * TODO: Remove things that are done.
5116 * bootstrap.conf: Add javacomp-script and javaexec-script.
5117 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5118
5119 * data/Makefile.am: Add new files.
5120 * data/java-skel.m4: New.
5121 * data/java.m4: New.
5122 * data/lalr1.java: New.
5123
5124 * doc/bison.texinfo: Put "A Complete C++ Example" under
5125 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5126 under Other Languages.
5127
5128 * src/getargs.c (valid_languages): Add Java.
5129 * src/getargs.h (struct bison_language): Update size of string fields.
5130
5131 * tests/Makefile.am: Add java.at.
5132 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5133 * tests/java.at: New.
5134 * tests/testsuite.at: Include it.
5135
51362007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5137
5138 Clean up.
5139 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5140 at_directive_argv arguments so these no longer have to be global
5141 variables. Also, update the implementation for the following changes.
5142 (fail_for_at_directive_too_many_args,
5143 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5144 (at_directive_name): Remove as at_directive_argv[0] will be used for
5145 this now.
5146 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5147 for the directive name.
5148 (at_directive_argc, at_directive_argv): Make these local within
5149 skel_lex instead of global.
5150 (INITIAL): Update directive start action for above changes.
5151 (SC_AT_DIRECTIVE_ARG): Rename to...
5152 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5153 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5154 (scan_skel): Move yylex_destroy to...
5155 (skel_scanner_free): ... here.
5156 * tests/skeletons.at (installed skeleton file name): Rename to...
5157 (installed skeleton file names): ... this.
5158
51592007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5160
5161 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5162 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5163 Summary" not "Directives".
5164 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5165 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5166 since the former is now the more complete one.
5167 (Prologue Alternatives): Likewise and do the same for %defines.
5168 (Table of Symbols): Add summary of %code, add summary of %define, and
5169 move full %code documentation to...
5170 (Decl Summary): ... here for consistency with other entries in these
5171 sections.
5172 Move %define entry in order to keep this list alphabetized.
5173 Reword %define entry a little to put less emphasis on the skeleton
5174 concept, which most users shouldn't have to think about.
5175
51762007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5177
5178 Adjust to recent gnulib changes.
5179 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5180 Add string.h, string_.h, unistd_.h, wchar_.h.
5181 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5182 * src/system.h: Don't include <stpcpy.h>; this is now done by
5183 <string.h>.
5184
51852007-01-23 Paolo Bonzini <bonzini@gnu.org>
5186
5187 Simplify implementation of unqualified %code, implement macros for
5188 uniform treatment of boolean %define flags. Document %define.
5189 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5190 b4_percent_code_ifdef): New.
5191 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5192 * data/c++.m4: Define default value for global_tokens_and_yystype.
5193 * data/glr.cc: Likewise.
5194 * data/location.cc: Use b4_percent_define_flag_if.
5195
5196 * doc/bison.texinfo (Decl Summary): Document %define.
5197
5198 * src/parse-gram.y (Unqualified %code): Change muscle name to
5199 b4_percent_code().
5200 (content.opt): Default to empty.
5201
52022007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5203
5204 Implement support for relative and absolute skeleton file names.
5205 Discussed starting at
5206 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5207 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5208 (Bison Options): Document in --skeleton entry.
5209 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5210 full_skeleton can't necessarily hold all of pkgdatadir.
5211 If the specified skeleton file name contains a `/', don't prepend
5212 pkgdatadir.
5213 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5214 file name contains a `/', prepend the grammar file directory.
5215 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5216 * skeletons.at: New file.
5217 (relative skeleton file names): New test case.
5218 (installed skeleton file names): New test case.
5219 * tests/testsuite.at: Include skeletons.at.
5220
5221 * bootstrap: Update copyright to 2007.
5222
52232007-01-17 Paolo Bonzini <bonzini@gnu.org>
5224
5225 * bootstrap: Remove occurrences of .#bootmp from the files.
5226
52272007-01-17 Akim Demaille <akim@epita.fr>
5228
5229 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5230 nonterminals.
5231 Use per-type %printer.
5232
52332007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5234
5235 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5236 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5237 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5238 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5239 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5240 tests/glr-regression.at, tests/input.at, tests/local.at,
5241 tests/output.at, tests/torture.at: Update copyright to 2007.
5242
52432007-01-16 Akim Demaille <akim@epita.fr>
5244
5245 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5246 error code.
5247 (Calc++ Scanner): Exit with failure if we can't open the input
5248 file.
5249 Accept "-" standing for stdin.
5250 (Calc++ Top Level): Print the result only if the parsing was
5251 successful.
5252
52532007-01-16 Akim Demaille <akim@epita.fr>
5254
5255 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5256
52572007-01-15 Paolo Bonzini <bonzini@gnu.org>
5258 and Joel E. Denny <jdenny@ces.clemson.edu>
5259
5260 Clean up %define and %code implementation in M4 some. Most
5261 importantly, rename all related macros to be in the b4_percent_define
5262 and b4_percent_code namespaces. Also, complete support for `.' in
5263 %define variable names and %code qualifiers.
5264 * data/bison.m4 (b4_check_user_names): Check for special
5265 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5266 m4_foreach loops.
5267 (b4_get_percent_define, b4_get_percent_code): Rename to...
5268 (b4_percent_define_get, b4_percent_code_get): ... these.
5269 Extend documentation with examples.
5270 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5271 b4_percent_define_skeleton_variables and
5272 b4_percent_code_skeleton_qualifiers.
5273 Expect any value for the %define variable `foo' to be stored in the
5274 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5275 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5276 expect any unqualified %code blocks to be stored in a macro named
5277 `b4_percent_code_unqualified'.
5278 Use m4_indir so that %define variable names and %code qualifiers can
5279 contain `.', which is allowed by the grammar parser.
5280 (b4_percent_define_default): New macro to set a default value for a
5281 %define variable.
5282 (m4_wrap): Update wrapped code, and fix some underquoting.
5283 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5284 Expect grammar uses of %define variables and %code qualifiers to be
5285 defined in b4_percent_define_user_variables and
5286 b4_percent_code_user_qualifiers.
5287 * data/c++.m4: Use b4_percent_define_default rather than
5288 m4_define_default. Fix some underquoting. Skeleton usage of %define
5289 variable define_location_comparison now implies skeleton usage of
5290 %define variable filename_type.
5291 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5292 data/push.c, data/yacc.c: Update macro names.
5293 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5294 muscle names.
5295
52962007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5297
5298 DJGPP specific issues.
5299
5300 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5301 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5302
53032007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5304
5305 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5306 run parsers in all tests so that Valgrind is invoked during
5307 maintainer-check-valgrind.
5308 (Duplicate representation of merged trees): Free all semantic values.
5309 (Duplicated user destructor for lookahead): Likewise.
5310
53112007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5312
5313 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5314 command-line prefix.
5315 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5316 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5317 miss Valgrind messages.
5318 (Exploding the Stack Size with Malloc): Likewise.
5319
53202007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5321
5322 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5323 locals. Reported by Juan Manuel Guerrero at
5324 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5325 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5326 Fix some indentation also.
5327 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5328 explaining this issue.
5329
53302007-01-09 Paolo Bonzini <bonzini@gnu.org>
5331 and Joel E. Denny <jdenny@ces.clemson.edu>
5332
5333 Simplify union and prologue handling, and escape union and lex/parse
5334 params with digraphs.
5335 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5336 values to the empty string since these are no longer guaranteed
5337 initialized by the front-end.
5338 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5339 braces around b4_user_stype since this is no longer done by the
5340 front-end.
5341 * src/files.c, src/files.h (pre_prologue_obstack,
5342 post_prologue_obstack): Remove.
5343 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5344 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5345 with digraphs. This fixes lex params and parse params.
5346 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5347 * src/output.c (prepare): Remove muscle insertion of the prologues.
5348 (output): Remove freeing of pre_prologue_obstack and
5349 post_prologue_obstack.
5350 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5351 than prologue_augment for prologue parsing so you don't need prologue
5352 obstacks.
5353 (grammar_declaration): For %union RHS, use `braceless' instead of
5354 "{...}" so that braces are already stripped and code is escaped with
5355 digraphs.
5356 * src/reader.c (prologue_augment): Remove.
5357 (reader): Remove initialization of pre_prologue_obstack and
5358 post_prologue_obstack.
5359 * src/reader.h (prologue_augment): Remove.
5360
5361 * data/c.m4: Remove stray parenthesis.
5362
53632007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5364
5365 Remove quotes from variables names in %define directives and from
5366 qualifiers in %code directives, and restrict the characters that are
5367 allowed in them to M4-friendly ones. For %define, continue to support
5368 the quoted form as a deprecated feature. Discussed starting at
5369 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5370 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5371 %code.
5372 * doc/bison.texinfo (Prologue Alternatives): Update.
5373 (Decl Summary): In %defines entry, update mention of `%code requires'
5374 and `%code provides'.
5375 (C++ Location Values): Update %define uses.
5376 (Calc++ Parser Interface): Likewise.
5377 (Calc++ Parser): Likewise, and update `%code requires' uses.
5378 (Table of Symbols): Update %code documentation.
5379 * src/parse-gram.y (prologue_declaration): For %define variables, use
5380 `variable' instead of `STRING'.
5381 (grammar_declaration): For %code qualifiers, use `ID' instead of
5382 `STRING'.
5383 (variable): New nonterminal that takes an `ID' or a `STRING'.
5384 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5385 and %define uses.
5386 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5387 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5388 (%define errors): Update %define uses.
5389
53902007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5391
5392 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5393 instead of muscle_insert for %define values so that M4-special
5394 characters are replaced with digraphs.
5395 * tests/input.at (%define errors): Extend to check weird values.
5396
53972007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5398
5399 Instead of having skeletons declare all valid %define variables and
5400 %code qualifiers, provide macros that retrieve the associated values
5401 and build these lists automatically. Thus Bison will now warn when a
5402 variable or qualifier is not used by the skeleton in the current
5403 invocation regardless of whether it might sometimes be used by that
5404 skeleton in other invocations. Also, move all %define value macros to
5405 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5406 form, which is replaced by %code.
5407 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5408 (b4_check_user_names): ... this, and change the series of valid name
5409 arguments to a single list argument for names used in the skeleton
5410 similar to the existing list argument for names used in the grammar.
5411 Warn instead of complaining.
5412 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5413 values and %code code, to format %code code properly, and to build
5414 lists of all %define variables and %code qualifiers used in the
5415 skeleton: b4_skeleton_percent_define_variables and
5416 b4_skeleton_percent_code_qualifiers.
5417 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5418 Remove, and...
5419 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5420 the skeleton names lists can finish building first. In place of
5421 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5422 expect the lists b4_user_percent_define_variables and
5423 b4_user_percent_code_qualifiers.
5424 * data/c++.m4: Where setting default values for b4_parser_class_name,
5425 b4_location_type, b4_filename_type, b4_namespace, and
5426 b4_define_location_comparison, update their names to the
5427 b4_percent_define_ namespace.
5428 * data/glr.c: Don't use b4_check_percent_define_variables and
5429 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5430 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5431 (b4_parser_class_name, b4_namespace): Define these using
5432 b4_get_percent_define for parser_class_name and namespace.
5433 * data/location.cc: Use b4_get_percent_define.
5434 * data/push.c: Don't use b4_check_percent_define_variables and
5435 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5436 * data/yacc.c: Likewise, and don't call m4_exit in
5437 b4_use_push_for_pull_if or m4_wrap code will never execute.
5438 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5439 Rename to...
5440 (muscle_grow_user_name_list): ... this for consistency with the
5441 terminology used in bison.m4.
5442 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5443 %define variable names, and rename muscle used_percent_define_variables
5444 to user_percent_define_variables.
5445 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5446 user_percent_code_qualifiers.
5447 (content): Remove.
5448 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5449 {CODE} form is no longer accepted.
5450 * tests/input.at (Reject bad %code qualifiers): Rename to...
5451 (Reject unused %code qualifiers): ... this, and update test output.
5452 (%define error): Update test output.
5453
54542007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5455
5456 Check for unrecognized %define variables similar to checking for
5457 unrecognized %code qualifiers. Check for redefined %define variables.
5458 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5459 generalizes...
5460 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5461 (b4_check_percent_define_variables): New, also wraps it.
5462 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5463 variables using b4_check_percent_define_variables.
5464 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5465 all those exercised in the test suite and all those listed in the
5466 `Default values' section of c++.m4. Are there others?
5467 * data/push.c, data/yacc.c: Declare no valid %define variables.
5468 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5469 similar to muscle_find, but it works even when the muscle stores a
5470 const value.
5471 (muscle_grow_used_name_list): New function for constructing the used
5472 name list muscles that b4_check_for_unrecognized_names requires.
5473 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5474 %define'd more than once. Define the b4_used_percent_define_variables
5475 muscle with muscle_grow_used_name_list.
5476 (grammar_declaration): Abbreviate %code code with
5477 muscle_grow_used_name_list.
5478 * tests/input.at (%define errors): New.
5479
54802007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5481
5482 Provide warn_at, complain_at, and fatal_at function callbacks to the
5483 skeletons, and use this for %code qualifier complaints.
5484 * data/bison.m4 (b4_error_at): New, invoked by...
5485 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5486 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5487 @fatal_at(...@) directives.
5488 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5489 qualifiers in b4_used_percent_code_qualifiers and to use
5490 b4_complain_at.
5491 * src/location.c, src/location.h (boundary_set_from_string): New global
5492 function.
5493 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5494 function.
5495 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5496 to b4_used_percent_code_qualifiers.
5497 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5498 function.
5499 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5500 (lineno): Rename to...
5501 (out_lineno): ... this so I don't misunderstand it again.
5502 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5503 here; these newlines are in the input but not the output file.
5504 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5505 (at_directive_perform): ... this new static function, and add handling
5506 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5507 directives.
5508 * tests/input.at (Reject bad %code qualifiers): Update test output with
5509 locations and extend.
5510
5511 * tests/output.at (Output file name: [, Output file name: ]): Remove
5512 bogus comment about these tests failing.
5513
55142007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5515
5516 Clean up b4_check_percent_code_qualifiers a little.
5517 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5518 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5519 documentation and add examples.
5520 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5521 qualifiers here.
5522
55232007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5524
5525 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5526 unreliable -- especially when they're hidden inside another macro.
5527 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5528 data/c.m4: Remove m4_divert(-1).
5529 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5530 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5531 m4_divert_push(0) and m4_divert_pop(0).
5532 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5533 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5534 pushed and popped by m4sugar, should be first on the stack.
5535
5536 Provide warn, complain, and fatal function callbacks to the skeletons.
5537 This provides more flexibility than m4_fatal, improves the error
5538 message format, and captures messages for translation. Discussed
5539 starting at
5540 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5541 * data/bison.m4 (b4_error): New, invoked by...
5542 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5543 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5544 directives. Because these M4 macros might be called when the current
5545 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5546 the previous removal of uses of m4_divert, which caused trouble.
5547 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5548 m4_fatal to report unrecognized %code qualifiers.
5549 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5550 push parser requests.
5551 * data/glr.c: Use b4_complain instead of m4_fatal to report
5552 non-deterministic push parser requests.
5553 Update @output usage to @output(...@) form.
5554 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5555 report missing %defines. Update @output usage to @output(...@) form.
5556 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5557 @output(...@) form.
5558 * src/main.c (main): Invoke skel_scanner_free.
5559 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5560 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5561 obstack_for_string from flex-scanner.h.
5562 (YY_DECL): Use to declare skel_lex static.
5563 (decode_at_digraphs): Remove; now handled in the new
5564 SC_AT_DIRECTIVE_ARG start condition.
5565 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5566 functions.
5567 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5568 at_directive_argv): New static globals.
5569 (INITIAL): Use fail_for_invalid_at.
5570 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5571 recognize the start of a generalized `@directive(...@)' form and
5572 start...
5573 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5574 directive args (using the new obstack_for_string), to decode the
5575 contained @ diagraphs, and to perform the directive. It recognizes
5576 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5577 @output(...@).
5578 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5579 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5580 `@,'.
5581 (scan_skel): Initialize obstack_for_string on the first call.
5582 (skel_scanner_free): New function to free obstack_for_string.
5583 * tests/input.at (Reject bad %code qualifiers): Update test output.
5584
55852007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5586
5587 Consolidate the 4 prologue alternative directives (%code, %requires,
5588 %provides, and %code-top) into a single %code directive with an
5589 optional qualifier field. Discussed at
5590 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5591 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5592 alternatives.
5593 * doc/bison.texinfo (Prologue Alternatives): Update.
5594 (Decl Summary): Update to %code "requires" and %code "provides".
5595 (Calc++ Parser): Update to %code "requires".
5596 (Table of Symbols): Remove entries for %requires, %provides, and
5597 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5598 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5599 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5600 which are skeleton-specific.
5601 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5602 declare what %code qualifiers it supports and to complain if any other
5603 qualifiers were used in the grammar.
5604 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5605 and b4_user_code([b4_percent_code_provides]) in place of
5606 b4_user_requires and b4_user_provides.
5607 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5608 Add b4_user_code([b4_percent_code_top]) and
5609 b4_user_code([b4_percent_code]).
5610 Invoke b4_check_percent_code_qualifiers.
5611 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5612 PERCENT_REQUIRES): Remove.
5613 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5614 %requires. Rewrite the %code RHS as the unqualified form defining the
5615 muscle b4_percent_code. Add another RHS for the qualified %code form,
5616 which defines muscles of the form b4_percent_code_QUALIFIER and the
5617 b4_used_percent_code_qualifiers muscle.
5618 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5619 PERCENT_REQUIRES): Remove.
5620 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5621 %code "requires" and %code "provides".
5622 * tests/input.at (Reject bad %code qualifiers): New.
5623
56242007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5625
5626 Use the new code_props interface for destructors and printers.
5627 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5628 printer_location members, and change the type of the destructor and
5629 printer members to code_props.
5630 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5631 symbol_printer_get, semantic_type_destructor_set,
5632 semantic_type_printer_set, default_tagged_destructor_set,
5633 default_tagless_destructor_set, default_tagged_printer_set,
5634 default_tagless_printer_set): Use code_props in arguments and return
5635 types in place of char const * and location.
5636 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5637 since the locations are now contained in the return of
5638 symbol_destructor_get and symbol_printer_get.
5639 * src/output.c (symbol_destructors_output, symbol_printers_output):
5640 Replace with...
5641 (symbol_code_props_output): ... this to eliminate duplicate code.
5642 (output_skeleton): Update to use symbol_code_props_output.
5643 * src/reader.c (symbol_should_be_used): Update use of
5644 symbol_destructor_get.
5645 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5646 Update uses of the various _destructor_set and _printer_set functions.
5647 * src/symtab.c: (default_tagged_destructor_location,
5648 default_tagless_destructor_location, default_tagged_printer_location,
5649 default_tagless_printer_location): Remove since we...
5650 (default_tagged_destructor, default_tagless_destructor,
5651 default_tagged_printer, default_tagless_printer): ... change the type
5652 of these to code_props.
5653 (symbol_new, semantic_type_new, symbol_destructor_set,
5654 semantic_type_destructor_set, symbol_destructor_get,
5655 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5656 symbol_check_alias_consistency, default_tagged_destructor_set,
5657 default_tagless_destructor_set, default_tagged_printer_set,
5658 default_tagless_printer_set): Update.
5659 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5660 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5661 code_props members.
5662 (symbol_print): Use SYMBOL_CODE_PRINT.
5663
56642007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5665
5666 Use the new code_props interface for rule actions.
5667 * src/symlist.h (symbol_list): Replace action, action_location, and
5668 used members with a code_props action_props member.
5669 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5670 grammar_midrule_action, grammar_current_rule_merge_set,
5671 grammar_current_rule_symbol_append, packgram): Update.
5672 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5673 * src/scan-code.l (handle_action_dollar): Update.
5674 (translate_rule_action): Remove, no longer used.
5675 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5676
56772007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5678
5679 Use the new code_props interface in parse-gram.y.
5680 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5681 Update all uses of translate_* functions to use the new code_props
5682 interface and to use gram_scanner_last_string_free and
5683 code_scanner_last_string_free where possible.
5684 (grammar_declaration): symbol_list_destructor_set and
5685 symbol_list_printer_set now perform the translation, so don't do it
5686 here. Use gram_scanner_last_string_free where possible.
5687 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5688 translate_code): Remove, no longer used.
5689 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5690 symbol_list_printer_set): Perform code translation here rather than
5691 depending on the caller to do so.
5692
5693 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5694 * src/scan-gram.h (gram_last_string): Remove declaration.
5695 * src/scan-gram.l (last_string): Declare it static.
5696
56972007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5698
5699 Encapsulate code properties and related functionality for the various
5700 destructors, printers, and actions into a code_props structure and
5701 interface. This patch merely implements code_props in scan-code.h and
5702 scan-code.l. Future patches will rewrite other modules to use it.
5703 Discussed starting at
5704 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5705 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5706 consistently initialize const structs that have an empty location
5707 field.
5708 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5709 to ensure consistency.
5710 * src/scan-code.h (code_props): New structure.
5711 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5712 function, macro, and const global variable for initializing a
5713 code_props with no code.
5714 (code_props_plain_init, code_props_symbol_action_init,
5715 code_props_rule_action_init, code_props_translate_code): The rest of
5716 the new code_props functional interface. Among other things, the init
5717 functions set the code_props kind field so that
5718 code_props_translate_code will know whether to behave like
5719 translate_symbol_action, translate_rule_action, or translate_code.
5720 These old translate functions must remain until all other modules are
5721 updated to use the new code_props interface.
5722 (code_scanner_last_string_free): New function similar to
5723 gram_scanner_last_string_free.
5724 (code_scanner_free): Add documentation.
5725 * src/scan-code.l: Implement the new interface.
5726 (code_lex): Make it static, add a code_props* argument, and remove the
5727 rule argument.
5728 (last_string): New static global similar to the one in scan-gram.l.
5729 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5730 instead of rule.
5731 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5732 code_props since Bison may one day use this information for destructors
5733 and printers.
5734 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5735 (handle_action_dollar): Use symbol_list_n_get and set used flag
5736 directly since symbol_list_n_used_set is removed.
5737 (translate_action): Add a code_props* argument and remove the rule,
5738 action, and location arguments. Pass the code_props* on to code_lex.
5739 (translate_rule_action, translate_symbol_action, translate_code):
5740 Rewrite as wrappers around the new code_props interface.
5741 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5742 it would eventually need to break the encapsulation of code_props.
5743
57442007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5745
5746 * etc/.cvsignore: New.
5747
57482007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5749
5750 Add maintainer-push-check to run maintainer-check using push parsing in
5751 place of pull parsing where available.
5752 * Makefile.am (maintainer-push-check): New.
5753 * data/bison.m4 (b4_use_push_for_pull_if): New.
5754 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5755 appropriately based on their existing values.
5756 (yypush_parse): Don't print push-parser-specific diagnostics if push
5757 parsing is being used in place of pull parsing.
5758 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5759 push.c.
5760 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5761 variable, and insert b4_use_push_for_pull_flag into muscles.
5762 * tests/Makefile.am (maintainer-push-check): New.
5763
57642006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5765
5766 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5767 (whether successful or failed) so that yypush_parse can be invoked
5768 again to start a new parse using the same yypstate.
5769 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5770 check multiple yypull_parse invocations on the same yypstate. For pull
5771 mode, extend to check multiple yyparse invocations.
5772 (Exploding the Stack Size with Alloca): Extend to try with
5773 %push-pull-parser.
5774 (Exploding the Stack Size with Malloc): Likewise.
5775
5776 * tests/calc.at (Simple LALR Calculator): Don't specify
5777 %skeleton "push.c" since %push-pull-parser implies that now.
5778 * tests/headers.at (export YYLTYPE): Don't check for the push
5779 declarations. Otherwise, this test case can't be used to see if push
5780 mode can truly emulate pull mode.
5781 * tests/input.at (Torturing the Scanner): Likewise.
5782 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5783 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5784 AT_YACC_IF, which now includes the case of push mode since %skeleton
5785 need not be used for push mode. This will be more intuitive once
5786 push.c is renamed to yacc.c.
5787
57882006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5789
5790 For push mode, convert yyparse from a macro to a function, invoke yylex
5791 instead of passing a yylexp argument to yypull_parse, and don't
5792 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5793 Discussed starting at
5794 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5795 * data/bison.m4 (b4_pull_if): New.
5796 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5797 * data/push.c: Improve M4 quoting a little.
5798 (b4_generate_macro_args, b4_parenthesize): Remove.
5799 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5800 any time a pull parser is requested.
5801 Don't #define this as a wrapper around yypull_parse. Instead, when
5802 both push and pull are requested, make it a function that does that
5803 same thing.
5804 (yypull_parse): If there's a b4_prefix, #define this to
5805 b4_prefix[pull_parse] when both push and pull are requested.
5806 Don't define this as a function unless both push and pull are
5807 requested.
5808 Remove the yylexp argument and hard-code yylex invocation instead.
5809 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5810 %push-parser.
5811 * src/getargs.c (pull_parser): New global initialized to true.
5812 * getargs.h (pull_parser): extern it.
5813 * src/output.c (prepare): Insert pull_flag muscle.
5814 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5815 (prologue_declaration): Set both push_parser and pull_parser = true for
5816 %push-pull-parser. Set push_parser = true and pull_parser = false for
5817 %push-parser.
5818 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5819 %push-parser since there's no backward-compatibility concern here.
5820 Scan %push-pull-parser.
5821 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5822 instead of %push-parser.
5823 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5824 prototype it in the module that calls yyparse.
5825 * tests/input.at (Torturing the Scanner): Likewise.
5826 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5827
58282006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5829
5830 Update etc/bench.pl. Optimize push mode a little (the yyn change
5831 deserves most of the credit).
5832 * Makefile.am (SUBDIRS): Add etc subdirectory.
5833 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5834 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5835 yytoken, yyval, and yyloc declarations to...
5836 (yyparse or yypush_parse): ... here to improve performance. For
5837 yypush_parse invocations after the first, be sure to assign yyn its old
5838 value again.
5839 (yypstate_new): Don't bother initializing the yyresult field since the
5840 initial value isn't used.
5841 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5842 remove the #define that, in push mode, set it to yyps->NAME.
5843 * etc/Makefile.am: New.
5844 * etc/bench.pl: Remove and build it instead from...
5845 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5846 "tests/bison" from the build directory by default rather than just
5847 invoking "bison" from $PATH.
5848 (calc_grammar): Update push parser code: don't declare yylval globally,
5849 don't define yyparse_wrapper, and don't #define yyparse.
5850 (bench_grammar): Update to check all working combinations of yacc.c,
5851 push.c, impure, pure, pull, and push.
5852
58532006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5854
5855 For push mode, add pull wrappers around yypush_parse.
5856 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5857 (yypull_parse): New function wrapping yypush_parse.
5858 (yyparse): New #define wrapping yypull_parse.
5859 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5860 is declared.
5861 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5862 prototype yylex in the module that calls yyparse, and don't prototype
5863 yyparse there. Otherwise, the yyparse expansion won't compile.
5864 * tests/input.at (Torturing the Scanner): Likewise.
5865
58662006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5867
5868 Enable push parsers to operate in impure mode. Thus, %push-parser no
5869 longer implies %pure-parser. The point of this change is to move
5870 towards being able to test the push parser code by running the entire
5871 test suite as if %push-parser had been declared.
5872 * data/push.c (yypush_parse): For impure mode, remove the
5873 yypushed_char, yypushed_val, and yypushed_loc arguments.
5874 Instead, declare these as local variables initialized to the global
5875 yychar, yylval, and yylloc.
5876 For the first yypush_parse invocation only, restore the initial values
5877 of these global variables when it's time to read a token since they
5878 have been overwritten.
5879 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5880 %push-parser.
5881 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5882 %pure-parser along with %push-parser since this test case was designed
5883 for pure push parsers.
5884 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5885 (AT_YACC_OR_PUSH_IF): New.
5886 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5887 add a note that it's still wrong for some cases (as it has been for a
5888 while).
5889 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5890 %push-parser no longer implies %pure-parser.
5891
58922006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5893
5894 Remove some unnecessary differences between the pull parser code and
5895 the push parser code. This patch enables yynerrs in push mode.
5896 * data/push.c: Reformat M4 a little.
5897 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5898 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5899 because push mode is on. Instead, if pure mode is on, move yynerrs
5900 to...
5901 (b4_declare_parser_state_variables): ... here.
5902 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5903 to yyps->NAME so it can be used in yypush_parse.
5904 (yypush_parse): Don't omit uses of yynerrs in push mode.
5905
59062006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5907
5908 Fix bug such that the first pushed token's value and location are
5909 sometimes overwritten (sometimes by %initial-action) before being used.
5910 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5911 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5912 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5913 more closely mimic the pull parser logic.
5914 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5915 time to read a token, which is after any initialization of yylval and
5916 yylloc.
5917 (gottoken): Rename label to...
5918 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5919 user namespace.
5920
59212006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5922
5923 Rearrange initialization of the parser state variables so that the
5924 skeleton doesn't have to have a copy for pull mode and another for push
5925 mode. This patch also fixes at least a bug such that yylloc was not
5926 initialized (with b4_location_initial_line and
5927 b4_location_initial_column) upon calling yypush_parse. However, that
5928 initialization now overwrites the first token's location;
5929 %initial-action assigning @$ already did the same thing, and both bugs
5930 will be fixed in a later patch.
5931 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5932 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5933 yyss, yyvs, yyls, and yystacksize.
5934 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5935 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5936 yylsp.
5937 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5938 yyps->NAME so it can be used in yypush_parse.
5939 (yyparse or yypush_parse): For yypush_parse, don't print the
5940 "Starting parse" diagnostic for invocations after the first.
5941 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5942 yypush_parse, only do it for the first invocation.
5943 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5944 initialization to occur in yypush_parse but only on the first
5945 invocation.
5946
59472006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5948
5949 * data/push.c: Add CPP guards around push parser declarations in both
5950 the header and the code file.
5951 In the code file, move the push parser declarations to the same place
5952 they appear in the header file.
5953 Clean up the M4 some, especially the inconsistent underquoting in
5954 some b4_c_function_def and b4_c_function_decl uses.
5955
59562006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5957
5958 Encapsulate the push parser state variables into an M4 macro so the
5959 push skeleton doesn't have to list them again for pull mode's yyparse.
5960 For push mode, remove yypush_parse's local equivalents of these
5961 variables to eliminate unnecessary copying between the two sets at
5962 run-time. This patch also fixes at least a bug related to multiple
5963 %initial-action invocations in push mode.
5964 * data/push.c (b4_declare_parser_variables): Rename to...
5965 (b4_declare_scanner_communication_variables): ... this for clarity and
5966 update both uses.
5967 (b4_declare_yyparse_variables): Remove and move its contents to the one
5968 spot where it was invoked.
5969 (b4_declare_parser_state_variables): New macro containing the parser
5970 state variables required by push mode.
5971 (struct yypstate): Replace all fields but yynew with
5972 b4_declare_parser_state_variables.
5973 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5974 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5975 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5976 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5977 parser state variable declarations with
5978 b4_declare_parser_state_variables.
5979 Don't initialize parser state variables when calling yypush_parse since
5980 yypstate_new already does that.
5981 Invoke the user's initial action only upon the first yypush_parse
5982 invocation.
5983 Remove all code that copies between the local parser state variables
5984 and the yypstate.
5985
59862006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5987
5988 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5989 prevent a name collision in a future patch where these names will
5990 sometimes be #define'd.
5991 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5992 since it no longer has the same name as the existing argument.
5993 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5994
59952006-12-19 Paolo Bonzini <bonzini@gnu.org>
5996 and Joel E. Denny <jdenny@ces.clemson.edu>
5997
5998 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5999 that the argument is case-insensitive, and there's no `=' here.
6000 For the %skeleton entry, mention that %language is better.
6001 (Bison Options): Likewise for --language and --skeleton. Move the
6002 --skeleton entry so that the `Tuning the parser' section is sorted
6003 alphabetically on long options.
6004 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6005 %language directive in detail here; cross-reference the %language
6006 documentation instead.
6007 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6008 `%require "2.3b"' so that the example is always up-to-date.
6009 (Table of Symbols): Add entries for %language and %skeleton.
6010 * examples/extexi (normalize): Instead of replacing every %require
6011 argument with the current Bison version, just substitute for
6012 `@value{VERSION}'. This guarantees that we're testing what actually
6013 appears in the documentation.
6014 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6015 rather than `@VERSION@'.
6016
60172006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6018
6019 * NEWS: Reword the %language news a bit, and put it earlier.
6020
6021 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6022 Rewrite to simplify the logic.
6023 (language_argmatch): Likewise.
6024 (program_name): We now own this var.
6025 * src/getargs.h (struct bison_language): Use char[] rather than
6026 const char *.
6027
6028 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6029 Java is supported.
6030 * src/complain.c (program_name): Remove decl; no longer needed.
6031 * src/main.c (program_name): Remove; now belongs to getargs.
6032
60332006-12-18 Paolo Bonzini <bonzini@gnu.org>
6034
6035 * NEWS: Document %language.
6036
6037 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6038
6039 * data/c-skel.m4, data/c++-skel.m4: New files.
6040 * data/glr.c: Complain on push parsers.
6041
6042 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6043 over %skeleton.
6044 (Decl Summary): Document %language and %skeleton.
6045 (Command line): Document -L.
6046
6047 * examples/extexi: Rewrite %require directive.
6048 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6049
6050 * src/files.c (compute_exts_from_gc): Look in language structure
6051 for .y extension.
6052 (compute_file_name_parts): Check whether .tab should be added.
6053 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6054 (language, skeleton_arg, language_argmatch): New.
6055 (long_options): Add --language.
6056 (getargs): Use skeleton_arg, add -L/--language.
6057 * src/getargs.h: Include location.h.
6058 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6059 * src/output.c (prepare): Pick default skeleton from struct language.
6060 Don't dispatch C skeletons here.
6061 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6062 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6063 * src/scan-gram.l ("%language"): New rule.
6064
6065 * tests/calc.at: Test %skeleton and %language.
6066 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6067 (AT_GLR_IF): Look for %skeleton "glr.cc".
6068 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6069 (AT_YACC_IF): Reject %language.
6070
60712006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6072
6073 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6074 since it wasn't used; only the typedef name 'semantic_type' is needed.
6075 Also, omit trailing white space.
6076
6077 * bootstrap: Sync from coreutils.
6078 (gnulib_extra_files): Add build-aux/announce.gen.
6079 (slurp): Adjust .gitignore files like .cvsignore files.
6080 * build-aux/announce-gen: Remove from CVS, since bootstrap
6081 now creates this.
6082
60832006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6084
6085 Make %push-parser imply %pure-parser. This fixes several bugs; see
6086 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6087 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6088 pure_parser = true.
6089 * data/push.c: Don't bother testing b4_push_if when deciding whether
6090 to expand b4_declare_parser_variables globally.
6091 (yypush_parse): Likewise in here.
6092
6093 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6094 (yy_reduce_print): Reformat M4 for readability.
6095
60962006-12-15 Bob Rossi <bob@brasko.net>
6097 and Joel Denny <jdenny@ces.clemson.edu>
6098
6099 * data/push.c (yypstate): Add typedef, and update all uses of
6100 struct yypstate to just yypstate.
6101 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6102
61032006-12-14 Bob Rossi <bob@brasko.net>
6104
6105 * data/push.c (yypush_parse): Declare prototype regardless of
6106 %locations option.
6107
61082006-12-14 Bob Rossi <bob@brasko.net>
6109
6110 * data/push.c (yyparse): Remove the prototype and the #define when in
6111 push-parser mode.
6112
61132006-12-13 Bob Rossi <bob@brasko.net>
6114
6115 * data/push.c (yypstate_init): Rename to...
6116 (yypstate_new): ... this and use b4_c_function_def.
6117 (yypstate_delete): New.
6118 (yypush_parse): Change parameters yynval and yynlloc to be const.
6119 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6120 yypstate_delete functions.
6121
61222006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6123
6124 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6125 strange test case titles. Reported by Bob Rossi.
6126
61272006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6128
6129 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6130 of potential ambiguities in GLR grammers.
6131
61322006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6133
6134 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6135 `bison ', use m4_index instead of m4_substr since chopping up a string
6136 containing M4-special characters causes problems here.
6137
6138 Fix a couple of bugs related to special characters in user-specified
6139 file names, and make it easier for skeletons to compute output file
6140 names with the same file name prefix as Bison-computed output file
6141 names.
6142 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6143 b4_parser_file_name and b4_spec_defines_file instead of
6144 @output_parser_name@ and @output_header_name@, which are now redundant.
6145 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6146 b4_parser_file_name, b4_spec_defines_file, and the new
6147 @basename(FILENAME@) instead of @output_parser_name@ and
6148 @output_header_name@, which inappropriately escaped the file names as
6149 C string literals.
6150 * src/files.c (all_but_ext): Remove static qualifier.
6151 (compute_output_file_names): Move `free (all_but_ext)' to...
6152 (output_file_names_free): ... here since all_but_ext is needed later.
6153 * src/files.h (all_but_ext): Extern.
6154 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6155 exactly what MUSCLE_INSERT_STRING used to do.
6156 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6157 characters are escaped properly.
6158 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6159 all_but_ext.
6160 For pkgdatadir muscle, maintain previous functionality by using
6161 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6162 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6163 digraphs would never be expanded. Hopefully no one has M4-special
6164 characters in his Bison installation path.
6165 * src/scan-skel.l: Don't parse @output_header_name@ and
6166 @output_parser_name@ anymore since they're now redundant.
6167 In @output, use decode_at_digraphs.
6168 Parse a new @basename command that invokes last_component.
6169 (decode_at_digraphs): New.
6170 (BASE_QPUTS): Remove unused.
6171 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6172 (Output file name): New tests.
6173
61742006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6175
6176 Warn about output files that are generated by the skeletons and that
6177 conflict with other output files.
6178 * data/glr.c: Don't generate the header file here when glr.cc does.
6179 * src/files.c (file_names, file_names_count): New static globals.
6180 (compute_output_file_names): Invoke output_file_name_check for files
6181 not generated by the skeletons and remove existing checks.
6182 (output_file_name_check): New function that warns about conflicting
6183 output file names.
6184 (output_file_names_free): Free file_names.
6185 * src/files.h (output_file_name_check): Declare.
6186 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6187 the skeletons.
6188 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6189 (Conflicting output files): New tests.
6190
61912006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6192
6193 * doc/bison.texinfo: Fix a couple of typos.
6194
61952006-12-08 Bob Rossi <bob@brasko.net>
6196
6197 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6198 Rename to...
6199 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6200 update all uses.
6201 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6202 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6203 local pv.
6204 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6205 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6206
62072006-12-07 Bob Rossi <bob@brasko.net>
6208 and Joel Denny <jdenny@ces.clemson.edu>
6209
6210 * data/push.c (yypvarsinit): Change return type from void* to struct
6211 yypvars*. No longer cast to void* on return.
6212 (struct yypvars): Remove yylen since it need not be remembered between
6213 yypushparse invocations.
6214 (yypushparse): Don't copy between yylen and pv->yylen.
6215
62162006-12-05 Bob Rossi <bob@brasko.net>
6217
6218 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6219 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6220 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6221 (struct yypvars): Remove b4_declare_parser_variables.
6222 (yypvarsinit): Remove init code for removed variables.
6223 (global scope): Do not declare b4_declare_parser_variables if
6224 push or pure mode.
6225 (yypushparse): Add b4_declare_parser_variables.
6226 Init new local variables, and remove init code for removed
6227 yypvars variables.
6228 (yyparse): Delete.
6229 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6230 and yyparse for other modes.
6231 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6232 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6233 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6234 (AT_PURE_LEX_IF): True if pure or push parser.
6235
62362006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6237
6238 Document Yacc prologue alternatives and default %destructor's and
6239 %printer's as experimental. Don't mention Java yet. Discussed at
6240 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6241 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6242 (2.3a): Annotate this entry to say the old forms of these features were
6243 also experimental.
6244 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6245 Table of Symbols): Say they're experimental. Comment out any mention
6246 of Java (we'll want this back eventually).
6247
62482006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6249
6250 Support a file name argument to %defines. Deprecate `=' in
6251 %file-prefix, %name-prefix, and %output. Discussed at
6252 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6253 * NEWS (2.3a+): Mention.
6254 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6255 form of %defines, and remove `=' from entries for %file-prefix,
6256 %name-prefix, and %output.
6257 * src/parse-gram.y (prologue_declaration): Implement.
6258 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6259 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6260 all but one occurrence of %name-prefix.
6261 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6262 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6263 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6264 occurrence of each of %file-prefix and %output. Add check for %defines
6265 with argument.
6266 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6267 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6268 Remove the `=' from %output.
6269
62702006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6271
6272 Don't escape $ in test case titles since Autoconf 2.61 now does that
6273 correctly.
6274 * tests/actions.at (Default %printer and %destructor are not for error
6275 or $undefined): Here.
6276 (Default %printer and %destructor are not for $accept): Here.
6277 * tests/input.at (Invalid $n and @n): Here.
6278
62792006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6280
6281 Rename <!> to <>. Discussed starting at
6282 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6283 * NEWS (2.3a+): Update.
6284 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6285 Update.
6286 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6287 * src/scan-gram.l (INITIAL): Implement.
6288 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6289 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6290 comment.
6291 * tests/actions.at (Default tagless %printer and %destructor,
6292 Default tagged and per-type %printer and %destructor,
6293 Default %printer and %destructor are not for error or $undefined,
6294 Default %printer and %destructor are not for $accept,
6295 Default %printer and %destructor for mid-rule values): Update.
6296 * tests/input.at (Default %printer and %destructor redeclared,
6297 Unused values with default %destructor): Update.
6298
62992006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6300
6301 Don't let %prec take a nonterminal.
6302 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6303 token.
6304 * tests/input.at (%prec takes a token): New test checking that %prec
6305 won't take a nonterminal.
6306
63072006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6308
6309 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6310 it was double-quoted.
6311 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6312 grammar is maintained with Bison's highest standards.
6313 * src/getargs.c: Fix some typos in Doxygen comments.
6314
63152006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6316
6317 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6318 later. Reported by Paul Eggert in
6319 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6320 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6321 * src/scan-code.l (translate_action): Don't bother invoking
6322 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6323 (code_scanner_free): Instead of invoking
6324 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6325 which frees more.
6326 * src/scan-gram.l (gram_scanner_free): Likewise.
6327 * src/scan-skel.l (scan_skel): Likewise.
6328
63292006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6330
6331 * src/files.c (tr): Change return type to void.
6332 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6333 has been called previously for the same key.
6334 (muscle_find): Return storage instead of value so that
6335 --enable-gcc-warnings doesn't produce warnings that the return discards
6336 const. aver that the value and storage are the same since storage
6337 could potentially be NULL when value is not.
6338 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6339 same as 0.
6340
63412006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6342
6343 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6344 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6345 us a slightly cleaner distribution, and also works.
6346 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6347 gnulib changes.
6348
63492006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6350 and Paul Eggert <eggert@cs.ucla.edu>
6351
6352 Don't let Bison leak memory except when it complains.
6353 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6354 (spec_defines_file, dir_prefix): Now char *, not const char *,
6355 since they are freed.
6356 * src/files.c: Likewise.
6357 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6358 Likewise.
6359 (tr): Now operates in-place. All uses changed.
6360 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6361 values.
6362 (compute_file_name_parts, compute_output_file_names): Don't store
6363 read-only data in variables that will be freed.
6364 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6365 src_extension, and header_extension.
6366 (output_file_names_free): New public function to free
6367 spec_verbose_file, spec_graph_file, spec_defines_file,
6368 parser_file_name, and dir_prefix.
6369 * src/getargs.c (getargs): Don't store read-only data in variables that
6370 will be freed.
6371 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6372 (which previously existed but was unused), and quotearg_free.
6373 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6374 * src/muscle_tab.c: Likewise.
6375 (muscle_entry): Make the value char const *,
6376 and add a new storage member that is char * and can be freed.
6377 (muscle_entry_free): New private function.
6378 (muscle_init): Use it instead of free.
6379 (muscle_insert, muscle_grow): Update and use new storage member.
6380 (muscle_code_grow): Free the string passed to muscle_grow
6381 since it's not needed anymore.
6382 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6383 add a new `char *code' member.
6384 ("{...}"): Declare semantic type as code.
6385 * src/scan-code.h (translate_rule_action):
6386 (translate_symbol_action, translate_code, translate_action): Return
6387 `char const *' rather than `char *' since external code should not free
6388 these strings.
6389 * src/scan-code.l: Likewise.
6390 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6391 which is "{...}" in the parser.
6392 * tests/Makefile.am (maintainer-check-valgrind): Set
6393 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6394 Valgrind.
6395 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6396 complain.
6397 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6398 expecting a non-zero exit status sets --leak-check=summary and
6399 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6400 this case, and we don't want to hear about it.
6401
64022006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6403
6404 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6405 instead of from the template, to simplify configuration a bit.
6406 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6407 and m4/wint_t.m4, as they are needed with the latest gnulib.
6408
64092006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6410
6411 Disable unset/unused mid-rule value warnings by default, and recognize
6412 --warnings=midrule-values to enable them. Discussed starting at
6413 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6414 * NEWS (2.3a+): Mention.
6415 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6416 warnings): Add entry for midrule-values subargument.
6417 * src/reader.c (symbol_should_be_used): Don't return true just because
6418 the value is a set/used mid-rule value unless
6419 --warnings=midrule-values was specified.
6420 * tests/input.at (Unused values, Unused values before symbol
6421 declarations): Run tests with and without --warnings=midrule-values.
6422
6423 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6424 than LIST_FREE directly.
6425
64262006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6427
6428 Finish implementing --warnings=error, which should not be implied by
6429 --warnings=all (or by its synonyms -W and --warnings without
6430 subarguments).
6431 * src/complain.c (set_warning_issued): New function to report that
6432 warnings are being treated as errors and to record an error if so.
6433 Invoke...
6434 (warn_at, warn): ... here.
6435 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6436 "error - warnings are errors" does not appear above "all - all of the
6437 above".
6438 (getargs): For -W and --warnings without subarguments, don't let
6439 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6440 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6441
64422006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6443
6444 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6445 empty subargument list. For example: `bison --warnings= parser.y'.
6446
64472006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6448
6449 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6450 the parser header file so that gcc doesn't warn.
6451
64522006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6453
6454 Split the default %destructor/%printer into two kinds: <*> and <!>.
6455 Discussed starting at
6456 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6457 * NEWS (2.3a+): Mention.
6458 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6459 previous change today related to mid-rules.
6460 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6461 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6462 (TYPE_TAG_ANY): Add as <*>.
6463 (TYPE_TAG_NONE): Add as <!>.
6464 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6465 for <*> and <!>.
6466 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6467 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6468 * src/symlist.c (symbol_list_default_new): Split into tagged and
6469 tagless versions.
6470 (symbol_list_destructor_set, symbol_list_printer_set): Split
6471 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6472 SYMLIST_DEFAULT_TAGLESS.
6473 * src/symlist.h: Update symbol_list_default*_new prototypes.
6474 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6475 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6476 * src/symtab.c (default_destructor, default_destructor_location,
6477 default_printer, default_printer_location): Split each into tagged and
6478 tagless versions.
6479 (symbol_destructor_get, symbol_destructor_location_get,
6480 symbol_printer_get, symbol_printer_location_get): Implement tagged
6481 default and tagless default cases.
6482 (default_destructor_set, default_printer_set): Split each into tagged
6483 and tagless versions.
6484 * src/symtab.h: Update prototypes.
6485 * tests/actions.at (Default %printer and %destructor): Rename to...
6486 (Default tagless %printer and %destructor): ... this, and extend.
6487 (Per-type %printer and %destructor): Rename to...
6488 (Default tagged and per-type %printer and %destructor): ... this, and
6489 extend.
6490 (Default %printer and %destructor for user-defined end token): Extend.
6491 (Default %printer and %destructor are not for error or $undefined):
6492 Update.
6493 (Default %printer and %destructor are not for $accept): Update.
6494 (Default %printer and %destructor for mid-rule values): Extend.
6495 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6496 (Unused values with default %destructor): Extend.
6497
64982006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6499
6500 Don't apply the default %destructor/%printer to an unreferenced midrule
6501 value. Mentioned at
6502 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6503 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6504 like $@n instead of just @n so that the default %destructor/%printer
6505 logic doesn't see them as user-defined symbols.
6506 (symbol_is_dummy): Check for both forms of the name.
6507 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6508 name for which the midrule value is referenced in any action.
6509 * tests/actions.at (Default %printer and %destructor for mid-rule
6510 values): New test.
6511 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6512 for change to dummy symbol names.
6513
65142006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6515
6516 Warn about unset midrule $$ if the corresponding $n is used.
6517 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6518 $n usage.
6519 (packgram): Before invoking grammar_rule_check on any rule, make sure
6520 all actions have already been scanned in order to set `used' flags.
6521 Otherwise, checking that a midrule's $$ is set will not always work
6522 properly because the midrule check must forward-reference the midrule's
6523 parent rule.
6524 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6525 warning.
6526
65272006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6528
6529 More improvements to the documentation of the prologue alternatives:
6530 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6531 Bison manual.
6532 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6533 some text to clarify the relative importance of the new directives and
6534 to show how these directives may be viewed as code labels.
6535
65362006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6537
6538 Similar to the recently removed %before-header, add %code-top as the
6539 alternative to the pre-prologue. Mentioned at
6540 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6541 Also, let the prologue alternatives appear in the grammar section.
6542 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6543 (prologue_declaration): Move the existing prologue alternatives to...
6544 (grammar_declaration): ... here and add %code-top.
6545 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6546
6547 Clean up and extend documentation for the prologue alternatives.
6548 * NEWS (2.3a+): Describe prologue alternatives.
6549 * doc/bison.texinfo (Prologue): Move discussion of prologue
6550 alternatives to...
6551 (Prologue Alternatives): ... this new section, and extend it to discuss
6552 all 4 directives in detail.
6553 (Table of Symbols): Clean up discussion of prologue alternatives and
6554 add %code-top.
6555
65562006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6557
6558 DJGPP specific issues.
6559
6560 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6561 config.bat accordingly.
6562 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6563 * djgpp/config.site: Likewise.
6564
65652006-10-16 Paolo Bonzini <bonzini@gnu.org>
6566
6567 Replace %*-header with %provides, %requires, %code. See discussion at
6568 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6569
6570 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6571 (b4_user_start_header): Remove.
6572 * data/glr.c: Use new macros instead of b4_*start_header
6573 and b4_*end_header.
6574 * data/glr.cc: Likewise.
6575 * data/lalr1.cc: Likewise.
6576 * data/push.c: Likewise.
6577 * data/yacc.c: Likewise.
6578
6579 * doc/bison.texinfo: Remove %before-header, rename
6580 %{start,end,after}-header to %requires, %provides, %code.
6581
6582 * src/parse-gram.y: Likewise (also rename token names accordingly).
6583 * src/scan-gram.l: Likewise.
6584 * tests/actions.at: Likewise.
6585
65862006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6587
6588 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6589 Problem reported by Joel E. Denny.
6590
65912006-10-14 Jim Meyering <jim@meyering.net>
6592
6593 (Sync from coreutils.)
6594 Work also when the working directory (with e.g. coreutils sources)
6595 is version controlled with git, rather than CVS.
6596 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6597 rather than CVS.
6598 In messages and comments, say e.g., "checked-out sources",
6599 rather than "CVS sources".
6600 (version_controlled_file): New function. Work for git as well as
6601 for CVS. Don't use grep's -q option.
6602 (slurp): Call it here, in place of CVS-specific code.
6603
66042006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6605
6606 Fix testsuite for ./configure --enable-gcc-warnings:
6607 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6608 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6609 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6610 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6611 * test/regression.at (Diagnostic that expects two alternatives):
6612 Likewise.
6613
66142006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6615
6616 * bootstrap.conf (gnulib_modules): Add config-h.
6617 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6618 worry about HAVE_CONFIG_H.
6619 * lib/abitset.c: Likewise.
6620 * lib/bitset.c: Likewise.
6621 * lib/bitset_stats.c: Likewise.
6622 * lib/bitsetv-print.c: Likewise.
6623 * lib/bitsetv.c: Likewise.
6624 * lib/ebitset.c: Likewise.
6625 * lib/get-errno.c: Likewise.
6626 * lib/lbitset.c: Likewise.
6627 * lib/subpipe.c: Likewise.
6628 * lib/timevar.c: Likewise.
6629 * lib/vbitset.c: Likewise.
6630 * lib/bitset.c: Include "bitset.h" first, to test interface.
6631 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6632 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6633 * lib/bitsetv.c: Include "bitsetv.h" first.
6634 * lib/get-errno.c: Include "get-errno.h" first.
6635 * m4/.cvsignore: Add config-h.m4.
6636 * tests/actions.at (Default %printer and %destructor for ...):
6637 Adjust expected line numbers in output to reflect removal of #if
6638 HAVE_CONFIG_H lines.
6639 * tests/glr-regression.at (Missed %merge type warnings when ...):
6640 Likewise.
6641 * tests/regression.at (Braced code in declaration in rules section):
6642 Likewise.
6643 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6644 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6645 Include <config.h> unconditionally.
6646
6647 * bootstrap: Sync from coreutils, as follows:
6648
6649 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6650
6651 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6652 variable was sometimes used without being initialized. This
6653 messed up the installation of the INSTALL file in some cases.
6654
6655 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6656
6657 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6658 --copy. Inspired by a suggestion from Bruno Haible.
6659
6660 2006-10-03 Jim Meyering <jim@meyering.net>
6661
6662 * bootstrap: Undo last change to this file, since now gnulib-tool
6663 sticks with the automake default in generating dependencies.
6664
66652006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6666
6667 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6668 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6669
6670 * doc/bison.1: Add copyright notice.
6671
6672 * data/glr.c: Don't include <stdarg.h>; not used.
6673
6674 * NEWS: The -g and --graph options now output graphs in Graphviz
6675 DOT format, not VCG format.
6676 * doc/bison.1: Likewise.
6677 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6678 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6679 of this change in
6680 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6681 * TODO: Remove Graphviz entry.
6682 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6683 remove vcg.c, vcg.h, vcg_defaults.h.
6684 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6685 * src/graphviz.c, src/graphviz.h: New files.
6686 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6687 * src/files.h: Make comment more generic.
6688 * src/main.c (main): Likewise.
6689 * src/print_graph.h: Likewise.
6690 * src/getargs.c (usage): Make usage description more generic.
6691 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6692 (static_graph, fgraph): Remove. All uses changed to pass
6693 arguments instead of sharing a static var.
6694 (print_core, print_actions, print_state, print_graph):
6695 Output graphviz format rather than VCG format.
6696 * tests/.cvsignore: Remove *.vcg; add *.dot.
6697 * tests/output.at: Expect *.dot files, not *.vcg files.
6698
6699 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6700 accommodates the 2006-10-08 change.
6701
67022006-10-11 Bob Rossi <bob@brasko.net>
6703
6704 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6705 (b4_yyssa, b4_yyerror_range): New macros.
6706 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6707 (yypvarsinit): Remove init of removed fields.
6708 (yypushparse): Remove use of removed fields; use new macros instead.
6709
67102006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6711
6712 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6713 in a push parser. Reindent slightly to match yacc.c better.
6714
67152006-10-11 Bob Rossi <bob@brasko.net>
6716
6717 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6718 yymsg_alloc fields.
6719 (yypvarsinit, yypushparse): Remove init of removed fields.
6720 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6721
67222006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6723
6724 * THANKS: Add Paolo Bonzini and Bob Rossi.
6725
67262006-10-08 Paolo Bonzini <bonzini@gnu.org>
6727
6728 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6729 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6730 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6731 b4_define_user_cde and uses): Remove.
6732 (b4_comment, b4_prefix, b4_sync_start): New.
6733 * data/bison.m4: New file, with most of the content removed from c.m4.
6734 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6735 * src/output.c (output_skeleton): Pass bison.m4.
6736 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6737 only if specified.
6738
67392006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6740
6741 Fix test failure reported by Tom Lane in
6742 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6743 and try to make such failures easier to catch in the future.
6744 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6745 that's now the caller's responsibility.
6746 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6747 Set yychar = YYEOF if it's negative.
6748 * tests/actions.at (yylex): Abort if asked to read past EOF.
6749 * tests/conflicts.at (yylex): Likewise.
6750 * tests/cxx-type.at (yylex): Likewise.
6751 * tests/glr-regression.at (yylex): Likewise.
6752 * tests/input.at (yylex): Likewise.
6753 * tests/regression.at (yylex): Likewise.
6754 * tests/torture.at (yylex): Likewise.
6755
67562006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6757
6758 Fix problems with translating English-language diagnostics.
6759 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6760 respect to bison-runtime pot generation. The YY_ stuff
6761 wasn't being captured.
6762 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6763 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6764 * runtime-po/POTFILES.in: Add data/push.c.
6765
67662006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6767
6768 Merge bootstrap changes from coreutils.
6769
6770 2006-09-28 Jim Meyering <jim@meyering.net>
6771
6772 Automatically generated dependencies are important even
6773 when all of the sources in a directory come from gnulib.
6774 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6775 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6776
6777 2006-09-23 Jim Meyering <jim@meyering.net>
6778
6779 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6780
6781 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6782
6783 * bootstrap: Add support for --force.
6784 (usage): New function. Describe usage less tersely.
6785 (CVS_only_file): New var.
6786
67872006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6788
6789 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6790 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6791 Adjust white space and comments to match GNU style better.
6792
67932006-09-20 Bob Rossi <bob@brasko.net>
6794
6795 * data/push.c (yyresult_get): Remove function.
6796 (YYPUSH_MORE): Add #define.
6797 (yypushparse): Modify return value.
6798
67992006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6800
6801 * stamp-h.in: Remove; no longer needed.
6802 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6803 Remove config.h, config.hin, intl (no longer created).
6804 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6805 stamp-h1.
6806
6807 Sync bootstrap from coreutils, as follows:
6808
6809 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6810
6811 * bootstrap (symlink_to_gnulib): New function.
6812 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6813 to copies-of-gnulib.
6814 (cp_mark_as_generated, slurp, gnulib_files):
6815 Avoid making a copy if it's the same as the old version.
6816 (gnulib_files): Add support for this variable (used by Bison).
6817
68182006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6819
6820 * src/getargs.c (usage): Rework to use conventions similar to
6821 coreutils, to make translation a bit easier and the code a bit
6822 smaller. Problem reported by Tim Van Holder.
6823
68242006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6825
6826 Use some of gnulib's new modules, taken from coreutils.
6827
6828 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6829 * bootstrap.conf: New file.
6830 (gnulib_modules): Add configmake, inttypes, unistd.
6831 (XGETTEXT_OPTIONS): Add complain, complain_at,
6832 fatal, fatal_at, warn, warn_at, unexpected_end.
6833 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6834 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6835 (gl_EARLY): Add.
6836 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6837 (gl_INIT): Add
6838 (GNULIB_AUTOCONF_SNIPPET): Remove.
6839 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6840 the pickiest.
6841 * lib/.cvsignore: Add inttypes_.h.
6842 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6843 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6844 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6845 no-longer-necessary initializations.
6846 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6847 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6848 use the unistd module.
6849 * src/system.h: Likewise.
6850 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6851 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6852 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6853 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6854 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6855 * src/system.h: Include inttypes.h unconditionally, now that we
6856 use the inttypes module. Don't bother to include stdint.h, since
6857 inttypes.h now does that for us.
6858 (LOCALEDIR): Remove, now that we use the configmake module.
6859 * src/getargs.c: Include configmake.h.
6860 * src/main.c: Likewise.
6861 * src/output.c: Likewise.
6862 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6863 not from $abs_top_builddir, since config.h moved.
6864
6865
6866 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6867 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6868
6869 * src/parse-gram.y (symbol_declaration): Don't put statements
6870 before declarations; it's not portable to C89.
6871 * src/scan-code.l (handle_action_at): Likewise.
6872
6873 * src/scan-code.l: Always initialize braces_level; the old code
6874 left it uninitialized and therefore had undefined behavior.
6875
6876 Don't attempt to redefine 'assert', since it runs afoul of
6877 systems where standard headers (mistakenly) include <assert.h>.
6878 Instead, define and use our own alternative, called 'aver'.
6879 * src/reader.c: Don't include assert.h, since we no longer
6880 use assert.
6881 * src/scan-code.l: Likewise.
6882 * src/system.h (assert): Remove, replacing with....
6883 (aver): New function, taking a bool arg. All uses changed.
6884 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6885 not merely an integer.
6886
68872006-09-15 Bob Rossi <bob@brasko.net>
6888
6889 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6890 * data/c.m4 (YYPUSH): New.
6891 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6892 * src/getargs.c (push_parser): New var.
6893 * src/getargs.h (push_parser): New declaration.
6894 * src/output.c (prepare): Add macro insertion of `push_flag'.
6895 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6896 (prologue_declaration): Parse %push-parser.
6897 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6898 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6899 list of removed lines from the traces observed.
6900 (AT_CHECK_CALC_LALR): Added push parser tests.
6901
69022006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6903
6904 * NEWS: Version 2.3a.
6905 * configure.ac (AC_INIT): Likewise.
6906
6907 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6908 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6909 due to header ordering dependencies. I don't know why the #define
6910 was there.
6911
6912 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6913 runtime cost when YYDEBUG is not defined, and so that some tests
6914 that used to fail now work. Problem and initial suggestion by
6915 Paolo Bonzini.
6916 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6917 * data/glr.cc (b4_parser_class_name):
6918 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6919 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6920 (yydebug_) [YYDEBUG]: New member.
6921 (yycdebug_): Now defined only if YYDEBUG.
6922 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6923 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6924 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6925 if YYYDEBUG.
6926 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6927 Define only if YYDEBUG.
6928 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6929 set_debug_level.
6930 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6931 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6932 AT_CHECK_CALC_GLR_CC that are working now.
6933
69342006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6935
6936 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6937 We don't need them in glr.cc, and glr.c defines them.
6938 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6939 assumes that defining it to anything is the same as defining
6940 it to 1. Problem reported by Paolo Bonzini.
6941
69422006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6943
6944 * data/c.m4 (b4_null, b4_case): Define.
6945 * src/output.c (prepare_symbols): Use b4_null.
6946 (user_actions_output): Use b4_case.
6947
69482006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6949
6950 * data/glr.c (b4_shared_declarations): Put start-header first,
6951 before any #includes that we generate, so that feature-test
6952 macros work. Problem reported by Michael Deutschmann in
6953 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6954 * data/lalr1.cc: Likewise.
6955 * doc/bison.texinfo (Prologue): Document that feature-test macros
6956 should be defined before any Bison declarations.
6957 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6958 that depend on location.hh after, not before, Bison decls, since
6959 we now include location.hh after the first user prologue.
6960
6961 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6962 Sander Brandenburg in
6963 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6964 Also, fix minor white space and comment issues.
6965 (Prologue): Mention that it's better to define feature-test macros
6966 before Bison declarations. Problem reported by Michael Deutschmann.
6967
6968 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6969 by Jim Meyering.
6970 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6971 This adjusts to recent gnulib changes.
6972
69732006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6974
6975 Finish implementation of per-type %destructor/%printer. Discussed
6976 starting at
6977 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6978 and
6979 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6980 * NEWS (2.3+): Add a description of this feature to the default
6981 %destructor/%printer description.
6982 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6983 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6984 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6985 list node contains a semantic type.
6986 * src/symtab.c, src/symtab.h: Extend with a table that associates
6987 semantic types with their %destructor's and %printer's.
6988 (semantic_type_from_uniqstr, semantic_type_get,
6989 semantic_type_destructor_set, semantic_type_printer_set): New functions
6990 composing the public interface of that table.
6991 (symbol_destructor_get, symbol_destructor_location_get,
6992 symbol_printer_get, symbol_printer_location_get): If there's no
6993 per-symbol %destructor/%printer, look up the per-type before trying
6994 the default.
6995 * tests/actions.at (Per-type %printer and %destructor): New test case.
6996 * tests/input.at (Default %printer and %destructor redeclared):
6997 Extend to check that multiple occurrences of %symbol-default in a
6998 single %destructor/%printer declaration is an error.
6999 (Per-type %printer and %destructor redeclared, Unused values with
7000 per-type %destructor): New test cases.
7001
70022006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7003
7004 Require default %destructor/%printer to be declared using
7005 %symbol-default instead of an empty symbol list, and start working on
7006 new per-type %destructor/%printer. Discussed at
7007 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7008 * NEWS (2.3+): Add %symbol-default to example.
7009 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7010 (Table of Symbols): Add entry for %symbol-default.
7011 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7012 (generic_symlist, generic_symlist_item): New nonterminals for creating
7013 a list in which each item is a symbol, semantic type, or
7014 %symbol-default.
7015 (grammar_declaration): Use generic_symlist in %destructor and %printer
7016 declarations instead of symbols.1 or an empty list.
7017 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7018 for changes to symbol_list.
7019 * src/reader.c: Update for changes to symbol_list.
7020 * src/scan-code.l: Likewise.
7021 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7022 * src/symlist.c, src/symlist.h: Extend such that a list node may
7023 represent a semantic type or a %symbol-default in addition to just an
7024 ordinary symbol. Add switched functions for setting %destructor's and
7025 %printer's.
7026 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7027 %destructor/%printer declarations.
7028
70292006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7030
7031 Whether the default %destructor/%printer applies to a particular symbol
7032 isn't a question of whether the user *declares* that symbol (in %token,
7033 for example). It's a question of whether the user by any means
7034 *defines* the symbol at all (by simply using a char token, for
7035 example). $end is defined by Bison whereas any other token with token
7036 number 0 is defined by the user. The error token is always defined by
7037 Bison regardless of whether the user declares it with %token, but we
7038 may one day let the user define error as a nonterminal instead.
7039 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7040 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7041 the meaning of "user-defined".
7042 * tests/actions.at (Default %printer and %destructor for user-declared
7043 end token): Rename to...
7044 (Default %printer and %destructor for user-defined end token): ...
7045 this.
7046
7047 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7048 computation of whether to apply the default, don't maintain a list of
7049 every Bison-defined symbol. Instead, just check for a first character
7050 of '$', which a user symbol cannot have, and check for the error token.
7051
70522006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7053
7054 Don't apply the default %destructor or %printer to the error token,
7055 $undefined, or $accept. This change fits the general rule that the
7056 default %destructor and %printer are only for user-declared symbols,
7057 and it solves several difficulties that are described in the new test
7058 cases listed below.
7059 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7060 * tests/actions.at (Default %printer and %destructor are not for error
7061 or $undefined, Default %printer and %destructor are not for $accept):
7062 New test cases.
7063
70642006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7065
7066 Allow %start after the first rule.
7067 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7068 when parsing the first rule.
7069 (check_and_convert_grammar): Search for it here after all grammar
7070 declarations have been parsed. Skip midrules, which have dummy LHS
7071 nonterminals.
7072 * src/symtab.c (symbol_is_dummy): New function.
7073 * src/symtab.h (symbol_is_dummy): Declare it.
7074 * tests/input.at (%start after first rule): New test.
7075
70762006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7077
7078 Redo some of the previous commit: add back the ability to use
7079 non-aliased/undeclared string literals since it might be useful to
7080 those declaring %token-table.
7081 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7082 commit: don't worry about complaints from symbols_pack.
7083 * src/symtab.c (symbol_new, symbol_class_set,
7084 symbol_check_alias_consistency): Undo changes in previous commit: count
7085 each string literal as a new symbol and token, assign it a symbol
7086 number, and don't complain about non-aliased string literals.
7087 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7088 and token counts but does still set aliased tokens to the same number,
7089 symbol_pack_processor now leaves empty slots in the symbols array.
7090 Remove those slots.
7091 * tests/regression.at (Undeclared string literal): Remove test case
7092 added in previous commit since non-aliased string literals are allowed
7093 again.
7094 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7095 remove unnecessary string literal declarations.
7096 * tests/sets.at (Firsts): Likewise.
7097
70982006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7099
7100 Don't allow an undeclared string literal, but allow a string literal to
7101 be used before its declaration.
7102 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7103 symbols_pack complained.
7104 * src/symtab.c (symbol_new): Don't count a string literal as a new
7105 symbol.
7106 (symbol_class_set): Don't count a string literal as a new token, and
7107 don't assign it a symbol number since symbol_make_alias does that.
7108 (symbol_make_alias): It's not necessary to decrement the symbol and
7109 token counts anymore. Don't assume that an alias declaration occurs
7110 before any uses of the identifier or string, and thus don't assert that
7111 one of them has the highest symbol number so far.
7112 (symbol_check_alias_consistency): Complain if there's a string literal
7113 that wasn't declared as an alias.
7114 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7115 symbol_pack asserts that every token has been assigned a symbol number
7116 although undeclared string literals have not.
7117 * tests/regression.at (String alias declared after use, Undeclared
7118 string literal): New test cases.
7119 (Characters Escapes, Web2c Actions): Declare string literals as
7120 aliases.
7121 * tests/sets.at (Firsts): Likewise.
7122
71232006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7124
7125 In the grammar scanner, STRING_FINISH unclosed constructs and return
7126 them to the parser in order to improve error messages.
7127 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7128 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7129 * tests/input.at (Unclosed constructs): New test case.
7130 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7131 seen.
7132
7133 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7134 unused global.
7135
71362006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7137
7138 Handle string aliases for character tokens correctly.
7139 * src/symtab.c (symbol_user_token_number_set): If the token has an
7140 alias, check and set its alias's user token number instead of its own,
7141 which is set to indicate the alias. Previously, every occurrence of
7142 the character token in the grammar overwrote that alias indicator with
7143 the character code.
7144 * tests/input.at (String aliases for character tokens): New test.
7145
71462006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7147
7148 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7149
71502006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7151
7152 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7153 to prevent failures when building on older platforms.
7154 Check for autopoint failure.
7155 Set XGETTEXT_OPTIONS to values that check for C format strings,
7156 so that translators are warned about them (this also helps
7157 prevent core dumps).
7158
7159 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7160 function, since it simplifies our code a bit.
7161
7162 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7163 rather than -W, so we don't get bogus warnings about sign comparisons.
7164 Add -Wpointer-arith, since that warning is useful (it reports code
7165 that does not conform to C89 and that some compilers reject).
7166 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7167 since it's no longer needed.
7168
71692006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7170
7171 Clean up scanners a bit.
7172 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7173 definitions so gcc won't warn when obstack_for_string is unused.
7174 * src/scan-code.l: config.h and system.h are already #include'd by
7175 scan-code-c.c, so get rid of them here.
7176 * src/scan-gram.l: Likewise.
7177 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7178 definitions rather than duplicating the rest of it.
7179 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7180
71812006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7182
7183 Suppress signed/unsigned comparison warnings for yycheck.
7184 * data/c.m4 (b4_safest_int_type): New macro.
7185 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7186 a signed int type, cast it to b4_safest_int_type first.
7187 * data/yacc.c: Likewise.
7188 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7189 also overwritten.
7190
71912006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7192
7193 * doc/bison.texinfo: Fix some typos.
7194
71952006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7196
7197 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7198 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7199
7200 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7201 the latest gnulib does this a different way.
7202 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7203 translation was patched, so stop omitting it.
7204
72052006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7206
7207 Enable declaration of default %printer/%destructor. Make the parser
7208 use these for all user-declared grammar symbols for which the user does
7209 not declare a specific %printer/%destructor. Thus, the parser uses it
7210 for token 0 if the user declares it but not if Bison generates it as
7211 $end. Discussed starting at
7212 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7213 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7214 and
7215 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7216 * NEWS (2.3+): Mention.
7217 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7218 declare a %destructor for a mid-rule's semantic value. It's just
7219 impossible to declare one specific to it.
7220 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7221 code. Describe default %destructor form.
7222 * src/parse-gram.y (grammar_declaration): Parse default
7223 %printer/%destructor declarations.
7224 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7225 and symbol_destructor_location_get rather than accessing the destructor
7226 and destructor_location members of struct symbol.
7227 (symbol_printers_output): Likewise but for %printer's.
7228 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7229 again.
7230 * src/symtab.c (default_destructor, default_destructor_location,
7231 default_printer, default_printer_location): New static global
7232 variables to record the default %destructor and %printer.
7233 (symbol_destructor_get, symbol_destructor_location_get,
7234 symbol_printer_get, symbol_printer_location_get): New functions to
7235 compute the appropriate %destructor and %printer for a symbol.
7236 (default_destructor_set, default_printer_set): New functions to set the
7237 default %destructor and %printer.
7238 * src/symtab.h: Prototype all those new functions.
7239 * tests/actions.at (Default %printer and %destructor): New test to
7240 check that the right %printer and %destructor are called, that they're
7241 not called for $end, and that $$ and @$ work correctly.
7242 (Default %printer and %destructor for user-declared end token): New
7243 test to check that the default %printer and %destructor are called for
7244 a user-declared end token.
7245 * tests/input.at (Default %printer and %destructor redeclared, Unused
7246 values with default %destructor): New tests to check related grammar
7247 warnings and errors.
7248
72492006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7250
7251 Clean up handling of %destructor for the end token (token 0).
7252 Discussed starting at
7253 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7254 and
7255 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7256
7257 Make the skeletons consistent in how they pop the end token and invoke
7258 its %destructor.
7259 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7260 state, which has token number 0, since this would invoke the
7261 %destructor for the end token.
7262 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7263 until after shifting the end token, or else it won't be popped.
7264 * data/yacc.c (yyparse): Likewise.
7265
7266 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7267 it's the end token. Upon termination, destroy an unshifted lookahead
7268 even when it's the end token.
7269 * data/lalr1.cc (yy::parser::parse): Likewise.
7270 * data/yacc.c (yyparse): Likewise.
7271
7272 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7273 value warnings for the end token when the user gives the end token a
7274 %destructor.
7275
7276 * tests/actions.at (Printers and Destructors): Test all the above.
7277
72782006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7279
7280 Update to latest gnulib and gettext versions.
7281 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7282 Add fopen-safer.
7283 (gnulib_files): Add m4/warning.m4. Don't worry about files
7284 overwritten by autopoint.
7285 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7286 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7287 rejects them.
7288 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7289 so that we can remove the intl files at a better time.
7290 (intl_files_to_remove): Remove aclocal.m4, since it gets
7291 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7292 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7293 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7294 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7295 Remove datarootdir hack; no longer needed.
7296 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7297 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7298 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7299 strdup.h.
7300 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7301 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7302
73032006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7304
7305 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7306 it with --assume-autoconf='latest-stable'.
7307
73082006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7309
7310 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7311 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7312 YYSTYPE' and `{'.
7313 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7314 those from muscle_tab.c since the old ones are misleading.
7315
73162006-07-13 Akim Demaille <akim@epita.fr>
7317
7318 Support %define "KEY" {VALUE}.
7319 * src/scan-code.h, src/scan-code.l (translate_action)
7320 (translate_rule_action, translate_symbol_action, translate_code):
7321 Return char *, not const char *.
7322 * src/parse-gram.y (declaration): Rename as...
7323 (prologue_declaration): this.
7324 (string_content): Remove this nonterminal, use STRING.
7325 (braceless, content, content.opt): New nonterminal.
7326 Use them.
7327 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7328 as value.
7329 * src/scan-gram.l (getargs.h): Don't include it.
7330
73312006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7332
7333 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7334 rather than a for-loop that declares a local bool variable. This
7335 should work around a compatibility problem with a Cray x1e C++
7336 compiler reported by Hung Nguyen in
7337 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7338 The for-loop was introduced in the 2004-11-17 change but I don't
7339 know why it was needed.
7340
73412006-07-12 Akim Demaille <akim@epita.fr>
7342
7343 * data/c.m4: Comment changes.
7344
73452006-07-10 Akim Demaille <akim@lrde.epita.fr>
7346
7347 * src/complain.c (error_message, ERROR_MESSAGE): New.
7348 To factor...
7349 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7350 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7351
73522006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7353
7354 * NEWS: Instead of %union, you can define and use your own union type
7355 YYSTYPE if your grammar contains at least one <type> tag.
7356 Your YYSTYPE need not be a macro; it can be a typedef.
7357 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7358 (Union Decl, Decl Summary): Document this.
7359 * data/glr.c (YYSTYPE): Implement this.
7360 * data/glr.cc (YYSTYPE): Likewise.
7361 * data/lalr1.cc (YYSTYPE): Likewise.
7362 * data/yacc.c (YYSTYPE): Likewise.
7363 * src/output.c (prepare): Output tag_seen_flag.
7364 * src/parse-gram.y (declaration, grammar_declaration):
7365 Use 'union_seen' rather than 'typed' to determine whether
7366 %union has been seen, since grammars can now be typed without
7367 %union.
7368 (symbol_declaration, type.opt, symbol_def):
7369 Keep track of whether a tag has been seen.
7370 * src/reader.c (union_seen, tag_seen): New vars.
7371 (typed): remove.
7372 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7373 * src/scan-code.l (untyped_var_seen): New variable.
7374 (handle_action_dollar): Adjust to above changes.
7375 (handle_action_dollar, handle_action_at):
7376 Improve overflow checking for outlandish numbers.
7377 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7378 avoid new diagnostics generated by above changes.
7379 * tests/regression.at (YYSTYPE typedef): Add test to check
7380 for type tags without %union.
7381
7382 * src/symlist.c (symbol_list_length): Return int, not unsigned
7383 int, since callers expect int. This may need to get revisited
7384 once we have proper integer overflow checking.
7385
7386 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7387 object is now static.
7388
7389 * src/getargs.c (flags_argmatch): Return void, not int,
7390 to pacify ./configure --enable-gcc-warnings.
7391
7392 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7393 since last_string is already defined to FLEX_PREFIX (last_string).
7394
73952006-07-09 Akim Demaille <akim@lrde.epita.fr>
7396
7397 Implement --warnings/-W.
7398 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7399 replaced by...
7400 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7401 Adjust callers.
7402 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7403 (warnings_args, warnings_types): New.
7404 (getargs, short_options, long_options): Accept -W/--warnings.
7405 Sort the options by alphabetical order, upper case letter right
7406 before its lower case.
7407
74082006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7409
7410 Change %merge result type clash warnings to errors. Discussed at
7411 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7412 * src/reader.c (record_merge_function_type): Use complain_at.
7413 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7414 declared later): Update test case results.
7415
74162006-07-09 Akim Demaille <akim@lrde.epita.fr>
7417
7418 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7419 to be in alphabetical order.
7420 (trace_args): Spelling fixes.
7421
74222006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7423
7424 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7425 so they don't collide with user-defined macros.
7426 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7427 this was never guaranteed, and now that we're using gnulib stdint,
7428 which defines int_fast16_t to long int, the problem is exposed.
7429
74302006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7431
7432 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7433 need the full POSIX semantics (and weren't implementing them
7434 anyway).
7435
7436 Adjust to Autoconf 2.60 and today's gnulib.
7437 * bootstrap (gnulib_modules): Add stdint.
7438 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7439 no longer copies it.
7440 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7441 since stdint needs the former and wcwidth (which is now required
7442 by mbswidth) needs the latter.
7443 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7444 work around a compatibility glitch between gettext 0.14.6 and
7445 Autoconf 2.60.
7446 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7447 Do not check for uintptr_t, since new stdint module does the right
7448 thing.
7449 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7450 Add stdint.h, stdint_.h, wcwidth.h.
7451 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7452 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7453 stdint.m4, wchar_t.m4, wcwidth.m4.
7454 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7455 usual order for ../lib/*.h files.
7456 (file_name_split): Use last_component, not base_name, to adjust
7457 to gnulib changes.
7458 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7459 for ../lib/*.h files.
7460 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7461 Define unconditionally, since we now assume the stdint module.
7462 * src/scan-skel.l: Include <dirname.h>.
7463 (BASE_QPUTS): Use last_component, not base_name.
7464 * src/system.h: Include <unlocked-io.h> in the usual order
7465 for ../lib/*.h files. Include <stdint.h> unconditionally,
7466 since we now use the stdint module.
7467 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7468 HAVE_UINTPTR_T, since we now use the stdint module.
7469 (base_name): Remove decl, since files now include <dirname.h>
7470 to get the decl.
7471
74722006-07-08 Akim Demaille <akim@lrde.epita.fr>
7473
7474 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7475 New, default to 1.
7476 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7477 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7478 default.
7479 * tests/calc.at: Adjust.
7480
74812006-07-08 Akim Demaille <akim@lrde.epita.fr>
7482
7483 * data/c.m4 (b4_basename): New.
7484 (b4_syncline): Also output the location of its invocation (from
7485 the skeleton).
7486 (b4_user_action, b4_define_user_action, b4_user_actions)
7487 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7488 (b4_user_stype): New.
7489 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7490
74912006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7492
7493 In the grammar file, the first column is 1 not 0 on the first line as
7494 on every other line.
7495 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7496 * tests/input.at (Torturing the Scanner): Update output.
7497
7498 * src/scan-gram.l (scanner_cursor): Declare it static.
7499
75002006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7501
7502 In warnings, say "previous declaration" rather than "first
7503 declaration".
7504 * src/symtab.c (redeclaration): Do that here.
7505 * src/reader.c (record_merge_function_type): In the case of a result
7506 type clash, report the previous declaration rather than the very first
7507 one in the grammar file.
7508 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7509 declared later): Add a third declaration to check this behavior.
7510 * tests/input.at (Incompatible Aliases): Update output.
7511
75122006-06-27 Akim Demaille <akim@epita.fr>
7513
7514 * doc/Doxyfile.in: New.
7515 * doc/Makefile.am: Use it.
7516 * src/lalr.h, src/symtab.h: Initial doxygenation.
7517
75182006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7519
7520 Don't miss %merge result type warnings just because the LHS types are
7521 declared after the %merge. This continues the effort of the previous
7522 patch.
7523 * src/reader.c (get_merge_function): Don't set the merger type yet.
7524 (record_merge_function_type): New function for setting the merger type
7525 and checking for clashes.
7526 (grammar_current_rule_merge_set): Set the location of the %merge for
7527 the current rule.
7528 (packgram): Invoke record_merge_function_type for each rule now that
7529 all symbol type declarations have been parsed.
7530 * src/reader.h (merger_list.type_declaration_location): New member
7531 storing the location of the first %merge from which the type for this
7532 merging function was derived.
7533 * src/symlist.h (symbol_list.merger_declaration_location): New member
7534 storing the location of a rule's %merge, if any.
7535 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7536 declared later): New test to catch the error fixed by the above patch.
7537
75382006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7539
7540 Get action warnings (grammar_rule_check) right even when symbol
7541 declarations appear after the rules. Discussed at
7542 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7543 and
7544 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7545 Don't mistake the type of $$ in a midrule to be that of its parent
7546 rule's $$.
7547 * src/reader.c (grammar_current_rule_end): Don't invoke
7548 grammar_rule_check yet since not all symbol declarations may have been
7549 parsed yet.
7550 (grammar_midrule_action): Likewise.
7551 Don't record whether the midrule's $$ has been used yet since actions
7552 haven't been translated yet.
7553 Record the midrule's parent rule and its RHS index within the parent
7554 rule.
7555 (grammar_current_rule_action_append): Don't translate the action yet
7556 since not all symbol declarations may have been parsed yet and, thus,
7557 warnings about types for $$, $n, @$, and @n can't be reported yet.
7558 (packgram): Translate the action and invoke grammar_rule_check now that
7559 all symbol declarations have been parsed.
7560 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7561 after parsing the entire grammar file, the symbol list here in the case
7562 of a midrule is actually the midrule's empty RHS, so reference its
7563 parent rule's RHS where necessary.
7564 On the other hand, now that you can already know it's a midrule, you
7565 aren't forced to think $$ has the same type as its parent rule's $$.
7566 (handle_action_at): In the case of a midrule, reference the parent rule
7567 where necessary.
7568 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7569 members.
7570 (symbol_list_length): Now that this is invoked after all rules have
7571 been parsed, a NULL symbol (rather than a NULL symbol list node)
7572 terminates a rule. symbol_list_print already does this correctly.
7573 * src/symlist.h (symbol_list.midrule_parent_rule,
7574 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7575 remember their relationships with their parents.
7576 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7577 fixed by the above patch.
7578 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7579 implementing...
7580 (Unused values): ... this old test case and...
7581 (Unused values before symbol declarations): ... this new test case.
7582 This one is the same as `Unused values' except that all symbol
7583 declarations appear after the rules in order to catch the rest of the
7584 errors fixed by the above patch.
7585
75862006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7587
7588 More cleanup.
7589 * src/reader.c (current_rule): Declare it static since it's no longer
7590 used outside this file.
7591 (grammar_current_rule_action_append): Remove redundant arguments from
7592 translate_rule_action invocation.
7593 * src/reader.h (current_rule): Remove this unused extern.
7594 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7595 * src/scan-code.l (translate_rule_action): Likewise.
7596
75972006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7598
7599 Clean up yesterday's patch.
7600 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7601 to...
7602 * src/reader.c (grammar_current_rule_action_append): ... here for
7603 consistency with grammar_current_rule_symbol_append.
7604 * tests/regression.at (Braced code in declaration in rules section):
7605 Make yyerror and yylex static as usual.
7606
76072006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7608
7609 Fix bug that mistakes braced code in a declaration in the rules section
7610 to be a rule action. Mentioned at
7611 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7612 * src/scan-gram.l: Move midrule action detection from the start of the
7613 scanning of any braced code to...
7614 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7615 action. For readability, use $2 and @2 rather than the equivalent
7616 global variables.
7617 * tests/regression.at (Braced code in declaration in rules section):
7618 New test to catch the error fixed by the above patch.
7619
7620 Work on code readability some.
7621 * src/scan-code.l (current_rule): Get rid of this misleading and
7622 redundant declaration: it's actually extern'ed in reader.h.
7623 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7624 translate_action): Add a rule argument and use it instead of the global
7625 current_rule.
7626 (translate_rule_action): This already receives current_rule through an
7627 argument, so pass it on to translate_action instead of assigning
7628 current_rule to current_rule.
7629 (translate_symbol_action, translate_code): Pass rule = NULL to
7630 translate_action.
7631
76322006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7633
7634 Rename %before-definitions to %start-header and %after-definitions to
7635 %end-header. Don't use these declarations to separate pre-prologue
7636 blocks from post-prologue blocks. Add new order-independent
7637 declarations %before-header and %after-header as alternatives to the
7638 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7639 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7640 * NEWS (2.3+): Update for these changes.
7641 * data/glr.c (b4_before_definitions): Update to...
7642 (b4_start_header): ... this.
7643 (b4_after_definitions): Update to...
7644 (b4_end_header): ... this.
7645 * data/glr.cc: Likewise.
7646 * data/lalr1.cc: Likewise.
7647 * data/yacc.c: Likewise.
7648 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7649 prologue blocks with %*-header declarations.
7650 (Calc++ Parser): Likewise.
7651 (Decl Summary): Update names.
7652 (Table of Symbols): Update description.
7653 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7654 (PERCENT_END_HEADER): ... this.
7655 (PERCENT_BEFORE_DEFINITIONS): Update to...
7656 (PERCENT_START_HEADER): ... this.
7657 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7658 (declaration): Update token names and m4 macro names.
7659 When parsing %end-header and %start-header, invoke translate_code
7660 before muscle_code_grow, and no longer set global booleans to remember
7661 whether these declarations have been seen.
7662 Parse new %after-header and %before-header.
7663 * src/reader.c (before_definitions, after_definitions): Remove.
7664 (prologue_augment): Accept a new bool argument to specify whether to
7665 augment the pre-prologue or post-prologue.
7666 * src/reader.h (before_definitions, after_definitions): Remove these
7667 extern's.
7668 (prologue_augment): Add new bool argument.
7669 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7670 (PERCENT_END_HEADER): ... this.
7671 (PERCENT_BEFORE_DEFINITIONS): Update to...
7672 (PERCENT_START_HEADER): ... this.
7673 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7674 * tests/actions.at (Printers and Destructors): Update names.
7675
76762006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7677
7678 Add comparison operators for C++ location classes. Discussed at
7679 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7680 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7681 declaration indicating whether filename_type has an operator==. If
7682 filename_type is `std::string', it defaults to `1', `0' otherwise.
7683 * data/location.cc: Iff b4_define_location_comparison is `1', add
7684 operator== and operator!= for class position and for class location.
7685
7686 Some minor fixes.
7687 * src/scan-action.l: Remove unused file.
7688 * src/symtab.c (symbol_printer_set): Use printer_location not
7689 destructor_location.
7690 * src/symtab.h (struct symbol): Replace incorrect source comment for
7691 printer members.
7692 * tests/input.at (Incompatible Aliases): Update output with correct
7693 printer location.
7694
76952006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7696
7697 Don't put the pre-prologue in the header file. For the yacc.c code
7698 file and the glr.c header and code files, move the pre-prologue before
7699 the token definitions. Add new %before-definitions and
7700 %after-definitions to declare code that will go in both the header file
7701 and code file. Discussed at
7702 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7703 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7704 and
7705 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7706 * NEWS (2.3+): Describe these changes.
7707 * data/glr.c (b4_pre_prologue): Move from within to before...
7708 (b4_shared_declarations): ... this.
7709 Add new b4_before_definitions before b4_token_enums.
7710 Add new b4_after_definitions at the end.
7711 * data/glr.cc (b4_pre_prologue): Replace with...
7712 (b4_before_definitions): ... this in the header file.
7713 (b4_after_definitions): New near the end of the header file.
7714 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7715 code file right before including the header file.
7716 (b4_before_definitions): New in the previous position of
7717 b4_pre_prologue in the header file.
7718 (b4_after_definitions): New near the end of the header file.
7719 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7720 (b4_token_enums_defines): In the code file, move to right before
7721 YYSTYPE for consistency with the header file.
7722 (b4_before_definitions): New right before b4_token_enums_defines in
7723 both the header and code file.
7724 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7725 header and code file.
7726 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7727 of prologues for %union dependencies.
7728 (Decl Summary): In %defines description, mention the effect of
7729 %before-definitions and %after-definitions on the header file.
7730 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7731 than in the pre-prologue so that make check succeeds.
7732 (Table of Symbols): Add entries for %before-definitions and
7733 %after-definitions.
7734 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7735 %before-definitions.
7736 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7737 (declaration): Parse those declarations and append to
7738 b4_before_definitions and b4_after_definitions, respectively.
7739 * src/reader.c (before_definitions, after_definitions): New bools to
7740 track whether those declarations have been seen.
7741 (prologue_augment): Add to the post-prologue if %union,
7742 %before-definitions, or %after-definitions has been seen.
7743 * src/reader.h (before_definitions, after_definitions): New extern's.
7744 * src/scan-gram.l: Scan the new declarations.
7745 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7746 prologue block in a %before-definitions or a %after-definitions based
7747 on whether the %union is declared.
7748 * tests/regression.at (Early token definitions with --yacc, Early token
7749 definitions without --yacc): Move tests for token definitions into the
7750 post-prologue since token names are no longer defined in the
7751 pre-prologue.
7752
77532006-06-20 Akim Demaille <akim@epita.fr>
7754
7755 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7756 (symbol_get): Use it.
7757 * src/parse-gram.y: Use it.
7758
77592006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7760
7761 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7762 build succeeds when configured with --enable-gcc-warnings.
7763
77642006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7765
7766 * src/parse-gram.y (char_name): New function.
7767 (CHAR, STRING, string_content): For %printer, properly escape.
7768 (ID): Prefer fputs to fprintf.
7769 (id): Reindent to be consistent with other rules.
7770 Properly quote char.
7771
7772 The Translation Project changed its way of publishing translations
7773 to maintainers. I haven't received any responses to my request
7774 for supporting the old way, or for documenting the new way. I
7775 have modified 'bootstrap' to use screen scraping
7776 (in this case, HTML scraping). This is unreliable and inelegant,
7777 but I don't see any better way. Yuck.
7778 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7779 (get_translations): New function, which uses HTML scraping to
7780 deduce locations of latest translations.
7781 Use this function to grab both bison and bison-runtime .po files.
7782 Don't bother priming the pump for the runtime-po domain any more,
7783 as it's now translated better than bison is.
7784
77852006-06-19 Akim Demaille <akim@epita.fr>
7786
7787 * src/scan-gram.l: No longer "parse" things after `%union' until
7788 `{'. Rather, return a single "%union" token.
7789 No longer make symbols: return strings, and leave the conversion
7790 to symbols to the parser.
7791 (SC_PRE_CODE, token_type): Remove.
7792 * src/parse-gram.y (%union): New field `character'.
7793 Sort tokens.
7794 (CHAR): New token.
7795 (ID, ID_COLON): Now that the scanner no longer makes them
7796 identifiers, adjust all uses to invoke symbol_get.
7797 (id_colon): New, wraps the conversion from string to symbol.
7798 (%union): Accept a possible union_name.
7799 (symbol): Now can be a char.
7800 * data/c.m4 (b4_union_name): Leave a default value.
7801 * data/glr.c, data/yacc.c: Use it.
7802
78032006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7804
7805 For associating token numbers with token names for "yacc.c", don't use
7806 #define statements unless `--yacc' is specified; always use enum
7807 yytokentype. Most important discussions start at:
7808 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7809 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7810 and
7811 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7812 * NEWS (2.3+): Mention.
7813 * data/c.m4 (b4_yacc_if): New.
7814 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7815 token #define's.
7816 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7817 on token name definitions.
7818 * src/getargs.c (usage): Capitalize `Yacc' in English.
7819 * src/output.c (prepare): Define b4_yacc_flag.
7820 * tests/regression.at (Early token definitions): Test that tokens names
7821 are defined before the pre-prologue not just before the post-prologue.
7822 Remove this test case and copy to...
7823 (Early token definitions with --yacc): ... this to test #define's.
7824 (Early token definitions without --yacc): ... and this to test enums.
7825
78262006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7827
7828 * NEWS: Reword the post-2.3 change to not be so optimistic about
7829 removing the old "look-ahead" spelling.
7830 Update previous look-ahead/lookahead change reports.
7831 * REFERENCES: look-ahead -> lookahead (since that's
7832 what he actually wrote).
7833 * doc/refcard.tex: look ahead -> lookahead,
7834 look-ahead -> lookahead
7835
78362006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7837
7838 For consistency, use `lookahead' instead of `look-ahead' or
7839 `look_ahead'. Discussed starting at
7840 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7841 and then at
7842 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7843 * NEWS: For the next release, note the change to `--report'.
7844 * TODO, doc/bison.1: Update English.
7845 * doc/bison.texinfo: Update English.
7846 (Understanding Your Parser, Bison Options): Document as
7847 `--report=lookahead' rather than `--report=look-ahead'.
7848 * src/conflicts.c: Update English in comments.
7849 (lookahead_set): Rename from look_ahead_set.
7850 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7851 (resolve_sr_conflict): Rename local look_ahead_tokens to
7852 lookahead_tokens, and update other uses.
7853 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7854 count_rr_conflicts, conflicts_free): Update uses.
7855 * src/getargs.c (report_args): Move "lookahead" before alternate
7856 spellings.
7857 (report_types): Update uses.
7858 (usage): For `--report' usage description, state `lookahead' spelling
7859 rather than `look-ahead'.
7860 * src/getargs.h (report.report_lookahead_tokens): Rename from
7861 report_look_ahead_tokens.
7862 * src/lalr.c: Update English in comments.
7863 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7864 (state_lookahead_tokens_count): Rename from
7865 state_look_ahead_tokens_count.
7866 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7867 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7868 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7869 Update other uses.
7870 Update English in output.
7871 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7872 * src/print.c: Update English in comments.
7873 (lookahead_set): Rename from look_ahead_set.
7874 (print_reduction): Rename argument lookahead_token from
7875 look_ahead_token.
7876 (print_core, state_default_rule, print_reductions, print_results):
7877 Update uses.
7878 * src/print_graph.c: Update English in comments.
7879 (print_core): Update uses.
7880 * src/state.c: Update English in comments.
7881 (reductions_new): Update uses.
7882 (state_rule_lookahead_tokens_print): Rename from
7883 state_rule_look_ahead_tokens_print, and update other uses.
7884 * src/state.h: Update English in comments.
7885 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7886 (state_rule_lookahead_tokens_print): Rename from
7887 state_rule_look_ahead_tokens_print.
7888 * src/tables.c: Update English in comments.
7889 (conflict_row, action_row): Update uses.
7890 * tests/glr-regression.at
7891 (Incorrect lookahead during deterministic GLR,
7892 Incorrect lookahead during nondeterministic GLR): Rename
7893 print_look_ahead to print_lookahead.
7894 * tests/torture.at: Update English in comments.
7895 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7896 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7897 (Many lookahead tokens): Update uses.
7898 * data/glr.c: Update English in comments.
7899 * lalr1.cc: Likewise.
7900 * yacc.c: Likewise.
7901 * src/conflicts.h: Likewise.
7902 * src/lalr.h: Likewise.
7903 * src/main.c: Likewise.
7904 * src/output.c: Likewise.
7905 * src/parse-gram.c: Likewise.
7906 * src/tables.h: Likewise.
7907 * tests/calc.at: Likewise.
7908
79092006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7910
7911 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7912
79132006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7914
7915 * TODO: Add request from Nelson H. F. Beebe to be able to install
7916 Bison without installing the yacc script.
7917
79182006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7919
7920 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7921 and yytext if they're already #define'd.
7922 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7923 * src/scan-code-c.c: ... here.
7924 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7925 <config.h>.
7926
79272006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7928
7929 Get Bison to build again when configured with --enable-gcc-warnings.
7930 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7931 missing #include's.
7932 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7933 loc argument as it shadows a global.
7934 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7935 invocation.
7936
7937 * src/.cvsignore: Add scan-code.c.
7938
79392006-06-07 Akim Demaille <akim@epita.fr>
7940
7941 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7942 to...
7943 * src/scan-code.l: here.
7944 * tests/input.at (Torturing the Scanner): Fix another location
7945 error.
7946
79472006-06-07 Akim Demaille <akim@epita.fr>
7948
7949 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7950
79512006-06-06 Akim Demaille <akim@epita.fr>
7952
7953 Extract the parsing of user actions from the grammar scanner.
7954 As a consequence, the relation between the grammar scanner and
7955 parser is much simpler. We can also split "composite tokens" back
7956 into simple tokens.
7957 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7958 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7959 rename as...
7960 * src/location.h, src/location.c (add_column_width)
7961 (location_compute): these.
7962 Fix the column count: the initial column is 0.
7963 (location_print): Be robust to ending column being 0.
7964 * src/location.h (boundary_set): New.
7965 * src/main.c: Adjust to scanner_free being renamed as
7966 gram_scanner_free.
7967 * src/output.c: Include scan-code.h.
7968 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7969 Use boundary_set.
7970 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7971 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7972 which is now, again, a separate token.
7973 Adjust all dependencies.
7974 Whereever actions with $ and @ are used, use translate_code.
7975 (action): Remove this nonterminal which is now useless.
7976 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7977 (grammar_current_rule_action_append): Use translate_code.
7978 (packgram): Bound check ruleno, itemno, and rule_length.
7979 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7980 (last_string, last_braced_code_loc, max_left_semantic_context)
7981 (scanner_initialize, scanner_free, scanner_last_string_free)
7982 (gram_out, gram_lineno, YY_DECL_): Move to...
7983 * src/scan-gram.h: this new file.
7984 (YY_DECL): Rename as...
7985 (GRAM_DECL): this.
7986 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7987 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7988 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7989 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7990 Move these declarations, and...
7991 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7992 these to...
7993 * src/flex-scanner.h: this new file.
7994 * src/scan-gram.l (rule_length, rule_length_overflow)
7995 (increment_rule_length): Remove.
7996 (last_braced_code_loc): Rename as...
7997 (gram_last_braced_code_loc): this.
7998 Adjust to the changes of the parser.
7999 Move all the handling of $ and @ into...
8000 * src/scan-code.l: here.
8001 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8002 (handle_action_dollar, handle_action_at): Move to...
8003 * src/scan-code.l: here.
8004 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8005 scan-code.h, scan-code-c.c, scan-gram.h.
8006 (EXTRA_bison_SOURCES): Add scan-code.l.
8007 (BUILT_SOURCES): Add scan-code.c.
8008 (yacc): Be robust to white spaces.
8009
8010 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8011 * tests/regression.at: Adjust the column numbers.
8012 * tests/regression.at: Adjust the error message.
8013
80142006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8015
8016 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8017 Use Akim's wording from
8018 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8019
80202006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8021
8022 Between Bison releases, manually append `+' to the previous Bison
8023 release number, and use that as a signal to automatically print the
8024 ChangeLog's CVS Id keyword from --version. Discussed starting at
8025 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8026 * ChangeLog: Add Id header.
8027 * configure.ac (AC_INIT): Append `+' to `2.3'.
8028 * src/.cvsignore: Add revision.c.
8029 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8030 (BUILT_SOURCES): Add revision.c.
8031 (revision.c): New target rule. This file defines a new global variable
8032 named revision. It initializes it with either the Id from ChangeLog
8033 or, if VERSION doesn't contain `+', with the empty string.
8034 * src/getargs.c (version): Print the value of revision.
8035 * src/revision.h: Extern revision.
8036
80372006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8038
8039 * NEWS: Version 2.3.
8040 * configure.ac (AC_INIT): Likewise.
8041
80422006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8043
8044 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8045 with no arguments, not as an object-like macro. This is for
8046 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8047 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8048 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8049 Document this.
8050
80512006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8052
8053 * src/getargs.c (usage): Back out yesterday's modification of the
8054 --help output so that we don't have to wait for translation before
8055 releasing 2.3.
8056
80572006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8058
8059 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8060 Problem reported by Akim Demaille.
8061
80622006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8063
8064 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8065
80662006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8067
8068 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8069 generated source code. Problem reported by Frans Englich in
8070 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8071
80722006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8073
8074 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8075 shell, not within 'make', so that 'make' by an ordinary builder
8076 (using GNU make) does not worry about configuring gzip. This also
8077 works around a bug reported independently by Keith Thompson and by
8078 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8079 stderr rather than stdout, messing up the build logs.
8080
80812006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8082
8083 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8084 to make sure that YYID will never be unused. This fixes a 'make
8085 maintainer-check' failure caused by the recent changes to the 'Trivial
8086 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8087 not used.
8088 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8089
80902006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8091
8092 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8093 state before an empty RHS is always resolved here. Only the location
8094 of that state is guaranteed to be resolved, and that's enough. This
8095 fixes the remaining bug reported by Derek M. Jones in
8096 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8097 * tests/glr-regression.at (Uninitialized location when reporting
8098 ambiguity): Test the above case.
8099 Also, the embedded comments in this test case claim it checks the case
8100 of an empty RHS that has inherited the initial location. However, the
8101 corresponding LHS was already resolved, so yyresolveLocations didn't
8102 actually have reason to modify it. Fix this by forcing
8103 nondeterministic operation at the beginning of the parse.
8104
81052006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8106
8107 * data/c.m4 (b4_yy_symbol_print_generate):
8108 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8109 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8110 of the bugs reported today by Derek M Jones in
8111 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8112 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8113 defined to be a type name without parens or brackets.
8114 (Location Type): Similarly for YYLTYPE.
8115 * tests/regression.at (Trivial grammars): Put in a test for this
8116 bug that will be caught by 'make maintainer-check' (though not,
8117 alas, by 'make check' unless your compiler is picky).
8118
81192006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8120
8121 * NEWS: Version 2.2.
8122 * configure.ac (AC_INIT): Likewise.
8123
81242006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8125
8126 * data/glr.c (yyreportTree): Make room in yystates for the state
8127 preceding the RHS. This fixes the segmentation fault reported by Derek
8128 M. Jones in
8129 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8130 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8131 to the user. Reported for yyreportTree by Derek M. Jones later in the
8132 same thread.
8133 * THANKS: Add Derek M. Jones.
8134 Update my email address.
8135 Fix typo in Steve Murphy's name.
8136
81372006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8138
8139 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8140 checking against YYLAST that caused the parser to miss a potential
8141 alternative in its diagnostic.
8142 Problem reported by Maria Jose Moron Fernandez in
8143 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8144 * data/lalr1.cc (yysyntax_error_): Likewise.
8145 * data/yacc.c (yysyntax_error): Likewise.
8146 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8147 tokens, in case we run into an older C compiler.
8148 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8149 Use them to check for the off-by-one error fixed above.
8150
8151 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8152 YYSIZE_T, not size_t.
8153 * tests/regression.at (Trivial grammars): New test, to catch
8154 the error fixed by the above patch.
8155
81562006-05-14 Akim Demaille <akim@lrde.epita.fr>
8157
8158 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8159 scheme.
8160 Reported by Steve Murphy.
8161
81622006-05-14 Akim Demaille <akim@lrde.epita.fr>
8163
8164 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8165 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8166
81672006-05-14 Akim Demaille <akim@lrde.epita.fr>
8168
8169 Implement --trace=m4.
8170 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8171 * src/output.c (output_skeleton): When set, pass -dV to m4.
8172
8173 Factor the handling of flags in m4.
8174 * src/output.c (prepare): Rename the muscle names debug, defines,
8175 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8176 * data/c.m4: Adjust.
8177 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8178 Use b4_define_flag_if to define other b4_FLAG_if macros.
8179 (b4_location_if): As a consequence, rename as...
8180 (b4_locations_if): this, for consistency.
8181 Adjust all the skeletons.
8182
81832006-05-14 Akim Demaille <akim@lrde.epita.fr>
8184
8185 * etc/bench.pm: Shorten bench names.
8186
81872006-05-14 Akim Demaille <akim@lrde.epita.fr>
8188
8189 * src/output.h, src/output.c (error_verbose): Move to...
8190 * src/getargs.h, src/getargs.c: here.
8191 Sort the flags.
8192 Adjust dependencies.
8193
81942006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8195
8196 * data/c.m4 (b4_copyright): Put the special exception for Bison
8197 skeletons here, so we don't have to put it in each skeleton. All
8198 uses changed. Suggested by Akim Demaille. Also, wrap the
8199 copyright notice, in case it is longer than 80 columns. Replace
8200 comma by newline after title.
8201
82022006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8203
8204 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8205 incompatibility, not a bug. Mention that it wasn't fixed as of
8206 flex 2.5.33.
8207
82082006-05-11 Akim Demaille <akim@lrde.epita.fr>
8209
8210 * examples/extexi: Enforce the precedence of concatenation over
8211 >>.
8212 Reported by Tommy Nordgren.
8213
82142006-05-11 Akim Demaille <akim@lrde.epita.fr>
8215
8216 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8217 with the member "token".
8218 Reported by Martin Nylin.
8219
82202006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8221
8222 * data/glr.c: Switch to Bison 2.2 special-exception language in
8223 the copyright notice. Use more-regular format for titles and
8224 copyright notices.
8225 * data/glr.cc: Likewise.
8226 * data/location.cc: Likewise.
8227 * data/yacc.cc: Likewise.
8228 * doc/bison.texinfo (Conditions): Document this.
8229 * NEWS: likewise. Upgrade version to 2.2.
8230
82312006-04-27 Akim Demaille <akim@lrde.epita.fr>
8232
8233 * data/glr.cc: Remove dead code.
8234
82352006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8236
8237 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8238 that variable and the line breaks the bootstrap. Problem reported
8239 by Juan M. Guerrero.
8240
82412006-04-24 Akim Demaille <akim@lrde.epita.fr>
8242
8243 * doc/bison.texinfo (Multiple start-symbols): New.
8244
82452006-04-24 Akim Demaille <akim@lrde.epita.fr>
8246
8247 * etc/README, etc/bench.pl: New.
8248
82492006-04-03 Akim Demaille <akim@lrde.epita.fr>
8250
8251 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8252 rule.
8253 Reported by Mickael Labau.
8254 * tests/input.at (Torturing the Scanner): Test it.
8255
82562006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8257
8258 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8259 Problem reported by Bob Rossi.
8260
82612006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8262
8263 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8264 and didn't really work.
8265 For the index, use @ifnotinfo, not @iftex.
8266 Minor cleanups of spacing and terminology.
8267
82682006-03-12 Akim Demaille <akim@lrde.epita.fr>
8269
8270 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8271 of AT_NAME_PREFIX when %name-prefix is not used.
8272
82732006-03-12 Akim Demaille <akim@lrde.epita.fr>
8274
8275 Apply --prefix to C++ skeletons too: they change the namespace.
8276 The test suite already exercize these cases.
8277 * data/c++.m4 (b4_namespace): New.
8278 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8279 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8280 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8281 * doc/bison.texinfo: Document it.
8282 (Option Cross Key): Use @multitable in all formats. It looks
8283 nicer, even in TeX outputs.
8284 (Rules): Use the same code whatever the output type is.
8285 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8286 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8287 * tests/calc.at: Use it, instead of hard coding `yy'.
8288
82892006-03-10 Akim Demaille <akim@lrde.epita.fr>
8290
8291 * TODO: Remove dead items.
8292
82932006-03-10 Akim Demaille <akim@lrde.epita.fr>
8294
8295 * doc/FAQ: Remove, merged into...
8296 * doc/bison.texinfo (FAQ): this.
8297 * doc/Makefile.am (EXTRA_DIST): Adjust.
8298
82992006-03-10 Akim Demaille <akim@lrde.epita.fr>
8300
8301 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8302 even if empty.
8303 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8304 * doc/bison.texinfo (Calc++ Scanner): Use it.
8305
83062006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8307
8308 Fix two nits reported by twlevo, plus one more that I discovered.
8309
8310 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8311 this is the usual Bison style.
8312 * src/location.h (location_print): Likewise.
8313
8314 * src/reader.h (token_name): Likewise.
8315
83162006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8317
8318 Fix some nits reported by twlevo.
8319 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8320 and "POSIX". Use more-modern syntax for URLs. Mention C++
8321 and ask for Java. Don't hardwire OS version numbers. Add
8322 copyright notice.
8323 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8324 * src/conflicts.c (solved_conflicts_obstack): Now static.
8325
83262006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8327
8328 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8329 page. Say "you can use it" not "you may use it" as on the web page;
8330 we're describing capabilities not granting permission.
8331
83322006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8333
8334 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8335 shadowing warnings. Use usual patter for iterating through RHS.
8336 * tests/glr-regression.at
8337 (Uninitialized location when reporting ambiguity):
8338 Modify yylex so that it uses its argument, rather than trying
8339 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8340 const char -> char const.
8341
8342 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8343 Don't use tabs inside commands; it messes up 'ps'.
8344 Problem reported by twlevo.
8345
83462006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8347
8348 * tests/glr-regression.at (Uninitialized location when reporting
8349 ambiguity): New test case.
8350 * data/glr.c (yyresolveLocations): New function, which uses
8351 YYLLOC_DEFAULT.
8352 (yyresolveValue): Invoke yyresolveLocations before reporting an
8353 ambiguity.
8354 * doc/bison.texinfo (Default Action for Locations): Note
8355 YYLLOC_DEFAULT's usage for ambiguity locations.
8356 (GLR Semantic Actions): Cross-reference those notes.
8357
83582006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8359
8360 * tests/glr-regression.at (Leaked semantic values when reporting
8361 ambiguity): Remove unnecessary union and type declarations.
8362 (Leaked lookahead after nondeterministic parse syntax error): New test
8363 case.
8364 * data/glr.c (yyparse): Check for zero stacks remaining before
8365 attempting to shift the lookahead so that you don't lose it.
8366
83672006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8368
8369 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8370 * tests/glr-regression.at (Leaked semantic values when reporting
8371 ambiguity): New test case.
8372 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8373 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8374 now unnecessary yystackp parameter.
8375 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8376 destructors can be called.
8377
8378 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8379 in existing testcases.
8380
83812006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8382
8383 Don't leak semantic values for parent RHS when a user action cuts the
8384 parser, and clean up related code a bit.
8385 * tests/glr-regression.at (Leaked merged semantic value if user action
8386 cuts parse): Rename to...
8387 (Leaked semantic values if user action cuts parse): ... this. Add check
8388 for leaked parent RHS values.
8389 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8390 between an unresolved state (non-empty chain of semantic options) and
8391 an incomplete one (signaled by an empty chain).
8392 (yyresolveStates): Document the interface. Move all manipulation of a
8393 successfully or unsuccessfully resolved yyGLRState to...
8394 (yyresolveValue): ... here so that yyresolveValue always leaves a
8395 yyGLRState with consistent data and thus is easier to understand.
8396 Remove the yyvalp and yylocp parameters since they are always just
8397 taken from the yys parameter. When reporting a discarded merged value
8398 in debugging output, note that it is incompletely merged. Document the
8399 interface.
8400 (yyresolveAction): If resolving any of the RHS states fails, destroy
8401 them all rather than leaking them. Thus, as long as user actions are
8402 written to clean up the RHS correctly, yyresolveAction always cleans up
8403 the RHS of a semantic option. Document the interface.
8404
84052006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8406
8407 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8408 led to a segmentation fault in GNU Pascal. Problem reported
8409 by Waldek Hebisch.
8410
84112006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8412
8413 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8414 mid-rule action inside a nonterminal symbol in order to declare a
8415 destructor for its semantic value.
8416
84172006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8418
8419 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8420 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8421 __cplusplus && ! defined _STDLIB_H && !
8422 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8423 defined free))]: Include <stdlib.h> rather than rolling our own
8424 declarations of malloc and free, to avoid problems with
8425 incompatible declarations (using 'throw') C++'s stdlib.h. This
8426 should fix Debian bug 340012
8427 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8428 reported by Guillaume Melquiond.
8429
84302006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8431
8432 * NEWS: Clarify symbols versus types in unused-value warnings.
8433
8434 * configure.ac (AC_INIT): Bump version number.
8435
84362006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8437
8438 * NEWS: Version 2.1a.
8439 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8440 since C99 requires this.
8441
84422006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8443
8444 * m4/c-working.m4: New file.
8445 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8446
84472006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8448
8449 * Makefile.maint: Merge from coreutils.
8450
84512006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8452
8453 More portability fixes for problems summarized by Nelson H. F. Beebe.
8454
8455 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8456 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8457 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8458 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8459 messes up because C++ code is compiled in 32-bit mode but linked
8460 in 64-bit mode.
8461
84622006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8463
8464 More portability fixes for problems summarized by Nelson H. F. Beebe.
8465
8466 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8467 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8468
8469 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8470 nodist_PROGRAMS, since we don't need to actually compile the
8471 example if we're just doing a plain 'make'. This avoids bothering
8472 the installer unnecessarily about problems due to weird C++
8473 compilers.
8474
84752006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8476
8477 More portability fixes for problems summarized by Nelson H. F. Beebe.
8478
8479 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8480 than #include "...", and compile with -I'.'. The old method was
8481 not portable, according to Posix and the C standard, and it does
8482 not work with Sun C 5.7, where previous #line directives affect
8483 the working directory used in later #include "..." directives.
8484
84852006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8486
8487 Various DJGGP specific issues in /djgpp
8488
84892006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8490
8491 More portability fixes for problems summarized by Nelson H. F. Beebe.
8492
8493 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8494 '#include <map>' works and that you can apply ++ to iterators.
8495
84962006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8497
8498 Work around portability problems summarized by Nelson H. F. Beebe in
8499 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8500
8501 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8502 that '#include <string>' works.
8503
8504 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8505 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8506 "warning: sorry: semantics of inline function static data `const
8507 unsigned char translate_table[262]' are wrong (you'll wind up with
8508 multiple copies)".
8509
8510 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8511 or, xor to not_, and_, or_, and xor_, respectively. This works
8512 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8513 random system header somewhere that includes the equivalent of
8514 <iso646.h>.
8515
8516 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8517 -E" works; it apparently doesn't work with PathScale EKO Compiler
8518 Suite Version 2.0.
8519
85202006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8521
8522 During deterministic GLR operation, user actions should be able to
8523 influence the parse by changing yychar. To make this easier to fix and
8524 to make glr.c easier to evolve in general, don't maintain yytoken in
8525 parallel with yychar; just compute yytoken when needed.
8526 * tests/glr-regression.at (Incorrect lookahead during deterministic
8527 GLR): Check that setting yychar in a user action has the intended
8528 effect.
8529 * data/glr.c (yyGLRStack): Remove yytokenp member.
8530 (yyclearin): Don't set *yytokenp.
8531 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8532 yychar rather than *yytokenp to determine the current lookahead.
8533 Compute yytoken locally when needed.
8534 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8535 point to.
8536
8537 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8538 after `--report' documentation.
8539
85402006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8541
8542 * src/parse-gram.y (grammar_declaration): Location of printer
8543 symbol is @1, not list->location. Bug reported by twlevo.
8544 * tests/input.at (Incompatible Aliases): Adjust to above change.
8545
85462006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8547
8548 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8549 all the test at once. This makes the output easier to read in the
8550 normal case.
8551
8552 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8553 got from <http://bro-ids.org/download.html>. The bug is that
8554 when two actions appeared in succession, the second one was
8555 scanned before the first one was added to the grammar rule
8556 as a midrule action. Bison then output the incorrect warning
8557 "parse.y:905.17-906.36: warning: unused value: $3".
8558 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8559 associated with a value.
8560 (rhs): Don't invoke grammar_current_rule_action_append.
8561 (action): Invoke it here instead.
8562 * src/reader.c (grammar_midrule_action): Now extern.
8563 (grammar_current_rule_action_append): Don't invoke
8564 grammar_midrule_action; that is now the scanner's job.
8565 * src/reader.h (last_string, last_braced_code_loc):
8566 (grammar_midrule_action): New decls.
8567 * src/scan-gram.l (last_string): Now extern, sigh.
8568 (last_braced_code_loc): New extern variable.
8569 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8570 rule already has an action.
8571 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8572 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8573 Add some tests to check that the above changes fixed the bug.
8574
85752006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8576
8577 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8578 All used changed. Check whether the symbol has a destructor,
8579 not whether it is typed.
8580 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8581 that the values are still reported as unused. All line numbers
8582 adjusted.
8583
85842006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8585
8586 Work around a bug in bro 0.8, which underparenthesizes its
8587 definition of YYLLOC_DEFAULT.
8588 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8589 their arguments.
8590 * data/lalr1.cc: Likewise.
8591 * data/yacc.cc: Likewise.
8592
85932006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8594
8595 Work around a bug in Pike 7.0, and give the Pike folks a
8596 better way to override the usual int widths.
8597 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8598 user can override the types.
8599 (short): #undef, to work around a bug in Pike 7.0.
8600 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8601 (union yyalloc.yyss): Use yytype_int16 rather than short.
8602 All uses changed.
8603 (yysigned_char): Remove.
8604 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8605 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8606 * tests/regression.at (Web2c Actions): Adjust to above changes.
8607
8608 * src/reader.c (check_and_convert_grammar): New function.
8609 (reader): Close the input file even if something went wrong during
8610 parsing. Minor file descriptor leak reported by twlevo.
8611
8612 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8613 to pacify gcc -Wswitch-default.
8614 * src/scan-gram.l (adjust_location): Use a default: break; case
8615 to pacify gcc -Wswitch-default.
8616 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8617 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8618 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8619 Move these decls to scan-skel.l, since they don't need to be
8620 visible elsewhere.
8621 * src/scan-skel.l: Accept the above decls.
8622 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8623 is used.
8624
86252006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8626
8627 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8628 since we don't want to insist on a version number at the start
8629 of the changelog every time.
8630 * Makefile.maint: Sync from coreutils a bit better.
8631 (sc_trailing_blank): Renamed from sc_trailing_space.
8632 All uses changed.
8633 (sc_no_if_have_config_h, sc_require_config_h):
8634 (sc_prohibit_assert_without_use): New rules.
8635 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8636 (sc_dd_max_sym_length): Fix leading spaces in rule.
8637 (sc_system_h_headers): Prefix with @.
8638 (sc_useless_cpp_parens, m4-check): Output line numbers.
8639 (changelog-check): Allow version only in head.
8640 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8641 satisfy new Makefile.maint rule.
8642 * data/glr.c: Likewise.
8643 * data/glr.cc: Likewise.
8644 * data/lalr1.cc: Likewise.
8645 * data/yacc.c: Likewise.
8646 * lib/ebitsetv.c: Likewise.
8647 * lib/lbitset.c: Likewise.
8648 * lib/subpipe.c: Likewise.
8649 * lib/timevar.c: Likewise.
8650 * src/system.h: Likewise.
8651 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8652 * djgpp/Makefile.maint: Add copyright notice.
8653 * djgpp/README.in: Likewise.
8654 * djgpp/config.bat: Likewise.
8655 * djgpp/config.site: Likewise.
8656 * djgpp/config_h.sed: Likewise.
8657 * djgpp/djunpack.bat: Likewise.
8658 * djgpp/config.sed: Fix copyright notice to match standard format.
8659 * djgpp/subpipe.h: Likewise.
8660 * lib/bitsetv-print.c: Likewise.
8661 * lib/bitsetv.c: Likewise.
8662 * lib/subpipe.h: Likewise.
8663 * lib/timevar.c: Likewise.
8664 * lib/timevar.h: Likewise.
8665 * djgpp/subpipe.c: Use standard recipe for config.h.
8666 * lib/abitset.c: Likewise.
8667 * lib/bitset.c: Likewise.
8668 * lib/bitset_stats.c: Likewise.
8669 * lib/bitsetv-print.c: Likewise.
8670 * lib/bitsetv.c: Likewise.
8671 * lib/ebitsetv.c: Likewise.
8672 * lib/get-errno.c: Likewise.
8673 * lib/lbitset.c: Likewise.
8674 * lib/subpipe.c: Likewise.
8675 * lib/timevar.c: Likewise.
8676 * lib/vbitset.c: Likewise.
8677 * tests/local.at: Likewise.
8678 * src/scan-gram.l: Don't include verify.h, since system.h does
8679 that for us.
8680 * .x-sc_require_config_h: New file.
8681 * .x-sc_unmarked_diagnostics: New file.
8682
86832006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8684
8685 Be a bit more systematic about using 'abort'.
8686 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8687 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8688 Put 'default: abort ();' before some other case, to satisfy older
8689 pedantic compilers.
8690 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8691 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8692 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8693 * src/conflicts.c (resolve_sr_conflict): Likewise.
8694 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8695 (get_decision_str, get_orientation_str, get_node_alignment_str):
8696 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8697 (get_linestyle_str, get_arrowstyle_str): Likewise.
8698 * src/conflicts.c (resolve_sr_conflict):
8699 Use a default case rather than one for the one remaining enum
8700 value, to catch invalid enum values as well.
8701 * src/lalr.c (set_goto_map, map_goto):
8702 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8703 * src/nullable.c (nullable_compute, token_definitions_output):
8704 Likewise.
8705 * src/reader.c (packgram, reader): Likewise.
8706 * src/state.c (transitions_to, state_new, state_reduction_find):
8707 Likewise.
8708 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8709 (symbol_pack): Likewise.
8710 * src/tables.c (conflict_row, pack_vector): Likewise.
8711 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8712 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8713 * src/system.h: Don't include <assert.h>.
8714 (assert): New macro.
8715
8716 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8717 (Destructor Decl, Parser Function, Pure Calling):
8718 Describe rules for braces inside C code more carefully.
8719
87202006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8721
8722 Fix some porting glitches found by Nelson H. F. Beebe.
8723 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8724 compilers that don't understand that abort () does not return.
8725 * src/state.c (transitions_to): Likewise.
8726 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8727 that '#include <cstdlib>' works.
8728 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8729 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8730 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8731 for the benefit of some pre-C99 compilers.
8732
8733 * bootstrap: Undo changes to gnulib files that autoreconf made.
8734
8735 Minor fixups to get 'make maintainer-check' to work.
8736 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8737 with the new verify.h implementation.
8738 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8739 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8740 * data/yacc.c (YYUSE): Likewise.
8741 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8742 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8743 * src/parse-gram.y (declaration): Don't pass a string constant
8744 to a function that expects char *, since GCC might complain
8745 about the constant value.
8746 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8747 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8748 before #defining them.
8749 * tests/glr-regression.at
8750 (Incorrectly initialized location for empty right-hand side in GLR):
8751 In yyerror, use the msg arg.
8752 (Corrupted semantic options if user action cuts parse):
8753 (Incorrect lookahead during deterministic GLR):
8754 (Incorrect lookahead during nondeterministic GLR):
8755 Don't name a local var 'index'; it shadows string.h's 'index'.
8756
87572006-01-19 Akim Demaille <akim@epita.fr>
8758
8759 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8760 location, not just parts of it.
8761
87622006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8763
8764 * NEWS: Document the fact that multiple %unions are now allowed.
8765 * doc/bison.texinfo (Union Decl): Likewise.
8766 * TODO: This feature is now implemented, so remove it from
8767 the wishlist.
8768
8769 * Makefile.maint: Merge with coreutils Makefile.maint.
8770 (CVS_LIST): Use build-aux version if available.
8771 (VERSION_REGEXP): New macro.
8772 (syntax-check-rules): Add sc_no_if_have_config_h,
8773 sc_prohibit_assert_without_use, sc_require_config_h,
8774 sc_useless_cpp_parens.
8775 (sc_obsolete_symbols): Check for O_NDELAY.
8776 (sc_dd_max_sym_length): Track coreutils.
8777 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8778 (sc_useless_cpp_parens): New rule.
8779 (news-date-check): Look for version or today's date.
8780 (changelog-check): Don't require version number near head.
8781 (copyright-check): Use current year instead of hardwiring 2005.
8782 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8783 (announcement): Add --gpg-key-ID.
8784
8785 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8786 with "file system".
8787
8788 Avoid undefined behavior that addressed just before the start of an
8789 array. Problem reported by twlevo.
8790 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8791 * src/lalr.c (build_relations): Rely on new sentinel.
8792 * src/gram.c (gram_free): Adjust to new sentinel.
8793
87942006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8795
8796 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8797 yylookaheadNeeds. All uses updated.
8798 (yysplitStack): Rename local yynewLookaheadStatuses to
8799 yynewLookaheadNeeds.
8800 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8801 GLR): In comments, change `lookahead status' to `lookahead need'.
8802
88032006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8804
8805 * data/glr.c (yysplitStack): A little stylistic rewrite.
8806
88072006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8808
8809 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8810
88112006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8812
8813 * doc/bison.texinfo: Fix some typos.
8814 (GLR Semantic Actions): New subsection discussing special
8815 considerations because GLR semantic actions might be deferred.
8816 (Actions): Mention look-ahead usage of yylval.
8817 (Actions and Locations): Mention look-ahead usage of yylloc.
8818 (Special Features for Use in Actions): Add YYEOF entry and mention it
8819 in the yychar entry.
8820 In the yychar entry, remove mention of the local yychar case (pure
8821 parser) since this is irrelevant information when writing semantic
8822 actions and since it's already discussed in `Table of Symbols' where
8823 yychar is otherwise described as an external variable.
8824 In the yychar entry, don't call it the `current' look-ahead since it
8825 isn't when semantic actions are deferred.
8826 In the yychar and yyclearin entries, add note about deferred semantic
8827 actions.
8828 Add yylloc and yylval entries discussing look-ahead usage.
8829 (Look-Ahead Tokens): When discussing yychar, don't call it the
8830 `current' look-ahead, and do mention yylval and yylloc.
8831 (Error Recovery): Cross-reference `Action Features' when mentioning
8832 yyclearin.
8833 (Table of Symbols): In the yychar entry, don't call it the `current'
8834 look-ahead.
8835 In the yylloc and yylval entries, mention look-ahead usage.
8836
88372006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8838
8839 * tests/glr-regression.at: Update copyright year to 2006.
8840
88412006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8842
8843 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8844 use during nondeterministic operation to track which stacks have
8845 actually needed the current lookahead.
8846 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8847 Allocate, deallocate, resize, and otherwise shuffle space for
8848 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8849 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8850 appropriately during nondeterministic operation.
8851 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8852 members to store the current lookahead to be used by the deferred
8853 user action.
8854 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8855 from which the RHS is taken. Set the lookahead members of the new
8856 yySemanticOption according to the lookahead status for stack yyk.
8857 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8858 yyaddDeferredAction.
8859 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8860 members of yySemanticOption before invoking yyuserAction, and then set
8861 them back to their current values afterward.
8862 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8863 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8864 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8865 titles for consistency.
8866 (Leaked merged semantic value if user action cuts parse): In order to
8867 suppress lint warnings, use arguments in merge function, and assign
8868 char value < 128 in main.
8869 (Incorrect lookahead during deterministic GLR): New test case.
8870 (Incorrect lookahead during nondeterministic GLR): New test case.
8871
88722006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8873
8874 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8875 !yyvaluep as signal that no semantic value is available to print.
8876 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8877 to print a semantic value.
8878
88792006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8880
8881 * tests/glr-regression.at: For consistency with my newer test cases,
8882 don't thank myself.
8883
88842006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8885
8886 * data/glr.c (yyresolveValue): When merging semantic options, if at
8887 least one user action succeeds but a later one cuts the parse, then
8888 destroy the semantic value before returning rather than leaking it.
8889 (yyresolveStates): If a user action cuts the parse and thus
8890 yyresolveValue fails, ignore the (unset) semantic value rather than
8891 corrupting the yyGLRState, and empty the semantic options list since
8892 the user actions should have called all necessary destructors.
8893 Simplify code with YYCHK.
8894 * tests/glr-regression.at (Corrupted semantic options if user action
8895 cuts parse): New test case.
8896 (Undesirable destructors if user action cuts parse): New test case.
8897 Before applying any of this patch, this test case never actually failed
8898 for me... but only because the corrupted semantic options usually
8899 masked this bug.
8900 (Leaked merged semantic value if user action cuts parse): New test
8901 case.
8902
89032006-01-05 Akim Demaille <akim@epita.fr>
8904
8905 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8906
89072006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8908
8909 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8910 _MSC_VER. Problem reported by Cenzato Marco.
8911 (b4_c_function_def): Use it.
8912 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8913 b4_c_modern.
8914 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8915 than rolling our own.
8916
89172006-01-04 Akim Demaille <akim@epita.fr>
8918
8919 Also warn about non-used mid-rule values.
8920 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8921 member.
8922 (symbol_list_new): Adjust.
8923 * src/reader.c (symbol_typed_p): New.
8924 (grammar_rule_check): Use it.
8925 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8926 Check its rule.
8927 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8928 Use it.
8929 * tests/actions.at (Exotic Dollars): Adjust.
8930
89312006-01-04 Akim Demaille <akim@epita.fr>
8932
8933 * src/reader.c (grammar_midrule_action): If $$ is set in a
8934 mid-rule, move the `used' bit to its lhs.
8935 * tests/input.at (Unused values): New.
8936 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8937
89382006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8939
8940 * doc/bison.texinfo (Bison Options): Say more accurately what
8941 --yacc does.
8942 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8943 about declarations in the grammar when in Yacc mode, as POSIX does
8944 not require a diagnostic when the grammar uses extensions.
8945
8946 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8947
8948 Warn about dubious constructions like "%token T T".
8949 Reported by twlevo.
8950 * src/symtab.h (struct symbol.declared): New member.
8951 * src/symtab.c (symbol_new): Initialize it to false.
8952 (symbol_class_set): New arg DECLARING, specifying whether
8953 this is a declaration that we want to warn about, if there
8954 is more than one of them. All uses changed.
8955
8956 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8957 Allow multiple %union directives, whose contents concatenate.
8958 * src/parse-gram.y (grammar_declaration): Likewise.
8959 Use muscle_code_grow, so that we don't need stype_line any more.
8960 All uses changed.
8961
8962 * src/muscle_tab.c (muscle_grow): Fix comment.
8963
8964 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8965 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8966 Update copyright year to 2006.
8967
89682006-01-03 Akim Demaille <akim@epita.fr>
8969
8970 Have glr.cc pass (some of) the calc.at tests.
8971 * data/glr.cc (b4_parse_param_orig): New.
8972 (b4_parse_param): Improve its definition, and bound it more
8973 clearly in the skeleton.
8974 (b4_epilogue): Append, instead of prepending, in order to keep
8975 #line consistency.
8976 Simplify the generation of auxiliary functions: locations and
8977 purity are mandated.
8978 (b4_global_tokens_and_yystype): Honor it.
8979 * data/location.cc (c++.m4): Don't include it.
8980 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8981 and AT_SKEL_CC_IF.
8982 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8983 AT_LALR1_CC_IF.
8984 Be sure to initialize the first position's filename.
8985 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8986 mandated anyway.
8987 (AT_CHECK_CALC_GLR_CC): New.
8988 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8989
89902006-01-02 Akim Demaille <akim@epita.fr>
8991
8992 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8993 c.m4.
8994 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8995 * data/glr.cc: Do not include stack.hh.
8996
89972006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8998
8999 * data/glr.c: Reformat whitespace with tabs.
9000 (b4_lpure_formals): Remove this unused m4 macro.
9001 * tests/cxx-type.at: Reformat whitespace with tabs.
9002 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9003 since it's a member. Rename type to isNterm for clarity.
9004
90052005-12-29 Akim <akim@sulaco.local>
9006
9007 Let glr.cc catch up with symbol_value_print.
9008 * data/glr.cc (b4_yysymprint_generate): Replace by...
9009 (b4_yy_symbol_print_generate): this.
9010 (yy_symbol_print, yy_symbol_value_print): Declare them.
9011
90122005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9013
9014 * src/location.h (boundary): Note that a line or column equal
9015 to INT_MAX indicates an overflow.
9016 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9017 (rule_length_overflow, increment_rule_length, add_column_width):
9018 New functions.
9019 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9020 (<SC_BRACED_CODE>"}"):
9021 Use increment_rule_length rather than incrementing it by hand.
9022 (adjust_location, handle_syncline): Diagnose overflow.
9023 (handle_action_dollar, handle_action_at):
9024 Fix bug with monstrosities like $-2147483648.
9025 Remove now-unnecessary checks.
9026 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9027 (convert_ucn_to_byte): Verify assumptions.
9028 (handle_syncline): New arg LOC. All callers changed.
9029 Don't store through a value derived from char const * pointer.
9030
9031 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9032 GCC warnings.
9033
90342005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9035
9036 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9037 Remove unnecessary forward static decls.
9038
90392005-12-27 Akim Demaille <akim@epita.fr>
9040
9041 * src/reader.c (grammar_current_rule_check): Also check that $$
9042 is used.
9043 Take the rule to check as argument, hence rename as...
9044 (grammar_rule_check): this.
9045 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9046 Rename as...
9047 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9048 (grammar_midrule_action, grammar_symbol_append): Now static.
9049 * tests/torture.at (input): Don't rely on the default action
9050 being always performed.
9051 * tests/calc.at: "Set" $$ even when the action is "cut" with
9052 YYERROR or other.
9053 * tests/actions.at (Exotic Dollars): Instead of using unused
9054 values, check that the warning is issued.
9055
90562005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9057
9058 * NEWS: Improve wording for unused-value warnings.
9059
90602005-12-22 Akim Demaille <akim@epita.fr>
9061
9062 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9063 (b4_yysymprint_generate): Rename as...
9064 (b4_yy_symbol_print_generate): this.
9065 Generate yy_symbol_print instead of yysymprint.
9066 Generate also yy_symbol_value_print, and use it.
9067
90682005-12-22 Akim Demaille <akim@epita.fr>
9069
9070 * NEWS: Warn about unused values.
9071 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9072 a `used' member.
9073 (symbol_list_n_get, symbol_list_n_used_set): New.
9074 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9075 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9076 * src/reader.c (grammar_current_rule_check): Check that values are
9077 used.
9078 * src/symtab.c (symbol_print): Accept 0.
9079 * tests/existing.at: Remove the type information.
9080 Empty the actions.
9081 Remove useless actions (beware of mid-rule actions: perl -000
9082 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9083 * tests/actions.at (Exotic Dollars): Use unused values.
9084 * tests/calc.at: Likewise.
9085 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9086 Likewise.
9087
9088 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9089 rule_useful_p.
9090
90912005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9092
9093 Undo 2005-12-01 tentative license wording change. The wording is
9094 still being reviewed by the lawyers, and we don't want to wait for
9095 them before publishing a test release. For now, revert to the
9096 previous wording.
9097 * NEWS: Undo 2005-12-01 change.
9098 * data/glr.c: Revert to previous license wording.
9099 * data/glr.cc: Likewise.
9100 * data/lalr1.cc: Likewise.
9101 * data/location.cc: Likewise.
9102 * data/yacc.c: Likewise.
9103
9104 * NEWS: Reword %destructor vs YYABORT etc.
9105 * data/glr.c: Use American spacing, for consistency.
9106 * data/glr.cc: Likewise.
9107 * data/lalr1.cc: Likewise.
9108 * data/yacc.c: Likewise.
9109 * data/yacc.c: Reformat comments slightly.
9110 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9111 for consistency. Fix some spelling errors and reword recently-included
9112 text slightly.
9113 * tests/cxx-type.at: Cast results of malloc, for C++.
9114
91152005-12-21 Joel E. Denny <address@hidden>
9116
9117 * tests/cxx-type.at: Construct a tree, count the parents of shared
9118 nodes, and free each node once and only once. Previously, the memory
9119 for semantic values was leaked instead.
9120
91212005-12-21 Joel E. Denny <address@hidden>
9122
9123 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9124 (yylval, yylloc): If pure, #define to yystackp->yyval and
9125 yystackp->yyloc similar to yychar and yynerrs.
9126 (yyparse): If pure, remove local yylval and yylloc. Add local
9127 yystackp to accommodate pure definitions of yylval and yylloc.
9128 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9129 yylvalp and yyllocp to &yylval and &yylloc.
9130 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9131 namespace. Previously, nerrs and char were missing, but lval and lloc
9132 weren't necessary.
9133 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9134 yylvalp and yyllocp parameters since, if pure, these are now always
9135 accessible through yystackp. If not pure, they are still accessible
9136 globally.
9137 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9138 `if (YYID (N))' to pacify lint.
9139
91402005-12-21 Akim Demaille <akim@epita.fr>
9141
9142 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9143 destroy the RHS symbols of a rule.
9144 * data/yacc.c (yylen): Initialize to 0.
9145 Keep its value to the number of items to possibly shift.
9146 In particular, a regular successful parse that ends on YYFINAL by
9147 a (internal) YYACCEPT must not have yylen != 0.
9148 (yyerrorlab, yyreturn): Pop the RHS.
9149 Reorder a bit to emphasize the `shifting' bits of code.
9150 (YYPOPSTACK): Now accept a number of items to pop.
9151 * data/lalr1.cc: Likewise.
9152 * data/glr.c: Formatting changes.
9153 Use goto instead of fall through.
9154 * doc/bison.texinfo (Destructor Decl): Complete.
9155
91562005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9157
9158 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9159 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9160 * djgpp/config.bat: Replace every occurence of the file name
9161 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9162 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9163 * djgpp/config.sed: Replace every occurence of the file name
9164 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9165 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9166 * djgpp/djunpack.bat: DJGPP specific file.
9167 * djgpp/fnchange.lst: DJGPP specific file.
9168 * djgpp/README.in: Add new information about how to unpack the bison
9169 source on MSDOS and other systems which have 8.3 file name restrictions
9170 using djunpack.bat and fnchange.lst.
9171
91722005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9173
9174 * bootstrap (build_cvs_prefix): Remove; unused.
9175 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9176 when getting gnulib.
9177
91782005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9179
9180 * data/glr.c: Reorder typedef declarations for structs to match order
9181 of struct declarations.
9182 Rename yystack everywhere to yystackp except in yyparse where it's not
9183 a pointer.
9184 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9185 consistency.
9186 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9187 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9188 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9189 lint.
9190
91912005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9192
9193 * tests/sets.at (Accept): Fix typos in regular expression used to
9194 sed out the final state number.
9195
9196 Work around portability problem on Solaris 10: flex-generated
9197 files include <stdio.h> before <config.h>, which messes up
9198 because the latter defines __EXTENSIONS__. Address the problem
9199 by creating two new little files that include <config.h> first,
9200 then include the flex-generated files. Rewrite everyone else
9201 to include <config.h> first, as well.
9202 * lib/timevar.c: Always include "config.h".
9203 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9204 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9205 (EXTRA_bison_SOURCES): New macro.
9206 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9207 * src/system.h: Don't include config.h.
9208 * src/LR0.c: Include <config.h> first.
9209 * src/assoc.c: Likewise.
9210 * src/closure.c: Likewise.
9211 * src/complain.c: Likewise.
9212 * src/conflicts.c: Likewise.
9213 * src/derives.c: Likewise.
9214 * src/files.c: Likewise.
9215 * src/getargs.c: Likewise.
9216 * src/gram.c: Likewise.
9217 * src/lalr.c: Likewise.
9218 * src/location.c: Likewise.
9219 * src/main.c: Likewise.
9220 * src/muscle_tab.c: Likewise.
9221 * src/nullable.c: Likewise.
9222 * src/output.c: Likewise.
9223 * src/parse-gram.y: Likewise.
9224 * src/print.c: Likewise.
9225 * src/print_graph.c: Likewise.
9226 * src/reader.c: Likewise.
9227 * src/reduce.c: Likewise.
9228 * src/relation.c: Likewise.
9229 * src/state.c: Likewise.
9230 * src/symlist.c: Likewise.
9231 * src/symtab.c: Likewise.
9232 * src/tables.c: Likewise.
9233 * src/uniqstr.c: Likewise.
9234 * src/vcg.c: Likewise.
9235
9236 * src/parse-gram.y: Fix minor problems uncovered by lint.
9237 (current_lhs, current_lhs_location): Now static.
9238 (current_assoc): Remove unused variable.
9239
9240 Cleanups so that Bison-generated parsers have less lint.
9241 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9242 Prepend /*ARGSUSED*/, for lint's sake.
9243 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9244 definition if 'lint' is defined.
9245 (YYID): New macro (or function, if lint).
9246 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9247 * data/yacc.c: Likewise.
9248 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9249 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9250 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9251 is C++ only.
9252 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9253 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9254 Use YYID(0) rather than 0, for lint.
9255 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9256 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9257
92582005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9259
9260 * tests/glr-regression.at
9261 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9262 Close memory leak reported by twlevo.
9263
92642005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9265
9266 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9267 all stacks.
9268 (yyparse): Iterate another stack in order to call user destructors.
9269 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9270 New test case.
9271 (Duplicated user destructor for lookahead): This test now is expected
9272 to succeed.
9273
92742005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9275
9276 * NEWS: Document the following change.
9277 * data/yacc.c: Say "parser skeleton" rather than "file", since
9278 it's no longer just a file.
9279 * data/glr.c: Grant a special exception for C GLR parsers, that
9280 reads like the already-existing exception for C LALR(1) parsers.
9281 * data/glr.cc: Likewise.
9282 * data/lalr1.cc: Likewise.
9283 * data/location.cc: Likewise.
9284 * data/yacc.c: Reword the "written by" statement to clarify that
9285 it was the parser skeleton, not the entire output file.
9286 * data/glr.c: Written by Paul Hilfinger.
9287 * data/glr.cc: Written by Akim Demaille.
9288 * data/lalr1.cc: Likewise.
9289
92902005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9291
9292 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9293 Fix typos in previous change that broke 'make check'.
9294 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9295 supported in C.
9296 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9297 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9298 We can revert this once things settle down.
9299
9300 * src/conflicts.c (conflicts_print): Don't print file name twice
9301 when %expect fails because there were no conflicts.
9302 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9303 change.
9304 * tests/conflicts.at (%expect not enough, %expect too much):
9305 (%expect with reduce conflicts): Adjust to new behavior.
9306
93072005-11-18 Akim Demaille <akim@epita.fr>
9308
9309 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9310 errors.
9311 * NEWS: Document this.
9312 * doc/bison.texinfo (Expect Decl): Likewise.
9313
93142005-11-16 Akim Demaille <akim@epita.fr>
9315
9316 Generalize the display of semantic values and locations in traces.
9317 * data/glr.c (yy_reduce_print): Fix indices (again).
9318 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9319 literal integers.
9320 * data/lalr1.cc (yyreduce_print): Rename as...
9321 (yy_reduce_print): this.
9322 Display values and locations.
9323 * data/yacc.c (yy_reduce_print): Likewise.
9324 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9325 (yysymprint): Move higher to be visible from yy_reduce_print).
9326 (yyparse): Adjust.
9327 * tests/calc.at: Adjust the expected length of the traces.
9328
93292005-11-14 Akim Demaille <akim@epita.fr>
9330
9331 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9332 from 1 to N, while values and location start at 0.
9333 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9334
93352005-11-14 Akim Demaille <akim@epita.fr>
9336
9337 * data/glr.c (yy_reduce_print): Fix the $ number.
9338
93392005-11-14 Akim Demaille <akim@epita.fr>
9340
9341 "Use" parse parameters.
9342 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9343 * data/glr.c, data/glr.cc: Use them.
9344 * data/glr.c (YYUSE): Have a C++ definition that supports
9345 non-pointer types.
9346
93472005-11-14 Akim Demaille <akim@epita.fr>
9348
9349 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9350
93512005-11-14 Akim Demaille <akim@epita.fr>
9352
9353 * data/glr.cc: New.
9354 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9355
93562005-11-12 Akim Demaille <akim@epita.fr>
9357
9358 Let position and location be PODs.
9359 * data/location.cc (position::initialize, location::initialize): New.
9360 (position::position, location::location): Define only if
9361 b4_location_constructors is defined.
9362 * data/lalr1.cc (b4_location_constructors): Define it for backward
9363 compatibility.
9364 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9365
93662005-11-12 Akim Demaille <akim@epita.fr>
9367
9368 * data/lalr1.cc: Move the body of the ctor and dtor into the
9369 parser file (instead of the header).
9370 Wrap the implementations in a "namespace yy".
9371
93722005-11-12 Akim Demaille <akim@epita.fr>
9373
9374 Have glr.c include its header file when created.
9375 * data/glr.c (b4_shared_declarations): New.
9376 Output them verbatim in the parser if !%defines, otherwise
9377 output then in the header file, and include it instead.
9378
93792005-11-11 Akim Demaille <akim@epita.fr>
9380
9381 * data/glr.c: Comment changes.
9382
93832005-11-11 Akim Demaille <akim@epita.fr>
9384
9385 When yydebug, report semantic and location values for reductions.
9386 * data/glr.c (yy_reduce_print): Report the semantic values and the
9387 locations.
9388 (YY_REDUCE_PRINT): Adjust.
9389 (yyglrReduce): Use them.
9390 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9391 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9392 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9393 traces.
9394
93952005-11-10 Akim Demaille <akim@epita.fr>
9396
9397 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9398 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9399 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9400
94012005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9402
9403 * m4/cxx.m4, examples/Makefile.am: Don't build
9404 examples/calc++ if no C++ compiler is available. (trivial change)
9405
94062005-11-09 Akim Demaille <akim@epita.fr>
9407
9408 * src/scan-skel.l: Use a couple of asserts.
9409
94102005-11-03 Akim Demaille <akim@epita.fr>
9411
9412 In some (weird) cases, the final state number is incorrect.
9413 Reported by Alexandre Duret-Lutz.
9414 * src/LR0.c (state_list_append): Remove the computation of
9415 final_state.
9416 (save_reductions): Do it here.
9417 (get_state): Alpha conversion.
9418 (generate_states): Use a for loop.
9419 * src/gram.h (item_number_is_rule_number)
9420 (item_number_is_symbol_number): New.
9421 * src/state.c: Use assert.
9422 * src/system.h: Include assert.h.
9423 * tests/sets.at (Accept): New.
9424
94252005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9426
9427 * data/glr.c (yyfill): Adjust comment.
9428 (yyresolveAction): Initialize default location properly
9429 for empty right-hand sides.
9430 (yydoAction): Ditto.
9431 Add comment explaining apparently dead code.
9432 * tests/glr-regression.at
9433 (Incorrectly initialized location for empty right-hand side in GLR):
9434 New test.
9435
94362005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9437
9438 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9439 gnulib when interrupted. This fixes some race conditions and
9440 works around some portability problems (one noted by Paul
9441 Hilfinger).
9442
94432005-10-22 Akim <akim@epita.fr>
9444
9445 * Makefile.cfg: Adjust to config -> build-aux.
9446 Reported by twledo.
9447
94482005-10-21 Akim Demaille <akim@epita.fr>
9449
9450 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9451 the %parse-params.
9452 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9453 * data/yacc.c (b4_Pure_if): Rename as...
9454 (b4_yacc_pure_if): this.
9455 (YY_SYMBOL_PRINT, yyparse): Adjust.
9456 * doc/bison.texinfo: Formatting changes.
9457
94582005-10-21 Akim Demaille <akim@epita.fr>
9459
9460 Finish the transition config -> build-aux.
9461 * configure.ac, Makefile.am: Use build-aux.
9462 * config/prev-version, config/announce-gen, config/Makefile.am:
9463 Move to...
9464 * build-aux/prev-version, build-aux/announce-gen,
9465 * build-aux/Makefile.am: here.
9466
94672005-10-14 Akim Demaille <akim@epita.fr>
9468
9469 * examples/calc++/test: Use set -x only when VERBOSE.
9470
94712005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9472
9473 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9474 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9475
94762005-10-13 Akim Demaille <akim@epita.fr>
9477
9478 * src/scan-skel.l: Output the base name parts of the parser and
9479 header file names.
9480 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9481 additional checks.
9482 Use this to exercise C++ outputs in subdirs.
9483 Reported by Oleg Smolsky.
9484
94852005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9486
9487 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9488 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9489 Problem reported by John P. Hartmann.
9490 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9491 already defined it.
9492
94932005-10-12 Akim Demaille <akim@epita.fr>
9494
9495 * src/parse-gram.y (version_check): Exit 63 to please missing
9496 (stands for "version mismatch).
9497 * tests/input.at, doc/bison.texinfo: Adjust.
9498
94992005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9500
9501 Work around portability problems with Visual Age C compiler
9502 (xlc and xlC_r) reported by John P. Hartmann.
9503 * data/location.cc (initial_column, initial_line): Remove.
9504 All uses replaced by 0 and 1.
9505 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9506 that xlc complains about.
9507 * src/scan-skel.l (skel_wrap): Likewise.
9508 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9509 as __STDC__.
9510 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9511 __STDC_VERSION__. Use it everywhere instead of looking at
9512 __STDC__ and __cplusplus.
9513
95142005-10-10 Akim Demaille <akim@epita.fr>
9515
9516 * examples/calc++/test: Be quiet unless VERBOSE.
9517
95182005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9519
9520 * data/c.m4 (yydestruct, yysymprint):
9521 Use YYUSE instead of casting to void.
9522 * data/glr.c (YYUSE): New macro.
9523 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9524 Use it instead of rolling our own.
9525 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9526 (YYCHK1):
9527 Use /*CONSTCOND*/ to suppress lint warnings.
9528 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9529 (YY_STACK_PRINT): Use 'false' not '0'.
9530 (YYUSE): New macro.
9531 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9532 * data/yacc.c (YYUSE): New macro.
9533 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9534 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9535 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9536
9537
9538 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9539 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9540
95412005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9542
9543 Undo the parts of the unlocked-I/O change that substituted
9544 putc or puts for printf. This might hurt performance a bit,
9545 but some people prefer the printf style.
9546 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9547 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9548 All uses replaced by YYFPRINTF and YYDPRINTF.
9549 * data/yacc.c: Likewise.
9550 * lib/bitset.c (bitset_print): Likewise.
9551 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9552 putc and puts.
9553 * lib/lbitset.c (debug_lbitset): Likewise.
9554 * src/closure.c (print_firsts, print_fderives): Likewise.
9555 * src/gram.c (grammar_dump): Likewise.
9556 * src/lalr.c (look_ahead_tokens_print): Likewise.
9557 * src/output.c (escaped_output): Likewise.
9558 (user_actions_output): Break apart two printfs.
9559 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9560 * src/reduce.c (reduce_print): Likewise.
9561 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9562 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9563
9564 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9565 Use assignments rather than casts-to-void to suppress
9566 unused-variable warnings. This pacifies 'lint'.
9567 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9568 unused-variable warnings.
9569
95702005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9571
9572 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9573
95742005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9575
9576 Use unlocked I/O for a minor performance improvement on hosts like
9577 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9578 is to use the gnlib unlocked-io module, and to prefer putc and
9579 puts to printf when either will work (since the latter doesn't
9580 come in an unlocked flavor).
9581 * bootstrap (gnulib_modules): Add unlocked-io.
9582 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9583 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9584 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9585 and similarly for puts and putc and printf.
9586 * data/yacc.c: Likewise.
9587 * lib/bitset.c (bitset_print): Likewise.
9588 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9589 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9590 to printf.
9591 * lib/lbitset.c (debug_lbitset): Likewise.
9592 * src/closure.c (print_firsts, print_fderives): Likewise.
9593 * src/gram.c (grammar_dump): Likewise.
9594 * src/lalr.c (look_ahead_tokens_print): Likewise.
9595 * src/output.c (escaped_output): Likewise.
9596 (user_actions_output): Coalesce two printfs.
9597 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9598 * src/reduce.c (reduce_print): Likewise.
9599 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9600 * src/system.h: Include unlocked-io.h rather than stdio.h.
9601
9602 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9603 this confuses xgettext.
9604
96052005-10-02 Akim Demaille <akim@epita.fr>
9606
9607 * bootstrap (gnulib_modules): Add strverscmp.
9608 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9609 * m4/.cvsignore: Add strverscmp.m4.
9610 * src/parse-gram.y (%require): New token, new rule.
9611 (version_check): New.
9612 * src/scan-gram.l (%require): Adjust.
9613 * tests/input.at (AT_REQUIRE): New.
9614 Use it.
9615 * doc/bison.texinfo (Require Decl): New.
9616 (Calc++ Parser): Use %require.
9617
96182005-10-02 Akim Demaille <akim@epita.fr>
9619
9620 * data/location.cc: New.
9621
96222005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9623 Akim Demaille <akim@epita.fr>
9624
9625 Make sure -odir/foo.cc creates dir/location.hh etc.
9626 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9627 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9628 (spec_defines_file): Now const.
9629 (dir_prefix): New.
9630 (short_base_name): Remove.
9631 * src/files.c: Adjust.
9632 (dirname.h): Include.
9633 (base_name): Don't prototype it.
9634 (finput): Remove, duplicates gram_in.
9635 (full_base_name, short_base_name): Replace by...
9636 (all_but_ext, all_but_tab_ext): these.
9637 (compute_base_names): Rename as...
9638 (compute_file_name_parts): this.
9639 Update to compute the new variables, including dir_prefix.
9640 Adjust dependencies.
9641 * src/output.c (prepare): Output them.
9642 * src/reader.c: Adjust to use gram_in, not finput.
9643 * src/scan-skel.l (@dir_prefix@): New.
9644
96452005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9646
9647 * lib/subpipe.c: New function end_of_output_subpipe() added
9648 to allow support for non-posix systems. This is a no-op function
9649 for posix systems.
9650
9651 * lib/subpipe.h: New function end_of_output_subpipe() added
9652 to allow support for non-posix systems. This is a no-op function
9653 for posix systems.
9654
9655 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9656 handle the lack of pipe/fork functionality on non-posix systems.
9657
9658 * djgpp/Makefile.maint: DJGPP specific file.
9659
9660 * djgpp/README.in: DJGPP specific file.
9661
9662 * djgpp/config.bat: DJGPP specific configuration file.
9663
9664 * djgpp/config.sed: DJGPP specific configuration file.
9665
9666 * djgpp/config.site: DJGPP specific configuration file.
9667
9668 * djgpp/config_h.sed: DJGPP specific configuration file.
9669
9670 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9671
9672 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9673
96742005-10-02 Akim Demaille <akim@epita.fr>
9675
9676 * data/location.cc: New, extract from...
9677 * data/lalr1.cc: here.
9678 (location.hh): Include it after the user prologue, in case the
9679 filename type is defined by the user.
9680 Forward declation location and position before the pre-prologue.
9681 (yyresult_): Rename as...
9682 (yyresult): this, it's a local variable, not an attribute.
9683 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9684
96852005-10-01 Akim Demaille <akim@epita.fr>
9686
9687 * examples/extexi: Restore the #line generation.
9688
96892005-09-30 Akim Demaille <akim@epita.fr>,
9690 Alexandre Duret-Lutz <adl@gnu.org>
9691
9692 Move the token type and YYSTYPE in the parser class.
9693 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9694 (parser::token): New, from the moved free definition of tokens.
9695 (parser::semantic_value): Now a full definition instead of an
9696 indirection to YYSTYPE.
9697 (b4_post_prologue): No longer included in the header file, but
9698 in the implementation file.
9699 * doc/bison.texi (C+ Language Interface): Update.
9700 * src/parse-gram.y: Support unary %define.
9701 * tests/actions.at: Define global_tokens_and_yystype for backward
9702 compatibility until we update the tests.
9703 * tests/calc.at: Idem.
9704 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9705 to simplify the code.
9706
97072005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9708
9709 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9710 Ah, the good old days! Problem reported by Peter Klein.
9711 * bootstrap (gnulib_modules): Add strerror, strtoul.
9712 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9713 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9714
97152005-09-29 Akim Demaille <akim@epita.fr>
9716
9717 * data/c.m4 (b4_error_verbose_if): New.
9718 * data/lalr1.cc: Use it.
9719 (YYERROR_VERBOSE_IF): Remove.
9720 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9721 parser members, replaced by...
9722 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9723 local variables.
9724 (yysyntax_error_): Takes the state number as argument.
9725 (yyreduce_print_): Use the argument yyrule, not the former
9726 attribute yyn_.
9727
97282005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9729
9730 * bootstrap (gnulib_modules): Add verify.
9731 * lib/.cvsignore: Add verify.h.
9732 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9733 * src/system.h (verify): Remove.
9734 Include verify.h instead.
9735 * src/tables.c (tables_generate): Use new API for 'verify'.
9736
97372005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9738
9739 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9740 local variables whose names begin with 'yy'.
9741 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9742 Trivial changes from Joel E. Denny.
9743
9744 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9745 it itself.
9746 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9747 don't use alloca any more.
9748
9749 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9750 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9751 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9752 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9753 to match yacc.c, to test more hosts.
9754
97552005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9756
9757 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9758 doesn't affect behavior.
9759 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9760 Solaris, AIX, MSC.
9761 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9762 This works a bit better with glibc, if user code has already included
9763 stdlib.h.
9764 * doc/bison.texinfo (Bison Parser): Document that users can't
9765 arbitrarily use malloc and free for other purposes. Document
9766 that <alloca.h> and <malloc.h> might be included.
9767 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9768 user must declare alloca.
9769
9770 * HACKING (release): Forwarn the Translation Project about
9771 stable releses.
9772
97732005-09-20 Akim Demaille <akim@epita.fr>
9774
9775 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9776
97772005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9778
9779 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9780 (YYSTACK_ALLOC_MAXIMUM): Use it.
9781 (yysyntax_error): New function.
9782 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9783 multiple syntax errors are reported, and alloca is being used.
9784 Instead, reallocate buffers twice as big each time, so that
9785 we waste at most half the allocated memory. Start with a small
9786 (128-byte) buffer that will suffice in most cases anyway.
9787 Use yysyntax_error to do most of the work.
9788
9789 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9790 yynerrs is the number of errors reported, not the number of
9791 errors encountered.
9792
9793 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9794 Mark it as expected to fail.
9795 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9796 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9797 Don't start user-code symbols with "yy", to avoid name space problems.
9798
97992005-09-19 Akim Demaille <akim@epita.fr>
9800
9801 Remove the traits, failed experiment.
9802 It never proved useful, and anyway because of the current
9803 definition, it was not possible to have several specialization of
9804 this traits, making it useless.
9805 * data/lalr1.cc (yy:traits): Remove.
9806 Inline its definitions in the parser class.
9807
98082005-09-19 Akim Demaille <akim@epita.fr>
9809
9810 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9811 least Mac OSX with a /usr/local install of gettext.
9812
98132005-09-19 Akim Demaille <akim@epita.fr>
9814
9815 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9816 and yytoken for similarity with the other skeletons.
9817
98182005-09-19 Akim Demaille <akim@epita.fr>
9819
9820 * NEWS, configure.ac: update version number to 2.1a.
9821
98222005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9823
9824 * NEWS: Version 2.1.
9825
9826 * NEWS: Remove notice of yytname change, since it was never in an
9827 official release.
9828 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9829 diagnostic.
9830 * src/output.c (prepare): Likewise.
9831 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9832 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9833 is not defined. This is an awful hack, but it's enough for now.
9834 All callers changed.
9835 * tests/glr-regression-at (make_value): Args are const pointers now,
9836 to avoid GCC warning.
9837 (Duplicated user destructor for lookahead): New test. Currently
9838 skipped. It fails on my host but I'm not sure it'll always fail.
9839
98402005-09-16 Akim Demaille <akim@epita.fr>
9841
9842 * src/symtab.h (struct symbol): Declare the printer and destructor
9843 as const, to avoid accidental calls to free.
9844 (symbol_destructor_set, symbol_printer_set): Adjust.
9845 * src/symtab.c: Adjust.
9846
98472005-09-16 Akim Demaille <akim@epita.fr>
9848
9849 * data/c.m4 (b4_token_enums): New.
9850 (b4_token_defines): Rename as...
9851 (b4_token_enums_defines): this.
9852 (b4_token_defines): New, output only the #defines.
9853 * data/yacc.c, data/glr.c: Adjust.
9854 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9855 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9856 as default values.
9857
98582005-09-16 Akim Demaille <akim@epita.fr>
9859
9860 * data/lalr1.cc (yylex_): Remove, inline its code.
9861 (yyreport_syntax_error_): Remove, replaced by...
9862 (yysyntax_error_): this which returns a string and leaves to the
9863 caller the call to the users' error function.
9864 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9865 Move from members of the parser object...
9866 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9867 to local variables of the parse function.
9868
98692005-09-16 Akim Demaille <akim@epita.fr>
9870
9871 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9872 since it's in Bison's name space.
9873
98742005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9875
9876 * data/glr.c (yyresolveValue): Add default case to pacify
9877 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9878
9879 * NEWS: Document when yyparse started to return 2.
9880 * doc/bison.texinfo (Parser Function): Document when yyparse
9881 returns 2.
9882
9883 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9884 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9885 changed.
9886 (class position): file_name -> filename (reverting). All uses changed.
9887
98882005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9889
9890 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9891 do anything if $@ exists. This reverts part of the 2005-07-07
9892 patch.
9893
98942005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9895
9896 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9897 contains obsolete information and isn't worth distributing as a
9898 separate file anyway.
9899 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9900 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9901 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9902 (yyparse): Abort if user code uses longjmp to throw an unexpected
9903 value.
9904
99052005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9906
9907 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9908 Suggested by twlevo@xs4all.nl.
9909
9910 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9911 This avoids a diagnostic from gcc -Wswitch-enum.
9912 Problem reported by twlevo@xs4all.nl.
9913
9914 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9915 standards. Use "file name" or "file" or "name", depending on
9916 the context.
9917 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9918 not to hack/foo.tab.c.
9919 (Calc++ Top Level): 2nd arg of main is not const.
9920 * data/glr.c: b4_filename -> b4_file_name.
9921 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9922 All uses changed.
9923 (class position): filename -> file_name. All uses changed.
9924 * data/yacc.c: b4_filename -> b4_file_name.
9925 * lib/bitset.h: filename -> file_name in local vars.
9926 * lib/bitset_stats.c: Likewise.
9927 * src/files.c: Likewise.
9928 * src/scan-skel.l ("@output ".*\n): Likewise.
9929 * src/files.c (file_name_split): Renamed from filename_split.
9930 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9931
99322005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9933
9934 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9935 to accommodate latest gnulib.
9936
9937 * tests/glr-regression.at (Duplicate representation of merged trees):
9938 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9939
9940 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9941 needed.
9942
99432005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9944
9945 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9946 All uses changed. Invoke user destructor after an error during a
9947 split parse (trivial change from Joel E. Denny).
9948
9949 * tests/glr-regression.at
9950 (User destructor after an error during a split parse): New test case.
9951 Problem reported by Joel E. Denny in:
9952 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9953
99542005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9955
9956 * README-cvs: Give URLs for recommended tools.
9957 Mention Gzip version problem, and bootstrapping issues.
9958 Remove troubleshooting section, as it's somewhat obsolete.
9959
9960 * bootstrap (no_cache): New var, to accommodate different wget
9961 variants. Use it instead of '-C off'. Problem reported by
9962 twlevo@xs4all.nl.
9963
9964 * data/glr.c (yydestroyStackItem): New function.
9965 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9966 debugging information. Problem reported by Joel E. Denny.
9967
99682005-08-25 Akim Demaille <akim@epita.fr>
9969
9970 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9971
99722005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9973
9974 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9975 Don't invoke destructor on unresolved entries.
9976 * tests/glr-regression.at
9977 (User destructor for unresolved GLR semantic value): New test case.
9978 Problem reported by Joel E. Denny in:
9979 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9980
99812005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9982
9983 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9984 Add strnlen.c.
9985 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9986 lib-prefix.m4, po.m4.
9987
9988 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9989 in yydestruct diagnostic, since it might not be an error.
9990 Problem reported by Joel Denny near end of
9991 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9992 * data/lalr1.cc (yyerturn): Likewise.
9993 * data/yacc.c (yyreturn): Likewise.
9994 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9995
9996 * src/files.c: Remove obsolete FIXME comment.
9997
9998 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9999 with the other templates, and to fix bogus run-on messages such
10000 as the one reported at the end of
10001 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10002 All callers changed to avoid the newline.
10003 (yyprocessOneStack): Output two lines rather than one, to accommodate
10004 the above change. This changes the debug output format slightly.
10005
10006 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10007 reported by Joel E. Denny in
10008 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10009 (trivial change).
10010 * tests/glr-regression.at (Duplicate representation of merged trees):
10011 New test, from Joel E. Denny in:
10012 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10013 * THANKS: Add Joel E. Denny.
10014
10015 * configure.ac (AC_INIT): Bump to 2.0c.
10016
100172005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10018
10019 * NEWS: Version 2.0b.
10020
10021 * Makefile.am (SUBDIRS): Put examples before tests, so that
10022 "make check" doesn't finish with "All 1 tests passed".
10023
10024 * tests/regression.at (Token definitions): Don't rely on
10025 AT_PARSER_CHECK for data that contains backslashes. It currently
10026 uses 'echo', and 'echo' isn't portable if its argument contains
10027 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10028 that the byte '\0xff' is not printable in the C locale; it is,
10029 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10030 not printable, so use '\0x81' to test.
10031
10032 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10033 version of GCC, since the macro is used with non-GCC compilers.
10034
10035 Fix core dump reported by Pablo De Napoli in
10036 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10037 * tests/regression.at (Invalid inputs with {}): New test.
10038 * src/parse-gram.y (token_name): Translate type before using
10039 it as an index.
10040
10041 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10042 the user's name space. All uses changed to __attribute__
10043 ((__unused__)).
10044 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10045 Add __attribute__ ((__noreturn__)).
10046
10047 * etc/clcommit: Remove. We weren't using it, and it failed
10048 "make maintainer-distcheck".
10049 * Makefile.maint: Merge from coreutils.
10050 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10051 (syntax-check-rules): Change list of rules as described below.
10052 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10053 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10054 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10055 (sc_trailing_space): New rules.
10056 (sc_xalloc_h_in_src): Remove.
10057 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10058 (sc_space_tab, sc_error_exit_success, sc_changelog):
10059 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10060 (makefile-check, po-check, author_mark_check):
10061 (makefile_path_separator_check, copyright-check):
10062 Use grep -n, to make it easier to find violations.
10063 Use CVS_LIST and CVS_LIST_EXCEPT.
10064 (header_regexp, h_re): Remove.
10065 (dd_c): New macro.
10066 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10067 (my-distcheck): Use more-modern GCC flags.
10068 (signatures, %.asc): Remove.
10069 (rel-files, announcement): Remove signatures.
10070 Restore old updating code, even though we don't use it, so
10071 that we're the same as coreutils.
10072 (alpha, beta, major): Depend on news-date-check.
10073 Make the upload commands.
10074
10075 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10076 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10077 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10078 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10079 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10080 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10081 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10082 * tests/sets.at: Likewise.
10083
10084 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10085 we comment out the Autoconf version number.
10086 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10087 it's error-prone and "make maintainer-distcheck" rejects it.
10088
10089 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10090 Indent calls to "error" to pacify "make maintainer-distcheck",
10091 when the calls are not intended to be translated.
10092 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10093
10094 * src/Makefile.am (DEFS): Use +=, to pacify
10095 "make maintainer-distcheck".
10096 (bison_SOURCES): Add scan-skel.h.
10097 (sc_tight_scope): New rule, from coreutils.
10098
10099 * src/files.c (src_extension, header_extension):
10100 Now static, not extern.
10101 * src/getargs.c (short_options): Likewise.
10102 * src/muscle_tab.c (muscle_table): Likewise.
10103 * src/parse-gram.y (current_class, current_type, current_prec):
10104 Likewise.
10105 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10106 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10107 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10108 void, to avoid warning when NLS is disabled.
10109 * src/output.c: Include scan-skel.h.
10110 (scan_skel): Remove decl, since scan-skel.h does this.
10111 (output_skeleton):
10112 Indent calls to "error" to pacify "make maintainer-distcheck".
10113 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10114 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10115 "make maintainer-distcheck".
10116 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10117 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10118 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10119 (skel_lex_destroy, scan_skel): Move these decls to...
10120 * src/scan-skel.h: New file.
10121 * src/uniqstr.c (uniqstr_assert):
10122 Indent calls to "error" to pacify "make maintainer-distcheck".
10123
10124 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10125 not @VAR@.
10126
10127 * tests/torture.at: Revamp to avoid misuse of atoi that
10128 "make maintainer-distcheck" complained about.
10129
10130 * examples/extexi (message): Don't print a message more than once,
10131 and omit line-number decoration that makes Emacs compile think
10132 that informative messages are worth worrying about.
10133
101342005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10135
10136 * configure.ac: Update version number.
10137
10138 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10139 accidentally.
10140 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10141 autogenerated by the maintainer.
10142 * examples/calc++/.cvsignore: Add *.yy.
10143
10144 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10145 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10146 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10147
10148 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10149
10150 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10151 from maintainer-distcheck about casting the argument of 'free'.
10152
10153 * NEWS: Mention recent yytname changes.
10154 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10155
10156 * bootstrap: For translations that have not yet been upgraded to
10157 the new runtime-po domain, prime the pump by extracting the
10158 relevant strings from the obsolete translations. This code can be
10159 removed once the bison-runtime domain has been translated by each
10160 team.
10161
10162 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10163 now that token names are already quoted.
10164
10165 Fix problem reported by Anthony Heading.
10166 * data/glr.c (YYTOKEN_TABLE): New macro.
10167 (yytname): Define if YYTOKEN_TABLE.
10168 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10169 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10170 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10171 * src/output.c (prepare_symbols): Output token_table_flag.
10172
101732005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10174
10175 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10176 again if the first call fails.
10177
10178 * data/glr.c (yytnamerr): New function.
10179 (yyreportSyntaxError): Use it to dequote most string literals.
10180 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10181 with other skeletons. All uses changed.
10182 (yytnameerr_): New function.
10183 (yyreport_syntax_error): Use it to dequote most string literals.
10184 * data/yacc.c (yytnamerr): New function.
10185 (yyerrlab): Use it to decode most string literals.
10186 * doc/bison.texinfo (Decl Summary, Calling Convention):
10187 Clarify quoting convention of yytname.
10188 * src/output.c (prepare_symbols): Quote all names. This undoes
10189 the 2005-04-17 change, which is now accomplished (mostly) via
10190 changes in the parsers as described above.
10191 * tests/regression.at (Token definitions, Web2c Actions):
10192 Undo most 2005-04-17 change here, too.
10193
101942005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10195
10196 Fix more problems reported by twlevo@xs4all.nl.
10197 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10198 remove trailing spaces. This loses the exit status of ./types,
10199 and isn't needed since ./types shouldn't be emitting trailing
10200 spaces.
10201 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10202 as the stack isn't valid in that case.
10203
10204 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10205 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10206 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10207 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10208 is used.
10209 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10210 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10211 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10212 Likewise.
10213
10214 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10215 overly-picky compilers that reject 'char *foo = "bar";'.
10216
10217 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10218 to FILE * parameter, not to stderr. This fixes a typo introduced
10219 in the 2005-07-12 change.
10220
10221 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10222 warnings from GCC 4.
10223
10224 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10225 (yyglrShiftDefer, yysplitStack):
10226 Remove unused parameters b4_pure_formals. All uses changed.
10227 (yyglrShift): Remove unused parameters b4_user_formals.
10228 All uses changed.
10229 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10230
102312005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10232
10233 Destructor cleanups and regularization among the three skeletons.
10234 * NEWS: Document the behavior changes.
10235 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10236 stack before failing, as the cleanup code will do it for us now.
10237 * data/lalr1.cc (yyerrlab): Likewise.
10238 * data/glr.c (yyparse): Pop everything off the stack before
10239 freeing it, so that destructors get called properly.
10240 * data/lalr1.cc (yyreturn): Likewise.
10241 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10242 This is more consistent.
10243 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10244 why destructors might be called. 1.875 -> 2.1.
10245 (Destructor Decl, Decl Summary, Table of Symbols):
10246 Some English-language cleanups for %destructor.
10247 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10248 Add output line for destructor of start symbol.
10249 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10250 because of that same extra output line.
10251
10252 * NEWS: Document minor wording changes in diagnostics of
10253 Bison-generated parsers.
10254 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10255 Remove unused formals. All uses changed.
10256 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10257 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10258 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10259 Rename yyoverflowab to yyexhaustedlab.
10260 When memory exhaustion occurs during syntax-error reporting,
10261 report it separately rather than in a single diagnostic; this
10262 eases translation.
10263 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10264 (Memory Exhausted): Renamed from Parser Stack Overflow.
10265 Revamp wording slightly to prefer "memory exhaustion".
10266 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10267
10268 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10269
10270 Add i18n support to the GLR skeleton. Partially fix the C++
10271 skeleton; a C++ expert needs to finish this. Remove debugging
10272 msgids; there's little point to having them translated, since they
10273 can be understood only by someone who can read the
10274 (English-language) source code.
10275
10276 Generate runtime-po/bison-runtime.pot automatically, so that we
10277 don't have to worry about garbage getting in that file. We'll
10278 make sure after the next official release that old msgids don't
10279 get lost. See
10280 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10281
10282 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10283 Now auto-generated.
10284 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10285 Fix typos in explanations of the runtime file.
10286 * bootstrap: Change gettext keyword from YYI18N to YY_.
10287 Use standard Makefile.in.in in runtime-po, since we'll arrange
10288 for backward-compatible bison-runtime.po files in a different way.
10289 * data/glr.c (YY_): New macro, from yacc.c.
10290 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10291 Translate messages intended for users.
10292 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10293 the wording in the other skeletons. We don't know that the memory
10294 is virtual.
10295 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10296 Use same method that yacc.c uses.
10297 Don't translate debugging messages.
10298 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10299 it doesn't work (yet), and requires C++ expertise to fix.
10300 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10301 Move defn to a more logical place, to be consistent with other
10302 skeletons.
10303 Don't translate debugging messages.
10304 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10305 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10306 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10307 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10308
10309 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10310 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10311 void, not int.
10312 * tests/glr-regression.at (Badly Collapsed GLR States):
10313 Likewise.
10314 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10315 yylex should return 0 at EOF rather than aborting.
10316
10317 Improve tests for stack overflow in GLR parser.
10318 Problem reported by twlevo@xs4all.nl.
10319 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10320 All uses removed.
10321 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10322 can handle the problem.
10323 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10324 (yyparse): New local variable yyresult to record the result.
10325 Use result of setjmp to set it, rather than storing itinto
10326 struct.
10327 (yyDone): Remove label.
10328 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10329 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10330 if YYABORT is used).
10331 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10332 yyparse status; put status > 1 into diagnostic.
10333 Check that status==2 works.
10334 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10335 Use exit status 3 for failure to open (which shouldn't happen).
10336
103372005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10338
10339 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10340 1 on syntax error; just let yyparse do its thing.
10341 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10342 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10343 (Exploding the Stack Size with Alloca):
10344 (Exploding the Stack Size with Malloc):
10345 Expect exit status 2, not 1, since the parser is supposed to blow
10346 its stack. Problem reported by twlevo@xs4all.nl.
10347
10348 * data/glr.c (yyparse): Don't assume that the initial calls
10349 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10350 Print a stack-overflow message and fail instead.
10351 Initialize the line-number information before creating the stack,
10352 so that the stack-overflow message can report line zero safely.
10353
103542005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10355
10356 Fix problems reported by twlevo@xs4all.nl.
10357 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10358 (yyuserMerge): Provide a default case if b4_mergers is empty.
10359 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10360 * tests/glr-regression.at
10361 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10362 Add casts to pacify C++ compilers.
10363 * tests/glr-regression.at (Improper merging of GLR delayed action
10364 sets): Declare yylex before using it.
10365 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10366 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10367 test for valgrind; valgrind is independent of g++.
10368 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10369 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10370 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10371 Use a destructor, so that we can expand the stack. Change
10372 YYSTYPE to char * so that we can free it. Cast result of malloc.
10373
103742005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10375
10376 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10377 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10378
103792005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10380
10381 * PACKAGING: New file, suggested by Bruno Haible and taken from
10382 similar wording in gettext's PACKAGING file.
10383 * NEWS: Mention PACKAGING.
10384 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10385
103862005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10387
10388 * NEWS: Document recent i18n improvements.
10389 * bootstrap: Get runtime translations into runtime-po.
10390 Create runtime-po files automatically, if possible.
10391 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10392 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10393 does not infringe on the user's name space.
10394 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10395 * doc/bison.texinfo (Internationalization): Revamp the English
10396 and Texinfo syntax a bit, to try to make it clearer.
10397 (Bison Options, Option Cross Key): Mention --print-localedir.
10398 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10399 YYENABLE_NLS. Quote a bit more.
10400 * runtime-po/.cvsignore: New file.
10401 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10402 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10403 * runtime-po/quot.sed: Likewise.
10404 * runtime-po/boldquot.sed: Likewise.
10405 * runtime-po/en@quot.header: Likewise.
10406 * runtime-po/en@boldquot.header: Likewise.
10407 * runtime-po/insert-header.sin: Likewise.
10408 * runtime-po/remove-potcdate.sin: Likewise.
10409 * runtime-po/Makevars: Likewise.
10410 * runtime-po/LINGUAS: Likewise.
10411 * runtime-po/de.po: Likewise; we will rely on the translation project
10412 to maintain this, so "bootstrap" should get it.
10413 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10414 its value.
10415 * src/main.c (main): Bind the bison-runtime domain, too.
10416
104172005-07-12 Bruno Haible <bruno@clisp.org>
10418
10419 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10420 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10421 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10422 * runtime-po: New directory.
10423 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10424 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10425 * runtime-po/Rules-quot: New file, copied from po/.
10426 * runtime-po/quot.sed: Likewise.
10427 * runtime-po/boldquot.sed: Likewise.
10428 * runtime-po/en@quot.header: Likewise.
10429 * runtime-po/en@boldquot.header: Likewise.
10430 * runtime-po/insert-header.sin: Likewise.
10431 * runtime-po/remove-potcdate.sin: Likewise.
10432 * runtime-po/Makevars: New file.
10433 * runtime-po/POTFILES.in: New file.
10434 * runtime-po/LINGUAS: New file.
10435 * runtime-po/bison-runtime.pot: New file.
10436 * runtime-po/de.po: New file.
10437 * m4/bison.m4: New file.
10438 * Makefile.am (SUBDIRS): Add runtime-po.
10439 (aclocaldir, aclocal_DATA): New variables.
10440 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10441 Define aclocaldir.
10442 * src/getargs.c (usage): Document --print-localedir option.
10443 (PRINT_LOCALEDIR_OPTION): New enum item.
10444 (long_options): Add --print-localedir option.
10445 (getargs): Handle --print-localedir option.
10446 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10447 (Internationalization): New section.
10448
104492005-07-12 Akim Demaille <akim@epita.fr>
10450
10451 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10452 for consistency with the rest of the code.
10453 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10454 Add separators.
10455
104562005-07-12 Akim Demaille <akim@epita.fr>
10457
10458 * src/parse-gram.y: Use %printer instead of YYPRINT.
10459
104602005-07-12 Akim Demaille <akim@epita.fr>
10461
10462 * src/symtab.h, src/symtab.c (symbol_print): New.
10463 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10464 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10465
104662005-07-12 Akim Demaille <akim@epita.fr>
10467
10468 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10469 b4_at_dollar and b4_dollar_dollar.
10470
104712005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10472
10473 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10474 and Pennello's paper.
10475
104762005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10477
10478 * data/yacc.c (yyparse): Undo previous patch. Instead,
10479 set yylsp[0] and yyvsp[0] only if the initial action
10480 sets yylloc and yylval, respectively.
10481
10482 * data/yacc.c (yyparse): In the initial action, set
10483 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10484 This avoids the use of undefined variables if the initial
10485 action does not set yylloc and/or yylval.
10486
104872005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10488
10489 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10490 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10491 Remove from CVS. These files are automatically generated.
10492 * examples/extexi: Clarify that this file is now part of Bison,
10493 not GNU M4, and that it works with any POSIX-compatible Awk.
10494 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10495 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10496 so that we also get calc++-parser.yy. Geneate it.
10497 Use $(AWK), not gawk, since any conforming Awk will do.
10498 Put comment before action, since older 'make' can't handle comment
10499 in action.
10500 $(BUILT_SOURCES): List all built sources, not just some of them.
10501 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10502 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10503 $($(calc_sources_generated)): Remove unnecessary test for existence
10504 of target. (This had a shell syntax error anyway; a stray "x".)
10505 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10506 calc++-parser.yy.
10507 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10508
10509 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10510 implied by the other modules.
10511
105122005-07-06 Akim Demaille <akim@epita.fr>
10513
10514 Bind examples/calc++ to the package.
10515 * examples/calc++/Makefile: Remove, replaced by...
10516 * examples/calc++/Makefile.am: ... this new file.
10517 * examples/calc++/test: Remove input.
10518 * examples/calc++/compile: Remove.
10519 * examples/Makefile.am: New.
10520 * configure.ac, Makefile.am: Adjust.
10521 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10522
105232005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10524
10525 * data/glr.c (yyFail): Drastically simplify; since the format argument
10526 never had any % directives, we can simply pass it to yyerror.
10527 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10528 be modified later, as that is the usual style in glr.c.
10529 Problems reported by Paul Hilfinger.
10530
10531 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10532 and size overflow errors.
10533 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10534 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10535 (YYSIZEMAX): New macro.
10536 (yystpcpy): New function, taken from yacc.c.
10537 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10538 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10539 so that we don't have to maintain their signatures.
10540 (yyFail): Check for buffer overflow, by using vsnprintf rather
10541 than vsprintf. Allocate a bigger buffer if possible.
10542 Report an error if buffer allocation fails.
10543 (yyStackOverflow): New function.
10544 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10545 the initialization was successful. It might fail if storage was
10546 exhausted.
10547 (yyexpandGLRStack): Add more checks for storage allocation failure.
10548 Use yyStackOverflow to report failures.
10549 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10550 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10551 Don't assume stack number fits in int.
10552 (yysplitStack): Check for storage allocation failure.
10553 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10554 can print diagnostics on storage allocation failure. All callers
10555 changed.
10556 (yyresolveValue): Use yybool for boolean.
10557 (yyreportSyntaxError): Check for size-calculation overflow.
10558 This code is taken from yacc.c.
10559 (yyparse): Check for storage allocation errors when allocating
10560 the initial stack.
10561
105622005-07-05 Akim Demaille <akim@epita.fr>
10563
10564 Extract calc++ from the documentation.
10565 * doc/bison.texinfo (Calc++): Add the extraction marks.
10566 * examples/extexi: New, from the aborted GNU Programming 2E.
10567 Separate the different paragraph of a file with empty lines.
10568 * examples/Makefile: Use it to extract the whole calc++ example.
10569
105702005-06-24 Akim Demaille <akim@epita.fr>
10571
10572 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10573 class typedefs.
10574
105752005-06-22 Akim Demaille <akim@epita.fr>
10576
10577 * doc/bison.texinfo (C++ Language Interface): First stab.
10578 (C++ Parsers): Remove.
10579
105802005-06-22 Akim Demaille <akim@epita.fr>
10581
10582 * data/lalr1.cc (yylex_): Honor %lex-param.
10583
105842005-06-22 Akim Demaille <akim@epita.fr>
10585
10586 Start a set of simple examples.
10587 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10588 * examples/calc++/calc++-driver.hh,
10589 * examples/calc++/calc++-parser.yy,
10590 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10591 * examples/calc++/compile, examples/calc++/test: New.
10592
105932005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10594
10595 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10596 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10597 which stems from the 2005-05-27 patch.
10598
105992005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10600
10601 * data/glr.c: Modify treatment of unused parameters to permit use
10602 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10603
106042005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10605
10606 Fix infringement on user name space reported by Janos Zoltan Szabo.
10607 * data/yacc.c (yyparse): strlen -> yystrlen.
10608
106092005-05-30 Akim Demaille <akim@epita.fr>
10610
10611 * data/lalr1.cc (_): New.
10612 Translate the various messages.
10613
106142005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10615
10616 Fix infringement on user name space reported by Bruno Haible.
10617 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10618 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10619 the user's name space.
10620 (alloca): Include <stdlib.h> to get it, if it's not built in.
10621 (YYMALLOC, YYFREE): Define only if needed.
10622 (malloc, free): Declare, but only if needed, as this infringes on
10623 the user name space.
10624
106252005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10626
10627 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10628 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10629 with %d format.
10630 * lib/ebitset.c (min, max): Undef before defining.
10631 * lib/vbitset.c (min, max): Likewise.
10632 * lib/subpipe.c (create_subpipe): Save local variables in case
10633 vfork clobbers them.
10634
106352005-05-24 Bruno Haible <bruno@clisp.org>
10636
10637 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10638 error message syntax used by gcc-4.0.
10639
106402005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10641
10642 * README: Mention m4 1.4.3. Remove obsolete advice about
10643 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10644
10645 * bootstrap: Remove workaround for problem I encountered with
10646 gettext 0.14.1; it seems to be fixed now.
10647
106482005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10649
10650 * NEWS: Version 2.0a.
10651
10652 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10653 the previous change.
10654
10655 Various maintainer cleanups.
10656 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10657 conftest*, for benefit of CVS commands run at the same time as
10658 "configure". Add build-aux, since "bootstrap" now creates it and
10659 its subfiles.
10660 * Makefile.cfg (move_if_change): Remove.
10661 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10662 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10663 (po_repo, do-po-update, po-update, wget_files, get-targets):
10664 (config.guess-url_prefix, config.sub-url_prefix):
10665 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10666 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10667 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10668 Remove.
10669 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10670 this is now the recommended name.
10671 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10672 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10673 ylwrap. These files now go into build-aux.
10674 * config/move-if-change: Remove.
10675 * config/prev-version.txt: Bump from 1.75 to 2.0.
10676
10677 * bootstrap: Add stdio-safer, unistd-safer modules.
10678 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10679 we don't need it).
10680 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10681 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10682 * lib/subpipe.c: Include "unistd-safer.h".
10683 (create_subpipe): Make sure all the newly-created
10684 file descriptors are > 2, so that diagnostics don't
10685 get sent down them (which might cause Bison to hang, in theory).
10686 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10687 * src/files.c (xfopen): Use fopen_safer, not fopen.
10688
10689 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10690 yesterday's yacc.c fix.
10691
106922005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10693
10694 * data/glr.c, data/lalr1.cc: Update copyright date.
10695
10696 Fix a destructor bug reported by Wolfgang Spraul in
10697 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10698 * data/yacc.c (yyabortlab): Don't call destructor, and
10699 don't set yychar to EMPTY.
10700 (yyoverflowlab): Don't call destructor.
10701 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10702 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10703 since we no longer output the message "discarding lookahead token
10704 end of input ()".
10705
107062005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10707
10708 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10709 fix a small glitch in debugging output.
10710 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10711 after YY_SYMBOL_PRINT where needed.
10712
10713 (struct yyGLRState): Add some comments.
10714 (struct yySemanticOption): Add some comments.
10715 (union yyGLRStackItem): Add comment.
10716
10717 (yymergeOptionSets): Correct this to properly perform the union,
10718 avoiding infinite reported by Michael Rosien.
10719 Update comment.
10720
10721 * tests/glr-regression.at: Add test for GLR merging error reported
10722 by M. Rosien.
10723
107242005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10725
10726 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10727 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10728 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10729 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10730 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10731 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10732 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10733 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10734 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10735 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10736 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10737 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10738 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10739 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10740 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10741 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10742 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10743 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10744 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10745 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10746 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10747 src/output.h, src/parse-gram.c, src/parse-gram.h,
10748 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10749 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10750 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10751 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10752 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10753 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10754 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10755 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10756 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10757 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10758 tests/reduce.at, tests/regression.at, tests/sets.at,
10759 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10760 Update FSF postal mail address.
10761
107622005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10763
10764 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10765 Problem reported by Ralf Menzel.
10766
107672005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10768
10769 * tests/actions.at: Test that stack overflow invokes destructors.
10770 From Marcus Holland-Moritz.
10771 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10772 from here....
10773 (yyreturn): to here. That way, destructors are called properly
10774 even if the stack overflows, or the user calls YYACCEPT or
10775 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10776 (yyoverflowlab): Destroy the lookahead.
10777
107782005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10779
10780 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10781
107822005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10783
10784 * NEWS: Bison-generated C parsers no longer quote literal strings
10785 associated with tokens.
10786 * src/output.c (prepare_symbols): Don't escape strings,
10787 since users don't want to see C escapes.
10788 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10789 in diagnostics.
10790 * tests/input.at (Torturing the Scanner): Likewise.
10791 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10792
107932005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10794
10795 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10796 the data size is known to be too small and we can't increase it.
10797 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10798
107992005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10800
10801 * src/parse-gram.y: Include quotearg.h.
10802 (string_as_id): Quote $1 before using it as a key, since the
10803 lexer no longer quotes it for us.
10804 (string_content): Don't strip quotes, since lexer no longer
10805 quotes it for us.
10806 * src/scan-gram.l: Include quotearg.h.
10807 ("\""): Omit quote.
10808 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10809 a key, since the rest of the lexer doesn't quote it.
10810 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10811 * tests/regression.at (Token definitions): Check for backslashes
10812 in token strings.
10813
10814 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10815 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10816 (yyparse): Revamp code to generate long syntax error message, to
10817 make it easier to translate, and to avoid problems with arithmetic
10818 overflow. Change "virtual memory" to "memory" in diagnostic, since
10819 we don't know whether the memory is virtual.
10820
108212005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10822
10823 * NEWS: Bison-generated C parsers now use the _ macro to
10824 translate strings.
10825 * data/yacc.c (_) [!defined _]: New macro.
10826 All English strings wrapped inside this macro.
10827 * doc/bison.texinfo (Bison Parser): Document _.
10828 * po/POTFILES.in: Include src/parse-gram.c, since it now
10829 includes translateable strings that parse-gram.y doesn't.
10830
108312005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10832
10833 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10834 reverting the 2004-10-11 change to this function.
10835 (symbol_check_alias_consistency): Don't call symbol_type_set
10836 if the type name is already correct.
10837 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10838
108392005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10840
10841 * tests/regression.at (Token definitions): Don't use a token named
10842 c, as that generates a "#define c ..." that runs afoul of buggy
10843 stdlib.h that uses the identifier c as a member of struct
10844 drand48_data. Problem reported by Horst Wente.
10845
108462005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10847
10848 * bootstrap: Change translation URL from
10849 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10850 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10851 redirection glitches. Problem reported by twlevo@xs4all.nl.
10852
108532005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10854
10855 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10856 after operands; POSIX says this isn't portable for the c99 command.
10857
108582005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10859
10860 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10861 immediately if a data overrun has occurred; this may help us track
10862 down what may be a spurious failure on MacOS.
10863
108642005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10865
10866 Respond to problems reported by twlevo@xs4all.nl.
10867
10868 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10869
10870 * src/vcg.h: Comment fix.
10871 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10872 (G_CMAX): Change to -1 instead of INT_MAX.
10873
10874 * data/yacc.c (yyparse): Omit spaces before #line.
10875
108762005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10877
10878 * src/tables.c (state_number_to_vector_number): Put it inside an
10879 "#if 0", since it's not currently used. Problem reported by
10880 Roland McGrath.
10881
108822005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10883
10884 * src/output.c (escaped_output): Renamed from
10885 escaped_file_name_output, since we now use it for symbol tags as
10886 well. All uses changed.
10887 (symbol_destructors_output, symbol_printers_output):
10888 Escape symbol tags too.
10889 Problem reported by Matyas Forstner in
10890 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10891
10892 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10893 not needed.
10894 * src/output.c (user_actions_output, token_definitions_output,
10895 symbol_destructors_output, symbol_printers_output): Likewise.
10896 * src/reader.c (prologue_augment): Likewise.
10897 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10898
10899 * src/vcg.c (output_edge): Don't quote linestyle arg.
10900 Problem reported by twlevo@xs4all.nl.
10901
109022005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10903
10904 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10905 example, reported by Derek M Jones. Also, make the example even
10906 more outrageous, to better illustrate how bad the problem is.
10907
109082005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10909
10910 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10911 putsym. Typo reported by Sebastian Piping.
10912
109132005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10914
10915 * doc/bison.texinfo (Language and Grammar): some -> same
10916 (Epilogue): int he -> in the
10917 Typos reported by Sebastian Piping via Justin Pence.
10918
109192005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10920
10921 * tests/glr-regression.at (Improper handling of embedded actions
10922 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10923 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10924 with dollar signs in test names.
10925 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10926 for a similar reason.
10927
109282005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10929
10930 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10931 wants to redefine G_VIEW.
10932
109332005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10934
10935 * src/vcg.c (get_view_str): Remove case for normal_view.
10936 Problem reported by twlevo@xs4all.nl.
10937
109382005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10939
10940 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10941 Problem reported by twlevo@xs4all.nl.
10942
10943 * doc/bison.texinfo: Change @dircategory from "GNU programming
10944 tools" to "Software development". Requested by Richard Stallman
10945 via Karl Berry.
10946
109472005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10948
10949 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10950 Problem reported by twlevo@xs4all.nl.
10951
109522005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10953
10954 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10955 keyword; it's not needed with modern compilers, and it doesn't
10956 affect correctness with older compilers. Suggested by
10957 twlevo@xs4all.nl.
10958
109592005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10960
10961 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10962 gcc -Wswitch-default.
10963 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10964 * data/yacc.c (yyparse): Likewise.
10965
109662005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10967
10968 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10969 already. Let config.h define any nonstandard values.
10970
109712005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10972
10973 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10974 for the benefit of slower hosts. Problem reported by
10975 Nelson H. F. Beebe.
10976
109772005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10978
10979 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10980 being defined and not used.
10981 * data/lalr1.cc (yyparse): Likewise.
10982 Use "if (false)" rather than "if (0)".
10983
109842005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10985
10986 * TODO: Mention that we should allow NUL bytes in tokens.
10987
109882005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10989
10990 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10991 Problem reported by Hans Aberg.
10992
109932005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10994
10995 * src/getargs.c (version): Happy new year; update overall
10996 program copyright date from 2004 to 2005.
10997
10998 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10999 Problem reported by Hans Aberg.
11000 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11001 (Output file names.): Add a test for the case when standard output
11002 is closed.
11003
110042004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11005
11006 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11007 to fix an oversight in the Bison 2.0 manual.
11008
110092004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11010
11011 * NEWS: Version 2.0. Reformat the existing news items since
11012 1.875, so that related items are grouped together.
11013 * configure.ac (AC_INIT): Bump version to 2.0.
11014 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11015
11016 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11017 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11018 otherwise, we're not testing alloca. Unfortunately there's no
11019 simple way to consult HAVE_ALLOCA here.
11020
11021 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11022 for yymsg, too.
11023
11024 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11025 hand. This avoids a warning about comparing int to size_t when
11026 GCC warnings are enabled.
11027
110282004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11029
11030 * NEWS: Bison-generated parsers no longer default to using the
11031 alloca function (when available) to extend the parser stack, due
11032 to widespread problems in unchecked stack-overflow detection.
11033 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11034 responsibility to set it to a positive value. This lets the user
11035 specify a value that is not a preprocessor constant.
11036 * data/yacc.c (YYMAXDEPTH): Likewise.
11037 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11038 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11039 to be a compile-time constant. However, explain the constraints on it.
11040 Also, explain the constraints on YYINITDEPTH.
11041 (Table of Symbols): Explain that alloca is no longer the default.
11042 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11043 to 1.
11044
11045 * doc/bison.texinfo (Location Default Action): Mention that n must
11046 be zero when k is zero. Suggested by Frank Heckenbach.
11047
110482004-12-22 Akim Demaille <akim@epita.fr>
11049
11050 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11051 (parser::state_type, parser::semantic_type, parser::location_type):
11052 Private, not public.
11053 (parser::parse): Return ints, not bool.
11054 Returning a bool introduces a problem: 0 corresponds to false, and
11055 it seems weird to return false on success. Returning true changes
11056 the conventions for yyparse.
11057 Alternatively we could return void and send an exception.
11058 There is no clear consensus (yet?).
11059 (state_stack, semantic_stack, location_stack): Rename as...
11060 (state_stack_type, semantic_stack_type, location_stack_type): these.
11061 Private, not public.
11062 * tests/c++.at: New.
11063 * tests/testsuite.at, tests/Makefile.am: Adjust.
11064
110652004-12-21 Akim Demaille <akim@epita.fr>
11066
11067 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11068
110692004-12-21 Akim Demaille <akim@epita.fr>
11070
11071 Don't impose std::string for filenames.
11072
11073 * data/lalr1.cc (b4_filename_type): New.
11074 (position::filename): Use it.
11075 (parser.hh): Move the inclusion of stack.hh and location.hh below
11076 the user code, so that needed headers for the filename type can be
11077 included first.
11078 Forward declare them before the user code.
11079 * tests/Makefile.am (check-local, installcheck-local): Pass
11080 TESTSUITEFLAGS to the TESTSUITE.
11081
110822004-12-20 Akim Demaille <akim@epita.fr>
11083
11084 Use more STL like names: my_class instead of MyClass.
11085
11086 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11087 (SemanticStack, SemanticType, StateStack, StateType)
11088 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11089 (Parser::value): Rename as...
11090 (location_stack, location_type, rhs_number_type, semantic_stack)
11091 (semantic_type, state_stack, state_type, token_number_type, stack)
11092 (slice, traits, parser::yylloc, parser::yylval): these.
11093
11094 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11095
110962004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11097
11098 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11099 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11100
111012004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11102
11103 Remove uses of 'short int' and 'unsigned short int'. This raises
11104 some arbitrary limits. It uses more memory but nowadays that's
11105 not much of an issue.
11106
11107 This change does not affect the generated parsers; that's a different
11108 task, as some users will want to conserve memory there.
11109
11110 Ideally we should use size_t to represent all object counts, and
11111 something like ptrdiff_t to represent signed differences of object
11112 counts; but that will require more code-cleanup than I have the
11113 time to do right now.
11114
11115 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11116 Use size_t, not int or short int, to count objects.
11117 * src/closure.c (nritemset, closure): Likewise.
11118 * src/closure.h (nritemset, closure): Likewise.
11119 * src/nullable.c (nullable_compute): Likewise.
11120 * src/print.c (print_core): Likewise.
11121 * src/print_graph.c (print_core): Likewise.
11122 * src/state.c (state_compare, state_hash): Likewise.
11123 * src/state.h (struct state): Likewise.
11124 * src/tables.c (default_goto, goto_actions): Likewise.
11125
11126 * src/gram.h (rule_number, rule): Use int, not short int.
11127 * src/output.c (prepare_rules): Likewise.
11128 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11129 errs, reductions): Likewise.
11130 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11131 Likewise.
11132 * src/tables.c (vector_number, tally, action_number,
11133 ACTION_NUMBER_MINIMUM): Likewise.
11134 * src/output.c (muscle_insert_short_int_table): Remove.
11135
111362004-12-17 Akim Demaille <akim@epita.fr>
11137
11138 * data/lalr1.cc: Extensive Doxygenation.
11139 (error_): Rename as...
11140 (error): this, since it is visible to the user.
11141 Adjust callers.
11142 (Parser::message): Now an automatic variable from...
11143 (Parser::yyreport_syntax_error_): here.
11144 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11145 Parser::error.
11146 * tests/input.at: Escape $.
11147
111482004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11149
11150 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11151 Parenthesize rhs to avoid obscure problems with mistakes like
11152 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11153 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11154 b4_rhs_location): Likewise.
11155 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11156 b4_rhs_location): Likewise.
11157
111582004-12-16 Akim Demaille <akim@epita.fr>
11159
11160 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11161 yacc.c: be sure to stay within yycheck_.
11162 * tests/actions.at: Re-enable C++ tests.
11163
111642004-12-16 Akim Demaille <akim@epita.fr>
11165
11166 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11167 real.
11168
111692004-12-16 Akim Demaille <akim@epita.fr>
11170
11171 Use #define to handle the %name-prefix.
11172
11173 * data/glr.c, data/yacc.c: Comment changes.
11174 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11175 so that one can refer to yylex in the parser file, and have it
11176 renamed, as is the case with other skeletons.
11177
111782004-12-16 Akim Demaille <akim@epita.fr>
11179
11180 Move lalr1.cc internals into yy*.
11181
11182 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11183 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11184 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11185 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11186 (empty_, final_, terror_, errcode_, ntokens_)
11187 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11188 (looka_, ilooka_, error_range_, nerrs_):
11189 Rename as...
11190 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11191 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11192 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11193 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11194 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11195 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11196 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11197 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11198 these.
11199
112002004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11201
11202 Fix some problems reported by twlevo at xs4all.
11203 * src/symtab.c (symbol_new): Report an error if the input grammar
11204 contains too many symbols. This is better than calling abort() later.
11205 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11206 (struct node, struct graph):
11207 Rename member expand to stretch. All uses changed.
11208 (struct graph): Remove member layoutalgorithm. All uses removed.
11209 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11210 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11211 All uses changed.
11212 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11213
112142004-12-15 Akim Demaille <akim@epita.fr>
11215
11216 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11217 Add more Doxygen comments.
11218 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11219 (report_syntax_error_, translate_): Rename as...
11220 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11221 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11222
112232004-12-15 Akim Demaille <akim@epita.fr>
11224
11225 * data/lalr1.cc (lex_): Rename as...
11226 (yylex_): this.
11227 Move the trace here.
11228 Take the %name-prefix into account.
11229 Reported by Alexandre Duret-Lutz.
11230
112312004-12-15 Akim Demaille <akim@epita.fr>
11232
11233 Simplify the C++ parser constructor.
11234
11235 * data/lalr1.cc (debug_): Rename as...
11236 (yydebug_): so that the parser's internals are always in the yy*
11237 pseudo namespace.
11238 Adjust uses.
11239 (b4_parse_param_decl): Remove the leading comma as it is now only
11240 called as unique argument list.
11241 (Parser::Parser): Remove the constructor accepting a location and
11242 an initial debugging level.
11243 Remove from the other ctor the argument for the debugging level.
11244 (debug_level_type, debug_level, set_debug_level): New.
11245
11246 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11247 constructor calls.
11248
112492004-12-15 Akim Demaille <akim@epita.fr>
11250
11251 Remove b4_root related material: failure experiment
11252 (which goal was to allow to derive from a class).
11253
11254 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11255 definitions and uses.
11256
112572004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11258
11259 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11260 not 2, since it's not portable to subtract 1 from the start of an
11261 array. The new item 0 is never set or used. All uses changed.
11262
11263 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11264 the default definition of YYLLOC_DEFAULT. Problem reported
11265 by Frank Heckenbach.
11266
112672004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11268
11269 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11270 the normal case and one for the error case. Just use the
11271 first one uniformly. Problem reported by Frank Heckenbach.
11272 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11273 use exactly the same macro in both places.
11274 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11275 so that the normal-case YYRHSLOC works for the error case too.
11276 All uses changed.
11277 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11278 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11279 * doc/bison.texinfo (Location Default Action): Don't claim that
11280 we have an array of locations. Use the same macro for both glr
11281 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11282 the index is 0.
11283
112842004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11285
11286 * HACKING: Update email addresses to send announcements to.
11287
11288 * configure.ac (AC_INIT): Bump version to 1.875f.
11289
112902004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11291
11292 * NEWS: Version 1.875e.
11293 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11294
11295 * src/scan-skel.l: Include "complain.h", for "fatal".
11296
11297 * src/relation.h (relation_print, relation_digraph):
11298 Relation sizes are of type relation_node, not size_t (this is
11299 merely a doc fix, since the two types are equivalent).
11300 (relation_transpose): Relation sizes are of type relation_node,
11301 not int.
11302 * src/relation.c: Likewise.
11303 (top, infinity): Now of type relation_node, not int.
11304 (traverse, relation_transpose): Use relation_node, not int.
11305
11306 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11307 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11308 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11309
11310 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11311 specifying whether the test should be skipped. Use it tp
11312 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11313 fail on some hosts, and should be skipped.
11314
113152004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11316
11317 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11318 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11319 unless otherwise specified below.
11320
11321 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11322 to allocate kernel_base, kernel_items, kernel_size, since
11323 they needn't be initialized to 0.
11324 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11325 * src/closure.c (new_closure): Likewise, for itemset.
11326 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11327 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11328 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11329 (build_relations): Likewise for edge, states1, includes.
11330 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11331 * src/reader.c (packgram): Likewise, for ritem, rules.
11332 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11333 * src/relation.c (relation_digraph): Likewise for VERTICES.
11334 (relation_transpose): Likewise for new_R, end_R.
11335 * src/symtab.c (symbols_token_translations_init): Likewise for
11336 token_translations.
11337 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11338 (token_actions): Likewise for yydefact, actrow, conflrow,
11339 conflict_list.
11340 (save_column): Likewise for froms[symno], tos[symno].
11341 (goto_actions): Likewise for state_count.
11342 (pack_table): Likewise for base, pos, check.
11343 (tables_generate): Likewise for width.
11344
11345 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11346 for initial core. Just have a separate core, so we needn't worry
11347 about whether kernel_size and kernel_base are initialized.
11348
11349 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11350 kernel_size, kernel_items): Remove unnecessary initialization.
11351 * src/conflicts.c (conflicts): Likewise.
11352 * src/derives.c (derives): Likewise.
11353 * src/muscle_tablc (muscle_insert): Likewise.
11354 * src/relation.c (relation_digraph): Likewise.
11355 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11356 conflrow, conflict_table, conflict_list, table, check):
11357 Likewise.
11358
11359 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11360 This is because all callers pass unsigned int.
11361 * src/closure.h (new_closure): Likewise.
11362
11363 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11364 (build_relations): Initialize includes[i] in all cases.
11365 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11366 and rules[ruleno].precsym. Initialize members in order.
11367 * src/relation.c (relation_transpose): Always initialize new_R[i]
11368 and end_R[i].
11369 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11370
11371 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11372 conflict_list[0] was always 0, but now it isn't initialized.
11373
11374 * src/table.c (table_grow): When conflict_table grew, the grown
11375 area wasn't cleared. Fix this.
11376
11377 * lib/.cvsignore: Add strdup.c, strdup.h.
11378 * m4/.cvsignore: Add strdup.m4.
11379
113802004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11381
11382 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11383 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11384 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11385 ngotos + 1 without checking for overflow.
11386 (build_relations): Use END_NODE, not -1, to denote end of edges.
11387 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11388 build_relations): Use goto_number, not int, for goto numbers.
11389 * src/tables.c (save_column, default_goto): Likewise.
11390
113912004-11-23 Akim Demaille <akim@epita.fr>
11392
11393 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11394 of #defining from yystype.
11395 Don't typedef yystype, C++ does not need it.
11396 This lets it possible to forward declare it as union.
11397
113982004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11399
11400 * bootstrap (gnulib_modules): Add extensions.
11401 Problem reported by Jim Meyering.
11402
114032004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11404
11405 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11406 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11407 src/system.h, src/tables.c: XFREE -> free, to accommodate
11408 recent change to gnulib xalloc.h.
11409 Problem reported by Jim Meyering.
11410
114112004-11-17 Akim Demaille <akim@epita.fr>
11412
11413 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11414
114152004-11-17 Akim Demaille <akim@epita.fr>,
11416 Alexandre Duret-Lutz <adl@gnu.org>
11417
11418 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11419 changes.
11420 (YYCDEBUG): Adjust.
11421 Use it instead of cdebug_.
11422 (Parser::debug_stream, Parser::set_debug_stream): New.
11423 (Parser::symprint_): Define cdebug_ for temporary backward
11424 compatibility.
11425 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11426 debug_stream ().
11427
114282004-11-17 Akim Demaille <akim@epita.fr>
11429
11430 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11431 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11432 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11433 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11434
114352004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11436
11437 * data/glr.c (yyloc_default): Remove; not used.
11438 Problem reported by Frank Heckenbach.
11439
114402004-10-25 Akim Demaille <akim@epita.fr>
11441
11442 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11443 Introduce another definition to address simple location arrays.
11444 (yyGLRStack): New member: yyerror_range.
11445 (yyrecoverSyntaxError, yyparse): Update it.
11446 (yyrecoverSyntaxError): Use it when shifting the error token to
11447 have an accurate range, equivalent to the one computed by both
11448 yacc.c and lalr1.cc.
11449 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11450 that column numbers start at column 0, as per GNU Coding
11451 Standards, the others tests, and the doc.
11452 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11453 Adjust to the above change (first column is 0).
11454 And adjust the location of the "<error>", now covering the whole
11455 line.
11456
114572004-10-22 Akim Demaille <akim@epita.fr>
11458 and Paul Eggert <eggert@cs.ucla.edu>
11459
11460 Remove some arbitrary limits on goto numbers and relations.
11461 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11462 initial values, since they're never used.
11463 (set_goto_map): ngotos is now unsigned, so test for overflow
11464 by seeing whether it wraps around to zero.
11465 * src/lalr.h (goto_number): Now size_t, not short int.
11466 (GOTO_NUMBER_MAXIMUM): Remove.
11467 * src/relation.c (relation_print, traverse, relation_transpose):
11468 Check for END_NODE rather than looking at sign.
11469 * src/relation.h (END_NODE): New macro.
11470 (relation_node): Now size_t, not short int.
11471
114722004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11473
11474 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11475 keyword, not an identifier. Problem reported by Baron Schwartz in
11476 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11477
114782004-10-11 Akim Demaille <akim@epita.fr>
11479
11480 * src/symtab.c (symbol_check_alias_consistency): Also check
11481 type names, destructors, and printers.
11482 Reported by Alexandre Duret-Lutz.
11483 Recode the handling of associativity and precedence in terms
11484 of symbol_precedence_set.
11485 Accept no redeclaration at all, not even equal to the previous
11486 value.
11487 (redeclaration): New.
11488 Use it to factor redeclaration complaints.
11489 (symbol_make_alias): Don't set the type of the alias, let
11490 symbol_check_alias_consistency do it as for other features.
11491 * src/symtab.h (symbol): Add new member prec_location, and
11492 type_location.
11493 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11494 * tests/input.at (Incompatible Aliases): New.
11495
114962004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11497
11498 .cvsignore fixes to accommodate gnulib changes,
11499 and the practice of naming build directories "_build".
11500 * .cvsignore: Add "_*". Sort.
11501 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11502 * m4/.cvsignore: Add "*_gl.m4".
11503
115042004-10-06 Akim Demaille <akim@epita.fr>
11505
11506 * src/parse-gram.y (add_param): Fix the truncation of trailing
11507 spaces.
11508
115092004-10-05 Akim Demaille <akim@epita.fr>
11510
11511 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11512 whether the reducion was empty or not. This leaves room to
11513 improve the use of YYLLOC_DEFAULT in such a case.
11514 lalr1.cc is still experimental, so changing this is acceptable.
11515 And finally, there are probably not many users who changed the
11516 handling of locations in GLR, so changing is admissible too.
11517
11518 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11519 empty reduction, set @$ to an empty location ending the previously
11520 stacked symbol.
11521 Adjust uses to make sure the code is triggered on empty
11522 reductions.
11523 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11524 expected output: empty reductions have empty locations.
11525
115262004-09-29 Akim Demaille <akim@epita.fr>
11527
11528 * data/lalr1.cc: Move towards a more standard C++ coding style
11529 for templates: Class < T > -> Class<T>.
11530
115312004-09-29 Akim Demaille <akim@epita.fr>
11532
11533 * data/lalr1.cc: Reinstall the former ctor, for sake of
11534 compatibility, but warn it will be removed.
11535 Move towards a more standard C++ coding style (i.e., type *var ->
11536 type* var).
11537
115382004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11539
11540 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11541 since it's less likely to work if NULs are involved in the future.
11542
115432004-09-27 Akim Demaille <akim@epita.fr>
11544
11545 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11546
115472004-09-27 Akim Demaille <akim@epita.fr>
11548
11549 * data/lalr1.cc (b4_parse_param_decl_1): New.
11550 (b4_parse_param_decl): Use it to have different names between attribute
11551 and argument names.
11552 (b4_cc_constructor_call): Likewise.
11553
115542004-09-24 Akim Demaille <akim@epita.fr>
11555
11556 * src/parse-gram.y (add_param): Strip the leading and trailing
11557 blanks from a formal argument declaration.
11558 (YY_LOCATION_PRINT): New.
11559
115602004-09-24 Akim Demaille <akim@epita.fr>
11561
11562 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11563 after the location.
11564
115652004-09-24 Akim Demaille <akim@epita.fr>
11566
11567 * doc/bison.texinfo (Table of Symbols): Sort.
11568
115692004-09-21 Akim Demaille <akim@epita.fr>
11570
11571 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11572 the useless parentheses.
11573 Suggested by Paul Eggert.
11574
115752004-09-20 Akim Demaille <akim@epita.fr>
11576
11577 Let the initial-action act on the look-ahead, and use it for the
11578 "initial push" (corresponding to an hypothetical beginning-of-file).
11579 And let lalr1.cc honor %initial-action.
11580
11581 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11582 example.
11583 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11584 (Parser::Parser): Remove the ctor that used to initialize it.
11585 (Parser::parse): Like in the other skeletons, issue the "starting
11586 parse" message before any action.
11587 Honor %initial-action.
11588 Initialize the stacks with the lookahead.
11589 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11590 look-ahead.
11591 Push them in the stacks.
11592 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11593
115942004-09-20 Akim Demaille <akim@epita.fr>
11595
11596 * doc/bison.texinfo (Initial Action Decl): New.
11597
115982004-09-20 Akim Demaille <akim@epita.fr>
11599
11600 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11601 clearer criterion to define it.
11602 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11603 When reducing on an empty RHS, use the latest stacked location as
11604 location.
11605 yylloc is not always available.
11606 * data/glr.c: Likewise.
11607 Also, honor initial-actions.
11608
116092004-09-20 Akim Demaille <akim@epita.fr>
11610
11611 * data/yacc.c (YY_LOCATION_PRINT): New.
11612 Define when we know YYLTYPE's structure, i.e., when the default
11613 YYLLOC_DEFAULT is used.
11614 * data/c.m4 (b4_yysymprint_generate): Use it.
11615 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11616 value of the result.
11617 (error_start_): Replace with...
11618 (error_range_): this location array.
11619 This allows to replace code relying on the implementation of
11620 locations by portable code.
11621 * data/yacc.c (yylerrsp): Replace with...
11622 (yyerror_range): this.
11623 Every time a token is popped, update yyerror_range[0], to have an
11624 accurate location for the error token.
11625 * data/glr.c (YY_LOCATION_PRINT): New.
11626 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11627 deference a pointer.
11628 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11629 report the location in %printers.
11630
11631 * src/scan-skel.l: Instead of abort, report error messages to ease
11632 understanding skeleton scanning failures.
11633
116342004-09-16 Akim Demaille <akim@epita.fr>
11635
11636 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11637 (iterator, const_iterator): these, to be more in the C++ spirit.
11638 Also, return reverse iterators so that when displaying the stack
11639 we display its bottom first.
11640 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11641 from yacc.c.
11642 We should probably use vector here though.
11643
116442004-09-16 Akim Demaille <akim@epita.fr>
11645
11646 Have more complete shift traces.
11647
11648 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11649 to report Shifts instead of ad hoc YYDPRINTF invocations,
11650 including for the error token.
11651 * data/lalr1.cc (symprint_): Output the location.
11652 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11653 output the location within the %printer.
11654 Activate GLR tests, at least to make sure they compile properly.
11655 They still don't pass though.
11656 * tests/calc.at: Adjust expect verbose output, since now "Entering
11657 state..." is on a different line than the "Shifting" message.
11658
116592004-09-08 Akim Demaille <akim@epita.fr>
11660
11661 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11662 Bison directive from the Bison file to the invocation of this
11663 macro, so that these directives are passed to
11664 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11665 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11666 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11667 the extra Bison directives instead of the whole series.
11668 Change the grammar so that there are recoverable errors, and
11669 unrecoverable errors. Now we can have the parser give up before
11670 consuming the whole input. As a result we now can observe that
11671 the lookahead is freed when needed.
11672 Change the parser source to parse argv[1] instead of a hard coded
11673 string.
11674 Simplify yylex, and give a value and location to EOF.
11675 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11676 passed directives already coded in the file.
11677 Add some tests to check the location of "error".
11678 For some tests, the C++ parser is correct, and not yacc.c.
11679 For other tests, they provide different, but unsatisfying, values,
11680 so keep the C++ value so that at least one parser is "correct"
11681 according to the test suite.
11682 (Actions after errors): Remove, this is subsumed by the
11683 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11684
116852004-09-06 Akim Demaille <akim@epita.fr>
11686
11687 * data/lalr1.cc: Adjust the indentation of the labels.
11688 (Parser::pop): New.
11689 Use it.
11690
116912004-09-06 Akim Demaille <akim@epita.fr>
11692
11693 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11694 argument, an informative message.
11695 Call YY_SYMBOL_PRINT.
11696 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11697 * data/lalr1.cc (destruct_): Likewise.
11698 In addition, no longer depend on b4_yysymprint_generate and
11699 b4_yydestruct_generate to generate these functions, do it "by
11700 hand".
11701
117022004-09-03 Akim Demaille <akim@epita.fr>
11703
11704 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11705 invoked, yydestruct the lookahead.
11706 * tests/calc.at (Calculator $1): Update the expected lengths of
11707 traces: there is an added line for the discarded lookahead.
11708 * doc/bison.texinfo (Destructor Decl): Some rewording.
11709 Define "discarded" symbols.
11710
117112004-09-02 Akim Demaille <akim@epita.fr>
11712
11713 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11714
117152004-09-02 Akim Demaille <akim@epita.fr>
11716
11717 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11718 (YYDSYMPRINTF): Rename as...
11719 (YY_SYMBOL_PRINT): this.
11720 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11721 two.
11722 Use it instead of direct symprint_ calls.
11723 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11724 one.
11725
117262004-09-02 Akim Demaille <akim@epita.fr>
11727
11728 * data/lalr1.cc (b4_yysymprint_generate): New.
11729 (symprint_): New member function, defined when YYDEBUG.
11730 Use it consistently instead of token/nterm debugging output by
11731 hand.
11732 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11733 %printer calls to use cdebug_ when using lalr1.cc.
11734
117352004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11736
11737 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11738 with #ifdef YYDEBUG.
11739
117402004-08-26 Akim Demaille <akim@epita.fr>
11741
11742 * doc/bison.texinfo (Implementing Loops): Rename as...
11743 (Implementing Gotos/Loops): this.
11744
117452004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11746
11747 Adjust to latest gnulib.
11748 * bootstrap (gnulib_modules): Add xalloc-die.
11749 Set LC_ALL=C so that file names sort consistently.
11750 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11751 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11752 uintmax_t.m4, ulonglong.m4.
11753 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11754 po.m4 since we are now using _gl.m4 instead.
11755
117562004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11757
11758 * src/scan-action.l: Remove. Scanning of semantic actions is
11759 handled in scan-gram.l.
11760
117612004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11762
11763 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11764
11765 * src/location.h (struct): The file member is a uniqstr.
11766 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11767
117682004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11769
11770 Fix bug with non-%union parsers that have printers or destructors,
11771 which led to a Bison core dump. Reported by Peter Fales in
11772 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11773
11774 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11775 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11776 not to our own type.
11777 * src/output.c (symbol_destructors_output, symbol_printers_output):
11778 Don't assume %union.
11779 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11780 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11781 UNION-FLAG. All callers changed.
11782 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11783 Use type char, not unsigned int, when declaring an array of char;
11784 this lets us remove a cast.
11785 (Printers and Destructors): Add non-%union test cases.
11786
117872004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11788
11789 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11790 GLR writeups. E.g., avoid frenchspacing and the future tense,
11791 change "lookahead" to "look-ahead", and change "wrt" to "with
11792 respect to".
11793
117942004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11795
11796 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11797 New sections, split off from the GLR Parsers section. Put the new
11798 Simple GLR Parser near the start of the GLR section, for clarity.
11799 Rewrite connective text.
11800
118012004-06-21 Frank Heckenbach <frank@g-n-u.de>
11802
11803 * doc/bison.texinfo (Simple GLR Parsers): New section.
11804
118052004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11806
11807 * NEWS, TODO, doc/bison.texinfo:
11808 Use "look-ahead" instead of "lookahead", to be consistent.
11809 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11810 while we're fixing "look-ahead".
11811 * src/conflicts.c (shift_set): Renamed from shiftset.
11812 (look_ahead_set): Renamed from lookaheadset.
11813 * src/print.c: Likewise.
11814 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11815 name for "lookahead".
11816 (report_types, usage): Likewise.
11817 * src/getargs.h (report_look_ahead_tokens): Renamed from
11818 report_lookaheads.
11819 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11820 compute_lookaheads.
11821 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11822 (look_ahead_tokens_print): Renamed from lookaheads_print.
11823 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11824 state_rule_lookaheads_print.
11825 * src/state.h: Likewise.
11826 (reductions.look_ahead_tokens): Renamed from lookaheads.
11827 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11828 AT_DATA_LOOKAHEADS_GRAMMAR.
11829
118302004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11831
11832 * README: Update location of patched M4 distribution.
11833
118342004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11835
11836 Don't assume the C++ compiler takes the same arguments as the C compiler
11837 (trivial change).
11838 * configure.ac (O0CXXFLAGS): New var.
11839 * tests/atlocal.in (CXXFLAGS): Use it.
11840
118412004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11842
11843 Fix some "make check" problems with C++ reported by
11844 Albert Chin-A-Young for Tru64 C++ in this thread:
11845 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11846
11847 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11848 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11849 Output to a .cc file for C++, not to a .c file.
11850 * tests/calc.at (AT_CHECK_CALC): Likewise.
11851 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11852 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11853
118542004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11855
11856 * tests/calc.at, tests/actions.at: Workaround for SGI
11857 C++ compiler. (trivial change)
11858
118592004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11860
11861 Spent a few hours checking out which prerequisite versions the
11862 current sources actually require. I went all the way back to
11863 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11864 a seemingly endless set of combinations of versions more recent
11865 than that. The bottom line is that the current sources require
11866 fairly recent versions of the build tools, and it'll be some work
11867 to change this.
11868 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11869 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11870 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11871 Add comments explaining why those particular versions are
11872 currently needed.
11873
11874 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11875 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11876 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11877
11878 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11879 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11880
118812004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11882
11883 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11884 0.11.5. Suggested by Bruno Haible.
11885 * bootstrap: Remove gettext version checking.
11886
11887 * doc/bison.texinfo (Decl Summary): Also mention that %union
11888 can depend on prerequisite types. Problem reported by Tim
11889 Van Holder.
11890
118912004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11892
11893 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11894 * README-alpha: Don't tell people not to package this.
11895
11896 * bootstrap: Don't assume $(...) works; use `...` instead.
11897 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11898 gettext better.
11899
11900 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11901 put into the -d output file, and mention what to do if YYSTYPE is
11902 defined as a macro.
11903
119042004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11905
11906 Undo change made earlier today: it caused autopoint to not bring
11907 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11908 autopoint's.
11909
11910 * bootstrap: Check that gettext version matches what's in
11911 configure.ac. Warn users to ignore robots.txt ERROR 404.
11912 * bootstrap: Undo today's earlier change (logged below).
11913 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11914
11915 The gettext version checking is causing more trouble than it's
11916 curing; remove it. Problem reported by Paul Hilfinger.
11917
11918 * bootstrap: Issue a warning that one can expect a message
11919 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11920 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11921
119222004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11923
11924 Ensure that the C++ compiler used for testing actually works on a
11925 simple test program; if not, skip the C++-related tests. Problem
11926 reported by Vin Shelton in:
11927 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11928
11929 * m4/cxx.m4: New file.
11930 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11931 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11932 * tests/local.at (AT_COMPILE_CXX): Use it.
11933
119342004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11935
11936 * data/glr.c (yylloc): Output this macro even if locations are not
11937 being generated, as the GLR parser needs it even in that case.
11938 Problem reported by Troy A. Johnson
11939 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11940
11941 * configure.ac (AC_INIT): Update to 1.875e.
11942
119432004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11944
11945 * NEWS: Version 1.875d.
11946 * configure.ac (AC_INIT): Likewise.
11947 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11948
11949 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11950 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11951 lalr1.cc runs afoul of the first, and the last two are no longer
11952 supported by GCC 3.4.0.
11953 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11954 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11955
119562004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11957
11958 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11959 unsigned int, for compatibility with latest gnulib hash module.
11960 * src/state.c (state_hash, state_hasher): Likewise.
11961 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11962 * src/uniqstr.c (hash_uniqstr): Likewise.
11963
119642004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11965
11966 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11967
11968 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11969 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11970 character and string literals.
11971 (unexpected_end): New function.
11972 (unexpected_eof): Use it.
11973 (unexpected_newline): New function.
11974 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11975 actions.
11976
11977 * NEWS: Document %expect-rr.
11978
11979 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11980 Fix typo by replacing $1 with $option.
11981 Remove more 'intl'-related files.
11982 Don't DEFUN AM_INTL_SUBDIR twice.
11983
11984 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11985 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11986 strtoul.c.
11987 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11988 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11989 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11990 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11991 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11992 * src/.cvsignore: Add *.output.
11993
11994 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11995 gets copied to the output file.
11996
119972004-04-28 Paul Eggert <eggert@twinsun.com>
11998
11999 Get files from the gnulib and po repositories, instead of relying
12000 on them being in our CVS. Upgrade to latest versions of gnulib
12001 and Automake.
12002
12003 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12004 * bootstrap: Bootstrap from gnulib and po repositories.
12005 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12006 * README-cvs: Document these changes. Remove version numbers from
12007 mentions of build tools, since they change so often. Mention Flex.
12008
12009 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12010 (gl_USE_SYSTEM_EXTENSIONS): Add.
12011 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12012 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12013 does this for us.
12014 (AC_ISC_POSIX): Remove; we no longer support this
12015 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12016 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12017 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12018 Do not check for C89 headers, except for locale.h which is used
12019 by the Yacc library and must port to K&R hosts.
12020 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12021 Do not check for C89 functions, except for setlocale which is
12022 used by the Yacc library.
12023 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12024 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12025 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12026 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12027 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12028 AM_GNU_GETTEXT): Remove; now done by:
12029 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12030 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12031 for us.
12032
12033 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12034 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12035 Define to empty, as gnulib.mk will do the rest for us.
12036 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12037 for us.
12038 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12039 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12040
12041 * src/files.c: Include gnulib's xstrndup.h.
12042
12043 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12044 (REALLOC): Use xnrealloc, for likewise.
12045 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12046 (strnlen, memrchr): Remove decls; functions no longer used.
12047 Include <stpcpy.h>.
12048
12049 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12050 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12051 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12052 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12053 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12054 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12055 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12056 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12057 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12058 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12059 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12060 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12061 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12062 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12063 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12064 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12065 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12066 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12067 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12068 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12069 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12070 Remove, as these files are now generated automatically
12071 by bootstrap or automake.
12072
12073 * po/ChangeLog: Remove: all but one entry was a duplicate
12074 of this file, and I moved that 2000-11-02 entry here.
12075
12076 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12077 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12078 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12079 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12080 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12081 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12082 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12083 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12084 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12085 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12086 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12087 xstrndup.h.
12088 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12089 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12090 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12091 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12092 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12093 * src/.cvsignore: Remove *_.c.
12094
12095
12096 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12097 support it. (The latest stable gzip doesn't.)
12098
120992004-04-27 Paul Eggert <eggert@twinsun.com>
12100
12101 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12102 case, as stos_ is now used by destructors due to the 2004-02-09
12103 change.
12104
12105 Remove more K&R C support.
12106 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12107 * lib/subpipe.c (errno): Remove decl.
12108 Include <stdlib.h> unconditionally.
12109 (EXIT_FAILURE): Remove macro.
12110 * src/complain.c (vfprintf, strerror): Remove.
12111 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12112 unconditionally.
12113 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12114 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12115 (strchr, strspn, memchr): Remove decls.
12116 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12117 unconditionally. Do not declare perror.
12118 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12119 unconditionally.
12120
12121 * src/complain.c (_): Remove useless defn, as system.h defines this.
12122
12123 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12124 with latest obstack.h.
12125 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12126 to procedure types, as obstack.h now does that for us.
12127 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12128
12129 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12130 so that this include file can stand alone.
12131 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12132 does this now. Include subpipe.h first after config.h, to
12133 test whether it can stand alone.
12134
12135 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12136 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12137 unused declaration.
12138
12139 * tests/synclines.at (%union synch line): Put a dummy member in
12140 the union, because empty unions aren't allowed in C. Caught
12141 by GCC 3.4.0.
12142
121432004-04-13 Jim Meyering <jim@meyering.net>
12144
12145 * src/conflicts.c (conflicts_print): Correct format string typo:
12146 use `%%' to produce literal `%'. (trivial change)
12147
121482004-03-30 Paul Eggert <eggert@twinsun.com>
12149
12150 * src/getargs.c (version): Update copyright year to 2004.
12151
12152 * data/c.m4 (b4_int_type): Use 'short int' rather than
12153 'short', and similarly for 'long', 'unsigned', etc.
12154 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12155 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12156 yy_yypstack, yydumpstack): Likewise.
12157 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12158 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12159 Likewise.
12160 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12161 yy_stack_print, yyparse): Likewise.
12162 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12163 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12164 * lib/bitset.c (bitset_print): Likewise.
12165 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12166 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12167 * lib/bitsetv.c (bitsetv_dump): Likewise.
12168 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12169 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12170 Likewise.
12171 * src/LR0.c (allocate_itemsets): Likewise.
12172 * src/gram.h (rule_number, rule): Likewise.
12173 * src/lalr.h (goto_number): Likewise.
12174 * src/nullable.c (nullable_compute): Likewise.
12175 * src/output.c (prepare_rules): Likewise.
12176 * src/relation.c (relation_print, relation_digraph): Likewise.
12177 * src/relation.h (relation_node): Likewise.
12178 * src/state.h (state_number, transitions, errs, reductions,
12179 struct state): Likewise.
12180 * src/symtab.h (symbol_number, struct symbol): Likewise.
12181 * src/tables.c (vector_number, tally, action_number,
12182 default_goto, goto_actions): Likewise.
12183 * tests/existing.at (GNU Cim Grammar): Likewise.
12184 * tests/regression.at (Web2c Actions): Likewise.
12185
12186 * src/output.c (muscle_insert_short_int_table): Renamed from
12187 muscle_insert_short_table. All uses changed.
12188
121892004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12190
12191 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12192 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12193 Add %expect-rr rule.
12194
12195 * src/scan-gram.l: Recognize %expect-rr.
12196
12197 * src/conflicts.h (expected_sr_conflicts): Rename from
12198 expected_conflicts.
12199 (expected_rr_conflicts): Declare.
12200
12201 * src/conflicts.c (expected_sr_conflicts): Rename from
12202 expected_conflicts.
12203 (expected_rr_conflicts): Define.
12204 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12205 for GLR parsers.
12206 Use expected_sr_conflicts in place of expected_conflicts.
12207 Warn if expected_rr_conflicts used in non-GLR parser.
12208
12209 * doc/bison.texinfo: Add documentation for %expect-rr.
12210
122112004-03-08 Paul Eggert <eggert@gnu.org>
12212
12213 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12214 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12215
12216 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12217 in lalr1.cc.
12218 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12219 * src/scan-gram.l (scan_integer): New function.
12220 ({int}): Use it.
12221 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12222 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12223 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12224 Say "long int", not "long", for uniformity with GNU style.
12225
122262004-02-25 Paul Eggert <eggert@twinsun.com>
12227
12228 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12229 compilers. This fixes a problem with Intel's C++ compiler being
12230 chatty, reported by Guido Trentalancia in
12231 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12232
122332004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12234
12235 Support %destructor and merge error locations in lalr1.cc.
12236
12237 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12238 (Parser::stos_): Define unconditionally.
12239 (Parser::destruct_): New method. Generate its body with
12240 b4_yydestruct_generate.
12241 (Parser::error_start_): New attribute.
12242 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12243 token which are discarded.
12244 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12245 error_start_ when erroneous token are discarded.
12246 (Parser::parse) <yyerrlab1>: Compute the location of the error
12247 token so that it covers all the discarded tokens.
12248 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12249 it can be called with `%skeleton "lalr1.cc"', and do that.
12250
122512004-02-02 Paul Eggert <eggert@twinsun.com>
12252
12253 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12254 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12255 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12256 There's no need to mention top_builddir since Automake does that
12257 for us.
12258 (INCLUDES): Remove, as Automake says it's obsolescent.
12259 Contents migrated into AM_CPPFLAGS as described above.
12260 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12261
122622004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12263
12264 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12265 (yyreportSyntaxError): Handle case where lookahead token is
12266 YYEMPTY.
12267
122682004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12269
12270 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12271 resulting parsers are compilable with C++.
12272
122732003-12-23 Paul Eggert <eggert@twinsun.com>
12274
12275 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12276 * src/output.c (output_skeleton): Rename local var.
12277 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12278 Bison tokens, as this runs afoul of the 2003-10-07 change that
12279 disallowed NUL bytes in character constants or string literals.
12280
12281 * tests/local.at: Require Autoconf 2.59's Autotest.
12282 * tests/testsuite.at: Don't include local.at, since we now assume
12283 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12284 including it.
12285 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12286 multiple inclusion warnings.
12287
122882003-12-02 Akim Demaille <akim@epita.fr>
12289
12290 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12291 conditions.
12292 From Bruno Haible.
12293
122942003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12295
12296 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12297
122982003-10-07 Paul Eggert <eggert@twinsun.com>
12299
12300 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12301 if testsuite doesn't exist.
12302
12303 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12304 literals, unfortunately.
12305 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12306 Complain about NUL bytes in character constants or string literals.
12307
123082003-10-05 Paul Eggert <eggert@twinsun.com>
12309
12310 * NEWS: Don't document %no-default-prec, as it's still
12311 too experimental.
12312 * doc/bison.texinfo: Document %no-default-prec only if
12313 the defaultprec flag is set. Normally it's not.
12314
123152003-10-04 Paul Eggert <eggert@twinsun.com>
12316
12317 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12318 non-modifiable lvalue, instead of a modifiable one.
12319 * doc/bison.texinfo (Actions): Document that $$ can
12320 be assigned to. Do not claim that $$ and $N are
12321 array element references: user code should not rely on this.
12322
123232003-10-01 Paul Eggert <eggert@twinsun.com>
12324
12325 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12326 (grammar_declaration): Use it.
12327 * src/scan-gram.l: New token %no-default-prec.
12328 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12329 * NEWS, doc/bison.texinfo: Document the above.
12330
123312003-10-01 Akim Demaille <akim@epita.fr>
12332
12333 VCG no longer supports long_straight_phase.
12334
12335 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12336 * src/print_graph.c (print_graph): Adjust.
12337
123382003-09-30 Frank Heckenbach <frank@g-n-u.de>
12339 and Paul Eggert <eggert@twinsun.com>
12340
12341 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12342 Table of Symbols): Document %default-prec.
12343 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12344 (grammar_declaration): Set default_prec on %default-prec.
12345 * src/scan-gram.l (%default-prec): New token.
12346 * src/reader.h (default_prec): New flag.
12347 * src/reader.c: Likewise.
12348 (packgram): Handle it.
12349 * tests/conflicts.at (%default-prec without %prec,
12350 %default-prec with %prec, %default-prec 1): New tests.
12351
123522003-09-30 Paul Eggert <eggert@twinsun.com>
12353
12354 * tests/testsuite.at: Include local.at, not input.at, fixing
12355 a typo in the 2003-08-25 patch.
12356
123572003-08-27 Akim Demaille <akim@epita.fr>
12358
12359 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12360 GCC warnings.
12361
123622003-08-26 Akim Demaille <akim@epita.fr>
12363
12364 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12365 "<\#" to avoid magic from Gnus when posting parts of this script.
12366
123672003-08-26 Akim Demaille <akim@epita.fr>
12368
12369 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12370 (Parser::parse): here.
12371 Adjust: nerrs and errstatus is now replaced by...
12372 (Parser::nerrs_, Parser::errstatus_): New.
12373
123742003-08-25 Akim Demaille <akim@epita.fr>
12375
12376 * config/announce-gen, Makefile.cfg: New.
12377 * Makefile.am: Adjust.
12378 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12379 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12380
123812003-08-25 Akim Demaille <akim@epita.fr>
12382
12383 When reducing initial empty rules, Bison parser read an initial
12384 location that is not defined. This results in garbage, and that
12385 affects Bison's own parser. Therefore we need (i) to extend Bison
12386 to support a means to initialize this location, and (ii) to use
12387 this CVS Bison to fix CVS Bison's parser.
12388
12389 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12390 with...
12391 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12392 * src/parse-gram.y: Adjust.
12393 (%initial-action): New.
12394 (%error-verbose): Since we require CVS Bison, there is no reason
12395 not to use it.
12396 * src/scan-gram.l: Adjust.
12397 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12398 * data/yacc.c (yyparse): Use b4_initial_action.
12399
124002003-08-25 Akim Demaille <akim@epita.fr>
12401
12402 * doc/bison.texinfo: Don't promote stdout for error messages.
12403
124042003-08-25 Akim Demaille <akim@epita.fr>
12405
12406 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12407 From Alexandre Duret-Lutz.
12408
124092003-08-25 Akim Demaille <akim@epita.fr>
12410
12411 Version 1.875c.
12412
124132003-08-25 Akim Demaille <akim@epita.fr>
12414
12415 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12416 Use them.
12417
124182003-08-25 Akim Demaille <akim@epita.fr>
12419
12420 * data/lalr1.cc (Parser::reduce_print_): New.
12421 Use it.
12422
124232003-08-25 Akim Demaille <akim@epita.fr>
12424
12425 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12426 error recovery loops. This patch is based on
12427 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12428 Also, augment the similarity between lalr1.cc and yacc.c.
12429 Note: the locations of error recovery rules are not correct yet.
12430
12431 * data/lalr1.cc: Comment changes to augment the similarity between
12432 lalr1.cc and yacc.c.
12433 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12434 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12435 yyerrlab), when hitting EOF, pop the whole stack here instead of
12436 merely falling thru the default error handling mechanism.
12437 (yyerrorlab): New label, with the old contents of YYERROR,
12438 plus the following change: pop the stack of rhs corresponding
12439 to the production that invoked YYERROR. That is how Yacc
12440 behaves (required by POSIX).
12441 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12442 fail.
12443
124442003-08-25 Akim Demaille <akim@epita.fr>
12445
12446 Tune local.at so that people can "autom4te -l autotest calc.at -o
12447 calc" for instance, to extract a sub test suite.
12448
12449 * tests/testsuite.at: Move the initialization, Autotest version
12450 requirement, and AT_TESTED invocation into...
12451 * tests/local.at: here.
12452 * tests/testsuite.at: Include it for compatibility with Autoconf
12453 2.57.
12454 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12455 be ignore.
12456
124572003-08-04 Paul Eggert <eggert@twinsun.com>
12458
12459 Rework code slightly to avoid gcc -Wtraditional warnings.
12460 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12461 The returned value is now stored in *YY0. All callers changed.
12462 * src/output.c (merge_output): Adjust to the above change.
12463
124642003-07-26 Paul Eggert <eggert@twinsun.com>
12465
12466 * data/glr.c (YYASSERT): New macro.
12467 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12468 yyresolveStates, yyprocessOneStack):
12469 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12470 Derived from a suggestion by Frank Heckenbach.
12471
124722003-07-25 Paul Eggert <eggert@twinsun.com>
12473
12474 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12475 for portability to K&R C (after ansi2knr, presumably). See
12476 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12477 by Frank Heckenbach, though I have omitted the structure-initialization
12478 part of his glr-knr.diff patch since I recall that the Portable
12479 C Compiler didn't require that change.
12480
12481 Let the user specify how to allocate and free memory.
12482 Derived from a suggestion by Frank Heckenbach in
12483 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12484 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12485 All uses of free, malloc, realloc changed to use these macros,
12486 and unnecessary casts removed.
12487 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12488
124892003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12490
12491 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12492 use s.empty() rather than s == "" to test for empty string; see
12493 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12494 (trivial change)
12495
124962003-06-25 Akim Demaille <akim@epita.fr>
12497
12498 * config/depcomp, config/install-sh: Update from masters.
12499
125002003-06-20 Paul Eggert <eggert@twinsun.com>
12501
12502 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12503 and return properly parenthesized result.
12504 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12505 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12506 Remove unnecessary parentheses from uses.
12507 * doc/bison.texinfo (Location Default Action): Describe the
12508 conventions for parentheses.
12509
125102003-06-19 Paul Eggert <eggert@twinsun.com>
12511
12512 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12513 yyreportTree): Do not assume that size_t is the same width as int,
12514 when printing sizes. Print sizes using an unsigned format.
12515 Problem reported by Frank Heckenbach in
12516 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12517
12518 Port to Forte Developer 7 C compiler.
12519 * data/glr.c (struct YYLTYPE): If locations are not being used,
12520 declare a single dummy member, as empty structs do not conform
12521 to the C standard.
12522 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12523 the Forte Developer 7 C compiler complains that end-of-loop
12524 code is not reached.
12525
125262003-06-17 Paul Eggert <eggert@twinsun.com>
12527
12528 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12529 avoid warnings from picky compilers about redefinition of PARAMS.
12530
125312003-06-17 Paul Eggert <eggert@twinsun.com>
12532
12533 Version 1.875b.
12534
12535 * NEWS: Document 1.875b.
12536
12537 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12538 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12539 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12540 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12541 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12542 per recent gettext manual's suggestion.
12543 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12544 Use prototypes, not old-style definitions.
12545 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12546 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12547 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12548 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12549 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12550 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12551 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12552 vbitset_or_and_cmp, vbitset_copy): Likewise.
12553
12554 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12555 Do not include <stdlib.h>.
12556 (PARAMS): Define unconditionally for C89.
12557 (ATTRIBUTE_NORETURN): Remove.
12558 (ATTRIBUTE_UNUSED): Define unconditionally.
12559
12560 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12561 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12562 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12563 * lib/vbitset.c, lib/vbitset.h: New files.
12564 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12565 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12566 from libbitset.
12567
12568 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12569 `How Can I Reset @code{yyparse}', since texinfo does not allow
12570 arbitrary @ in node names.
12571
12572 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12573 shouldn't be needed according to the gettext 0.12.1 documentation
12574 but which seem to be needed anyway: codeset.m4 glibc21.m4
12575 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12576 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12577 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12578
12579 * lib/.cvsignore: Add stdbool.h.
12580 * m4/.cvsignore: Add nls.m4, po.m4.
12581
12582 Upgrade to CVS gnulib.
12583 * stdbool_.h: File renamed from stdbool.h.in.
12584 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12585 AC_HEADER_STDBOOL.
12586 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12587 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12588 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12589 (MOSTLYCLEANFILES): New var.
12590 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12591 (stdbool.h): New rule.
12592 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12593 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12594 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12595 m4/quote.m4: Upgrade to today's gnulib.
12596
12597 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12598 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12599 the tests right now.
12600 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12601 yyerror are declared before use; C99 requires this.
12602
126032003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12604
12605 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12606 first.
12607 (yyrecoverSyntaxError): Correct the logic for setting and testing
12608 yyerrState.
12609 Correct comment on handling EOF.
12610 Allow states with only a default reduction, rather than failing
12611 (I can't quite reconstruct why these were not allowed before).
12612
12613 Fixes to avoid problem that $-N rules in GLR parsers can cause
12614 buffer overruns, corrupting state.
12615
12616 * src/output.c (prepare_rules): Output max_left_semantic_context
12617 definition.
12618 * src/reader.h (max_left_semantic_context): New variable declaration.
12619 * src/scan-gram.l (max_left_semantic_context): Define.
12620 (handle_action_dollar): Update max_left_semantic_context.
12621 * data/glr.c (YYMAXLEFT): New definition.
12622 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12623 (yyresolveAction): Ditto.
12624
12625 Fixes to problems with location handling in GLR parsers reported by
12626 Frank Heckenbach (2003/06/05).
12627
12628 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12629 (YYRHSLOC): Add parentheses, and define only if locations used.
12630 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12631 locations not used.
12632 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12633 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12634
12635 * tests/cxx-type.at: Exercise location information; update tests
12636 to differentiate output with and without locations.
12637 Remove forward declarations of yylex and yyerror---caused errors
12638 because default YYLTYPE not yet defined.
12639 Change semantic actions to compute strings, rather than printing
12640 them directly (to test proper passing of semantics values). Change
12641 output to prefix notation and update test data and expected results.
12642 (yylex): Track locations.
12643 (stmtMerge): Return value rather than printing, and include arguments
12644 in value.
12645
126462003-06-03 Paul Eggert <eggert@twinsun.com>
12647
12648 Avoid warnings generated by GCC 2.95.4 when Bison is
12649 configured with --enable-gcc-warnings.
12650 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12651 yy::]b4_parser_class_name[::translate_,
12652 yy::Stack::operator[] (unsigned),
12653 yy::Stack::operator[] (unsigned) const,
12654 yy::Slice::operator[] (unsigned),
12655 yy::Slice::operator[] (unsigned) const):
12656 Rename local vars to avoid warnings.
12657 * tests/glr-regression.at (Improper handling of embedded actions
12658 and $-N in GLR parsers): Remove unused local variable from yylex.
12659 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12660 (void) as arg when not pure, since we now assume C89 when building
12661 Bison. Pacify GCC by using parameter.
12662
126632003-06-02 Paul Eggert <eggert@twinsun.com>
12664
12665 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12666 yy::Location::lines, yy::Location::columns): Rename arguments
12667 to avoid shadowing; this removes a warning generated by GCC 3.3.
12668
126692003-06-01 Paul Eggert <eggert@twinsun.com>
12670
12671 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12672 to g++, as GCC 3.3 complains if you do it.
12673 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12674 everything that WARNING_CFLAGS has, except omit warnings
12675 not suitable for C++.
12676 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12677 * tests/atlocal.in (CXXFLAGS): New var.
12678 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12679
12680 Fix a GLR parser bug I reported in February; see
12681 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12682 The problem was that GLR parsers did not conform to the C standard,
12683 because actions like { $1 = $2 + $3; } expanded to expressions
12684 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12685 to a local variable. The C standard says that expressions
12686 like (var = f ()) + (var = f ()) have undefined behavior.
12687 Another problem was that GCC sometimes issues warnings that
12688 yyfill and its parameters are unused.
12689
12690 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12691 as possibly unused.
12692 (yyfill): New function.
12693 (YYFILL): Use it.
12694 (yyuserAction): Change type of yynormal to bool, so that it matches
12695 the new yyfill signature. Mark it as possibly unused.
12696
12697
12698 Follow up on a bug I reported in February, where a Bison-generated
12699 parser can loop. Provide a test case and a fix for yacc.c. I
12700 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12701 The original bug report is in:
12702 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12703
12704 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12705 macro's size was becoming unwieldy.
12706 (yyerrlab): Do not discard an empty lookahead symbol, as this
12707 might destroy garbage.
12708 (yyerrorlab): New label, with the old contents of YYERROR,
12709 plus the following change: pop the stack of rhs corresponding
12710 to the production that invoked YYERROR. That is how Yacc
12711 behaves, and POSIX requires this behavior.
12712 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12713 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12714 Define 'alarm' to do nothing if unistd.h is not available.
12715 Add a new rule "exp: '-' error;" to test the above change to
12716 data/yacc.c. Use 'alarm' to abort any test taking longer than
12717 10 seconds, as it's probably looping.
12718 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12719 Also, the new yacc.c generates two fewer diagnostics for an
12720 existing test.
12721
127222003-05-24 Paul Eggert <eggert@twinsun.com>
12723
12724 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12725 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12726 This fixes a problem reported by John Bowman when the Compaq/HP
12727 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12728 -ansi -Wall -gall).
12729 * data/yacc.c (union yyalloc): Likewise.
12730 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12731
12732 Switch from 'int' to 'bool' where that makes sense.
12733
12734 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12735 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12736 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12737 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12738 Return or accept bool, not int. All callers changed.
12739 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12740 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12741 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12742 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12743 bitset_or_and_cmp_): Likewise.
12744 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12745 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12746 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12747 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12748 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12749 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12750 bitset_stats_or_and_cmp): Likewise.
12751 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12752 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12753 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12754 ebitset_xor_cmp): Likewise.
12755 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12756 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12757 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12758 lbitset_xor_cmp): Likewise.
12759 * lib/bbitset.h: Include <stdbool.h>.
12760 (struct bitset_vtable): The following members now return bool, not
12761 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12762 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12763 or_and_cmp).
12764 * src/conflicts.c (count_rr_conflicts): Likewise.
12765 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12766 All uses changed.
12767 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12768 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12769 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12770 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12771 graph_flag): Likewise.
12772 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12773 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12774 graph_flag): Likewise.
12775 * src/output.c (error_verbose): Likewise.
12776 * src/output.h (error_verbose): Likewise.
12777 * src/reader.c (start_flag, typed): Likewise.
12778 * src/reader.h (typed): Likewise.
12779 * src/getargs.c (LOCATIONS_OPTION): New constant.
12780 (long_options, getargs): Use it.
12781 * src/lalr.c (build_relations): Use bool, not int.
12782 * src/nullable.c (nullable_compute): Likewise.
12783 * src/print.c (print_reductions): Likewise.
12784 * src/tables.c (action_row, pack_vector): Likewise.
12785 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12786 * src/output.c (prepare): Use it.
12787 * src/output.c (token_definitions_output,
12788 symbol_destructors_output, symbol_destructors_output): Use string,
12789 not boolean integer, to keep track of whether to output separator.
12790 * src/print_graph.c (print_core): Likewise.
12791 * src/state.c (state_rule_lookaheads_print): Likewise.
12792
12793 * config/install-sh: Sync from automake 1.7.5.
12794
127952003-05-14 Paul Eggert <eggert@twinsun.com>
12796
12797 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12798 semicolon after a grammar declaration, in the interest of possible
12799 future changes to the Bison input language.
12800 Do not allow a stray semicolon at the start of the grammar.
12801 (rhses.1): Allow one or more semicolons after any rule, including
12802 just before "|" as required by POSIX.
12803 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12804 grammar.
12805
128062003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12807
12808 %parse-param support for lalr1.cc.
12809
12810 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12811 b4_cc_constructor_calls, b4_cc_constructor_call,
12812 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12813 definitions.
12814 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12815 parse-param arguments.
12816 (yy::b4_parser_class_name): Declare instance variables to
12817 hold parse-param arguments.
12818 * tests/calc.at: s/value/semantic_value/ because value clashes
12819 with a member of yy::b4_parser_class_name. Adjust C++ code
12820 to handle %parse-param. Enable %parse-param test in C++.
12821
128222003-05-12 Paul Eggert <eggert@twinsun.com>
12823
12824 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12825 English a bit. Fix fclose typo. Change "const char" to "char
12826 const", and use ANSI C rather than K&R for "main". Suggest
12827 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12828 and suggest yy_switch_to_buffer.
12829
128302003-05-05 Paul Eggert <eggert@twinsun.com>
12831
12832 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12833 C89. This avoids a diagnostic on compilers that define __STDC__
12834 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12835 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12836
128372003-05-03 Paul Eggert <eggert@twinsun.com>
12838
12839 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12840 Do not overrun array bounds.
12841 This should fix a bug reported today by Olatunji Oluwabukunmi in
12842 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12843
128442003-04-29 Akim Demaille <akim@epita.fr>
12845
12846 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12847 * src/getargs.c, src/getargs.h: here, as bool, not int.
12848 (nondeterministic_parser): New.
12849 * src/parse-gram.y, src/scan-gram.l: Support
12850 %nondeterministic-parser.
12851 * src/output.c (prepare): Use nondeterministic_parser instead
12852 of glr_parser where appropriate.
12853 * src/tables.c (conflict_row, action_row, save_row)
12854 (token_actions, token_actions, pack_vector): Ditto.
12855
128562003-04-29 Akim Demaille <akim@epita.fr>
12857
12858 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12859
128602003-04-29 Akim Demaille <akim@epita.fr>
12861
12862 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12863 with %pure-parser and %locations to exercise the patch from Yakov
12864 Markovitch below.
12865
128662003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12867
12868 * data/yacc.c: (b4_lex_param): Corrected for the case where
12869 %lex-param is provided and %pure-parser isn't.
12870
128712003-04-27 Paul Eggert <eggert@twinsun.com>
12872
12873 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12874 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12875 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12876 if it is not defined.
12877 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12878
128792003-04-26 Paul Eggert <eggert@twinsun.com>
12880
12881 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12882 Declare to be of type suitable for the ninf value itself, not of
12883 type suitable for the corresponding table, since the latter might
12884 be unsigned but the ninf value might be negative. This fixes a
12885 bug reported by Alexandre Duret-Lutz in
12886 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12887
12888 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12889 invokes it. We shouldn't invoke it twice because it will attempt
12890 to put error.o in the archive twice. This fixes a glitch reported
12891 by Martin Mokrejs in
12892 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12893
128942003-04-21 Paul Eggert <eggert@twinsun.com>
12895
12896 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12897 to gnulib.
12898
128992003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12900
12901 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12902 Fix obvious typo that results in uncompilable GLR parsers
12903 when both %pure-parser and %locations are used. (trivial change)
12904
129052003-04-17 Paul Eggert <eggert@twinsun.com>
12906
12907 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12908 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12909 Do not insert the expected token via unput, as this runs afoul
12910 of a POSIX-compatibility bug in flex 2.5.31.
12911 All uses changed to BEGIN the parent state,
12912 since we no longer insert the expected token via unput.
12913 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12914 that is no longer emitted after the above change.
12915
12916 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12917 the first one. This change is from Paul Hilfinger, and it fixes
12918 regression reported by Werner Lemberg in
12919 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12920
12921 (resolve_sr_conflict): Don't invoke state_errs_set
12922 unless one or more tokens have been explicitly made errors.
12923 Otherwise, the above change causes Bison to abort.
12924
12925 * tests/existing.at (GNU pic Grammar): New test case, taken from
12926 Lemberg's email.
12927
129282003-03-31 Akim Demaille <akim@epita.fr>
12929
12930 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12931
129322003-03-31 Akim Demaille <akim@epita.fr>
12933
12934 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12935 output.
12936
129372003-03-31 Akim Demaille <akim@epita.fr>
12938
12939 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12940 From Paul Hilfinger.
12941
129422003-03-29 Akim Demaille <akim@epita.fr>
12943
12944 * m4/error.m4: Do not put under dynamic conditions some code which
12945 expansion is under static control.
12946
129472003-03-29 Akim Demaille <akim@epita.fr>
12948
12949 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12950
129512003-03-29 Akim Demaille <akim@epita.fr>
12952
12953 * doc/bison.texinfo (Strings are Destroyed): New.
12954
129552003-03-13 Paul Eggert <eggert@twinsun.com>
12956
12957 * .cvsignore: Add configure.lineno.
12958 * src/.cvsignore: Add yacc.
12959 * tests/.cvsignore: Add testsuite.log.
12960 * doc/fdl.texi: Sync with latest FSF version.
12961
129622003-03-12 Paul Eggert <eggert@twinsun.com>
12963
12964 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12965 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12966 cursor, instead of leaving it undefined. This fixes a bug
12967 reported by Tim Van Holder in
12968 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12969 * tests/input.at (Torturing the Scanner): Test the scanner on
12970 an empty input file, which was Tim Van Holder's test case.
12971
12972 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12973 <sys/resource.h> can be included, include sys/time.h and
12974 sys/times.h first, if available. This works around the SunOS
12975 4.1.4 porting bug reported by Bruce Becker in
12976 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12977
12978 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12979 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12980 AC_HEADER_SYS_WAIT.
12981
12982 Merge changes from gnulib. This was prompted because the CVS
12983 snapshot didn't build on Solaris 7 due to strnlen problems.
12984
12985 These changes need to be merged back into gnulib:
12986 * lib/hash.c: Include <stdbool.h> unconditionally.
12987 * m4/onceonly.m4 (m4_quote): New macro.
12988 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12989 Quote AC_FOREACH variable-expansions properly.
12990 The 2003-01-03 obstack.h change also needs merging.
12991 {end of changes requiring merging}
12992
12993 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12994 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12995 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12996 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12997 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12998 New files, imported from gnulib.
12999 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13000 above.
13001
13002 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13003 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13004 gnulib sources.
13005
13006 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13007 Add.
13008 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13009 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13010 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13011 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13012 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13013 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13014 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13015 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13016 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13017 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13018 (jm_PREREQ_ARGMATCH): Remove.
13019 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13020 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13021
13022 * src/system.h: Include <stdbool.h> unconditionally.
13023
13024 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13025 assuming at least C89 in the bitset code for some time now.
13026
130272003-03-03 Akim Demaille <akim@epita.fr>
13028
13029 * ro.po: New.
13030
130312003-03-02 Akim Demaille <akim@epita.fr>
13032
13033 * doc/bison.texinfo (Table of Symbols): Reactivate the
13034 documentation for %lex-param, and %parse-param.
13035
130362003-03-02 Akim Demaille <akim@epita.fr>
13037
13038 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13039 generate verbose error messages.
13040 Use the number of tokens as an upper bound in yytname, as it
13041 cannot be a non terminal.
13042
130432003-03-02 Akim Demaille <akim@epita.fr>
13044
13045 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13046 message.
13047
130482003-03-02 Akim Demaille <akim@epita.fr>
13049
13050 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13051 Use them to exercise yycheck overrun.
13052 Based on Andrew Suffield's grammar.
13053
130542003-03-02 Akim Demaille <akim@epita.fr>
13055
13056 Create tests/local.at for Bison generic testing macros.
13057
13058 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13059 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13060 This new file.
13061 * tests/calc.at (AT_CHECK_CALC): Adjust.
13062 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13063 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13064 * tests/local.at: here.
13065 (AT_COMPILE_CXX): Tags the tests using it as c++.
13066 Ignore the test if CXX is not functional.
13067
130682003-03-01 Paul Eggert <eggert@twinsun.com>
13069
13070 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13071 not loc->end, since loc->end might contain garbage and this leads
13072 to undefined behavior on some platforms.
13073 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13074 depend on *loc, so that the reader doesn't give the the false
13075 impression that *loc is initialized.
13076 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13077 does not survive the return.
13078
130792003-03-01 Akim Demaille <akim@epita.fr>
13080
13081 * src/scan-gram.l (code_start): Always initialize it when entering
13082 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13083 yylex invocation. An alternative would be making it static, but
13084 then it starts with the second %%'s beginning, instead of its end.
13085
130862003-02-28 Paul Eggert <eggert@twinsun.com>
13087
13088 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13089 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13090 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13091
130922003-02-26 Paul Eggert <eggert@twinsun.com>
13093
13094 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13095 Remove Sequent/Pyramid discussion (nobody uses them any more).
13096 Merge VMS and MS-DOS discussion; these ports may well be dead
13097 but let's keep mentioning them for now. Put <> around email
13098 addresses. Add copyright notice.
13099
131002003-02-24 Paul Eggert <eggert@twinsun.com>
13101
13102 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13103 to avoid collision with flex use of yylineno.
13104 Problem reported by Bruce Lilly in
13105 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13106 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13107 * data/yacc.c (yy_reduce_print): Likewise.
13108
13109 * config/depcomp: Sync with Automake 1.7.3.
13110
131112003-02-21 Akim Demaille <akim@epita.fr>
13112
13113 * data/lalr1.cc: Use temporary variables instead of casts to
13114 change integer types.
13115 Suggested by Paul Eggert.
13116
131172003-02-21 Akim Demaille <akim@epita.fr>
13118
13119 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13120 to avoid confusions with lalr1.cc's notion of Position.
13121 Suggested by Paul Eggert.
13122
131232003-02-20 Akim Demaille <akim@epita.fr>
13124
13125 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13126 before initial_columns.
13127 (location.hh): Use consistent variable names when defining the
13128 operator<<.
13129 Use "last" so that we subtract from Positions, not from unsigned.
13130
131312003-02-20 Akim Demaille <akim@epita.fr>
13132
13133 * data/lalr1.cc (position.hh): New subfile, including the extended
13134 and Doxygen'ed documentation of class Position.
13135 (location.hh): Use it.
13136 Document a` la Doxygen.
13137 With the help of Benoit Perrot.
13138
131392003-02-20 Akim Demaille <akim@epita.fr>
13140
13141 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13142 AT_YACC_IF.
13143 Redefine AT_YYERROR_SEES_LOC_IF using it.
13144 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13145 not defined.
13146 Don't use the location in yy::Parser::error_ and
13147 yy::Parser::print_ when not %locations.
13148 Activate more lalr1.cc tests.
13149
131502003-02-19 Akim Demaille <akim@epita.fr>
13151
13152 * data/lalr1.cc: When displaying a line number, be sure to make it
13153 an int.
13154
131552003-02-19 Akim Demaille <akim@epita.fr>
13156
13157 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13158 Remove, useless.
13159 (YYABORT, YYACCEPT, YYERROR): New.
13160 * tests/calc.at: Renable the lalr1.cc test.
13161
131622003-02-19 Akim Demaille <akim@epita.fr>
13163
13164 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13165 error recovery, mixing with/without pops and discarding of the
13166 lookahead.
13167 Exercise YYERROR.
13168 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13169
131702003-02-17 Paul Eggert <eggert@twinsun.com>
13171
13172 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13173 * tests/testsuite.at (AT_COMPILE): Use them.
13174 This fixes the testsuite problem reported by Robert Lentz in
13175 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13176
131772003-02-12 Paul Eggert <eggert@twinsun.com>
13178
13179 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13180 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13181 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13182 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13183 Check for malloc failure, for consistency with yacc.c.
13184 (yytname_size): Remove, for consistency with yacc.c.
13185
13186 The bug still remains in data/lalr1.cc, as I didn't have time
13187 to fix it there.
13188
131892003-02-06 Akim Demaille <akim@epita.fr>
13190
13191 * configure.ac (GXX): Rename as...
13192 (CXX): this, to keep the original Autoconf semantics.
13193 Require 2.57.
13194 * data/lalr1.cc: Fix b4_copyright invocations.
13195 If YYDEBUG is not defined, don't depend upon name_ being defined.
13196 (location.hh): Include string and iostream.
13197 (Position::filename): New member.
13198 (Position::Position ()): New.
13199 (operator<< (Position)): New.
13200 (operator- (Position, int)): New.
13201 (Location::first, Location::last): Rename as...
13202 (Location::begin, Location::end): these, to mock the conventional
13203 iterator names.
13204 (operator<< (Location)): New.
13205 * tests/atlocal.in (CXX): New.
13206 * tests/testsuite.at (AT_COMPILE_CXX): New.
13207 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13208 locations in a more synthetic way.
13209 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13210 lalr1.cc is used.
13211 Adjust the C locations to match those from Emacs: first column is
13212 column 0.
13213 Change all the expected results.
13214 Conform to the GCS: simplify the locations when applicable.
13215 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13216 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13217 these CPP macros with the m4 macros new defined by...
13218 (AT_CHECK_PUSHDEFS): this, i.e.:
13219 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13220 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13221 New macros.
13222 (AT_CHECK_POPDEFS): Undefine them.
13223 (AT_CHECK_CALC_LALR1_CC): New.
13224 Use it for the first lalr1.cc test.
13225
132262003-02-04 Akim Demaille <akim@epita.fr>
13227
13228 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13229 Location as is defined.
13230
132312003-02-04 Akim Demaille <akim@epita.fr>
13232
13233 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13234 name_ being defined.
13235
132362003-02-03 Paul Eggert <eggert@twinsun.com>
13237
13238 * src/gram.h (start_symbol): Remove unused decl.
13239
13240 Use more-consistent naming conventions for local vars.
13241
13242 * src/derives.c (derives_compute): Change type of local var from
13243 int to rule_number.
13244 * src/gram.c (grammar_rules_partial_print): Likewise.
13245 * src/print.c (print_core): Likewise.
13246 * src/reduce.c (reduce_grammar_tables): Likewise.
13247
13248 * src/gram.c (grammar_dump): Change name of item_number *
13249 local var from r to rp.
13250 * src/nullable.c (nullable_compute): Likewise.
13251
13252 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13253
13254 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13255 for symbol or symbol_number var.
13256 * src/reader.c (grammar_start_symbol_set): Likewise.
13257 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13258 Likewise.
13259 * src/state.c (transitions_to): Likewise.
13260 * src/state.h: Likewise.
13261 * src/tables.c (symbol_number_to_vector_number): Likewise.
13262
13263 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13264 char * var.
13265
13266 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13267 var.
13268
13269 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13270 var.
13271
13272 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13273 Use str, not s, for char * var. Use ch, not c, for character var.
13274 Use size for size var.
13275
13276 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13277 char * var.
13278 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13279 uniqstr var.
13280 * src/uniqstr.h: Likewise.
13281
13282 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13283 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13284 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13285 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13286 param to have same name as that of enum, so that we don't use
13287 "s" to stand for a non-state.
13288
132892003-02-02 Akim Demaille <akim@epita.fr>
13290
13291 * src/scan-skel.l: Scan more than one inert character per yylex
13292 invocation.
13293
132942003-02-01 Paul Eggert <eggert@twinsun.com>
13295
13296 Version 1.875a.
13297
13298 * po/LINGUAS: Add ms.
13299
133002003-01-30 Akim Demaille <akim@epita.fr>
13301
13302 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13303
133042003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13305
13306 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13307 of $1.
13308
13309 Changes in response to error report by S. Eken: GLR mode does not
13310 handle negative $ indices or $ indices in embedded rules correctly.
13311 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13312
13313 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13314 (b4_rhs_location): Ditto.
13315 (yyfill): New function to copy from stack tree into array
13316 incrementally.
13317 (yyuserAction): Modify to allow incremental move of semantic values
13318 to rhs array when in GLR mode.
13319 Define YYFILL to use in user-defined actions to fill semantic array
13320 as needed.
13321 Remove dummy use of yystack, as there is now a guaranteed use.
13322 (yydoAction): Modify to allow incremental move of semantic values
13323 to rhs array when in GLR mode.
13324 (yyresolveAction): Ditto.
13325 (yyglrShiftDefer): Update comment.
13326 (yyresolveStates): Use X == NULL for pointers, not !X.
13327 (yyglrReduce): Ditto.
13328 (yydoAction): Ditto
13329
13330 * tests/glr-regr1.at: Rename to ...
13331 * tests/glr-regression.at: Add new regression test for the problems
13332 described above (adapted from S. Eken).
13333 Update copyright notice.
13334 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13335 * tests/Makefile.am: Ditto.
13336
133372003-01-28 Paul Eggert <eggert@twinsun.com>
13338
13339 * data/lalr1.cc: Do not use @output_header_name@ unless
13340 b4_defines_flag is set. This fixes two bugs reported by
13341 Tim Van Holder in
13342 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13343 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13344
133452003-01-21 Paul Eggert <eggert@twinsun.com>
13346
13347 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13348 we don't need to worry about yyerrlab1 being reported as an
13349 "unused label" by non-GCC C compilers. The downside is that if
13350 locations are used then a couple of statements are duplicated each
13351 time YYERROR is invoked, but the upside is that the warnings
13352 should vanish.
13353 (yyerrlab1): Move code to YERROR.
13354 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13355 This reverts some of the 2002-12-27 change.
13356
133572003-01-17 Paul Eggert <eggert@twinsun.com>
13358
13359 * src/output.c (symbol_printers_output): Fix typo that led
13360 to core dump. Problem reported by Antonio Rus in
13361 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13362
133632003-01-13 Akim Demaille <akim@epita.fr>,
13364 Quoc Peyrot <chojin@lrde.epita.fr>,
13365 Robert Anisko <anisko_r@lrde.epita.fr>
13366
13367 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13368 when the stacks contain one element, as the loop would otherwise
13369 free the last state, and then use the top state (the one we just
13370 popped). This means that the initial elements will not be freed
13371 explicitly, as is the case in yacc.c; it is not a problem, as
13372 these elements have fake values.
13373
133742003-01-11 Paul Eggert <eggert@twinsun.com>
13375
13376 * NEWS: %expect-violations are now just warnings, reverting
13377 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13378 bootstrapping problem reported by Matthias Klose; see
13379 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13380 * src/conflicts.c (conflicts_print): Likewise.
13381 * tests/conflicts.at (%expect not enough, %expect too much,
13382 %expect with reduce conflicts): Likewise.
13383 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13384 that the warning is enabled if the number of conflicts changes
13385 (not necessarily increases).
13386
13387 * src/getargs.c (version): Update copyright year.
13388
133892003-01-09 Akim Demaille <akim@epita.fr>
13390
13391 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13392
133932003-01-08 Paul Eggert <eggert@twinsun.com>
13394
13395 * Makefile.maint (WGETFLAGS):
13396 New macro, containing "-C off" to disable proxy caches.
13397 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13398 (rel-check): Use $(WGET) instead of wget.
13399
134002003-01-06 Paul Eggert <eggert@twinsun.com>
13401
13402 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13403 the GLR paper of Scott, Johnstone and Hussain.
13404
134052003-01-04 Paul Eggert <eggert@twinsun.com>
13406
13407 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13408 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13409 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13410 (EXTRA_LIBRARIES): New var, for liby.a.
13411 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13412 (EXTRA_SCRIPTS): New var, for yacc.
13413
13414 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13415 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13416 Problem reported by Nelson H. F. Beebe.
13417
134182003-01-03 Paul Eggert <eggert@twinsun.com>
13419
13420 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13421 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13422 when compiling Bison 1.875's `bitset bset = obstack_alloc
13423 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13424
13425 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13426 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13427 grow to a huge size with typical invocation.
13428
13429 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13430 Use the pattern recommended by Autoconf 2.57, except also protect
13431 against double-definition.
13432 * src/system.h: Likewise.
13433 Portability issues reported by Nelson H. F. Beebe.
13434
13435 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13436 All uses changed. Provide a definition in both C and C++.
13437 (yytrue, yyfalse): Define even if defined (__cplusplus).
13438
13439 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13440 Reported by Nelson H. F. Beebe.
13441
13442 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13443
134442003-01-02 Paul Eggert <eggert@twinsun.com>
13445
13446 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13447 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13448 Bug reported by Nelson H. F. Beebe.
13449
134502003-01-01 Paul Eggert <eggert@twinsun.com>
13451
13452 * Version 1.875.
13453
134542002-12-30 Paul Eggert <eggert@twinsun.com>
13455
13456 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13457 Moved here from...
13458 (<INITIAL>","): Here. This causes stray "," to be treated
13459 more uniformly.
13460
13461 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13462 last brace in braced code when not in Yacc mode, for compatibility
13463 with Bison 1.35. This resurrects the 2001-12-15 patch to
13464 src/reader.c.
13465
13466 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13467 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13468
134692002-12-28 Paul Eggert <eggert@twinsun.com>
13470
13471 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13472 that of SYM's type. This fixes Debian bug 168069, reported by
13473 Thomas Olsson.
13474
134752002-12-28 Paul Eggert <eggert@twinsun.com>
13476
13477 Version 1.75f.
13478
13479 Switch back to the Yacc style of conflict reports, undoing some
13480 of the 2002-07-30 change.
13481 * doc/bison.texinfo (Understanding): Use Yacc style for
13482 conflict reports. Also, use new way of locating rules.
13483 * src/conflicts.c (conflict_report):
13484 Renamed from conflict_report_yacc, removing the old
13485 'conflict_report'. Translate the entire conflict report at once,
13486 so that we don't assume that "," has the same interpretation in
13487 all languages.
13488 (conflicts_output): Use Yacc-style conflict report for each state,
13489 instead of our more-complicated style.
13490 (conflicts_print): Use Yacc-style conflict report, except print
13491 the input file name when not emulating Yacc.
13492 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13493 Conflicted Reduction, %expect not enough, %expect too much,
13494 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13495 * tests/existing.at (GNU Cim Grammar): Likewise.
13496 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13497
13498 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13499 fatal): Don't invoke fflush; it's not needed and it might even be
13500 harmful for stdout, as stdout might not be open.
13501 * src/reduce.c (reduce_print): Likewise.
13502
135032002-12-27 Paul Eggert <eggert@twinsun.com>
13504
13505 Fix a bug where error locations were not being recorded correctly.
13506 This problem was originally reported by Paul Hilfinger in
13507 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13508
13509 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13510 top of the location stack's error locations.
13511 (yyerrlab): Set it. When discarding a token, push its location
13512 onto yylerrsp so that we don't lose track of the error's end.
13513 (yyerrlab1): Now is only the target of YYERROR, so that we can
13514 properly record the location of the action that failed. For GCC
13515 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13516 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13517 (yyerrlab2): New label, which yyerrlab now falls through to.
13518 Compute the error's location by applying YYLLOC_DEFAULT to
13519 the locations of all the symbols that went into the error.
13520 * doc/bison.texinfo (Location Default Action): Mention that
13521 YYLLOC_DEFAULT is also invoked for syntax errors.
13522 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13523 Error locations include the locations of all the tokens that were
13524 discarded, not just the last token.
13525
135262002-12-26 Paul Eggert <eggert@twinsun.com>
13527
13528 * src/files.c: Include quote.h.
13529 (compute_output_file_names): Warn if we detect conflicting
13530 outputs to the same file. This should catch the misunderstanding
13531 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13532
13533 * src/conflicts.c (conflicts_print): If the user specifies
13534 "%expect N", report an error if there are any reduce/reduce
13535 conflicts. This is what the manual says should happen.
13536 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13537 * tests/conflicts.at (%expect with reduce conflicts): New test.
13538
13539 Don't use m4_include on relative file names, as it doesn't work as
13540 desired if there happens to be a file with that name under ".".
13541
13542 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13543 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13544 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13545 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13546 * src/output.c (output_skeleton): Use full path names when
13547 specifying a file to include; don't rely on include path, as
13548 it's unreliable when the working file contains a file with
13549 that name.
13550
135512002-12-25 Paul Eggert <eggert@twinsun.com>
13552
13553 Remove obsolete references to bison.simple and bison.hairy.
13554 Problem mentioned by Aubin Mahe in
13555 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13556 * data/glr.c: Comment fix.
13557 * doc/bison.1: Remove references. Also, mention "yacc".
13558
13559 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13560 with -g option.
13561
13562 * src/parse-gram.y (declaration): Use enum "report_states" rather
13563 than its numeric value 1.
13564
13565 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13566 opening a new one. This fixes Debian bug 165349, reported by
13567 Bruce Stephens.
13568
135692002-12-24 Paul Eggert <eggert@twinsun.com>
13570
13571 Version 1.75e.
13572
13573 * Makefile.maint (cvs-update): Don't assume that the shell
13574 supports $(...), as Solaris sh doesn't.
13575
13576 * src/parse-gram.y (lloc_default): Remove test for empty
13577 nonterminals at the end, since it didn't change the result.
13578
135792002-12-24 Paul Eggert <eggert@twinsun.com>
13580
13581 If the user does not define YYSTYPE as a macro, Bison now declares it
13582 using typedef instead of defining it as a macro. POSIX requires this.
13583 For consistency, YYLTYPE is also declared instead of defined.
13584
13585 %union directives can now have a tag before the `{', e.g., the
13586 directive `%union foo {...}' now generates the C code
13587 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13588 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13589 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13590 instead of `yyltype'.
13591
13592 `yystype' and `yyltype' are now obsolescent macros instead of being
13593 typedefs or tags; they are no longer documented and will be
13594 withdrawn in a future release.
13595
13596 * data/glr.c (b4_location_type): Remove.
13597 (YYSTYPE): Renamed from yystype.
13598 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13599 (struct YYLTYPE): Renamed from struct yyltype.
13600 (YYLTYPE): Renamed from yyltype.
13601 (yyltype, yystype): New (and obsolescent) macros,
13602 for backward compatibility.
13603 * data/yacc.c: Likewise.
13604
13605 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13606 does not specify a union tag. This is for compatibility with
13607 Solaris 9 yacc.
13608
13609 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13610 const *, since it is now modified by stripping surrounding { }.
13611 (current_braced_code): Remove.
13612 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13613 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13614 trailing " {...}". Now of type <chars>.
13615 (grammar_declaration): Adjust to bundled tokens.
13616 (code_content): Remove; stripping is now done by add_param.
13617 (print_token_value): Print contents of bundled tokens.
13618 (token_name): New function.
13619
13620 * src/reader.h (braced_code, current_braced_code): Remove.
13621 (token_name): New decl.
13622
13623 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13624 token_type, not braced_code code_kind. All uses changed.
13625 (SC_PRE_CODE): New state, for scanning after a keyword that
13626 has (or usually has) an immediately-following braced code.
13627 (token_type): New local var, to keep track of which token type
13628 to return when scanning braced code.
13629 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13630 <INITIAL>"%parse-param", <INITIAL>"%printer",
13631 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13632 instead of returning a token type immediately.
13633 (<INITIAL>"{"): Set token type.
13634 (<SC_BRACED_CODE>"}"): Use it.
13635 (handle_action_dollar, handle_action_at): Now returns bool
13636 indicating success. Fail if ! current_rule; this prevents a core dump.
13637 (handle_symbol_code_dollar, handle_symbol_code_at):
13638 Remove; merge body into caller.
13639 (handle_dollar, handle_at): Complain in invalid contexts.
13640
13641 * NEWS, doc/bison.texinfo: Document the above.
13642 * NEWS: Fix years and program names in copyright notice.
13643
136442002-12-17 Paul Eggert <eggert@twinsun.com>
13645
13646 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13647 Reporting, Table of Symbols): Omit mentions of %lex-param and
13648 %parse-param from the documentation for now.
13649
136502002-12-15 Paul Eggert <eggert@twinsun.com>
13651
13652 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13653 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13654 lookahead symbol, and which sets yychar in parser actions) and it
13655 disagreed with the Bison documentation. Bug
13656 reported by Andrew Walrond.
13657
13658 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13659 as the caller now does that.
13660 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13661 (YYEMPTY): Parenthesize right hand side, since others use it.
13662 (yyparse): Don't assume that our generated code is the only code
13663 that sets yychar.
13664
136652002-12-13 Paul Eggert <eggert@twinsun.com>
13666
13667 Version 1.75d.
13668
13669 POSIX requires a "yacc" command.
13670 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13671 (MOSTLYCLEANFILES): Add yacc.
13672 (yacc): New rule.
13673 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13674 as an alias for bison y.
13675
13676 * po/LINGUAS: Add da.
13677
13678 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13679 problem with latest <getopt.h>.
13680 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13681
13682 * doc/fdl.texi: Upgrade to 1.2.
13683 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13684 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13685 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13686 gnulib.
13687 * config/install-sh: Sync with autotools.
13688
13689 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13690 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13691 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13692 locations are requested.
13693 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13694 locations are requested.
13695
136962002-12-12 Paul Eggert <eggert@twinsun.com>
13697
13698 Remove unportable casts and storage allocation tricks.
13699 While we're at it, remove almost all casts, since they
13700 usually aren't needed and are a sign of trouble.
13701
13702 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13703
13704 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13705 the pointer DSET returned by malloc; this isn't portable.
13706 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13707 Similarly for DERIVES.
13708 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13709 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13710 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13711
13712 * src/derives.c (derives_compute): Do not bother invoking
13713 int_of_rule_number, since rule numbers are integers.
13714
13715 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13716 rather than XMALLOC (char, N).
13717
13718 * src/files.c (filename_split): Rewrite to avoid cast.
13719
13720 * src/gram.h (symbol_number_as_item_number,
13721 item_number_as_symbol_number, rule_number_as_item_number,
13722 item_number_as_rule_number):
13723 Now inline functions rather than macros, to avoid casts.
13724 * src/state.h (state_number_as_int): Likewise.
13725 * src/tables.c (state_number_to_vector_number,
13726 symbol_number_to_vector_number): Likewise.
13727
13728 * src/gram.h (int_of_rule_number): Remove; no longer used.
13729
13730 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13731 since the resulting storage is always stored into.
13732
13733 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13734 where it's needed.
13735
13736 * src/muscle_tab.c (muscle_m4_output):
13737 Now inline. Return bool, not int.
13738 * src/state.c (state_compare): Likewise.
13739 * src/symtab.c (symbol_check_defined,
13740 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13741 hash_compare_symbol, hash_symbol):
13742 Likewise.
13743 * src/uniqstr.c (uniqstr_print): Likewise.
13744 * src/muscle_tab.c (muscle_m4_output_processor):
13745 New function, to avoid casts.
13746 * src/state.c (state_comparator, stage_hasher): Likewise.
13747 * src/symtab.c (symbol_check_defined_processor,
13748 symbol_check_alias_consistency_processor, symbol_pack_processor,
13749 symbol_translation_processor, hash_symbol_comparator,
13750 hash_symbol_hasher): Likewise.
13751 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13752 * src/muscle_tab.c (muscles_m4_output):
13753 Use new functions instead of casting old functions unportably.
13754 * src/state.c (state_hash_new): Likewise.
13755 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13756 symbols_token_translations_init):
13757 Likewise.
13758 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13759
13760 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13761 var instead of casting to long, to avoid casts.
13762 (prepare_states): Use MALLOC rather than alloca, so that we don't
13763 have to worry about alloca.
13764 * src/state.c (state_hash_lookup): Likewise.
13765
13766 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13767 local var instead of casting to unsigned char, to avoid casts.
13768
13769 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13770 STATE_ALLOC): Remove.
13771 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13772 rather than calloc, and use offsetof to avoid allocating slightly
13773 too much storage.
13774 (state_new): Initialize all members.
13775
13776 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13777
13778 * src/symtab.c (symbol_free): Remove; unused.
13779 (symbol_get): Remove cast in lhs of assignment.
13780 (symbols_do): Now static. Accept generic arguments, not
13781 hashing-related ones.
13782
13783 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13784 (symbol_processor): Remove.
13785 (symbols_do): Remove decl; now static.
13786
13787 * src/system.h (alloca): Remove; decl no longer needed.
13788 (<stddef.h>): Include, for offsetof.
13789 (<inttypes.>, <stdint.h>): Include if available.
13790 (uintptr_t): New type, if system lacks it.
13791 (CALLOC, MALLOC, REALLOC): New macros.
13792 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13793 new macros.
13794
13795 * src/tables.c (table_size): Now int, to pacify GCC.
13796 (table_grow, table_ninf_remap): Use signed table size.
13797 (save_row): Don't bother initializing locals when not needed.
13798 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13799 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13800
13801 * src/vcg.h: Correct misspellings.
13802
13803 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13804
13805
13806 * src/getargs.c (getargs): Don't assume EOF == -1.
13807
138082002-12-09 Paul Eggert <eggert@twinsun.com>
13809
13810 Change identifier spellings to avoid collisions with names
13811 that are reserved by POSIX.
13812
13813 Don't use names ending in _t, since POSIX reserves them.
13814 For consistency, remove _e and _s endings -- they're weren't
13815 needed to remove ambiguity. All uses changed.
13816 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13817 turn was just renamed from struniq_t.
13818 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13819 which in turn was just renamed from struniq_processor_t.
13820 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13821 in turn was renamed from hash_compare_struniq_t.
13822 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13823 (state_list): Renamed from state_list_t.
13824 * src/assoc.h (assoc): Renamed from assoc_t.
13825 * src/conflicts.c (enum conflict_resolution): Renamed from
13826 enum conflict_resolution_e.
13827 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13828 (rule_list): Renamed from rule_list_t.
13829 * src/getargs.h (enum trace): Renamed from enum trace_e.
13830 (enum report): Renamed from enum report_e.
13831 * src/gram.h (item_number): Renamed from item_number_t.
13832 (rule_number): Renamed from rule_number_t.
13833 (struct rule_s): Remove the "rule_s" part; not used.
13834 (rule): Renamed from rule_t.
13835 (rule_filter): Renamed from rule_filter_t.
13836 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13837 (goto_list): Renamed from goto_list_t.
13838 * src/lalr.h (goto_number): Renamed from goto_number_t.
13839 * src/location.h (location): Renamed from location_t.
13840 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13841 and moved here from:
13842 * src/muscle_tab.h (muscle_entry_t): here.
13843 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13844 (rule_list): Renamed from rule_list_t.
13845 * src/print_graph.c (static_graph): Renamed from graph.
13846 * src/reader.h (braced_code): Renamed from braced_code_t.
13847 Remove brace_code_e tag.
13848 * src/relation.h (relation_node): Renamed from relation_node_t.
13849 (relation_nodes): Renamed from relation_nodes_t.
13850 (relation): Renamed from relation_t.
13851 * src/state.h (state_number): Renamed from state_number_t.
13852 (struct state): Renamed from struct state_s.
13853 (state): Renamed from state_t.
13854 (transitions): Renamed from transitions_t. Unused (and
13855 misspelled) transtion_s tag removed.
13856 (errs): Renamed from errs_t. Unused errs_s tag removed.
13857 (reductions): Renamed from reductions_t. Unused tag
13858 reductions_s removed.
13859 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13860 (struct symbol_list): Renamed from struct symbol_list_s.
13861 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13862 (struct symbol): Renamed from struct symbol_s.
13863 (symbol): Renamed from symbol_t.
13864 * src/tables.c (vector_number): Renamed from vector_number_t.
13865 (action_number): Renamed from action_t.
13866 * src/tables.h (base_number): Renamed from base_t.
13867 * src/vcg.h (enum color): Renamed from enum color_e.
13868 (enum textmode): Renamed from enum textmode_e.
13869 (enum shape): Renamed from enum shape_e.
13870 (struct colorentry): Renamed from struct colorentry_s.
13871 (struct classname): Renamed from struct classname_s.
13872 (struct infoname): Renamed from struct infoname_s.
13873 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13874 (enum decision): Renamed from enum decision_e.
13875 (enum orientation): Renamed from enum orientation_e.
13876 (enum alignment): Renamed from enum alignment_e.
13877 (enum arrow_mode): Renamed from enum arrow_mode_e.
13878 (enum crossing_type): Renamed from enum crossing_type_e.
13879 (enum view): Renamed from enum view_e.
13880 (struct node): Renamed from struct node_s.
13881 (node): Renamed from node_t.
13882 (enum linestyle): Renamed from enum linestyle_e.
13883 (enum arrowstyle): Renamed from enum arrowstyle_e.
13884 (struct edge): Renamed from struct edge.
13885 (edge): Renamed from edge_t.
13886 (struct graph): Renamed from struct graph_s.
13887 (graph): Renamed from graph_t.
13888 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13889 Rename value_t -> value.
13890 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13891 value_t_as_yystype -> value_as_yystype.
13892
13893 Don't include <errno.h> in the mainstream code, since it
13894 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13895 * lib/get-errno.c, lib/get-errno.h: New files.
13896 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13897 get-errno.c.
13898 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13899 * src/output.c (output_skeleton): Likewise.
13900 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13901 instead of errno.
13902 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13903 Likewise.
13904 (handle_action_dollar, handle_action_at): Likewise.
13905 * src/system.h: Do not include <errno.h>.
13906 (TAB_EXT): Renamed from EXT_TAB.
13907 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13908
13909 Avoid str[a-z]*, since <string.h> reserves that name space.
13910 Change all instances of "struniq" in names to "uniqstr", and
13911 likewise for "STRUNIQ" and "UNIQSTR".
13912 * src/uniqstr.c: Renamed from src/struniq.c.
13913 * src/uniqstr.h: Renamed from src/struniq.h.
13914 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13915 * src/files.c (strsuffix): Remove; unused.
13916 (concat2): Renamed from stringappend. Now static.
13917 * src/files.h (strsuffix, stringappend): Remove; unused.
13918 * src/parse-gram.y (<chars>): Renamed from <string>.
13919 (<uniqstr>): Renamed from <struniq>.
13920 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13921 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13922 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13923 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13924 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13925 (N_EXPAND): Renamed from N_STRETCH.
13926
13927 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13928 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13929 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13930 Remove; unused.
13931 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13932 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13933 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13934 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13935 (BASE_MAXIMUM): Renamed from BASE_MAX.
13936 (BASE_MINIMUM): Renamed from BASE_MIN.
13937 (ACTION_MAX): Remove; unused.
13938 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13939 Unnecessary casts removed from above defines.
13940
13941
13942 Fix misspelling in names.
13943 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13944 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13945 G_NODE_ALIGNEMENT.
13946
13947
13948 * lib/timevar.c (timevar_report): Renamed from time_report,
13949 for consistency with other names.
13950 * lib/timevar.h (timevar_report): New decl.
13951 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13952
13953
13954 Sort include-file uses.
13955
13956 Reorder all include files under src to be in the order "system.h".
13957 then the ../lib include files in angle brackets (alphabetized),
13958 then the . include files in double-quotes (alphabetized). Fix
13959 dependency breakages encountered in this process, as follows:
13960 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13961 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13962 * src/state.h: Include "symtab.h".
13963
139642002-12-08 Paul Eggert <eggert@twinsun.com>
13965
13966 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13967 since this causes problems when __file__ contains character
13968 sequences like "@" that are treated specially by src/scan-skel.l.
13969 Instead, just use the file's basename. This fixes the bug
13970 reported by Martin Mokrejs in
13971 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13972
139732002-12-06 Paul Eggert <eggert@twinsun.com>
13974
13975 Add support for rules that do not have trailing semicolons, as
13976 POSIX requires. Improve the quality of locations in Bison
13977 diagnostics.
13978
13979 * src/location.c: Include <quotearg.h>.
13980 (empty_location): Now const.
13981 (location_print): New function. Follow the recommendation of the
13982 GNU Coding Standards for locations that span file boundaries.
13983 * src/location.h: Do not include <quotearg.h>; no longer needed.
13984 (boundary): New type.
13985 (location_t): Use it. This allows locations to span file boundaries.
13986 All member uses changed: file -> start.file or end.file (as needed),
13987 first_line -> start.line, first_column -> start.column,
13988 last_line -> end.line, last_column -> end.column.
13989 (equal_boundaries): New function.
13990 (LOCATION_RESET, LOCATION_STEP): Remove.
13991 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13992 (empty_location): Now const.
13993 (location_print): New decl.
13994 * src/parse-gram.y (lloc_default): New function, which handles
13995 empty locations more accurately.
13996 (YYLLOC_DEFAULT): Use it.
13997 (%token COLON): Remove.
13998 (%token ID_COLON): New token.
13999 (rules): Use it.
14000 (declarations, rules): Remove trailing semicolon.
14001 (declaration, rules_or_grammar_declaration):
14002 Allow empty (";") declaration.
14003 (symbol_def): Remove empty actions; no longer needed.
14004 (rules_or_grammar_declaration): Remove trailing semicolon.
14005 (semi_colon.opt): Remove.
14006 * src/reader.h: Include location.h.
14007 (scanner_cursor): New decl.
14008 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14009 rolling our own.
14010 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14011 of *loc.
14012 (STEP): Remove. No longer needed, now that adjust_location does
14013 the work. All uses removed.
14014 (scanner_cursor): New var.
14015 (adjust_location): Renamed from extend_location. It now sets
14016 *loc and adjusts the scanner cursor. All uses changed.
14017 Don't bother testing for CR.
14018 (handle_syncline): Remove location arg; now updates scanner cursor.
14019 All callers changed.
14020 (unexpected_end_of_file): Now accepts start boundary of token or
14021 comment, not location. All callers changed. Update scanner cursor,
14022 not the location.
14023 (SC_AFTER_IDENTIFIER): New state.
14024 (context_state): Renamed from c_context. All uses changed.
14025 (id_loc, code_start, token_start): New local vars.
14026 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14027 processing of Yacc white space and equivalents here.
14028 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14029 instead of returning ID immediately, since we need to search for
14030 a subsequent colon.
14031 (<INITIAL>"'", "\""): Save token_start.
14032 (<INITIAL>"%{", "{", "%%"): Save code_start.
14033 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14034 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14035 BEGIN context_state at end, not INITIAL.
14036 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14037 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14038 Return correct token start.
14039 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14040 the start of a character, string or multiline comment is found.
14041 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14042 Reduction): Adjust reported locations to match the more-precise
14043 results now expected.
14044 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14045 * tests/reduce.at (Useless Rules, Reduced Automaton,
14046 Underivable Rules): Likewise.
14047 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14048 or "|"' now that so many other tokens are allowed by the new grammar.
14049
14050 * src/complain.h (current_file): Remove duplicate decl;
14051 current_file is now owned by files.h.
14052 * src/complain.c, src/scan-gram.l: Include files.h.
14053
140542002-12-06 Paul Eggert <eggert@twinsun.com>
14055
14056 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14057 promotes to int; it might be unsigned int.
14058 * data/yacc.c (yy_reduce_print): Likewise.
14059
14060 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14061 be #defined in the prologue, not in the Bison declarations.
14062 This fixes Debian Bug 102878, reported by Shaul Karl.
14063
140642002-12-02 Paul Eggert <eggert@twinsun.com>
14065
14066 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14067 * lib/strtoul.c: New file, from gnulib.
14068 This fixes a porting bug reported by Peter Klein in
14069 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14070
140712002-11-30 Paul Eggert <eggert@twinsun.com>
14072
14073 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14074 and put only a forward declaration in the prologue. This is for
14075 consistency with the other scanner helper functions.
14076
14077 Type clashes now generate warnings, not errors, since it
14078 appears that POSIX may allow some grammars with type clashes.
14079 * src/reader.c (grammar_current_rule_check): Warn about
14080 type clashes instead of complaining.
14081 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14082
14083 Add Yacc library, since POSIX requires it.
14084 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14085 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14086 * lib/main.c, lib/yyerror.c: New files.
14087
14088 gram_error can be static; it need not be extern.
14089 * src/reader.h (gram_error): Remove decl.
14090 * src/parse-gram.y (gram_error): Now static. Add static decl.
14091 (print_token_value): Omit parameter names from forward decl,
14092 for consistency.
14093
140942002-11-29 Paul Eggert <eggert@twinsun.com>
14095
14096 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14097 be declared before being used. E.g., one should typically
14098 declare them in the prologue. Use GNU coding style in examples.
14099 Put "const" consistently after the type it modifies. Mention
14100 that C99 supports "inline". Mention that yyerror traditionally
14101 returns "int".
14102
14103 %parse-param and %lex-param now take just one argument, the
14104 declaration; the argument name is deduced from the declaration.
14105
14106 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14107 Reporting, Table of Symbols): Document this.
14108 * src/parse-gram.y (add_param): New function.
14109 (COMMA): Remove.
14110 (declaration): Implement new rule for %parse-param and %lex-param.
14111 * src/scan-gram.l: "," now elicits a warning, rather than being
14112 a token; this is more compatible with byacc.
14113 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14114
141152002-11-27 Paul Eggert <eggert@twinsun.com>
14116
14117 Rename identifiers to avoid real and potential collisions.
14118
14119 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14120 to avoid collision with lex macro described by Bruce Lilly in
14121 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14122 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14123 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14124 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14125 All uses changed.
14126 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14127 The name "yycontrol" violates the name space rules, and this stuff
14128 wasn't being used anyway.
14129 (input): Remove action; this stuff wasn't being used.
14130 (gram_error): Rename local variable yylloc -> loc.
14131 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14132 (YY_DECL): Don't use "yy" at start of local variables.
14133 All uses changed, e.g., yylloc -> loc.
14134 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14135 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14136 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14137 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14138
14139 * src/parse-gram.y (gram_error): loc is now const *.
14140 * src/reader.h (gram_error): Likewise.
14141
141422002-11-24 Paul Eggert <eggert@twinsun.com>
14143
14144 Version 1.75c.
14145
14146 * tests/actions.at (Actions after errors): Use an output format
14147 more similar to that of the Printers and Destructors test.
14148 Test the position of the ';' token too.
14149 (Printers and Destructors): Likewise.
14150 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14151 unnecessarily alarming people when the test fails.
14152
14153 * data/yacc.c (yyerrlab1): Move this label down, so that the
14154 parser does not discard the lookahead token if the user code
14155 invokes YYERROR. This change is required for POSIX conformance.
14156
14157 * lib/error.c: Sync with gnulib.
14158
141592002-11-22 Paul Eggert <eggert@twinsun.com>
14160
14161 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14162 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14163 * lib/xmalloc.c: Likewise.
14164
141652002-11-20 Paul Eggert <eggert@twinsun.com>
14166
14167 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14168
141692002-11-20 Paul Eggert <eggert@twinsun.com>
14170
14171 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14172 should use `if (! x) abort ();' rather than `assert (x);', and
14173 anyway it's one less thing to worry about configuring.
14174
14175 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14176 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14177 and replace all instances of assert with abort.
14178 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14179 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14180
14181 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14182 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14183 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14184 hash_find_entry, hash_rehash, hash_insert): Likewise.
14185 * src/conflicts.c (resolve_sr_conflict): Likewise.
14186 * src/lalr.c (set_goto_map, map_goto): Likewise.
14187 * src/nullable.c (nullable_compute): Likewise.
14188 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14189 * src/reader.c (packgram, reader): Likewise.
14190 * src/state.c (state_new, state_free, state_transitions_set,
14191 state_reduction_find): Likewise.
14192 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14193 symbol_pack): Likewise.
14194 * src/tables.c (conflict_row, pack_vector): Likewise.
14195 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14196 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14197 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14198 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14199
14200 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14201 (ARGMATCH_CONSTRAINT): New macro.
14202 (ARGMATCH_ASSERT): Use it.
14203
14204 * src/system.h (verify): New macro.
14205 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14206 rather than assert.
14207 * src/tables.c (tables_generate): Likewise.
14208
14209 * src/struniq.c (struniq_assert): Now returns void, and aborts
14210 if the assertion is false.
14211 (struniq_assert_p): Remove.
14212 * src/struniq.h: Likewise.
14213
142142002-11-18 Paul Eggert <eggert@twinsun.com>
14215
14216 * data/glr.c (yygetLRActions): Replace `yyindex' with
14217 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14218 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14219 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14220
142212002-11-18 Akim Demaille <akim@epita.fr>
14222
14223 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14224 space.
14225 From Tim Van Holder.
14226
142272002-11-17 Paul Eggert <eggert@twinsun.com>
14228
14229 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14230 to "SyntaxError" for consistency with my 2002-11-15 change.
14231
14232 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14233 not define to {}, since this breaks the common use of `YYDPRINTF
14234 ((...));' if a single statement is desired (e.g. before `else').
14235 Work around GCC warnings by surrounding corresponding calls with
14236 {} if needed.
14237 (yyhasResolvedValue): Remove unused function.
14238 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14239 loop body.
14240 (yyreportSyntaxError): Renamed from yyreportParseError.
14241 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14242 All uses changed.
14243 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14244 extern when possible. Remove unused initializations.
14245
142462002-11-16 Akim Demaille <akim@epita.fr>
14247
14248 Augment the similarity between GLR and LALR traces.
14249
14250 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14251 (YY_REDUCE_PRINT): New.
14252 (yyparse): Use them.
14253 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14254 YYDPRINT here.
14255 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14256 state reached after the reduction/recovery, since...
14257 (yyparse, yyprocessOneStack): Report the state we are entering in.
14258
142592002-11-16 Akim Demaille <akim@epita.fr>
14260
14261 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14262 Add support for --trace=skeleton.
14263 * src/scan-skel.l: %option debug.
14264 Scan strings of non-@ or \n instead of character by character.
14265 (scan_skel): Handle trace_skeleton.
14266 (QPUTS): New.
14267 (@output_parser_name@, @output_header_name@): ``Restore'' their
14268 support (used to be M4 macros).
14269 * data/yacc.c: Quote larger chunks, a la glr.c.
14270 * data/lalr1.cc: Likewise.
14271 The header guards are no longer available, so use some other
14272 string than `YYLSP_NEEDED'.
14273
142742002-11-16 Akim Demaille <akim@epita.fr>
14275
14276 Make the ``Printers and Destructors'' test more verbose, taking
14277 `yacc.c''s behavior as (possibly wrong) reference.
14278
14279 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14280 instead of fprint on stdout.
14281 Set and report the last_line of the symbols.
14282 Consistently display values and locations.
14283
142842002-11-16 Paul Eggert <eggert@twinsun.com>
14285
14286 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14287
142882002-11-15 Paul Eggert <eggert@twinsun.com>
14289
14290 * tests/actions.at (Actions after errors): New test case.
14291
14292 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14293 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14294 tests/action.at, tests/calc.at, tests/conflicts.at,
14295 tests/cxx-type.at, tests/regression.at:
14296 "parse error" -> "syntax error" for POSIX compatibility.
14297 "parsing stack overflow..." -> "parser stack overflow" so
14298 that code matches Bison documentation.
14299
143002002-11-15 Akim Demaille <akim@epita.fr>
14301
14302 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14303 take two BRACED_CODE, not two string_content.
14304 Free the scanner's obstack when we are done.
14305 (code_content): New.
14306 * tests/calc.at: Adjust.
14307 * doc/bison.texinfo: Adjust.
14308 Also, make sure to include the `,' for these declarations.
14309
143102002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14311
14312 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14313 definition; avoids potential autoreconf problems.
14314
143152002-11-15 Akim Demaille <akim@epita.fr>
14316
14317 Always check the value returned by yyparse.
14318
14319 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14320 returned by yyparse.
14321 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14322 Adjust calls.
14323 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14324 returned by yyparse.
14325
143262002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14327
14328 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14329 on input.at test.
14330
143312002-11-14 Paul Eggert <eggert@twinsun.com>
14332
14333 * src/output.c (output_skeleton): Call xfopen instead of
14334 duplicating xfopen's body.
14335
14336 Fix bugs reported by Nelson H. F. Beebe in
14337 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14338
14339 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14340 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14341 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14342 file twice in the grammar, as an extra check.
14343
14344 * tests/input.at (Torturing the Scanner): Surround the
14345 backslash-newline tests with "#if 0", to make it less likely that
14346 we'll run into compiler bugs. Bring back solitary \ inside
14347 comment, but add a closing comment to work around HP C bug. Don't
14348 test backslash-newline in C character constant.
14349
143502002-11-14 Akim Demaille <akim@epita.fr>
14351
14352 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14353 status of the compiler.
14354 Calling `exit 1' is no longer needed.
14355 Reported by Nelson H. F. Beebe.
14356
143572002-11-14 Akim Demaille <akim@epita.fr>
14358
14359 * tests/atlocal.in (CPPFLAGS): We have config.h.
14360 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14361 New.
14362 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14363 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14364 * tests/regression.at, tests/torture.at: Use them for all the
14365 grammars that are to be compiled.
14366 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14367 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14368 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14369
143702002-11-14 Akim Demaille <akim@epita.fr>
14371
14372 * doc/bison.texinfo: Various formatting changes (alignments in
14373 samples, additional @group/@end group, GCS in samples.
14374 Use @deffn instead of simple @table to define the directives,
14375 macros, variables etc.
14376
143772002-11-13 Paul Eggert <eggert@twinsun.com>
14378
14379 Fix some bugs reported by Albert Chin-A-Young in
14380 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14381
14382 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14383 -o c"; the HP C compiler chatters during compilation.
14384 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14385 * tests/headers.at (export YYLTYPE): Likewise.
14386
14387 * tests/input.at (Torturing the Scanner): Remove lines containing
14388 solitary backslashes, as they tickle a bug in the HP C compiler.
14389
14390 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14391 comments, since they're not portable. Use GNU coding style.
14392
143932002-11-13 Akim Demaille <akim@epita.fr>
14394
14395 * data/yacc.c: Leave bigger chunks of quoted text.
14396 (YYDSYMPRINTF): New.
14397 Use it to report symbol activities.
14398 * data/glr.c (YYDSYMPRINTF): New.
14399 Use it.
14400
144012002-11-12 Paul Eggert <eggert@twinsun.com>
14402
14403 Version 1.75b.
14404
14405 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14406 (yyglrReduce): Return yyok, not 0.
14407 This should avoid the enumerated-type warnings reported
14408 by Nelson H. F. Beebe in
14409 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14410
14411 * lib/bbitset.h (BITSET_INLINE): Remove.
14412 * lib/bitset.h [! BITSET_INLINE]: Remove.
14413 (bitset_set, bitset_reset, bitset_test): Rename local vars
14414 to avoid shadowing warnings by GCC.
14415
14416 * data/glr.c (inline): Remove #define. It's the user's
14417 responsibility to #define it away, just like 'const'.
14418 This fixes one of the bugs reported by Nelson H. F. Beebe in
14419 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14420
14421 * Makefile.maint (po-check): Scan .l and .y files instead of the
14422 .c and the .h files that they generate. This fixes the bug
14423 reported by Tim Van Holder in:
14424 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14425 Look for N_ as well as for _. Try to avoid matching #define for
14426 N_ and _.
14427 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14428 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14429 * src/scan-gram.l: Revamp regular expressions so that " and '
14430 do not confuse xgettext.
14431
14432 * src/struniq.h (struniq_new): Do not declare the return type
14433 to be 'const'; this violates the C standard.
14434 * src/struniq.c (struniq_new): Likewise.
14435
144362002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14437
14438 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14439 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14440 linker.
14441
144422002-11-12 Akim Demaille <akim@epita.fr>
14443
14444 * Makefile.maint: Sync with Autoconf:
14445 (local_updates): New.
14446
144472002-11-12 Akim Demaille <akim@epita.fr>
14448
14449 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14450
144512002-11-12 Akim Demaille <akim@epita.fr>
14452
14453 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14454 locations.
14455
144562002-11-12 Akim Demaille <akim@epita.fr>
14457
14458 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14459 not yyvalue.
14460
144612002-11-12 Akim Demaille <akim@epita.fr>
14462
14463 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14464 Use it to test the GLR parser.
14465
144662002-11-12 Akim Demaille <akim@epita.fr>
14467
14468 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14469 defines it.
14470 * data/glr.c (yystos): New.
14471 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14472 (YYDSYMPRINT): New.
14473 (yyval): Don't define it, it is handled via M4.
14474 (yyrecoverParseError): Free verbosely the discarded symbols.
14475 * data/yacc.c (yysymprint): Remove, rather...
14476 (b4_yysymprint_generate): invoke.
14477 * data/c.m4 (b4_yysymprint_generate): New.
14478 Accept pointers as arguments, as opposed to the version from
14479 yacc.c.
14480 (b4_yydestruct_generate): Likewise.
14481 * tests/cations.at (Printers and Destructors): Use Bison directives
14482 instead of CPP macros.
14483 Don't rely on internal details.
14484
144852002-11-12 Akim Demaille <akim@epita.fr>
14486
14487 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14488 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14489 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14490 it against YYEMPTY and so forth), work on yytoken (i.e., set
14491 it to YYEMPTY etc.).
14492 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14493 (b4_symbol_actions): Remove.
14494 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14495 for 0, end-of-input.
14496
144972002-11-12 Akim Demaille <akim@epita.fr>
14498
14499 * doc/bison.texinfo (Destructor Decl): New.
14500
145012002-11-12 Akim Demaille <akim@epita.fr>
14502
14503 * src/tables.c (tables_generate): Use free for pointers that
14504 cannot be NULL, not XFREE.
14505 (pack_vector): Use assert, not fatal, for bound violations.
14506 * src/state.c (state_new): Likewise.
14507 * src/reader.c (reader): Likewise.
14508 * src/lalr.c (set_goto_map): Likewise.
14509 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14510 the file name.
14511
145122002-11-12 Akim Demaille <akim@epita.fr>
14513
14514 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14515 Restore.
14516 * src/scan-gram.l (last_string): Is global to the file, not to
14517 yylex.
14518 * src/parse-gram.y (input): Don't append the epilogue here,
14519 (epilogue.opt): do it here, and free the scanner's obstack.
14520 * src/reader.c (epilogue_set): Rename as...
14521 (epilogue_augment): this.
14522 * data/c.m4 (b4_epilogue): Defaults to empty.
14523
145242002-11-12 Akim Demaille <akim@epita.fr>
14525
14526 * src/getargs.c (long_options): Remove duplicates.
14527 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14528 Remove.
14529 * doc/bison.rnh: Remove.
14530 * doc/bison.texinfo (VMS Invocation): Remove.
14531
145322002-11-12 Akim Demaille <akim@epita.fr>
14533
14534 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14535 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14536
14537 Use struniq for symbols.
14538
14539 * src/symtab.h (symbol_t): The tag member is a struniq.
14540 (symbol_type_set): Adjust.
14541 * src/symtab.c (symbol_new): Takes a struniq.
14542 (symbol_free): Don't free the tag member.
14543 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14544 (hash_compare_symbol, hash_symbol): these.
14545 Use the fact that tags as struniqs.
14546 (symbol_get): Use struniq_new.
14547 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14548 Returns a strniq.
14549 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14550 and type members are struniqs.
14551 * src/reader.c (get_merge_function)
14552 (grammar_current_rule_merge_set): Adjust.
14553 (TYPE, current_type): Are struniq.
14554
14555 Use struniq for file names.
14556
14557 * src/files.h, src/files.c (infile): Split into...
14558 (grammar_file, current_file): these.
14559 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14560 * src/reduce.c (reduce_print): Likewise.
14561 * src/getargs.c (getargs): Likewise.
14562 * src/complain.h, src/complain.c: Likewise.
14563 * src/main.c (main): Call struniqs_new early enough to use it for
14564 file names.
14565 Don't free the input file name.
14566
145672002-11-12 Akim Demaille <akim@epita.fr>
14568
14569 * src/symtab.c (symbol_free): Remove dead deactivated code:
14570 type_name are properly removed.
14571 Don't use XFREE to free items that cannot be NULL.
14572 * src/struniq.h, src/struniq.c: New.
14573 * src/main.c (main): Initialize/free struniqs.
14574 * src/parse-gram.y (%union): Add astruniq member.
14575 (yyprint): Adjust.
14576 * src/scan-gram.l (<{tag}>): Return a struniq.
14577 Free the obstack bit that used to store it.
14578 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14579
145802002-11-11 Paul Eggert <eggert@twinsun.com>
14581
14582 Revamp to fix many (but not all) of the C- and M4-related quoting
14583 problems. Among other things, this fixes the Bison bug reported
14584 by Jan Hubicka when processing the Bash grammar; see:
14585 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14586
14587 Use new @ escapes consistently. Represent brackets with @{ and @}
14588 rather than @<:@ and @:>@, since this works a bit better with dumb
14589 editors like vi. Represent @ with @@, since @ is now consistently
14590 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14591 __ofile__, to avoid unexpected expansions. Similarly, use @output
14592 rather than #output.
14593
14594 * data/c.m4 (b4_copyright): Omit file name from comment, since
14595 the file name could contain "*/".
14596 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14597 be quoted. All uses changed.
14598
14599 * data/glr.c: Use new @ escapes consistently.
14600 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14601 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14602 Remove, since they couldn't handle arbitrary characters in file
14603 names.
14604 * data/lalr1.cc: Likewise.
14605 * data/yacc.c: Likewise.
14606
14607 * src/files.c (output_infix): Remove; all uses removed.
14608 * src/files.h: Likewise.
14609
14610 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14611 mishandled funny characters in file names, and anyway it isn't
14612 needed any more.
14613 * data/yacc.c: Likewise.
14614 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14615
14616 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14617 * data/yacc.c: Likewise.
14618
14619 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14620 strings now.
14621 (muscle_init): Quote filename as a C string.
14622 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14623 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14624 * src/output.c (escaped_file_name_output): New function.
14625 (prepare_symbols): Quote tokens for M4.
14626 (prepare): Don't insert output_infix, output_prefix,
14627 output_parser_name, output_header_name; this is now down by scan-skel.
14628 Insert skeleton as a C string.
14629
14630 * src/output.c (user_actions_output, symbol_destructors_output,
14631 symbol_printers_output): Quote filenames for C and M4.
14632 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14633
14634 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14635 escapes other than \\ and \'; this simplifies the code.
14636 (<SC_STRING>): Likewise, for \\ and \".
14637 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14638 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14639 Use new escapes @{ and @} for [ and ].
14640
14641 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14642 them with auto vars.
14643 Switch to new escape scheme, where @ is the escape character uniformly.
14644 Abort if a stray escape character is found. Avoid unbounded input
14645 buffer when parsing non-escaped text.
14646
14647 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14648 __oline__, #output, $@, and @{ do not have unintended meanings.
14649
146502002-11-09 Paul Eggert <eggert@twinsun.com>
14651
14652 Fix the test failure due to GCC warnings described in
14653 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14654 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14655 evaluate to 0 if it's impossible for NINF to be in the respective
14656 table.
14657 (yygetLRActions, yyrecoverParseError): Use them.
14658
14659 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14660 counted in the token inserted at end of file. Now takes
14661 location_t *, not location_t, so that the location can be
14662 adjusted. All uses changed.
14663
14664 * tests/regression.at (Invalid inputs): Adjust wording in
14665 diagnostic to match the new behavior.
14666
14667 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14668 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14669 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14670 abort ();'. This reduces the runtime of the "Many lookaheads"
14671 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14672 GCC 3.2.
14673
146742002-11-07 Paul Eggert <eggert@twinsun.com>
14675
14676 * src/parse-gram.y (CHARACTER): Remove unused token.
14677 All uses removed.
14678
14679 * src/scan-gram.l: Remove stack option. We no longer use the
14680 stack, since the stack was never deeper than 1; instead, use the
14681 new auto var c_context to record the stacked value.
14682
14683 Remove nounput option. At an unexpected end of file, we now unput
14684 the minimal input necessary to end cleanly; this simplifies the
14685 code.
14686
14687 Avoid unbounded token sizes where this is easy.
14688
14689 (unexpected_end_of_file): New function.
14690 Use it to systematize the error message on unexpected EOF.
14691 (last-string): Now auto, not static.
14692 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14693 (scanner_last_string_free): Remove; not used.
14694 (percent_percent_count): Move decl to just before use.
14695 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14696 not the (never otherwised-used) CHARACTER.
14697
146982002-11-07 Akim Demaille <akim@epita.fr>
14699
14700 Let yyerror always receive the msg as last argument, so that
14701 yyerror can be variadic.
14702
14703 * data/yacc.c (b4_yyerror_args): New.
14704 Use it when calling yyerror.
14705 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14706 Use it when calling yyerror.
14707 * doc/bison.texinfo (Error Reporting): Adjust.
14708 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14709 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14710
147112002-11-06 Akim Demaille <akim@epita.fr>
14712
14713 #line should have quoted strings.
14714 Ideally, this should be done by m4_quotearg.
14715
14716 * src/scan-skel.l: Include quotearg.h.
14717 Quote __ofile__.
14718 * src/output.c (symbol_printers_output)
14719 (symbol_destructors_output): Quote the file name.
14720
147212002-11-06 Akim Demaille <akim@epita.fr>
14722
14723 * tests/regression.at (Invalid inputs): Adjust to the recent
14724 messages.
14725
147262002-11-06 Akim Demaille <akim@epita.fr>
14727
14728 Restore --no-lines.
14729 Reported by Jim Kent.
14730
14731 * data/c.m4 (b4_syncline): New.
14732 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14733 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14734 * src/output.c (user_actions_output): Likewise.
14735 (prepare): Define 'b4_synclines_flag'.
14736 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14737
147382002-11-06 Akim Demaille <akim@epita.fr>
14739
14740 * src/main.c (main): Free `infile'.
14741 * src/scan-gram.l (handle_syncline): New.
14742 Recognize `#line'.
14743 * src/output.c (user_actions_output, symbol_destructors_output)
14744 (symbol_printers_output): Use the location's file name, not
14745 infile.
14746 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14747
147482002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14749
14750 * src/tables.c (matching_state): Don't allow states to match if
14751 either has GLR conflict entries.
14752
147532002-11-05 Paul Eggert <eggert@twinsun.com>
14754
14755 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14756 "integer out of range" rather than "invalid value".
14757 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14758 accordingly.
14759
14760 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14761 Also, remove one static variable in the scanner.
14762
14763 * src/scan-gram.l (braces_level): Now auto, not static.
14764 Initialize to zero if the compiler is being picky.
14765 (INITIAL): Clear braces_level instead of incrementing it.
14766 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14767 as POSIX 1003.1-2001 requires.
14768 * src/system.h (IF_LINT): New macro, taken from coreutils.
14769 * configure.ac: Define "lint" if --enable-gcc-warnings.
14770
147712002-11-05 Akim Demaille <akim@epita.fr>
14772
14773 * src/scan-gram.l: When it starts with `%', complain about the
14774 whole directive, not just that `invalid character: %'.
14775
147762002-11-04 Akim Demaille <akim@epita.fr>
14777
14778 * Makefile.maint: Update from Autoconf.
14779 (update, cvs-update, po-update, do-po-update): New.
14780
147812002-11-04 Akim Demaille <akim@epita.fr>
14782
14783 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14784 and yyerror.
14785 Have yyerror `use' its arguments.
14786 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14787 returns true when location & yacc & pure & parse-param.
14788 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14789
147902002-11-04 Akim Demaille <akim@epita.fr>
14791
14792 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14793 clashes.
14794 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14795 font-lock-mode.
14796 Use complain_at.
14797 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14798 slot 0.
14799
148002002-11-03 Paul Eggert <eggert@twinsun.com>
14801
14802 * src/reader.c (get_merge_function, grammar_current_rule_check):
14803 Use consistent diagnostics for reporting type name clashes.
14804 Quote the types with <>, for consistency with Yacc.
14805 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14806
148072002-11-03 Akim Demaille <akim@epita.fr>
14808
14809 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14810 New.
14811 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14812 (b4_parse_param): Remove.
14813 Use b4_identification.
14814 Propagate b4_pure_args where needed to pass them to yyerror.
14815 * data/glr.m4 (b4_parse_param): Remove.
14816 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14817 (b4_lpure_formals): New.
14818 Use b4_identification.
14819 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14820 b4_user_formals and b4_user_args.
14821 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14822 (yyreportAmbiguity): When using a pure parser, also need
14823 the location, and the parse-params.
14824 Adjust callers.
14825 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14826 When using a pure parser, also need the parse-params.
14827 Adjust callers.
14828 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14829 (%pure-parser + %parse-param) LALR and GLR parsers.
14830 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14831 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14832 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14833 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14834 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14835 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14836 * doc/bison.texinfo: Untabify the whole file.
14837 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14838 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14839 (Error Reporting): Adjust to these new directives.
14840 Document %error-verbose, deprecate YYERROR_VERBOSE.
14841
148422002-11-03 Akim Demaille <akim@epita.fr>
14843
14844 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14845 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14846 command line options.
14847 * tests/cxx-type.at: Formatting changes.
14848
148492002-11-03 Paul Eggert <eggert@twinsun.com>
14850
14851 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14852 to count columns correctly, and to check for invalid inputs.
14853
14854 Use mbsnwidth to count columns correctly. Account for tabs, too.
14855 Include mbswidth.h.
14856 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14857 (extend_location): New function.
14858 (YY_LINES): Remove.
14859
14860 Handle CRLF in C code rather than in Lex code.
14861 (YY_INPUT): New macro.
14862 (no_cr_read): New function.
14863
14864 Scan UCNs, even though we don't fully handle them yet.
14865 (convert_ucn_to_byte): New function.
14866
14867 Handle backslash-newline correctly in C code.
14868 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14869 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14870 all uses changed.
14871 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14872 Use {splice} wherever C allows backslash-newline.
14873 YY_STEP after space, newline, vertical-tab.
14874 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14875
14876 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14877
14878 ({int}, handle_action_dollar, handle_action_at): Check for integer
14879 overflow.
14880
14881 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14882
14883 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14884 as well as \000. Check for UCHAR_MAX, not 255.
14885 Allow \x with an arbitrary positive number of digits, as in C.
14886 Check for overflow here.
14887 Allow \? and UCNs, for compatibility with C.
14888
14889 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14890 with quote slot used by complain_at.
14891
14892 * tests/input.at: Add tests for backslash-newline, m4 quotes
14893 in symbols, long literals, and funny escapes in strings.
14894
14895 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14896 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14897 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14898 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14899 * m4/mbswidth.m4: New file, from GNU coreutils.
14900
14901 * doc/bison.texinfo (Grammar Outline): Document // comments.
14902 (Symbols): Document that trigraphs have no special meaning in Bison,
14903 nor is backslash-newline allowed.
14904 (Actions): Document that trigraphs have no special meaning.
14905
14906 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14907 no longer used.
14908
149092002-11-02 Paul Eggert <eggert@twinsun.com>
14910
14911 * src/reader.c: Don't include quote.h; not needed.
14912 (get_merge_function): Reword warning to be consistent with
14913 type clash diagnostic in grammar_current_rule_check.
14914
14915 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14916 bug in trigraph handling.
14917
14918 * src/output.c (prepare_symbols): When printing token names,
14919 escape "[" as "@<:@" and likewise for "]".
14920
14921 * src/system.h (errno): Remove declaration, as we are now
14922 assuming C89 or better, and C89 guarantees errno.
14923
149242002-10-30 Paul Eggert <eggert@twinsun.com>
14925
14926 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14927 Check for close failures.
14928 * src/files.h (xfclose): Return void, not int, since it always
14929 returned zero.
14930 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14931 indicates one.
14932 * src/output.c (output_skeleton): Use xfclose rather than fclose
14933 and ferror. xfclose now checks ferror.
14934
14935 * data/glr.c (YYLEFTMOST_STATE): Remove.
14936 (yyreportTree): Use a stack-based leftmost state. This avoids
14937 our continuing battles with bogus warnings about initializers.
14938
149392002-10-30 Akim Demaille <akim@epita.fr>
14940
14941 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14942 #if.
14943
149442002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14945
14946 * tests/glr-regr1.at: New test for reported regressions.
14947 * tests/testsuite.at: Add glr-regr1.at test.
14948 * tests/Makefile.am: Add glr-regr1.at test.
14949
149502002-10-24 Paul Eggert <eggert@twinsun.com>
14951
14952 Version 1.75a.
14953
14954 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14955 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14956 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14957 Don't assume strdup exists; POSIX says its an XSI extension.
14958 Check for buffer overflow on input.
14959
149602002-10-24 Akim Demaille <akim@epita.fr>
14961
14962 * src/output.c (output_skeleton): Don't disable M4sugar comments
14963 too soon: it results in comments being expanded.
14964 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14965 first output.
14966
149672002-10-24 Akim Demaille <akim@epita.fr>
14968
14969 * data/yacc.c (m4_int_type): New.
14970 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14971 char' as only yacc.c wants K&R portability.
14972 * data/glr.c (yysigned_char): Remove.
14973 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14974 Reported by Quoc Peyrot.
14975
149762002-10-23 Paul Eggert <eggert@twinsun.com>
14977
14978 * src/main.c (main): With --trace=time, report times even if a
14979 non-fatal error occurs. Formerly, the times were reported in some
14980 such cases but not in others.
14981 * src/reader.c (reader): Just return if a complaint has been issued,
14982 instead of exiting, so that 'main' can report times.
14983
149842002-10-22 Akim Demaille <akim@epita.fr>
14985
14986 * src/system.h: Include sys/types.
14987 Reported by Bert Deknuydt.
14988
149892002-10-23 Paul Eggert <eggert@twinsun.com>
14990
14991 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14992 Suggested by Art Haas.
14993
149942002-10-22 Paul Eggert <eggert@twinsun.com>
14995
14996 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14997 decl; not needed any more.
14998 * src/main.c (main): Use return to exit, undoing yesterday's change.
14999 The last OS that we could find where this wouldn't work is
15000 SunOS 3.5, and that's too old to worry about now.
15001
15002 * data/glr.c (struct yyltype): Define members even when not
15003 doing locations. This is more consistent with yacc.c, and it
15004 works around the following bug reports:
15005 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15006 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15007
15008 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15009 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15010 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15011
150122002-10-22 Akim Demaille <akim@epita.fr>
15013
15014 * data/README: New.
15015
150162002-10-21 Paul Eggert <eggert@twinsun.com>
15017
15018 Be consistent about 'bool'; the old code used an enum in one
15019 module and an int in another, and this violates the C standard.
15020 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15021 * configure.ac (AC_HEADER_STDBOOL): Add.
15022 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15023 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15024 * src/symtab.c (hash_compare_symbol_t): Likewise.
15025 * src/system.h (bool, false, true): Use a definition consistent
15026 with ../lib/hash.c. All uses changed.
15027
15028 * src/complain.c (warning_issued): Renamed from warn_message_count,
15029 so that we needn't worry about integer overflow (!).
15030 Now of type bool. All uses changed.
15031 (complaint_issued): Renamed from complain_message_count; likewise.
15032
15033 * src/main.c (main): Use exit to exit with failure.
15034
15035 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15036 rather than 1 and 0.
15037 * src/main.c (main): Likewise.
15038 * src/getargs.c (getargs): Likewise.
15039 * src/reader.c (reader): Likewise.
15040
15041 * src/getarg.c (getargs): Remove duplicate code for
15042 "Try `bison --help'".
15043
15044 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15045 What was that "2" for?
15046
15047 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15048 * src/getargs.c (usage): Likewise.
15049
15050 * src/getargs.c (getargs): When there are too few operands, report
15051 the last one. When there are too many, report the first extra
15052 one. This is how diffutils does it.
15053
150542002-10-20 Paul Eggert <eggert@twinsun.com>
15055
15056 Remove K&R vestiges.
15057 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15058 * src/complain.c (VA_START): Remove. Assume prototypes.
15059 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15060 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15061 fatal): Assume prototypes.
15062 * src/complain.h: Assume prototypes.
15063 * src/system.h (PARAMS): Remove.
15064 Include <limits.h> unconditionally, since it's guaranteeed even
15065 for a freestanding C89 compiler.
15066 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15067 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15068
150692002-10-20 Akim Demaille <akim@epita.fr>
15070
15071 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15072 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15073 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15074 (yyresolveStates, yyresolveAction, yyresolveStack)
15075 (yyprocessOneStack): Use them.
15076 (yy_reduce_print): New.
15077 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15078
150792002-10-20 Akim Demaille <akim@epita.fr>
15080
15081 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15082 arguments and output `void'.
15083 (b4_c_function): Rename as...
15084 (b4_c_function_def): this.
15085 (b4_c_function_decl, b4_c_ansi_function_def)
15086 (b4_c_ansi_function_decl): New.
15087 Change the interpretation of the arguments: before `int, foo', now
15088 `int foo, foo'.
15089 * data/yacc.c (yyparse): Prototype and define thanks to these.
15090 Adjust b4_c_function_def uses.
15091 * data/glr.c (yyparse): Likewise, but ANSI only.
15092
150932002-10-20 Akim Demaille <akim@epita.fr>
15094
15095 * src/output.c (prepare): Move the definition of `tokens_number',
15096 `nterms_number', `undef_token_number', `user_token_number_max'
15097 to...
15098 (prepare_tokens): Here.
15099 (prepare_tokens): Rename as...
15100 (prepare_symbols): this.
15101 (prepare): Move the definition of `rules_number' to...
15102 (prepare_rules): here.
15103 (prepare): Move the definition of `last', `final_state_number',
15104 `states_number' to...
15105 (prepare_states): here.
15106 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15107
151082002-10-20 Akim Demaille <akim@epita.fr>
15109
15110 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15111
151122002-10-20 Akim Demaille <akim@epita.fr>
15113
15114 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15115 * data/c.m4: here.
15116
151172002-10-20 Akim Demaille <akim@epita.fr>
15118
15119 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15120 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15121 `pair'.
15122 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15123 `name' to...
15124 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15125 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15126 These.
15127
151282002-10-19 Paul Eggert <eggert@twinsun.com>
15129
15130 Do not create a temporary file, as that involves security and
15131 cleanup headaches. Instead, use a pair of pipes.
15132 Derived from a suggestion by Florian Krohm.
15133 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15134 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15135 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15136 (BISON_PREREQ_SUBPIPE): Add.
15137 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15138 Add subpipe.h, subpipe.c.
15139 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15140 * po/POTFILES.in: Add lib/subpipe.c.
15141 * src/output.c: Include "subpipe.h".
15142 (m4_invoke): Remove decl.
15143 (scan_skel): New decl.
15144 (output_skeleton): Use pipe rather than temporary file for m4 input.
15145 Check that m4sugar.m4 is readable, to avoid deadlock.
15146 Check for pipe I/O error.
15147 * src/scan-skel.l (readpipe): Remove decl.
15148 (scan_skel): New function, to be used in place of m4_invoke.
15149 Read from stream rather than file.
15150
15151 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15152 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15153 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15154 this generates a more-accurate value anyway.
15155
15156 * lib/timevar.c (timervar_accumulate): Rename locals to
15157 avoid confusion with similarly-named more-global.
15158 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15159
15160 * src/output.c (prepare): Use xstrdup to convert char const *
15161 to char *, to avoid GCC warning.
15162
151632002-10-19 Akim Demaille <akim@epita.fr>
15164
15165 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15166 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15167 Use them to have `calc.y' ready for %pure-parser.
15168 * data/yacc.c (YYLEX): Pass a yylex return type to
15169 b4_c_function_call.
15170
151712002-10-19 Akim Demaille <akim@epita.fr>
15172
15173 Prototype support of %lex-param and %parse-param.
15174
15175 * src/parse-gram.y: Add the definition of the %lex-param and
15176 %parse-param tokens, plus their rules.
15177 Drop the `_' version of %glr-parser.
15178 Add the "," token.
15179 * src/scan-gram.l (INITIAL): Scan them.
15180 * src/muscle_tab.c: Comment changes.
15181 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15182 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15183 (muscle_entry_s): The `value' member is no longer const.
15184 Adjust all dependencies.
15185 * src/muscle_tab.c (muscle_init): Adjust: use
15186 MUSCLE_INSERT_STRING.
15187 Initialize the obstack earlier.
15188 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15189 (muscle_pair_list_grow): New.
15190 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15191 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15192 * tests/calc.at: Use %locations, not --locations.
15193 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15194
151952002-10-19 Akim Demaille <akim@epita.fr>
15196
15197 * src/getargs.c (usage): Take status as argument and exit
15198 accordingly.
15199 Report the traditional `Try ... --help' message when status != 0.
15200 (usage, version): Don't take a FILE * as arg, it is pointless.
15201 (getargs): When there is an incorrect number of arguments, make it
15202 an error, and report it GNUlically thanks to `usage ()'.
15203
152042002-10-18 Paul Eggert <eggert@twinsun.com>
15205
15206 * data/glr.c (yyreportParseError): Don't assume that sprintf
15207 yields the length of the printed string, as this is not true
15208 on SunOS 4.1.4. Reported by Peter Klein.
15209
15210 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15211 * tests/conflicts.at (%nonassoc and eof): Likewise.
15212 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15213
152142002-10-17 Akim Demaille <akim@epita.fr>
15215
15216 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15217 * src/getargs.c (trace_types, trace_args): Adjust.
15218 * src/reader.c (grammar_current_rule_prec_set)
15219 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15220 Standardize error messages.
15221 And s/@prec/%prec/!
15222 (reader): Use trace_flag to enable scanner/parser debugging,
15223 instead of an adhoc scheme.
15224 * src/scan-gram.l: Remove trailing debugging code.
15225
152262002-10-16 Paul Eggert <eggert@twinsun.com>
15227
15228 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15229 MUSCLE_TAB_H.
15230
15231 * NEWS: Officially drop support for building Bison with K&R C,
15232 since it didn't work anyway and it's not worth worrying about.
15233 * Makefile.maint (wget_files): Remove ansi2knr.c.
15234 (ansi2knr.c-url_prefix): Remove.
15235 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15236 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15237 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15238
152392002-10-15 Paul Eggert <eggert@twinsun.com>
15240
15241 Stop using the "enum_" trick for K&R-style function definitions;
15242 it confused me, and I was the author! Instead, assume that people
15243 who want to use K&R C compilers (when using these modules in GCC,
15244 perhaps?) will run ansi2knr.
15245
15246 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15247 All uses of "enum_" changed to "enum ".
15248 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15249 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15250
15251 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15252 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15253 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15254 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15255 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15256 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15257 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15258 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15259 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15260 Use function prototypes; this removes the need for declaring
15261 static functions simply to provide their prototypes.
15262 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15263 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15264 bitset_count_, bitset_create, bitset_dump, bitset_first,
15265 bitset_free, bitset_init, bitset_last, bitset_next,
15266 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15267 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15268 bitset_print, bitset_release_memory, bitset_toggle_,
15269 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15270 debug_bitset): Likewise.
15271 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15272 * lib/bitset_stats.c (bitset_log_histogram_print,
15273 bitset_percent_histogram_print, bitset_stats_and,
15274 bitset_stats_and_cmp, bitset_stats_and_or,
15275 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15276 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15277 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15278 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15279 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15280 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15281 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15282 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15283 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15284 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15285 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15286 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15287 bitset_stats_zero): Likewise.
15288 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15289 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15290 bitsetv_dump, debug_bitsetv): Likewise.
15291 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15292 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15293 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15294 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15295 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15296 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15297 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15298 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15299 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15300 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15301 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15302 Likewise.
15303 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15304 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15305 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15306 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15307 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15308 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15309 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15310 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15311 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15312 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15313 lbitset_xor_cmp, lbitset_zero): Likewise.
15314
153152002-10-14 Akim Demaille <akim@epita.fr>
15316
15317 Version 1.75.
15318
153192002-10-14 Akim Demaille <akim@epita.fr>
15320
15321 * tests/Makefile.am (maintainer-check-posix): New.
15322
153232002-10-14 Akim Demaille <akim@epita.fr>
15324
15325 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15326 member.
15327
153282002-10-14 Akim Demaille <akim@epita.fr>
15329
15330 * src/tables.c (table_ninf_remap): base -> tab.
15331 Reported by Matt Rosing.
15332
153332002-10-14 Paul Eggert <eggert@twinsun.com>
15334
15335 * tests/action.at, tests/calc.at, tests/conflicts.at,
15336 tests/cxx-type.at, tests/headers.at, tests/input.at,
15337 tests/regression.at, tests/synclines.at, tests/torture.at:
15338 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15339 so that the tests still work even if POSIXLY_CORRECT is set.
15340 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15341
15342 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15343 for portability to K&R hosts. Fix typo: signed char is guaranteed
15344 only to 127, not to 128.
15345 * data/glr.c (yysigned_char): New type.
15346 * data/yacc.c (yysigned_char): Likewise.
15347 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15348
153492002-10-13 Paul Eggert <eggert@twinsun.com>
15350
15351 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15352 true due to limited range of data type" warning from GCC.
15353
15354 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15355 by wrapping enum yytokentype's definition inside #ifndef
15356 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15357
153582002-10-13 Akim Demaille <akim@epita.fr>
15359
15360 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15361 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15362
153632002-10-13 Akim Demaille <akim@epita.fr>
15364
15365 * Makefile.maint: Update from Autoconf 2.54.
15366 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15367
153682002-10-13 Akim Demaille <akim@epita.fr>
15369
15370 * src/print.c (print_state): Separate the list of solved conflicts
15371 from the other items.
15372 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15373
153742002-10-13 Akim Demaille <akim@epita.fr>
15375
15376 Let nondeterministic skeletons be usable with deterministic
15377 tables.
15378
15379 With the patch, GAWK compiled by GCC without -O2 passes its test
15380 suite using a GLR parser driven by LALR tables. It fails with -O2
15381 because `struct stat' gives two different answers on my machine:
15382 88 (definition of an auto var) and later 96 (memset on this var).
15383 Hence the stack is badly corrumpted. The headers inclusion is to
15384 blame: if I move the awk.h inclusion before GLR's system header
15385 inclusion, the two struct stat have the same size.
15386
15387 * src/tables.c (pack_table): Always create conflict_table.
15388 (token_actions): Always create conflict_list.
15389 * data/glr.c (YYFLAG): Remove, unused.
15390
153912002-10-13 Akim Demaille <akim@epita.fr>
15392
15393 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15394 (O0FLAGS): New.
15395 (VALGRIND, GXX): New.
15396 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15397 * tests/bison.in: Run $PREBISON a pre-command.
15398 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15399 (maintainer-check-g++): New.
15400 * Makefile.am (maintainer-check): New.
15401
154022002-10-13 Akim Demaille <akim@epita.fr>
15403
15404 * data/glr.c: Formatting changes.
15405 Tweak some trace messages to match yacc.c's.
15406
154072002-10-13 Akim Demaille <akim@epita.fr>
15408
15409 GLR parsers sometimes raise parse errors instead of performing the
15410 default reduction.
15411 Reported by Charles-Henry de Boysson.
15412
15413 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15414 check the length of the traces when %glr.
15415 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15416 GLR's traces.
15417 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15418 Test GLR parsers.
15419 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15420 (yyltype): Remove the yy prefix from the member names.
15421 (yytable): Complete its comment.
15422 (yygetLRActions): Map error action number from YYTABLE from
15423 YYTABLE_NINF to 0.
15424 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15425 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15426 not satisfying as we could compare an YYACTION computed from
15427 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15428 only value for error actions.
15429 (yyreportParseError): In verbose parse error messages, don't issue
15430 `error' in the list of expected tokens.
15431 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15432 next action to perform to match glr.c's decoding.
15433 (yytable): Complete its comment.
15434
154352002-10-13 Paul Eggert <eggert@twinsun.com>
15436
15437 Fix problem reported by Henrik Grubbstroem in
15438 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15439 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15440 because the Bison parser reads the second action before reducing
15441 the first one.
15442 * src/scan-gram.l (rule_length): New static var.
15443 Use it to keep track of the rule length in the scanner, since
15444 we can't expect the parser to be in lock-step sync with the scanner.
15445 (handle_action_dollar, handle_action_at): Use this var.
15446 * tests/actions.at (Exotic Dollars): Test for the problem.
15447
154482002-10-12 Paul Eggert <eggert@twinsun.com>
15449
15450 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15451 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15452 Include <sys/time.h> when checking for clock_t and struct tms.
15453 Use same include order as source.
15454 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15455 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15456
15457 * lib/timevar.c: Update copyright date and clarify comments.
15458 (get_time) [IN_GCC]: Keep the GCC version for reference.
15459
15460 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15461 GCC version as of today, then merge Bison's changes.
15462 Change "GCC" to "Bison" in copyright notice. timevar.def's
15463 author is Akim, so change that too.
15464
15465 * src/reader.c (grammar_current_rule_check):
15466 Don't worry about the default action if $$ is untyped.
15467 Prevents bogus warnings reported by Jim Gifford in
15468 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15469
15470 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15471 * data/glr.c, data/lalr1.cc, data/yacc.c:
15472 Output token definitions before the first part of user declarations.
15473 Fixes compatibility problem reported by Jim Gifford for kbd in
15474 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15475
154762002-10-11 Paul Eggert <eggert@twinsun.com>
15477
15478 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15479 (yyparse): here. This undoes some of the 2002-07-25 change.
15480 Compatibility problem reported by Ralf S. Engelschall with
15481 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15482
154832002-10-11 Akim Demaille <akim@epita.fr>
15484
15485 * tests/regression.at Characters Escapes): New.
15486 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15487 characters.
15488 Reported by Jan Nieuwenhuizen.
15489
154902002-10-11 Akim Demaille <akim@epita.fr>
15491
15492 * po/id.po: New.
15493
154942002-10-10 Paul Eggert <eggert@twinsun.com>
15495
15496 Portability fixes for bitsets; this also avoids several GCC
15497 warnings.
15498
15499 * lib/abitset.c: Include <stddef.h>, for offsetof.
15500 * lib/lbitset.c: Likewise.
15501
15502 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15503 properly for vectors of objects. Do not assume that adding a
15504 header size to a multiple of a word size yields a value that is
15505 properly aligned for the whole union.
15506 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15507
15508 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15509 unique names for structures.
15510 * lib/ebitset.c (ebitset_bytes): Likewise.
15511 * lib/lbitset.c (lbitset_bytes): Likewise.
15512
15513 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15514 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15515 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15516 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15517 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15518 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15519 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15520 to improve the type-checking that GCC can do.
15521 * lib/bitset.c (bitset_op4_cmp): Likewise.
15522 * lib/bitset_stats.c (bitset_stats_count,
15523 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15524 bitset_stats_copy, bitset_stats_disjoint_p,
15525 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15526 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15527 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15528 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15529 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15530 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15531 bitset_stats_or_and_cmp): Likewise.
15532 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15533 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15534 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15535 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15536
15537 * lib/abitset.h: Include bitset.h, not bbitset.h.
15538 * lib/ebitset.h: Likewise.
15539 * lib/lbitset.h: Likewise.
15540
15541 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15542 All instances of parameters of type enum bitset_opts are now of
15543 type enum_bitset_opts, to conform to the C Standard, and similarly
15544 for enum_bitset_type.
15545 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15546 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15547
15548 Do not use "struct bitset_struct" to mean different things in
15549 different modules. Not only is this confusing, it violates
15550 the C Standard, which requires that structure types in different
15551 modules must be compatible if one is to be passed to the other.
15552 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15553 All instances of "struct bitset_struct *" replaced with "bitset".
15554 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15555 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15556 struct lbitset_struct, struct bitset_stats_struct): New types.
15557 All uses of struct bitset_struct changed to union bitset_union,
15558 etc.
15559 * lib/abitset.c (struct abitset_struct, abitset,
15560 struct bitset_struct): Remove.
15561 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15562 struct bitset_struct): Remove.
15563 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15564 bitset_struct): Remove.
15565 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15566 Likewise.
15567
15568 Do not call a function of type T using a call that assumes the
15569 function is of a different type U. Standard C requires that a
15570 function must be called with a type that is compatible with its
15571 definition.
15572 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15573 New decls.
15574 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15575 New functions.
15576 * lib/ebitset.c (PFV): Remove.
15577 * lib/lbitset.c (PFV): Likewise.
15578 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15579 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15580 decls.
15581 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15582 (ebitset_vtable): Use them.
15583 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15584 lbitset_xor): New functions.
15585 (lbitset_vtable): Use them.
15586
15587 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15588 Declare.
15589
15590 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15591 GCC warning.
15592 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15593 Use offsetof, for simplicity.
15594
155952002-10-06 Paul Eggert <eggert@twinsun.com>
15596
15597 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15598 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15599 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15600 which was inadvertently undone by the 2002-09-30 patch.
15601 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15602 the same width as int.
15603
156042002-10-04 Paul Eggert <eggert@twinsun.com>
15605
15606 Version 1.50.
15607
15608 * configure.ac (AC_INIT), NEWS: Increment version number.
15609
15610 * doc/bison.texinfo: Minor spelling, grammar, and white space
15611 fixes.
15612 (Symbols): Mention that any negative value returned from yylex
15613 signifies end-of-input. Warn about negative chars. Mention
15614 the portable Standard C character set.
15615
15616 The GNU coding standard says CFLAGS and YFLAGS are reserved
15617 for the installer to set.
15618 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15619 * src/Makefile.am (AM_CFLAGS): Likewise.
15620 (AM_YFLAGS): Renamed from YFLAGS.
15621
15622 Fix some MAX and MIN problems.
15623 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15624 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15625 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15626 * src/reader.c (reader): Use it.
15627
15628 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15629 POSIX 1003.1-2001 has removed fgrep.
15630
156312002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15632
15633 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15634 interpreted as signed.
15635 * lib/ebitset.c (ebitset_list): Fix bug.
15636
156372002-10-01 Paul Eggert <eggert@twinsun.com>
15638
15639 More fixes for 64-bit hosts and large bitsets.
15640
15641 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15642 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15643 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15644 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15645 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15646 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15647 bitset_count_): Likewise.
15648 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15649 bitset_first, bitset_last): Likewise.
15650 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15651 bitset_stats_list_reverse, bitset_stats_size,
15652 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15653 Likewise.
15654 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15655 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15656 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15657 bitsetv_reflexive_transitive_closure): Likewise.
15658 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15659 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15660 Likewise.
15661 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15662 Likewise.
15663
15664 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15665 Use size_t, not unsigned int, to count bytes.
15666 * lib/abitset.h (abitset_bytes): Likewise.
15667 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15668 Likewise.
15669 * lib/bitset.h (bitset_bytes): Likewise.
15670 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15671 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15672 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15673 * lib/ebitset.c (ebitset_bytes): Likewise.
15674 * lib/ebitset.h (ebitset_bytes): Likewise.
15675 * lib/lbitset.c (lbitset_bytes): Likewise.
15676 * lib/lbitset.h (lbitset_bytes): Likewise.
15677
15678 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15679 abitset_subset_p, abitset_disjoint_p, abitset_and,
15680 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15681 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15682 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15683 abitset_or_and, abitset_or_and_cmp):
15684 Use bitset_windex instead of unsigned int.
15685 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15686 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15687 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15688 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15689 Likewise.
15690 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15691
15692 * lib/bitset.c (bitset_print):
15693 Use proper printf formats for widths of integer types.
15694 * lib/bitset_stats.c (bitset_percent_histogram_print,
15695 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15696 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15697 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15698 * lib/lbitset.c (lbitset_bytes): Likewise.
15699
15700 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15701 BITSET_SIZE_MAX): New macros.
15702 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15703 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15704 to BITSET_WINDEX_MAX.
15705
15706 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15707 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15708 since we now return the bitset_bindex type (not int).
15709
15710 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15711 when computing sizes.
15712 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15713
15714 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15715 and avoid cast to unsigned.
15716
157172002-09-30 Akim Demaille <akim@epita.fr>
15718
15719 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15720 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15721 Updates from Michael Hayes.
15722
157232002-09-30 Art Haas <ahaas@neosoft.com>
15724
15725 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15726 invocations.
15727 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15728 defined.
15729
157302002-09-27 Akim Demaille <akim@epita.fr>
15731
15732 Version 1.49c.
15733
157342002-09-27 Akim Demaille <akim@epita.fr>
15735
15736 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15737 (Because of AC_LIBSOURCE).
15738
157392002-09-27 Akim Demaille <akim@epita.fr>
15740
15741 Playing with Autoscan.
15742
15743 * configure.ac: Remove the old LIBOBJ tweaks.
15744 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15745 * lib/strrchr.c: New.
15746 * lib/strtol.c: New, from the Coreutils 4.5.1.
15747
157482002-09-27 Akim Demaille <akim@epita.fr>
15749
15750 Playing with Autoscan.
15751
15752 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15753 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15754 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15755 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15756 Coreutils 4.5.1.
15757
157582002-09-24 Akim Demaille <akim@epita.fr>
15759
15760 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15761 (Frequently Asked Questions, Parser Stack Overflow): New.
15762
157632002-09-13 Akim Demaille <akim@epita.fr>
15764
15765 Playing with autoscan.
15766
15767 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15768 * src/files.c (skeleton_find): Remove, unused.
15769 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15770 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15771
157722002-09-13 Akim Demaille <akim@epita.fr>
15773
15774 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15775 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15776
157772002-09-13 Akim Demaille <akim@epita.fr>
15778
15779 * configure.ac: Require 2.54.
15780 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15781 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15782 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15783 Remove, provided by Autoconf macros.
15784
157852002-09-12 Akim Demaille <akim@epita.fr>
15786
15787 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15788
157892002-09-12 Akim Demaille <akim@epita.fr>
15790
15791 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15792 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15793 Reported by Martin Mokrejs.
15794
157952002-09-10 Akim Demaille <akim@epita.fr>
15796
15797 * src/parse-gram.y: Associate a human readable string to each
15798 token type.
15799 * tests/regression.at (Invalid inputs): Adjust.
15800
158012002-09-10 Gary V. Vaughan <gary@gnu.org>
15802
15803 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15804 with an Autoconf-2.5x style configure.ac.
15805
158062002-09-06 Paul Eggert <eggert@twinsun.com>
15807
15808 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15809 exception applies only to yacc.c. This is a modification of a
15810 patch originally suggested by Akim Demaille.
15811
158122002-09-06 Akim Demaille <akim@epita.fr>
15813
15814 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15815 here to...
15816 * data/yacc.c: here.
15817
15818 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15819 LocationType.
15820 (b4_ltype): Default to yy::Location from location.hh.
15821
158222002-09-04 Jim Meyering <jim@meyering.net>
15823
15824 * data/yacc.c: Guard the declaration of yytoknum also with
15825 `#ifdef YYPRINT', so it is declared only when used.
15826
158272002-09-04 Akim Demaille <akim@epita.fr>
15828
15829 * configure.in: Rename as...
15830 * configure.ac: this.
15831 Bump to 1.49c.
15832
158332002-09-04 Akim Demaille <akim@epita.fr>
15834
15835 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15836 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15837 translate maintainer only messages.
15838
158392002-08-12 Paul Eggert <eggert@twinsun.com>
15840
15841 Version 1.49b.
15842
15843 * Makefile.am (SUBDIRS): Remove intl.
15844 (DISTCLEANFILES): Remove.
15845 * NEWS: Mention that GNU M4 is now required. Clarify what is
15846 meant by "larger grammars". Mention the pt_BR translation.
15847 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15848 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15849 Bump version from 0.11.2 to 0.11.5.
15850 (BISON_PREREQ_STAGE): Remove.
15851 (AM_GNU_GETTEXT): Use external gettext.
15852 (AC_OUTPUT): Remove intl/Makefile.
15853
15854 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15855
15856 * data/glr.c: Include string.h, for strlen.
15857 (yyreportParseError): Use size_t for yysize.
15858 (yy_yypstack): No longer nested inside yypstates, as nested
15859 functions are not portable. Do not assume size_t is the
15860 same width as int.
15861 (yypstates): Do not assume that ptrdiff_t is the same width
15862 as int, and similarly for yyposn and YYINDEX.
15863
15864 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15865
15866 * lib/Makefile.am (INCLUDES): Do not include from the intl
15867 directory, which has been removed.
15868 * src/Makefile.am (INCLUDES): Likewise.
15869
15870 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15871 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15872 New vars.
15873
15874 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15875 * tests/Makefile.am (EXTRA_DIST): Likewise.
15876
15877 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15878 Do not assume that bitset_windex is the same width as unsigned.
15879
15880 * lib/abitset.c (abitset_unused_clear): Do not assume that
15881 bitset_word is the same width as int.
15882 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15883 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15884 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15885 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15886 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15887
15888 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15889 portability to one's complement hosts!).
15890 * lib/ebitset.c (ebitset_op1): Likewise.
15891 * lib/lbitset.c (lbitset_op1): Likewise.
15892
15893 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15894 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15895 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15896 Sync with fileutils.
15897 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15898 lib/gettext.h: Sync with diffutils.
15899
15900 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15901 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15902
15903 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15904 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15905 check for void *.
15906
15907 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15908 size_t; the old version tried to do this but casted improperly.
15909 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15910 (bitset_test): Now returns int, not unsigned long.
15911
15912 * lib/bitset_stats.c: Include "gettext.h".
15913 (_): New macro.
15914 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15915 name locals "index", as it generates unnecessary warnings on some
15916 hosts that have an "index" function.
15917
15918 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15919 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15920 they need translation.
15921 * src/LR0.c (state_list_append, new_itemsets, get_state,
15922 append_states, generate_states): Likewise.
15923 * src/assoc.c (assoc_to_string): Likewise.
15924 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15925 * src/gram.c (grammar_dump): Likewise.
15926 * src/injections.c (injections_compute): Likewise.
15927 * src/lalr.c (lookaheads_print): Likewise.
15928 * src/relation.c (relation_transpose): Likewise.
15929 * src/scan-gram.l: Likewise.
15930 * src/tables.c (table_grow, pack_vector): Likewise.
15931
15932 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15933 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15934 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15935 * m4/mbstate_t.m4: Sync with fileutils.
15936 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15937
15938 * po/LINGUAS: Add pt_BR.
15939 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15940 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15941 lib/timevar.c.
15942 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15943 manual recommends.
15944 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15945
15946 * src/complain.c (strerror_r): Remove decl; not needed.
15947 (strerror): Use same pattern as ../lib/error.c.
15948
15949 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15950
15951 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15952
15953 * src/main.c (main): Cast result of bindtextdomain and textdomain
15954 to void, to avoid a GCC warning when --disable-nls is in effect.
15955
15956 * src/scan-gram.l: Use strings rather than escapes when possible,
15957 to minimize the number of warnings from xgettext.
15958 (handle_action_dollar, handle_action_at): Don't use isdigit,
15959 as it mishandles negative chars and it may not work as expected
15960 outside the C locale.
15961
15962 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15963 this is a GCC extension and is not portable to other compilers.
15964
15965 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15966 Do not include <ctype.h>; no longer needed.
15967 Do not include <malloc.h>; no longer needed (and generates
15968 warnings on OpenBSD 3.0).
15969
15970 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15971 it's not portable.
15972
15973 * tests/regression.at: Do not use 'cc -c input.c -o input';
15974 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15975
15976 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15977 exit status as failure, not just exit status 1. Sun C exits
15978 with status 2 sometimes.
15979
15980 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15981 Use it for the two large tests.
15982
159832002-08-02 Akim Demaille <akim@epita.fr>
15984
15985 * src/conflicts.c (conflicts_output): Don't output rules never
15986 reduced here, since anyway that computation doesn't work.
15987 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15988 (rule_useless_p, rule_never_reduced_p): New.
15989 (grammar_rules_partial_print): Use a filter instead of a range.
15990 Display the title only if needed.
15991 (grammar_rules_print): Adjust.
15992 (grammar_rules_never_reduced_report): New.
15993 * src/tables.c (action_row): Move the computation of rules never
15994 reduced to...
15995 (token_actions): here.
15996 * src/main.c (main): Make the parser before making the report, so
15997 that rules never reduced are computed.
15998 Call grammar_rules_never_reduced_report.
15999 * src/print.c (print_results): Report rules never reduced.
16000 * tests/conflicts.at, tests/reduce.at: Adjust.
16001
160022002-08-01 Akim Demaille <akim@epita.fr>
16003
16004 Instead of attaching lookaheads and duplicating the rules being
16005 reduced by a state, attach the lookaheads to the reductions.
16006
16007 * src/state.h (state_t): Remove the `lookaheads',
16008 `lookaheads_rule' member.
16009 (reductions_t): Add a `lookaheads' member.
16010 Use a regular array for the `rules'.
16011 * src/state.c (reductions_new): Initialize the lookaheads member
16012 to 0.
16013 (state_rule_lookaheads_print): Adjust.
16014 * src/state.h, src/state.c (state_reductions_find): New.
16015 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16016 (count_rr_conflicts): Adjust.
16017 * src/lalr.c (LArule): Remove.
16018 (add_lookback_edge): Adjust.
16019 (state_lookaheads_count): New.
16020 (states_lookaheads_initialize): Merge into...
16021 (initialize_LA): this.
16022 (lalr_free): Adjust.
16023 * src/main.c (main): Don't free nullable and derives too early: it
16024 is used by --verbose.
16025 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16026
160272002-08-01 Akim Demaille <akim@epita.fr>
16028
16029 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16030 `rule_number_t**'.
16031 (set_derives, free_derives): Rename as...
16032 (derives_compute, derives_free): this.
16033 Adjust all dependencies.
16034 * src/nullable.c (set_nullable, free_nullable): Rename as...
16035 (nullable_compute, nullable_free): these.
16036 (rule_list_t): Store rule_t *, not rule_number_t.
16037 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16038 pointers, instead of their numbers.
16039 * src/main.c (main): Call nullable_free, and derives_free earlier,
16040 as they were lo longer used.
16041
160422002-08-01 Akim Demaille <akim@epita.fr>
16043
16044 * lib/timevar.c (get_time): Include children time.
16045 * src/lalr.h (LA, LArule): Don't export them: used with the
16046 state_t.
16047 * src/lalr.c (LA, LArule): Static.
16048 * src/lalr.h, src/lalr.c (lalr_free): New.
16049 * src/main.c (main): Call it.
16050 * src/tables.c (pack_vector): Check whether loc is >= to the
16051 table_size, not >.
16052 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16053 (tables_generate): do it, since that's also it which allocates
16054 them.
16055 Don't free LA and LArule, main does.
16056
160572002-07-31 Akim Demaille <akim@epita.fr>
16058
16059 Separate parser tables computation and output.
16060
16061 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16062 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16063 (yydefgoto, yydefact, high): Move to...
16064 * src/tables.h, src/tables.c: here.
16065 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16066 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16067 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16068 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16069 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16070 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16071 (action_row, save_row, token_actions, save_column, default_goto)
16072 (goto_actions, sort_actions, matching_state, pack_vector)
16073 (table_ninf_remap, pack_table, prepare_actions): Move to...
16074 * src/tables.c: here.
16075 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16076 * src/output.c (token_actions, output_base, output_conflicts)
16077 (output_check): Merge into...
16078 (prepare_actions): this.
16079 (actions_output): Rename as...
16080 (user_actions_output): this.
16081 * src/main.c (main): Call tables_generate and tables_free.
16082
160832002-07-31 Akim Demaille <akim@epita.fr>
16084
16085 Steal GCC's --time-report support.
16086
16087 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16088 stolen/adjusted from GCC.
16089 * m4/stage.m4: Remove time related checks.
16090 * m4/timevar.m4: New.
16091 * configure.in: Adjust.
16092 * src/system.h: Adjust to using timevar.h.
16093 * src/getargs.h, src/getargs.c: Support trace_time for
16094 --trace=time.
16095 * src/main.c (stage): Remove.
16096 (main): Replace `stage' invocations with timevar calls.
16097 * src/output.c: Insert pertinent timevar calls.
16098
160992002-07-31 Akim Demaille <akim@epita.fr>
16100
16101 Let --trace have arguments.
16102
16103 * src/getargs.h (enum trace_e): New.
16104 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16105 (long_options, short_options): --trace/-T takes an optional
16106 argument.
16107 Change all the uses of trace_flag to reflect the new flags.
16108 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16109
16110 Strengthen `stage' portability.
16111
16112 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16113 * configure.in: Use it.
16114 Don't check for malloc.h and sys/times.h.
16115 * src/system.h: Include them when appropriate.
16116 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16117 times and struct tms are available.
16118
161192002-07-30 Akim Demaille <akim@epita.fr>
16120
16121 In verbose parse error message, don't report `error' as an
16122 expected token.
16123 * tests/actions.at (Printers and Destructors): Adjust.
16124 * tests/calc.at (Calculator $1): Adjust.
16125 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16126 error message, do not report the parser accepts the error token in
16127 that state.
16128
161292002-07-30 Akim Demaille <akim@epita.fr>
16130
16131 Normalize conflict related messages.
16132
16133 * src/complain.h, src/complain.c (warn, complain): New.
16134 * src/conflicts.c (conflicts_print): Use them.
16135 (conflict_report_yacc): New, extracted from...
16136 (conflicts_print): here.
16137 * tests/conflicts.at, tests/existing.at: Adjust.
16138
161392002-07-30 Akim Demaille <akim@epita.fr>
16140
16141 Report rules which are never reduced by the parser: those hidden
16142 by conflicts.
16143
16144 * src/LR0.c (save_reductions): Don't make the final state too
16145 different: save its reduction (accept) instead of having a state
16146 without any action (no shift or goto, no reduce).
16147 Note: the final state is now a ``regular'' state, i.e., the
16148 parsers now contain `reduce 0' as default reduction.
16149 Nevertheless, since they decide to `accept' when yystate =
16150 final_state, they still will not reduce rule 0.
16151 * src/print.c (print_actions, print_reduction): Adjust.
16152 * src/output.c (action_row): Track reduced rules.
16153 (token_actions): Report rules never reduced.
16154 * tests/conflicts.at, tests/regression.at: Adjust.
16155
161562002-07-30 Akim Demaille <akim@epita.fr>
16157
16158 `stage' was accidently included in a previous patch.
16159 Initiate its autoconfiscation.
16160
16161 * configure.in: Look for malloc.h and sys/times.h.
16162 * src/main.c (stage): Adjust.
16163 Report only when trace_flag.
16164
161652002-07-29 Akim Demaille <akim@epita.fr>
16166
16167 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16168 state_number_t.
16169 (errs_t): symbol_t*, not symbol_number_t.
16170 (reductions_t): rule_t*, not rule_number_t.
16171 (FOR_EACH_SHIFT): New.
16172 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16173 * src/print.c, src/print_graph.c: Adjust.
16174
161752002-07-29 Akim Demaille <akim@epita.fr>
16176
16177 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16178
16179 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16180 (endtoken, accept): these.
16181 * src/reader.c (reader): Set endtoken's default tag to "$end".
16182 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16183 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16184 Adjust.
16185
161862002-07-29 Akim Demaille <akim@epita.fr>
16187
16188 * src/reduce.c (reduce_grammar): When the language is empty,
16189 complain about the start symbol, not the axiom.
16190 Use its location.
16191 * tests/reduce.at (Empty Language): New.
16192
161932002-07-26 Akim Demaille <akim@epita.fr>
16194
16195 * src/reader.h, src/reader.c (gram_error): ... can't get
16196 yycontrol without making too strong assumptions on the parser
16197 itself.
16198 * src/output.c (prepare_tokens): Use the real 0th value of
16199 token_translations instead of `0'.
16200 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16201 visible here.
16202 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16203 for the time being: %locations ought to provide it to yyerror.
16204
162052002-07-25 Akim Demaille <akim@epita.fr>
16206
16207 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16208 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16209 * tests/regression.at (Web2c Actions): Adjust.
16210
162112002-07-25 Akim Demaille <akim@epita.fr>
16212
16213 Stop storing rules from 1 to nrules + 1.
16214
16215 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16216 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16217 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16218 Iterate from 0 to nrules.
16219 Use rule_number_as_item_number and item_number_as_rule_number.
16220 Adjust to `derive' now containing possibly 0.
16221 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16222 Handle the `- 1' part in rule numbers from/to item numbers.
16223 * src/conflicts.c (log_resolution): Fix the message which reversed
16224 shift and reduce.
16225 * src/output.c (action_row): Initialize default_rule to -1.
16226 (token_actions): Adjust.
16227 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16228 expected output.
16229 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16230
162312002-07-25 Akim Demaille <akim@epita.fr>
16232
16233 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16234 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16235 (b4_c_knr_arg_decl): New.
16236 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16237 yyreport_parse_error.
16238
162392002-07-25 Akim Demaille <akim@epita.fr>
16240
16241 * data/yacc.c (yyreport_parse_error): New, extracted from...
16242 (yyparse): here.
16243 (yydestruct, yysymprint): Move above yyparse.
16244 Be K&R compliant.
16245
162462002-07-25 Akim Demaille <akim@epita.fr>
16247
16248 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16249 replace...
16250 (b4_sint_type, b4_uint_type): these.
16251 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16252 * tests/regression.at (Web2c Actions): Adjust.
16253
162542002-07-25 Akim Demaille <akim@epita.fr>
16255
16256 * src/gram.h (TIEM_NUMBER_MAX): New.
16257 (item_number_of_rule_number, rule_number_of_item_number): Rename
16258 as...
16259 (rule_number_as_item_number, item_number_as_rule_number): these.
16260 Adjust dependencies.
16261 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16262 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16263 (symbol_number_to_vector_number): New.
16264 (order): Of vector_number_t* type.
16265 (base_t, BASE_MAX, BASE_MIN): New.
16266 (froms, tos, width, pos, check): Of base_t type.
16267 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16268 (actrow): Of action_number_t type.
16269 (conflrow): Of unsigned int type.
16270 (table_ninf, base_ninf): New.
16271 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16272 (muscle_insert_int_table, muscle_insert_base_table)
16273 (muscle_insert_rule_number_table): New.
16274 (prepare_tokens): Output `toknum' as int_table.
16275 (action_row): Returns a rule_number_t.
16276 Use ACTION_MIN, not SHRT_MIN.
16277 (token_actions): yydefact is rule_number_t*.
16278 (table_ninf_remap): New.
16279 (pack_table): Use it for `base' and `table'.
16280 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16281 replaced with...
16282 (YYPACT_NINF, YYTABLE_NINF): these.
16283 (yypact, yytable): Compute their types instead of hard-coded
16284 `short'.
16285 * tests/regression.at (Web2c Actions): Adjust.
16286
162872002-07-19 Akim Demaille <akim@epita.fr>
16288
16289 * src/scan-gram.l (id): Can start with an underscore.
16290
162912002-07-16 Akim Demaille <akim@epita.fr>
16292
16293 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16294 Adjust all former `associativity' dependencies.
16295 * src/symtab.c (symbol_new): Default associativity is `undef', not
16296 `right'.
16297 (symbol_check_alias_consistence): Adjust.
16298
162992002-07-09 Akim Demaille <akim@epita.fr>
16300
16301 * doc/bison.texinfo: Properly set the ``header'' part.
16302 Use @dircategory ``GNU programming tools'' as per Texinfo's
16303 documentation.
16304 Use @copying.
16305
163062002-07-09 Akim Demaille <akim@epita.fr>
16307
16308 * lib/quotearg.h: Protect against multiple inclusions.
16309 * src/location.h (location_t): Add a `file' member.
16310 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16311 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16312 `error_one_per_line' support.
16313
163142002-07-09 Akim Demaille <akim@epita.fr>
16315
16316 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16317 * src/reader.c (lineno): Remove.
16318 Adjust all dependencies.
16319 (get_merge_function): Take a location and use complain_at.
16320 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16321 * tests/regression.at (Invalid inputs, Mixing %token styles):
16322 Adjust.
16323
163242002-07-09 Akim Demaille <akim@epita.fr>
16325
16326 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16327 recovery rule, and forbid extensions when --yacc.
16328 (gram_error): Use complain_at.
16329 * src/reader.c (reader): Exit if there were parse errors.
16330
163312002-07-09 Akim Demaille <akim@epita.fr>
16332
16333 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16334 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16335 Reported by R Blake <blakers@mac.com>.
16336
163372002-07-09 Akim Demaille <akim@epita.fr>
16338
16339 * data/yacc.c: Output the copyright notive in the header.
16340
163412002-07-03 Akim Demaille <akim@epita.fr>
16342
16343 * src/output.c (froms, tos): Are state_number_t.
16344 (save_column): sp, sp1, and sp2 are state_number_t.
16345 (prepare): Rename `final' as `final_state_number', `nnts' as
16346 `nterms_number', `nrules' as `rules_number', `nstates' as
16347 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16348 unused.
16349 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16350 * data/lalr1.cc (nsym_): Remove, unused.
16351
163522002-07-03 Akim Demaille <akim@epita.fr>
16353
16354 * src/lalr.h, src/lalr.c (goto_number_t): New.
16355 * src/lalr.c (goto_list_t): New.
16356 Propagate them.
16357 * src/nullable.c (rule_list_t): New.
16358 Propagate.
16359 * src/types.h: Remove.
16360
163612002-07-03 Akim Demaille <akim@epita.fr>
16362
16363 * src/closure.c (print_fderives): Use rule_rhs_print.
16364 * src/derives.c (print_derives): Use rule_rhs_print.
16365 (rule_list_t): New, replaces `shorts'.
16366 (set_derives): Add comments.
16367 * tests/sets.at (Nullable, Firsts): Adjust.
16368
163692002-07-03 Akim Demaille <akim@epita.fr>
16370
16371 * src/output.c (prepare_actions): Free `tally' and `width'.
16372 (prepare_actions): Allocate and free `order'.
16373 * src/symtab.c (symbols_free): Free `symbols'.
16374 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16375 * src/output.c (m4_invoke): Move to...
16376 * src/scan-skel.l: here.
16377 (<<EOF>>): Close yyout, and free its name.
16378
163792002-07-03 Akim Demaille <akim@epita.fr>
16380
16381 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16382
16383 * src/LR0.c (new_state): Merge into...
16384 (state_list_append): this.
16385 (new_states): Merge into...
16386 (generate_states): here.
16387 (set_states): Don't ensure a proper `errs' state member here, do it...
16388 * src/conflicts.c (conflicts_solve): here.
16389 * src/state.h, src/state.c: Comment changes.
16390 (state_t): Rename member `shifts' as `transitions'.
16391 Adjust all dependencies.
16392 (errs_new): For consistency, also take the values as argument.
16393 (errs_dup): Remove.
16394 (state_errs_set): New.
16395 (state_reductions_set, state_transitions_set): Assert that no
16396 previous value was assigned.
16397 (state_free): New.
16398 (states_free): Use it.
16399 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16400 temporary storage: use `errs' and `nerrs' as elsewhere.
16401 (set_conflicts): Allocate and free this `errs'.
16402
164032002-07-02 Akim Demaille <akim@epita.fr>
16404
16405 * lib/libiberty.h: New.
16406 * lib: Update the bitset implementation from upstream.
16407 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16408 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16409 * src/main.c: Adjust bitset stats calls.
16410
164112002-07-01 Paul Eggert <eggert@twinsun.com>
16412
16413 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16414 char, so that negative chars don't collide with $.
16415
164162002-06-30 Akim Demaille <akim@epita.fr>
16417
16418 Have the GLR tests be `warning' checked, and fix the warnings.
16419
16420 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16421 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16422 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16423 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16424 (yyaddDeferredAction): static.
16425 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16426 (yyreportParseError): yyprefix is const.
16427 yytokenp is used only when verbose.
16428 (yy__GNUC__): Replace with __GNUC__.
16429 (yypdumpstack): yyi is size_t.
16430 (yypreference): Un-yy local variables and arguments, to avoid
16431 clashes with `yyr1'. Anyway, we are not in the user name space.
16432 (yytname_size): be an int, as is compared with ints.
16433 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16434 Use them.
16435 * tests/cxx-gram.at: Use quotation to protect $1.
16436 Use AT_COMPILE to enable warnings hunts.
16437 Prototype yylex and yyerror.
16438 `Use' argc.
16439 Include `string.h', not `strings.h'.
16440 Produce and prototype stmtMerge only when used.
16441 yylex takes a location.
16442
164432002-06-30 Akim Demaille <akim@epita.fr>
16444
16445 We spend a lot of time in quotearg, in particular when --verbose.
16446
16447 * src/symtab.c (symbol_get): Store a quoted version of the key.
16448 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16449 Adjust all callers.
16450
164512002-06-30 Akim Demaille <akim@epita.fr>
16452
16453 * src/state.h (reductions_t): Rename member `nreds' as num.
16454 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16455 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16456
164572002-06-30 Akim Demaille <akim@epita.fr>
16458
16459 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16460 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16461 (shifts_to): Rename as...
16462 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16463 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16464 (TRANSITION_IS_DISABLED, transitions_to): these.
16465
164662002-06-30 Akim Demaille <akim@epita.fr>
16467
16468 * src/print.c (print_shifts, print_gotos): Merge into...
16469 (print_transitions): this.
16470 (print_transitions, print_errs, print_reductions): Align the
16471 lookaheads columns.
16472 (print_core, print_transitions, print_errs, print_state,
16473 print_grammar): Output empty lines separator before, not after.
16474 (state_default_rule_compute): Rename as...
16475 (state_default_rule): this.
16476 * tests/conflicts.at (Defaulted Conflicted Reduction),
16477 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16478 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16479
164802002-06-30 Akim Demaille <akim@epita.fr>
16481
16482 Display items as we display rules.
16483
16484 * src/gram.h, src/gram.c (rule_lhs_print): New.
16485 * src/gram.c (grammar_rules_partial_print): Use it.
16486 * src/print.c (print_core): Likewise.
16487 * tests/conflicts.at (Defaulted Conflicted Reduction),
16488 (Unresolved SR Conflicts): Adjust.
16489 (Unresolved SR Conflicts): Adjust and rename as...
16490 (Resolved SR Conflicts): this, as was meant.
16491 * tests/regression.at (Web2c Report): Adjust.
16492
164932002-06-30 Akim Demaille <akim@epita.fr>
16494
16495 * src/print.c (state_default_rule_compute): New, extracted from...
16496 (print_reductions): here.
16497 Pessimize, but clarify the code.
16498 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16499
165002002-06-30 Akim Demaille <akim@epita.fr>
16501
16502 * src/output.c (action_row): Let default_rule be always a rule
16503 number.
16504
165052002-06-30 Akim Demaille <akim@epita.fr>
16506
16507 * src/closure.c (print_firsts, print_fderives, closure):
16508 Use BITSET_EXECUTE.
16509 * src/lalr.c (lookaheads_print): Likewise.
16510 * src/state.c (state_rule_lookaheads_print): Likewise.
16511 * src/print_graph.c (print_core): Likewise.
16512 * src/print.c (print_reductions): Likewise.
16513 * src/output.c (action_row): Likewise.
16514 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16515
165162002-06-30 Akim Demaille <akim@epita.fr>
16517
16518 * src/print_graph.c: Use report_flag.
16519
165202002-06-30 Akim Demaille <akim@epita.fr>
16521
16522 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16523 to...
16524 * src/relation.h, src/relation.c (traverse, relation_digraph)
16525 (relation_print, relation_transpose): New.
16526
165272002-06-30 Akim Demaille <akim@epita.fr>
16528
16529 * src/state.h, src/state.c (shifts_to): New.
16530 * src/lalr.c (build_relations): Use it.
16531
165322002-06-30 Akim Demaille <akim@epita.fr>
16533
16534 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16535 (item_number_of_rule_number, rule_number_of_item_number): New.
16536 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16537 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16538 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16539 Propagate their use.
16540 Much remains to be done, in particular wrt `shorts' from types.h.
16541
165422002-06-30 Akim Demaille <akim@epita.fr>
16543
16544 * src/symtab.c (symbol_new): Initialize the `printer' member.
16545
165462002-06-30 Akim Demaille <akim@epita.fr>
16547
16548 * src/LR0.c (save_reductions): Remove, replaced by...
16549 * src/state.h, src/state.c (state_reductions_set): New.
16550 (reductions, errs): Rename as...
16551 (reductions_t, errs_t): these.
16552 Adjust all dependencies.
16553
165542002-06-30 Akim Demaille <akim@epita.fr>
16555
16556 * src/LR0.c (state_list_t, state_list_append): New.
16557 (first_state, last_state): Now symbol_list_t.
16558 (this_state): Remove.
16559 (new_itemsets, append_states, save_reductions): Take a state_t as
16560 argument.
16561 (set_states, generate_states): Adjust.
16562 (save_shifts): Remove, replaced by...
16563 * src/state.h, src/state.c (state_shifts_set): New.
16564 (shifts): Rename as...
16565 (shifts_t): this.
16566 Adjust all dependencies.
16567 * src/state.h (state_t): Remove the `next' member.
16568
165692002-06-30 Akim Demaille <akim@epita.fr>
16570
16571 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16572 escaped in slot 0.
16573
165742002-06-30 Akim Demaille <akim@epita.fr>
16575
16576 Use hash.h for the state hash table.
16577
16578 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16579 (allocate_storage): Use state_hash_new.
16580 (free_storage): Use state_hash_free.
16581 (new_state, get_state): Adjust.
16582 * src/lalr.h, src/lalr.c (states): Move to...
16583 * src/states.h (state_t): Remove the `link' member, no longer
16584 used.
16585 * src/states.h, src/states.c: here.
16586 (state_hash_new, state_hash_free, state_hash_lookup)
16587 (state_hash_insert, states_free): New.
16588 * src/states.c (state_table, state_compare, state_hash): New.
16589 * src/output.c (output_actions): Do not free states now, since we
16590 still need to know the final_state number in `prepare', called
16591 afterwards. Do it...
16592 * src/main.c (main): here: call states_free after `output'.
16593
165942002-06-30 Akim Demaille <akim@epita.fr>
16595
16596 * src/state.h, src/state.c (state_new): New, extracted from...
16597 * src/LR0.c (new_state): here.
16598 * src/state.h (STATE_ALLOC): Move to...
16599 * src/state.c: here.
16600 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16601 * src/state.h, src/state.c: here.
16602
166032002-06-30 Akim Demaille <akim@epita.fr>
16604
16605 * src/reader.c (gensym): Rename as...
16606 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16607 (getsym): Rename as...
16608 (symbol_get): this.
16609
166102002-06-30 Akim Demaille <akim@epita.fr>
16611
16612 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16613 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16614 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16615 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16616
166172002-06-30 Akim Demaille <akim@epita.fr>
16618
16619 Make the test suite pass with warnings checked.
16620
16621 * tests/actions.at (Printers and Destructors): Improve.
16622 Avoid unsigned vs. signed issues.
16623 * tests/calc.at: Don't exercise the scanner here, do it...
16624 * tests/input.at (Torturing the Scanner): here.
16625
166262002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16627
16628 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16629 reorganize first lines parallel to yacc.c.
16630
166312002-06-28 Akim Demaille <akim@epita.fr>
16632
16633 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16634 (b4_token_enum, b4_token_defines): New, factored from...
16635 * data/lalr1.cc, data/yacc.c, glr.c: here.
16636
166372002-06-28 Akim Demaille <akim@epita.fr>
16638
16639 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16640 unused variables.
16641 * src/output.c (merger_output): static.
16642
166432002-06-28 Akim Demaille <akim@epita.fr>
16644
16645 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16646 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16647 pacify GCC.
16648 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16649
166502002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16651
16652 Accumulated changelog for new GLR parsing features.
16653
16654 * src/conflicts.c (count_total_conflicts): Change name to
16655 conflicts_total_count.
16656 * src/conflicts.h: Ditto.
16657 * src/output.c (token_actions): Use the new name.
16658 (output_conflicts): Change conflp => conflict_list_heads, and
16659 confl => conflict_list for better readability.
16660 * data/glr.c: Use the new names.
16661 * NEWS: Add self to GLR announcement.
16662
16663 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16664
16665 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16666 Akim Demaille.
16667
16668 * data/bison.glr: Change name to glr.c
16669 * data/glr.c: Renamed from bison.glr.
16670 * data/Makefile.am: Add glr.c
16671
16672 * src/getargs.c:
16673
16674 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16675 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16676
16677 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16678
16679 * data/bison.glr: Be sure to restore the
16680 current #line when returning to the skeleton contents after having
16681 exposed the input file's #line.
16682
16683 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16684
16685 * data/bison.glr: Bring up to date with changes to bison.simple.
16686
16687 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16688
16689 * data/bison.glr: Correct definitions that use b4_prefix.
16690 Various reformatting.
16691 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16692 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16693 yytokenp argument; now part of stack.
16694 (yychar): Define to behave as documented.
16695 (yyclearin): Ditto.
16696
16697 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16698
16699 * src/reader.h: Add declaration for free_merger_functions.
16700
16701 * src/reader.c (merge_functions): New variable.
16702 (get_merge_function): New function.
16703 (free_merger_functions): New function.
16704 (readgram): Check for %prec that is not followed by a symbol.
16705 Handle %dprec and %merge declarations.
16706 (packgram): Initialize dprec and merger fields in rules array.
16707
16708 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16709 conflict_list_cnt, conflict_list_free): New variables.
16710 (table_grow): Also grow conflict_table.
16711 (prepare_rules): Output dprec and merger tables.
16712 (conflict_row): New function.
16713 (action_row): Output conflict lists for GLR parser. Don't use
16714 default reduction in conflicted states for GLR parser so that there
16715 are spaces for the conflict lists.
16716 (save_row): Also save conflict information.
16717 (token_actions): Allocate conflict list.
16718 (merger_output): New function.
16719 (pack_vector): Pack conflict table, too.
16720 (output_conflicts): New function to output yyconflp and yyconfl.
16721 (output_check): Allocate conflict_tos.
16722 (output_actions): Output conflict tables, also.
16723 (output_skeleton): Output b4_mergers definition.
16724 (prepare): Output b4_max_rhs_length definition.
16725 Use 'bison.glr' as default skeleton for GLR parsers.
16726
16727 * src/gram.c (glr_parser): New flag.
16728 (grammar_free): Call free_merger_functions.
16729
16730 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16731 all pairs of conflicting reductions, rather than just all tokens
16732 causing conflicts. Needed to size conflict tables.
16733 (conflicts_output): Modify call to count_rr_conflicts for new
16734 interface.
16735 (conflicts_print): Ditto.
16736 (count_total_conflicts): New function.
16737
16738 * src/reader.h (merger_list): New type.
16739 (merge_functions): New variable.
16740
16741 * src/lex.h (tok_dprec, tok_merge): New token types.
16742
16743 * src/gram.h (rule_s): Add dprec and merger fields.
16744 (glr_parser): New flag.
16745
16746 * src/conflicts.h (count_total_conflicts): New function.
16747
16748 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16749
16750 * doc/bison.texinfo (Generalized LR Parsing): New section.
16751 (GLR Parsers): New section.
16752 (Language and Grammar): Mention GLR parsing.
16753 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16754 Correct typo ("tge" -> "the").
16755
16756 * data/bison.glr: New skeleton for GLR parsing.
16757
16758 * tests/cxx-gram.at: New tests for GLR parsing.
16759
16760 * tests/testsuite.at: Include cxx-gram.at.
16761
16762 * tests/Makefile.am: Add cxx-gram.at.
16763
16764 * src/parse-gram.y:
16765
16766 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16767
16768 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16769
167702002-06-27 Akim Demaille <akim@epita.fr>
16771
16772 * src/options.h, src/options.c: Remove.
16773 * src/getargs.c (short_options, long_options): New.
16774
167752002-06-27 Akim Demaille <akim@epita.fr>
16776
16777 * data/bison.simple, data/bison.c++: Rename as...
16778 * data/yacc.c, data/lalr1.cc: these.
16779 * doc/bison.texinfo (Environment Variables): Remove.
16780
167812002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16782
16783 * src/getargs.c (report_argmatch): Initialize strtok().
16784
167852002-06-20 Akim Demaille <akim@epita.fr>
16786
16787 * data/bison.simple (b4_symbol_actions): New, replaces...
16788 (b4_symbol_destructor, b4_symbol_printer): these.
16789 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16790 user token numbers.
16791
167922002-06-20 Akim Demaille <akim@epita.fr>
16793
16794 * data/bison.simple (yydestructor): Rename as...
16795 (yydestruct): this.
16796
167972002-06-20 Akim Demaille <akim@epita.fr>
16798
16799 * src/symtab.h, src/symtab.c (symbol_type_set)
16800 (symbol_destructor_set, symbol_precedence_set): The location is
16801 the last argument.
16802 Adjust all callers.
16803
168042002-06-20 Akim Demaille <akim@epita.fr>
16805
16806 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16807 internals.
16808 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16809 Takes a location.
16810 * src/symtab.h, src/symtab.c (symbol_class_set)
16811 (symbol_user_token_number_set): Likewise.
16812 Adjust all callers.
16813 Promote complain_at.
16814 * tests/input.at (Type Clashes): Adjust.
16815
168162002-06-20 Akim Demaille <akim@epita.fr>
16817
16818 * data/bison.simple (YYLEX): Fix the declaration when
16819 %pure-parser.
16820
168212002-06-20 Akim Demaille <akim@epita.fr>
16822
16823 * data/bison.simple (yysymprint): Don't print the token number,
16824 just its name.
16825 * tests/actions.at (Destructors): Rename as...
16826 (Printers and Destructors): this.
16827 Also exercise %printer.
16828
168292002-06-20 Akim Demaille <akim@epita.fr>
16830
16831 * data/bison.simple (YYDSYMPRINT): New.
16832 Use it to remove many of the #if YYDEBUG/if (yydebug).
16833
168342002-06-20 Akim Demaille <akim@epita.fr>
16835
16836 * src/symtab.h, src/symtab.c (symbol_t): printer and
16837 printer_location are new members.
16838 (symbol_printer_set): New.
16839 * src/parse-gram.y (PERCENT_PRINTER): New token.
16840 Handle its associated rule.
16841 * src/scan-gram.l: Adjust.
16842 (handle_destructor_at, handle_destructor_dollar): Rename as...
16843 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16844 * src/output.c (symbol_printers_output): New.
16845 (output_skeleton): Call it.
16846 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16847 since there are already many grammar files with a user `yyprint'.
16848 Replace the calls to YYPRINT to calls to yysymprint.
16849 * tests/calc.at: Adjust.
16850 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16851 taking advantage of parser very internal details (stack size!).
16852
168532002-06-20 Akim Demaille <akim@epita.fr>
16854
16855 * src/scan-gram.l: Complete the scanner with the missing patterns
16856 to pacify Flex.
16857 Use `quote' and `symbol_tag_get' where appropriate.
16858
168592002-06-19 Akim Demaille <akim@epita.fr>
16860
16861 * tests/actions.at (Destructors): Augment to test locations.
16862 * data/bison.simple (yydestructor): Pass it the current location
16863 if locations are enabled.
16864 Prototype only when __STDC__ or C++.
16865 Change the argument names to move into the yy name space: there is
16866 user code here.
16867
168682002-06-19 Akim Demaille <akim@epita.fr>
16869
16870 * data/bison.simple (b4_pure_if): New.
16871 Use it instead of #ifdef YYPURE.
16872
168732002-06-19 Akim Demaille <akim@epita.fr>
16874
16875 * data/bison.simple (b4_location_if): New.
16876 Use it instead of #ifdef YYLSP_NEEDED.
16877
168782002-06-19 Akim Demaille <akim@epita.fr>
16879
16880 Prepare @$ in %destructor, but currently don't bind it in the
16881 skeleton, as %location use is not cleaned up yet.
16882
16883 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16884 (handle_action_at): New.
16885 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16886 a braced_code_t and a location as additional arguments.
16887 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16888 unquote one when outputting `b4_dollar_dollar'.
16889 Adjust callers.
16890 * data/bison.simple (b4_eval): Remove.
16891 (b4_symbol_destructor): Adjust.
16892 * tests/input.at (Invalid @n): Adjust.
16893
168942002-06-19 Zack Weinberg <zack@codesourcery.com>
16895
16896 * doc/bison.texinfo: Document ability to have multiple
16897 prologue sections.
16898
168992002-06-18 Akim Demaille <akim@epita.fr>
16900
16901 * src/files.c (compute_base_names): When computing the output file
16902 names from the input file name, strip the directory part.
16903
169042002-06-18 Akim Demaille <akim@epita.fr>
16905
16906 * data/bison.simple.new: Comment changes.
16907 Reported by Andreas Schwab.
16908
169092002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16910
16911 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16912 there are no `label `yyoverflowlab' defined but not used' warnings
16913 when yyoverflow is defined.
16914
169152002-06-18 Akim Demaille <akim@epita.fr>
16916
16917 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16918 new member.
16919 (symbol_destructor_set): Adjust.
16920 * src/output.c (symbol_destructors_output): Output the destructor
16921 locations.
16922 Output the symbol name.
16923 * data/bison.simple (b4_symbol_destructor): Adjust.
16924
169252002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16926 and Akim Demaille <akim@epita.fr>
16927
16928 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16929 what's left on the stack when the error recovery hits EOF.
16930 * tests/actions.at (Destructors): Complete to exercise this case.
16931
169322002-06-17 Akim Demaille <akim@epita.fr>
16933
16934 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16935 arguments is really empty, not only equal to `[]'.
16936 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16937 member.
16938 (symbol_destructor_set): New.
16939 * src/output.c (symbol_destructors_output): New.
16940 * src/reader.h (brace_code_t, current_braced_code): New.
16941 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16942 (handle_dollar): Rename as...
16943 (handle_action_dollar): this.
16944 (handle_destructor_dollar): New.
16945 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16946 (grammar_declaration): Use it.
16947 * data/bison.simple (yystos): Is always defined.
16948 (yydestructor): New.
16949 * tests/actions.at (Destructors): New.
16950 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16951
169522002-06-17 Akim Demaille <akim@epita.fr>
16953
16954 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16955 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16956 rule_length only when needed.
16957 * src/output.c (actions_output, token_definitions_output): Output
16958 the full M4 block.
16959 * src/symtab.c: Don't access directly to the symbol tag, use
16960 symbol_tag_get.
16961 * src/parse-gram.y: Use symbol_list_free.
16962
169632002-06-17 Akim Demaille <akim@epita.fr>
16964
16965 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16966 (symbol_list_prepend, get_type_name): Move to...
16967 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16968 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16969 Adjust all callers.
16970 (symbol_list_free): New.
16971 * src/scan-gram.l (handle_dollar): Takes a location.
16972 * tests/input.at (Invalid $n): Adjust.
16973
169742002-06-17 Akim Demaille <akim@epita.fr>
16975
16976 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16977 (symbol_list_prepend): New.
16978 * src/parse-gram.y (%union): `list' is a new member.
16979 (symbols.1): New, replaces...
16980 (terms_to_prec.1, nterms_to_type.1): these.
16981 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16982 Take a location as additional argument.
16983 Adjust all callers.
16984
169852002-06-15 Akim Demaille <akim@epita.fr>
16986
16987 * src/parse-gram.y: Move %token in the declaration section so that
16988 we don't depend upon CVS Bison.
16989
169902002-06-15 Akim Demaille <akim@epita.fr>
16991
16992 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16993 * src/print.c (print_core): Use it.
16994
169952002-06-15 Akim Demaille <akim@epita.fr>
16996
16997 * src/conflicts.c (log_resolution): Accept the rule involved in
16998 the sr conflicts instead of the lookahead number that points to
16999 that rule.
17000 (flush_reduce): Accept the current lookahead vector as argument,
17001 instead of the index in LA.
17002 (resolve_sr_conflict): Accept the current number of lookahead
17003 bitset to consider for the STATE, instead of the index in LA.
17004 (set_conflicts): Adjust.
17005 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17006
170072002-06-15 Akim Demaille <akim@epita.fr>
17008
17009 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17010 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17011 Adjust all dependencies.
17012 * src/lalr.c (initialize_lookaheads): Split into...
17013 (states_lookaheads_count, states_lookaheads_initialize): these.
17014 (lalr): Adjust.
17015
170162002-06-15 Akim Demaille <akim@epita.fr>
17017
17018 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17019 out of...
17020 (grammar_rules_print): here.
17021 * src/reduce.c (reduce_output): Use it.
17022 * tests/reduce.at (Useless Rules, Reduced Automaton)
17023 (Underivable Rules): Adjust.
17024
170252002-06-15 Akim Demaille <akim@epita.fr>
17026
17027 Copy BYacc's nice way to report the grammar.
17028
17029 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17030 New.
17031 Don't print the rules' location, it is confusing and useless.
17032 (rule_print): Use grammar_rhs_print.
17033 * src/print.c (print_grammar): Use grammar_rules_print.
17034
170352002-06-15 Akim Demaille <akim@epita.fr>
17036
17037 Complete and rationalize `useless thing' warnings.
17038
17039 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17040 (symbol_tag_print): New.
17041 Use them everywhere in place of accessing directly the tag member.
17042 * src/gram.h, src/gram.c (rule_print): New.
17043 Use it where a rule used to be printed `by hand'.
17044 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17045 (reduce_grammar_tables): Report the useless rules.
17046 (reduce_print): Useless things are a warning, not an error.
17047 Report it as such.
17048 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17049 (Reduced Automaton, Underivable Rules): Adjust.
17050 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17051 * tests/conflicts.at (Unresolved SR Conflicts)
17052 (Solved SR Conflicts): Adjust.
17053
170542002-06-15 Akim Demaille <akim@epita.fr>
17055
17056 Let symbols have a location.
17057
17058 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17059 (getsym): Adjust.
17060 Adjust all callers.
17061 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17062 Use location_t, not int.
17063 * src/symtab.c (symbol_check_defined): Take advantage of the
17064 location.
17065 * tests/regression.at (Invalid inputs): Adjust.
17066
170672002-06-15 Akim Demaille <akim@epita.fr>
17068
17069 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17070 (input): Don't try to initialize yylloc here, do it in the
17071 scanner.
17072 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17073 * src/gram.h (rule_t): Change line and action_line into location
17074 and action_location, of location_t type.
17075 Adjust all dependencies.
17076 * src/location.h, src/location.c (empty_location): New.
17077 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17078 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17079 (grammar_current_rule_symbol_append)
17080 (grammar_current_rule_action_append): Expect a location as argument.
17081 * src/reader.c (grammar_midrule_action): Adjust to attach an
17082 action's location as dummy symbol location.
17083 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17084 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17085 the line numbers.
17086
170872002-06-14 Akim Demaille <akim@epita.fr>
17088
17089 Grammar declarations may be found in the grammar section.
17090
17091 * src/parse-gram.y (rules_or_grammar_declaration): New.
17092 (declarations): Each declaration may end with a semicolon, not
17093 just...
17094 (grammar_declaration): `"%union"'.
17095 (grammar): Branch to rules_or_grammar_declaration.
17096
170972002-06-14 Akim Demaille <akim@epita.fr>
17098
17099 * src/main.c (main): Invoke scanner_free.
17100
171012002-06-14 Akim Demaille <akim@epita.fr>
17102
17103 * src/output.c (m4_invoke): Extracted from...
17104 (output_skeleton): here.
17105 Free tempfile.
17106
171072002-06-14 Akim Demaille <akim@epita.fr>
17108
17109 * src/parse-gram.y (directives, directive, gram)
17110 (grammar_directives, precedence_directives, precedence_directive):
17111 Rename as...
17112 (declarations, declaration, grammar, grammar_declaration)
17113 (precedence_declaration, precedence_declarator): these.
17114 (symbol_declaration): New.
17115
171162002-06-14 Akim Demaille <akim@epita.fr>
17117
17118 * src/files.c (action_obstack): Remove, unused.
17119 (output_obstack): Remove it, and all its dependencies, as it is no
17120 longer needed.
17121 * src/reader.c (epilogue_set): Build the epilogue in the
17122 muscle_obstack.
17123 * src/output.h, src/output.c (muscle_obstack): Move to...
17124 * src/muscle_tab.h, src/muscle_tab.h: here.
17125 (muscle_init): Initialize muscle_obstack.
17126 (muscle_free): New.
17127 * src/main.c (main): Call it.
17128
171292002-06-14 Akim Demaille <akim@epita.fr>
17130
17131 * src/location.h: New, extracted from...
17132 * src/reader.h: here.
17133 * src/Makefile.am (noinst_HEADERS): Merge into
17134 (bison_SOURCES): this.
17135 Add location.h.
17136 * src/parse-gram.y: Use location_t instead of Bison's.
17137 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17138 Use location_t instead of ints.
17139
171402002-06-14 Akim Demaille <akim@epita.fr>
17141
17142 * data/bison.simple, data/bison.c++: Be sure to restore the
17143 current #line when returning to the skeleton contents after having
17144 exposed the input file's #line.
17145
171462002-06-12 Akim Demaille <akim@epita.fr>
17147
17148 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17149 eager.
17150 * tests/actions.at (Exotic Dollars): New.
17151
171522002-06-12 Akim Demaille <akim@epita.fr>
17153
17154 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17155 ['"/] too eagerly.
17156 * tests/input.at (Torturing the Scanner): New.
17157
171582002-06-11 Akim Demaille <akim@epita.fr>
17159
17160 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17161 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17162 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17163 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17164 * src/reader.c (reader): Use it.
17165
171662002-06-11 Akim Demaille <akim@epita.fr>
17167
17168 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17169 Adjust all callers.
17170 (scanner_last_string_free): New.
17171
171722002-06-11 Akim Demaille <akim@epita.fr>
17173
17174 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17175 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17176 (last_string, YY_OBS_FREE): New.
17177 Use them when returning an ID.
17178
171792002-06-11 Akim Demaille <akim@epita.fr>
17180
17181 Have Bison grammars parsed by a Bison grammar.
17182
17183 * src/reader.c, src/reader.h (prologue_augment): New.
17184 * src/reader.c (copy_definition): Remove.
17185
17186 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17187 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17188 (grammar_current_rule_prec_set, grammar_current_rule_check)
17189 (grammar_current_rule_symbol_append)
17190 (grammar_current_rule_action_append): Export.
17191 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17192 (symbol_list_action_append): Remove.
17193 Hook the routines from reader.
17194 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17195 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17196
17197 * src/reader.c (read_declarations): Remove, unused.
17198
17199 * src/parse-gram.y: Handle the epilogue.
17200 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17201 (grammar_start_symbol_set): this.
17202 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17203 * src/reader.c (readgram): Remove, unused.
17204 (reader): Adjust to insert eoftoken and axiom where appropriate.
17205
17206 * src/reader.c (copy_dollar): Replace with...
17207 * src/scan-gram.h (handle_dollar): this.
17208 * src/parse-gram.y: Remove `%thong'.
17209
17210 * src/reader.c (copy_at): Replace with...
17211 * src/scan-gram.h (handle_at): this.
17212
17213 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17214 New.
17215
17216 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17217 time being.
17218
17219 * src/reader.h, src/reader.c (grammar_rule_end): New.
17220
17221 * src/parse.y (current_type, current_class): New.
17222 Implement `%nterm', `%token' support.
17223 Merge `%term' into `%token'.
17224 (string_as_id): New.
17225 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17226 type name.
17227
17228 * src/parse-gram.y: Be sure to handle properly the beginning of
17229 rules.
17230
17231 * src/parse-gram.y: Handle %type.
17232 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17233
17234 * src/parse-gram.y: More directives support.
17235 * src/options.c: No longer handle source directives.
17236
17237 * src/parse-gram.y: Fix %output.
17238
17239 * src/parse-gram.y: Handle %union.
17240 Use the prologue locations.
17241 * src/reader.c (parse_union_decl): Remove.
17242
17243 * src/reader.h, src/reader.c (epilogue_set): New.
17244 * src/parse-gram.y: Use it.
17245
17246 * data/bison.simple, data/bison.c++: b4_stype is now either not
17247 defined, then default to int, or to the contents of %union,
17248 without `union' itself.
17249 Adjust.
17250 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17251
17252 * src/output.c (actions_output): Don't output braces, as they are
17253 already handled by the scanner.
17254
17255 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17256 characters to themselves.
17257
17258 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17259 that the epilogue has a proper #line.
17260
17261 * src/parse-gram.y: Handle precedence/associativity.
17262
17263 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17264 a terminal.
17265 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17266 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17267 at all to define terminals that cannot be emitted.
17268
17269 * src/scan-gram.l: Escape M4 characters.
17270
17271 * src/scan-gram.l: Working properly with escapes in user
17272 strings/characters.
17273
17274 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17275 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17276 grammar.
17277 Use more modest sizes, as for the time being the parser does not
17278 release memory, and therefore the process swallows a huge amount
17279 of memory.
17280
17281 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17282 stricter %token grammar.
17283
17284 * src/symtab.h (associativity): Add `undef_assoc'.
17285 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17286 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17287
17288 * tests/regression.at (Invalid %directive): Remove, as it is now
17289 meaningless.
17290 (Invalid inputs): Adjust to the new error messages.
17291 (Token definitions): The new grammar doesn't allow too many
17292 eccentricities.
17293
17294 * src/lex.h, src/lex.c: Remove.
17295 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17296 (copy_character, copy_string2, copy_string, copy_identifier)
17297 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17298 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17299 (parse_action): Remove.
17300 * po/POTFILES.in: Adjust.
17301
173022002-06-11 Akim Demaille <akim@epita.fr>
17303
17304 * src/reader.c (parse_action): Don't store directly into the
17305 rule's action member: return the action as a string.
17306 Don't require `rule_length' as an argument: compute it.
17307 (grammar_current_rule_symbol_append)
17308 (grammar_current_rule_action_append): New, eved out from
17309 (readgram): here.
17310 Remove `action_flag', `rulelength', unused now.
17311
173122002-06-11 Akim Demaille <akim@epita.fr>
17313
17314 * src/reader.c (grammar_current_rule_prec_set).
17315 (grammar_current_rule_check): New, eved out from...
17316 (readgram): here.
17317 Remove `xaction', `first_rhs': useless.
17318 * tests/input.at (Type clashes): New.
17319 * tests/existing.at (GNU Cim Grammar): Adjust.
17320
173212002-06-11 Akim Demaille <akim@epita.fr>
17322
17323 * src/reader.c (grammar_midrule_action): New, Eved out from
17324 (readgram): here.
17325
173262002-06-11 Akim Demaille <akim@epita.fr>
17327
17328 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17329 New.
17330 (readgram): Use them as replacement of inlined code, crule and
17331 crule1.
17332
173332002-06-11 Akim Demaille <akim@epita.fr>
17334
17335 * src/reader.c (grammar_end, grammar_symbol_append): New.
17336 (readgram): Use them.
17337 Make the use of `p' as local as possible.
17338
173392002-06-10 Akim Demaille <akim@epita.fr>
17340
17341 GCJ's parser requires the tokens to be defined before the prologue.
17342
17343 * data/bison.simple: Output the token definition before the user's
17344 prologue.
17345 * tests/regression.at (Braces parsing, Duplicate string)
17346 (Mixing %token styles): Check the output from bison.
17347 (Early token definitions): New.
17348
173492002-06-10 Akim Demaille <akim@epita.fr>
17350
17351 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17352 assigning twice the same user number to a token, so that we can
17353 use it in...
17354 * src/lex.c (lex): here.
17355 Also use `symbol_class_set' instead of hand written code.
17356 * src/reader.c (parse_assoc_decl): Likewise.
17357
173582002-06-10 Akim Demaille <akim@epita.fr>
17359
17360 * src/symtab.c, src/symtab.c (symbol_class_set)
17361 (symbol_user_token_number_set): New.
17362 * src/reader.c (parse_token_decl): Use them.
17363 Use a switch instead of ifs.
17364 Use a single argument.
17365
173662002-06-10 Akim Demaille <akim@epita.fr>
17367
17368 Remove `%thong' support as it is undocumented, unused, duplicates
17369 `%token's job, and creates useless e-mail traffic with people who
17370 want to know what it is, why it is undocumented, unused, and
17371 duplicates `%token's job.
17372
17373 * src/reader.c (parse_thong_decl): Remove.
17374 * src/options.c (option_table): Remove "thong".
17375 * src/lex.h (tok_thong): Remove.
17376
173772002-06-10 Akim Demaille <akim@epita.fr>
17378
17379 * src/symtab.c, src/symtab.c (symbol_type_set)
17380 (symbol_precedence_set): New.
17381 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17382 (value_components_used): Remove, unused.
17383
173842002-06-09 Akim Demaille <akim@epita.fr>
17385
17386 Move symbols handling code out of the reader.
17387
17388 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17389 (axiom): Move to...
17390 * src/symtab.h, src/symtab.c: here.
17391
17392 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17393 * src/reader.c (startval): Rename as...
17394 * src/symtab.h, src/symtab.c (startsymbol): this.
17395 * src/reader.c: Adjust.
17396
17397 * src/reader.c (symbol_check_defined, symbol_make_alias)
17398 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17399 (token_translations_init)
17400 Move to...
17401 * src/symtab.c: here.
17402 * src/reader.c (packsymbols): Move to...
17403 * src/symtab.h, src/symtab.c (symbols_pack): here.
17404 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17405 argument.
17406
174072002-06-03 Akim Demaille <akim@epita.fr>
17408
17409 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17410 then statements.
17411
174122002-06-03 Akim Demaille <akim@epita.fr>
17413
17414 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17415 structs with non literals.
17416 * src/scan-skel.l: never-interactive.
17417 * src/conflicts.c (enum conflict_resolution_e): No trailing
17418 comma.
17419 * src/getargs.c (usage): Split long literal strings.
17420 Reported by Hans Aberg.
17421
174222002-05-28 Akim Demaille <akim@epita.fr>
17423
17424 * data/bison.c++: Use C++ ostreams.
17425 (cdebug_): New member.
17426
174272002-05-28 Akim Demaille <akim@epita.fr>
17428
17429 * src/output.c (output_skeleton): Be sure to allocate enough room
17430 for `/' _and_ for `\0' in full_skeleton.
17431
174322002-05-28 Akim Demaille <akim@epita.fr>
17433
17434 * data/bison.c++: Catch up with bison.simple:
17435 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17436 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17437 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17438 and popping traces.
17439
174402002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17441
17442 * src/output.c (output_skeleton): Put an explicit path in front of
17443 the skeleton file name, rather than relying on the -I directory,
17444 to partially alleviate effects of having a skeleton file lying around
17445 in the current directory.
17446
174472002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17448
17449 * src/conflicts.c (log_resolution): Correct typo:
17450 obstack_printf should be obstack_fgrow1.
17451
174522002-05-26 Akim Demaille <akim@epita.fr>
17453
17454 * src/state.h (state_t): `solved_conflicts' is a new member.
17455 * src/LR0.c (new_state): Set it to 0.
17456 * src/conflicts.h, src/conflicts.c (print_conflicts)
17457 (free_conflicts, solve_conflicts): Rename as...
17458 (conflicts_print, conflicts_free, conflicts_solve): these.
17459 Adjust callers.
17460 * src/conflicts.c (enum conflict_resolution_e)
17461 (solved_conflicts_obstack): New, used by...
17462 (log_resolution): this.
17463 Adjust to attach the conflict resolution to each state.
17464 Complete the description with the precedence/associativity
17465 information.
17466 (resolve_sr_conflict): Adjust.
17467 * src/print.c (print_state): Output its solved_conflicts.
17468 * tests/conflicts.at (Unresolved SR Conflicts)
17469 (Solved SR Conflicts): Exercise --report=all.
17470
174712002-05-26 Akim Demaille <akim@epita.fr>
17472
17473 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17474 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17475 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17476 (token_number_t, item_number_as_token_number)
17477 (token_number_as_item_number, muscle_insert_token_number_table):
17478 Rename as...
17479 (symbol_number_t, item_number_as_symbol_number)
17480 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17481 these, since it is more appropriate.
17482
174832002-05-26 Akim Demaille <akim@epita.fr>
17484
17485 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17486 `Error:' lines.
17487 * data/bison.simple (yystos) [YYDEBUG]: New.
17488 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17489 error recovery.
17490 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17491
174922002-05-25 Akim Demaille <akim@epita.fr>
17493
17494 * doc/bison.texinfo (Debugging): Split into...
17495 (Tracing): this new section, its former contents, and...
17496 (Understanding): this new section.
17497 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17498 by...
17499 (report_flag): this.
17500 Adjust all dependencies.
17501 (report_args, report_types, report_argmatch): New.
17502 (usage, getargs): Report/support -r, --report.
17503 * src/options.h
17504 (struct option_table_struct): Rename as..,
17505 (struct option_table_s): this.
17506 Rename the `set_flag' member to `flag' to match with getopt_long's
17507 struct.
17508 * src/options.c (option_table): Split verbose into an entry for
17509 %verbose, and another for --verbose.
17510 Support --report/-r, so remove -r from the obsolete --raw.
17511 * src/print.c: Attach full item sets and lookaheads reports to
17512 report_flag instead of trace_flag.
17513 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17514
175152002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17516 and Paul Eggert <eggert@twinsun.com>
17517
17518 * data/bison.simple (yyparse): Correct error handling to conform to
17519 POSIX and yacc. Specifically, after syntax error is discovered,
17520 do not reduce further before shifting the error token.
17521 Clean up the code a bit by removing the labels yyerrdefault,
17522 yyerrhandle, yyerrpop.
17523 * NEWS: Document the above.
17524
175252002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17526
17527 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17528 type; it isn't always big enough, since it doesn't necessarily
17529 include non-terminals.
17530 (yytranslate): Expand definition of yy_token_number_type, so that
17531 the latter can be removed.
17532 (yy_token_number_type): Remove, only one use.
17533 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17534 don't use TokenNumberType as element type.
17535
17536 * tests/regression.at: Modify expected output to agree with change
17537 to yyr1 and yytranslate.
17538
175392002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17540
17541 * src/reader.c (parse_action): Use copy_character instead of
17542 obstack_1grow.
17543
175442002-05-13 Akim Demaille <akim@epita.fr>
17545
17546 * tests/regression.at (Token definitions): Prototype yylex and
17547 yyerror.
17548
175492002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17550
17551 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17552 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17553 32-bit arithmetic.
17554 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17555
175562002-05-07 Akim Demaille <akim@epita.fr>
17557
17558 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17559 avoid GCC warnings.
17560
175612002-05-07 Akim Demaille <akim@epita.fr>
17562
17563 Kill GCC warnings.
17564
17565 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17566 over the RHS of each rule.
17567 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17568 * src/state.h (state_t): Member `nitems' is unsigned short.
17569 * src/LR0.c (get_state): Adjust.
17570 * src/reader.c (packgram): Likewise.
17571 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17572 `Type'.
17573 (muscle_insert_int_table): Remove, unused.
17574 (prepare_rules): Remove `max'.
17575
175762002-05-06 Akim Demaille <akim@epita.fr>
17577
17578 * src/closure.c (print_firsts): Display of the symbol tags.
17579 (bitmatrix_print): Move to...
17580 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17581 here.
17582 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17583
175842002-05-06 Akim Demaille <akim@epita.fr>
17585
17586 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17587 hash_do_for_each.
17588
175892002-05-06 Akim Demaille <akim@epita.fr>
17590
17591 * src/LR0.c (new_state, get_state): Instead of using the global
17592 `kernel_size' and `kernel_base', have two new arguments:
17593 `core_size' and `core'.
17594 Adjust callers.
17595
175962002-05-06 Akim Demaille <akim@epita.fr>
17597
17598 * src/reader.c (packgram): No longer end `ritem' with a 0
17599 sentinel: it is not used.
17600
176012002-05-05 Akim Demaille <akim@epita.fr>
17602
17603 New experimental feature: display the lookaheads in the report and
17604 graph.
17605
17606 * src/print (print_core): When --trace-flag, display the rules
17607 lookaheads.
17608 * src/print_graph.c (print_core): Likewise.
17609 Swap the arguments.
17610 Adjust caller.
17611
176122002-05-05 Akim Demaille <akim@epita.fr>
17613
17614 * tests/torture.at (Many lookaheads): New test.
17615
176162002-05-05 Akim Demaille <akim@epita.fr>
17617
17618 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17619 (GENERATE_MUSCLE_INSERT_TABLE): this.
17620 (output_int_table, output_unsigned_int_table, output_short_table)
17621 (output_token_number_table, output_item_number_table): Replace with...
17622 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17623 (muscle_insert_short_table, muscle_insert_token_number_table)
17624 (muscle_insert_item_number_table): these.
17625 Adjust all callers.
17626 (prepare_tokens): Don't free `translations', since...
17627 * src/reader.h, src/reader.c (grammar_free): do it.
17628 Move to...
17629 * src/gram.h, src/gram.c (grammar_free): here.
17630 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17631 b4_translate_max.
17632
176332002-05-05 Akim Demaille <akim@epita.fr>
17634
17635 * src/output.c (output_unsigned_int_table): New.
17636 (prepare_rules): `i' is unsigned.
17637 `prhs', `rline', `r2' are unsigned int.
17638 Rename muscle `rhs_number_max' as `rhs_max'.
17639 Output muscles `prhs_max', `rline_max', and `r2_max'.
17640 Free rline and r1.
17641 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17642 to compute types instead of constant types.
17643 * tests/regression.at (Web2c Actions): Adjust.
17644
176452002-05-04 Akim Demaille <akim@epita.fr>
17646
17647 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17648 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17649 Adjust dependencies.
17650 * src/output.c (token_definitions_output): Be sure not to output a
17651 `#define 'a'' when fed with `%token 'a' "a"'.
17652 * tests/regression.at (Token definitions): New.
17653
176542002-05-03 Paul Eggert <eggert@twinsun.com>
17655
17656 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17657 for K&R C.
17658
176592002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17660
17661 * Makefile.am (SUBDIRS): Remove intl.
17662 (EXTRA_DIST): Add config/config.rpath.
17663
176642002-05-03 Akim Demaille <akim@epita.fr>
17665
17666 * data/bison.simple (m4_if): Don't output empty enums.
17667 And actually, output valid enum definitions :(.
17668
176692002-05-03 Akim Demaille <akim@epita.fr>
17670
17671 * configure.bat: Remove, completely obsolete.
17672 * Makefile.am (EXTRA_DIST): Adjust.
17673 Don't distribute config.rpath...
17674 * config/Makefile.am (EXTRA_DIST): Do it.
17675
176762002-05-03 Akim Demaille <akim@epita.fr>
17677
17678 * configure.in (GETTEXT_VERSION): New.
17679 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17680
176812002-05-03 Akim Demaille <akim@epita.fr>
17682
17683 * data/bison.simple (b4_token_enum): New.
17684 (b4_token_defines): Use it to output tokens both as #define and
17685 enums.
17686 Suggested by Paul Eggert.
17687 * src/output.c (token_definitions_output): Don't output spurious
17688 white spaces.
17689
176902002-05-03 Akim Demaille <akim@epita.fr>
17691
17692 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17693
176942002-05-02 Robert Anisko <robert@lrde.epita.fr>
17695
17696 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17697 Update the stack class, give a try to deque as the default container.
17698
176992002-05-02 Akim Demaille <akim@epita.fr>
17700
17701 * data/bison.simple (yyparse): Do not implement @$ = @1.
17702 (YYLLOC_DEFAULT): Adjust to do it.
17703 * doc/bison.texinfo (Location Default Action): Fix.
17704
177052002-05-02 Akim Demaille <akim@epita.fr>
17706
17707 * src/reader.c (parse_braces): Merge into...
17708 (parse_action): this.
17709
177102002-05-02 Akim Demaille <akim@epita.fr>
17711
17712 * configure.in (ALL_LINGUAS): Remove.
17713 * po/LINGUAS, hr.po: New.
17714
177152002-05-02 Akim Demaille <akim@epita.fr>
17716
17717 Remove the so called hairy (semantic) parsers.
17718
17719 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17720 * src/gram.h, src/gram.c (semantic_parser): Remove.
17721 (rule_t): Remove the guard and guard_line members.
17722 * src/lex.h (token_t): remove tok_guard.
17723 * src/options.c (option_table): Remove %guard and %semantic_parser
17724 support.
17725 * src/output.c, src/output.h (guards_output): Remove.
17726 (prepare): Adjust.
17727 (token_definitions_output): Don't output the `T'
17728 tokens (???).
17729 (output_skeleton): Don't output the guards.
17730 * src/files.c, src/files.c (attrsfile): Remove.
17731 * src/reader.c (symbol_list): Remove the guard and guard_line
17732 members.
17733 Adjust dependencies.
17734 (parse_guard): Remove.
17735 * data/bison.hairy: Remove.
17736 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17737 BISON_HAIRY.
17738
177392002-05-02 Akim Demaille <akim@epita.fr>
17740
17741 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17742 (parse_guard): Rename the formal argument `stack_offset' as
17743 `rule_length', which is more readable.
17744 Adjust callers.
17745 (copy_at, copy_dollar): Instead of outputting the hard coded
17746 values of $$, $n and so forth, output invocation to b4_lhs_value,
17747 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17748 Note: this patch partially drops `semantic-parser' support: it
17749 always does `rule_length - n', where semantic parsers ought to
17750 always use `-n'.
17751 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17752 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17753
177542002-05-02 Akim Demaille <akim@epita.fr>
17755
17756 * configure.in (AC_INIT): Bump to 1.49b.
17757 (AM_INIT_AUTOMAKE): Short invocation.
17758
177592002-05-02 Akim Demaille <akim@epita.fr>
17760
17761 Version 1.49a.
17762
177632002-05-01 Akim Demaille <akim@epita.fr>
17764
17765 * src/skeleton.h: Remove.
17766
177672002-05-01 Akim Demaille <akim@epita.fr>
17768
17769 * src/skeleton.h: Fix the #endif.
17770 Reported by Magnus Fromreide.
17771
177722002-04-26 Paul Eggert <eggert@twinsun.com>
17773
17774 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17775 Define if we define YYSTYPE and YYLTYPE, respectively.
17776 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17777
177782002-04-25 Robert Anisko <robert@lrde.epita.fr>
17779
17780 * src/scan-skel.l: Postprocess quadrigraphs.
17781
17782 * src/reader.c (copy_character): New function, used to output
17783 single characters while replacing `[' and `]' with quadrigraphs, to
17784 avoid troubles with M4 quotes.
17785 (copy_comment): Output characters with copy_character.
17786 (read_additionnal_code): Likewise.
17787 (copy_string2): Likewise.
17788 (copy_definition): Likewise.
17789
17790 * tests/calc.at: Exercise M4 quoting.
17791
177922002-04-25 Akim Demaille <akim@epita.fr>
17793
17794 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17795 between `!' and the command.
17796 Reported by Paul Eggert.
17797
177982002-04-24 Robert Anisko <robert@lrde.epita.fr>
17799
17800 * tests/calc.at: Exercise prologue splitting.
17801
17802 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17803 `b4_post_prologue' instead of `b4_prologue'.
17804
17805 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17806 muscles.
17807 (output): Free pre_prologue_obstack and post_prologue_obstack.
17808 * src/files.h, src/files.c (attrs_obstack): Remove.
17809 (pre_prologue_obstack, post_prologue_obstack): New.
17810 * src/reader.c (copy_definition): Add a parameter to specify the
17811 obstack to fill, instead of using attrs_obstack unconditionally.
17812 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17813 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17814
178152002-04-23 Paul Eggert <eggert@twinsun.com>
17816
17817 * data/bison.simple: Remove unnecessary commentary and white
17818 space differences from 1_29-branch.
17819 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17820
17821 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17822 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17823 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17824 constructors or destructors.
17825
17826 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17827
178282002-04-23 Akim Demaille <akim@epita.fr>
17829
17830 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17831 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17832 location with columns.
17833 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17834 All reported by Paul Eggert.
17835
178362002-04-22 Akim Demaille <akim@epita.fr>
17837
17838 * src/reduce.c (dump_grammar): Move to...
17839 * src/gram.h, src/gram.c (grammar_dump): here.
17840 Be sure to separate long item numbers.
17841 Don't read the members of a rule's prec if its nil.
17842
178432002-04-22 Akim Demaille <akim@epita.fr>
17844
17845 * src/output.c (table_size, table_grow): New.
17846 (MAXTABLE): Remove, replace uses with table_size.
17847 (pack_vector): Instead of dying when the table is too big, grow it.
17848
178492002-04-22 Akim Demaille <akim@epita.fr>
17850
17851 * data/bison.simple (yyr1): Its type is that of a token number.
17852 * data/bison.c++ (r1_): Likewise.
17853 * tests/regression.at (Web2c Actions): Adjust.
17854
178552002-04-22 Akim Demaille <akim@epita.fr>
17856
17857 * src/reader.c (token_translations_init): 256 is now the default
17858 value for the error token, i.e., it will be assigned another
17859 number if the user assigned 256 to one of her tokens.
17860 (reader): Don't force 256 to error.
17861 * doc/bison.texinfo (Symbols): Adjust.
17862 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17863 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17864 etc. instead of 10, 20, 30 (which was used to `jump' over error
17865 (256) and undefined (2)).
17866
178672002-04-22 Akim Demaille <akim@epita.fr>
17868
17869 Propagate more token_number_t.
17870
17871 * src/gram.h (token_number_as_item_number)
17872 (item_number_as_token_number): New.
17873 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17874 Use it to create output_item_number_table and
17875 output_token_number_table.
17876 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17877 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17878 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17879 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17880
178812002-04-22 Akim Demaille <akim@epita.fr>
17882
17883 * src/output.h, src/output.c (get_lines_number): Remove.
17884
178852002-04-19 Akim Demaille <akim@epita.fr>
17886
17887 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17888 as Lex/Flex'.
17889 (Debugging): More details about enabling the debugging features.
17890 (Table of Symbols): Describe $$, $n, @$, and @n.
17891 Suggested by Tim Josling.
17892
178932002-04-19 Akim Demaille <akim@epita.fr>
17894
17895 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17896
178972002-04-10 Akim Demaille <akim@epita.fr>
17898
17899 * src/system.h: Rely on HAVE_LIMITS_H.
17900 Suggested by Paul Eggert.
17901
179022002-04-09 Akim Demaille <akim@epita.fr>
17903
17904 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17905 full stderr, and strip it according to the bison options, instead
17906 of composing the error message from different bits.
17907 This makes it easier to check for several error messages.
17908 Adjust all the invocations.
17909 Add an invocation exercising the error token.
17910 Add an invocation demonstrating a stupid error message.
17911 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17912 Adjust the tests.
17913 Error message are for stderr, not stdout.
17914
179152002-04-09 Akim Demaille <akim@epita.fr>
17916
17917 * src/gram.h, src/gram.c (error_token_number): Remove, use
17918 errtoken->number.
17919 * src/reader.c (reader): Don't specify the user token number (2)
17920 for $undefined, as it uselessly prevents using it.
17921 * src/gram.h (token_number_t): Move to...
17922 * src/symtab.h: here.
17923 (state_t.number): Is a token_number_t.
17924 * src/print.c, src/reader.c: Use undeftoken->number instead of
17925 hard coded 2.
17926 (Even though this 2 is not the same as above: the number of the
17927 undeftoken remains being 2, it is its user token number which
17928 might not be 2).
17929 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17930 `user_token_number_max'.
17931 Output `undef_token_number'.
17932 * data/bison.simple, data/bison.c++: Use them.
17933 Be sure to map invalid yylex return values to
17934 `undef_token_number'. This saves us from gratuitous SEGV.
17935
17936 * tests/conflicts.at (Solved SR Conflicts)
17937 (Unresolved SR Conflicts): Adjust.
17938 * tests/regression.at (Web2c Actions): Adjust.
17939
179402002-04-08 Akim Demaille <akim@epita.fr>
17941
17942 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17943 Adding #line.
17944 Remove the duplicate `typedefs'.
17945 (RhsNumberType): Fix the declaration and various other typos.
17946 Use __ofile__.
17947 * data/bison.simple: Use __ofile__.
17948 * src/scan-skel.l: Handle __ofile__.
17949
179502002-04-08 Akim Demaille <akim@epita.fr>
17951
17952 * src/gram.h (item_number_t): New, the type of item numbers in
17953 RITEM. Note that it must be able to code symbol numbers as
17954 positive number, and the negation of rule numbers as negative
17955 numbers.
17956 Adjust all dependencies (pretty many).
17957 * src/reduce.c (rule): Remove this `short *' pointer: use
17958 item_number_t.
17959 * src/system.h (MINSHORT, MAXSHORT): Remove.
17960 Include `limits.h'.
17961 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17962 (shortcpy): Remove.
17963 (MAXTABLE): Move to...
17964 * src/output.c (MAXTABLE): here.
17965 (prepare_rules): Use output_int_table to output rhs.
17966 * data/bison.simple, data/bison.c++: Adjust.
17967 * tests/torture.at (Big triangle): Move the limit from 254 to
17968 500.
17969 * tests/regression.at (Web2c Actions): Ajust.
17970
17971 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17972 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17973 passes, but produces negative #line number, once fixed, GCC is
17974 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17975 C), it passes.
17976 * src/state.h (state_h): Code input lines on ints, not shorts.
17977
179782002-04-08 Akim Demaille <akim@epita.fr>
17979
17980 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17981 and then the grammar.
17982
179832002-04-08 Akim Demaille <akim@epita.fr>
17984
17985 * src/system.h: No longer using strndup.
17986
179872002-04-07 Akim Demaille <akim@epita.fr>
17988
17989 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17990 * src/output.c (output_table_data): Return the longest number.
17991 (prepare_tokens): Output `token_number_max').
17992 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17993 New.
17994 Use them to define yy_token_number_type/TokenNumberType.
17995 Use this type for yytranslate.
17996 * tests/torture.at (Big triangle): Push the limit from 124 to
17997 253.
17998 * tests/regression.at (Web2c Actions): Adjust.
17999
180002002-04-07 Akim Demaille <akim@epita.fr>
18001
18002 * tests/torture.at (Big triangle): New.
18003 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18004 * tests/existing.at: here.
18005
180062002-04-07 Akim Demaille <akim@epita.fr>
18007
18008 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18009 nritems.
18010 Adjust dependencies.
18011
180122002-04-07 Akim Demaille <akim@epita.fr>
18013
18014 * src/reader.c: Normalize increments to prefix form.
18015
180162002-04-07 Akim Demaille <akim@epita.fr>
18017
18018 * src/reader.c, symtab.c: Remove debugging code.
18019
180202002-04-07 Akim Demaille <akim@epita.fr>
18021
18022 Rename all the `bucket's as `symbol_t'.
18023
18024 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18025 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18026 * src/symtab.c, src/symtab.h (bucket): Rename as...
18027 (symbol_t): this.
18028 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18029 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18030 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18031 (buckets_new, buckets_free, buckets_do): Rename as...
18032 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18033 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18034 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18035 (symbols_new, symbols_free, symbols_do): these.
18036
180372002-04-07 Akim Demaille <akim@epita.fr>
18038
18039 Use lib/hash for the symbol table.
18040
18041 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18042 EOF.
18043 * src/lex.c (lex): Set the `number' member of new terminals.
18044 * src/reader.c (bucket_check_defined, bucket_make_alias)
18045 (bucket_check_alias_consistence, bucket_translation): New.
18046 (reader, grammar_free, readgram, token_translations_init)
18047 (packsymbols): Adjust.
18048 (reader): Number the predefined tokens.
18049 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18050 for predefined tokens.
18051 * src/symtab.h (bucket): Remove all the hash table related
18052 members.
18053 * src/symtab.c (symtab): Replace by...
18054 (bucket_table): this.
18055 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18056 (buckets_new, buckets_do): New.
18057
180582002-04-07 Akim Demaille <akim@epita.fr>
18059
18060 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18061 (start_symbol, max_user_token_number, semantic_parser)
18062 (error_token_number): Initialize.
18063 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18064 Initialize.
18065 (reader): Don't.
18066 (errtoken, eoftoken, undeftoken, axiom): Extern.
18067
180682002-04-07 Akim Demaille <akim@epita.fr>
18069
18070 * src/gram.h (rule_s): prec and precsym are now pointers
18071 to the bucket giving the priority/associativity.
18072 Member `associativity' removed: useless.
18073 * src/reduce.c, src/conflicts.c: Adjust.
18074
180752002-04-07 Akim Demaille <akim@epita.fr>
18076
18077 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18078 Properly escape the symbols' TAG when outputting them.
18079
180802002-04-07 Akim Demaille <akim@epita.fr>
18081
18082 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18083
180842002-04-07 Akim Demaille <akim@epita.fr>
18085
18086 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18087 (LArule): this, which is an array to rule_t*.
18088 * src/print.c, src/conflicts.c: Adjust.
18089
180902002-04-07 Akim Demaille <akim@epita.fr>
18091
18092 * src/gram.h (rule_t): Rename `number' as `user_number'.
18093 `number' is a new member.
18094 Adjust dependencies.
18095 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18096
180972002-04-07 Akim Demaille <akim@epita.fr>
18098
18099 As a result of the previous patch, it is no longer needed
18100 to reorder ritem itself.
18101
18102 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18103
181042002-04-07 Akim Demaille <akim@epita.fr>
18105
18106 Be sure never to walk through RITEMS, but use only data related to
18107 the rules themselves. RITEMS should be banished.
18108
18109 * src/output.c (output_token_translations): Rename as...
18110 (prepare_tokens): this.
18111 In addition to `translate', prepare the muscles `tname' and
18112 `toknum', which were handled by...
18113 (output_rule_data): this.
18114 Remove, and move the remainder of its outputs into...
18115 (prepare_rules): this new routines, which also merges content from
18116 (output_gram): this.
18117 (prepare_rules): Be sure never to walk through RITEMS.
18118 (output_stos): Rename as...
18119 (prepare_stos): this.
18120 (output): Always invoke prepare_states, after all, just don't use it
18121 in the output if you don't need it.
18122
181232002-04-07 Akim Demaille <akim@epita.fr>
18124
18125 * src/LR0.c (new_state): Display `nstates' as the name of the
18126 newly created state.
18127 Adjust to initialize first_state and last_state if needed.
18128 Be sure to distinguish the initial from the final state.
18129 (new_states): Create the itemset of the initial state, and use
18130 new_state.
18131 * src/closure.c (closure): Now that the initial state has its
18132 items properly set, there is no need for a special case when
18133 creating `ruleset'.
18134
18135 As a result, now the rule 0, reducing to $axiom, is visible in the
18136 outputs. Adjust the test suite.
18137
18138 * tests/conflicts.at (Solved SR Conflicts)
18139 (Unresolved SR Conflicts): Adjust.
18140 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18141 * tests/conflicts.at (S/R in initial): New.
18142
181432002-04-07 Akim Demaille <akim@epita.fr>
18144
18145 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18146 the RHS of the rules.
18147 * src/output.c (output_gram): Likewise.
18148
181492002-04-07 Akim Demaille <akim@epita.fr>
18150
18151 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18152 bucket.
18153 Adjust all dependencies.
18154 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18155 `number' of the buckets too.
18156 * src/gram.h: Include `symtab.h'.
18157 (associativity): Move to...
18158 * src/symtab.h: here.
18159 No longer include `gram.h'.
18160
181612002-04-07 Akim Demaille <akim@epita.fr>
18162
18163 * src/gram.h, src/gram.c (rules_rhs_length): New.
18164 (ritem_longest_rhs): Use it.
18165 * src/gram.h (rule_t): `number' is a new member.
18166 * src/reader.c (packgram): Set it.
18167 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18168 the end of `rules', and count them out of `nrules'.
18169 (reduce_output, dump_grammar): Adjust.
18170 * src/print.c (print_grammar): It is no longer needed to check for
18171 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18172 * tests/reduce.at (Reduced Automaton): New test.
18173
181742002-04-07 Akim Demaille <akim@epita.fr>
18175
18176 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18177 lacking `+ 1' to nrules, Bison reported as useless a token if it
18178 was used solely to set the precedence of the last rule...
18179
181802002-04-07 Akim Demaille <akim@epita.fr>
18181
18182 * data/bison.c++, data/bison.simple: Don't output the current file
18183 name in #line, to avoid useless diffs between two identical
18184 outputs under different names.
18185
181862002-04-07 Akim Demaille <akim@epita.fr>
18187
18188 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18189 Normalize loops to using `< nrules + 1', not `<= nrules'.
18190
181912002-04-07 Akim Demaille <akim@epita.fr>
18192
18193 * TODO: Update.
18194
181952002-04-07 Akim Demaille <akim@epita.fr>
18196
18197 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18198 bucket.value as bucket.number.
18199
182002002-04-07 Akim Demaille <akim@epita.fr>
18201
18202 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18203 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18204 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18205 RHS, instead of being an index in RITEMS.
18206
182072002-04-04 Paul Eggert <eggert@twinsun.com>
18208
18209 * doc/bison.texinfo: Update copyright date.
18210 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18211 (Symbols): Warn about running Bison in one character set,
18212 but compiling and/or running in an incompatible one.
18213 Warn about character code 256, too.
18214
182152002-04-03 Paul Eggert <eggert@twinsun.com>
18216
18217 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18218 YYERROR_VERBOSE is nonzero, not whether it is defined.
18219
18220 Merge changes from bison-1_29-branch.
18221
182222002-03-20 Paul Eggert <eggert@twinsun.com>
18223
18224 Merge fixes from Debian bison_1.34-1.diff.
18225
18226 * configure.in (AC_PREREQ): 2.53.
18227
182282002-03-20 Akim Demaille <akim@epita.fr>
18229
18230 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18231
182322002-03-19 Paul Eggert <eggert@twinsun.com>
18233
18234 * src/bison.simple (YYCOPY): New macro.
18235 (YYSTACK_RELOCATE): Use it.
18236 Remove Type arg; no longer needed. All callers changed.
18237 (yymemcpy): Remove; no longer needed.
18238
18239 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18240 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18241
182422002-03-19 Akim Demaille <akim@epita.fr>
18243
18244 Test and fix the #line outputs.
18245
18246 * tests/atlocal.at (GCC): New.
18247 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18248 (Prologue synch line, %union synch line, Postprologue synch line)
18249 (Action synch line, Epilogue synch line): New tests.
18250 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18251 * data/bison.simple, data/bison.c++: Use it.
18252
182532002-03-19 Akim Demaille <akim@epita.fr>
18254
18255 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18256 (Solved SR Conflicts, %expect not enough, %expect right)
18257 (%expect too much): Move to...
18258 * tests/conflicts.at: this new file.
18259
182602002-03-19 Akim Demaille <akim@epita.fr>
18261
18262 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18263 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18264 that we can move to enums for instance.
18265 * src/output.c (token_definitions_output): Output a list of
18266 `token-name, token-number' instead of the #define.
18267 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18268
182692002-03-14 Akim Demaille <akim@epita.fr>
18270
18271 Use Gettext 0.11.1.
18272
182732002-03-09 Robert Anisko <robert@lrde.epita.fr>
18274
18275 * data/bison.c++: Make the user able to add members to the generated
18276 parser by subclassing.
18277
182782002-03-05 Robert Anisko <robert@lrde.epita.fr>
18279
18280 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18281 a character.
18282 Reported by Nicolas Tisserand and Nicolas Burrus.
18283
182842002-03-04 Robert Anisko <robert@lrde.epita.fr>
18285
18286 * src/reader.c: Warn about lacking semi-colons, do not complain.
18287
182882002-03-04 Robert Anisko <robert@lrde.epita.fr>
18289
18290 * data/bison.c++: Remove a debug line.
18291
182922002-03-04 Robert Anisko <robert@lrde.epita.fr>
18293
18294 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18295 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18296 provide a default implementation.
18297
182982002-03-04 Akim Demaille <akim@epita.fr>
18299
18300 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18301 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18302 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18303 * tests/semantic.at (Parsing Guards): Similarly.
18304 * src/reader.at (readgram): Complain if the last rule is not ended
18305 with a semi-colon.
18306
183072002-03-04 Akim Demaille <akim@epita.fr>
18308
18309 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18310 * src/closure.c: here.
18311 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18312 RTC.
18313 * src/warshall.h, src/warshall.c: Remove.
18314 * tests/sets.at (Broken Closure): Adjust.
18315
183162002-03-04 Akim Demaille <akim@epita.fr>
18317
18318 * src/output.c (output_skeleton): tempdir is const.
18319 bytes_read is unused.
18320
183212002-03-04 Akim Demaille <akim@epita.fr>
18322
18323 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18324 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18325 Update.
18326 From Michael Hayes.
18327
183282002-03-04 Akim Demaille <akim@epita.fr>
18329
18330 * src/closure.c (closure): `r' is unused.
18331
183322002-03-04 Akim Demaille <akim@epita.fr>
18333
18334 * tests/sets.at (Broken Closure): Add the ending `;'.
18335 * src/reader.at (readgram): Complain if a rule is not ended with a
18336 semi-colon.
18337
183382002-03-04 Akim Demaille <akim@epita.fr>
18339
18340 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18341 (count_sr_conflicts): Use bitset_count.
18342 * src/reduce.c (inaccessable_symbols): Ditto.
18343 (bits_size): Remove.
18344 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18345
183462002-03-04 Akim Demaille <akim@epita.fr>
18347
18348 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18349 * src/reduce.c: Remove the `bitset_zero's following the
18350 `bitset_create's, as now it is performed by the latter.
18351
183522002-03-04 Akim Demaille <akim@epita.fr>
18353
18354 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18355 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18356 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18357 latest sources from Michael.
18358
183592002-03-04 Akim Demaille <akim@epita.fr>
18360
18361 * src/output.c (output): Don't free the grammar.
18362 * src/reader.c (grammar_free): New.
18363 * src/main.c (main): Call it and don't free symtab here.
18364
183652002-03-04 Akim Demaille <akim@epita.fr>
18366
18367 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18368 before returning.
18369 Reported by Benoit Perrot.
18370
183712002-03-04 Akim Demaille <akim@epita.fr>
18372
18373 Use bitset operations when possible, not loops over bits.
18374
18375 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18376 bitset_or.
18377 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18378 * src/reduce.c (useless_nonterminals): Formatting changes.
18379 * src/warshall.c (TC): Use bitset_or.
18380
183812002-03-04 Akim Demaille <akim@epita.fr>
18382
18383 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18384 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18385 Ditto.
18386
183872002-03-04 Akim Demaille <akim@epita.fr>
18388
18389 * src/lalr.c (F): Now a bitset*.
18390 Adjust all dependencies.
18391
183922002-03-04 Akim Demaille <akim@epita.fr>
18393
18394 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18395 Adjust all dependencies.
18396
183972002-03-04 Akim Demaille <akim@epita.fr>
18398
18399 * src/L0.c, src/LR0.h (nstates): Be size_t.
18400 Adjust comparisons (signed vs unsigned).
18401 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18402 bitset*.
18403 Adjust all dependencies.
18404
184052002-03-04 Akim Demaille <akim@epita.fr>
18406
18407 * src/closure.c (firsts): Now, also a bitset.
18408 Adjust all dependencies.
18409 (varsetsize): Remove, now unused.
18410 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18411
184122002-03-04 Akim Demaille <akim@epita.fr>
18413
18414 * src/print.c: Convert to use bitset.h, not hand coded iterations
18415 over ints.
18416
184172002-03-04 Akim Demaille <akim@epita.fr>
18418
18419 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18420
184212002-03-04 Akim Demaille <akim@epita.fr>
18422
18423 * src/closure.c (ruleset): Be a bitset.
18424 (rulesetsize): Remove.
18425
184262002-03-04 Akim Demaille <akim@epita.fr>
18427
18428 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18429 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18430 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18431 * src/closure.c (fderives): Be an array of bitsets.
18432
184332002-02-28 Robert Anisko <robert@lrde.epita.fr>
18434
18435 * data/bison.c++: Merge the two generated headers. Insert a copyright
18436 notice in each output file.
18437
184382002-02-28 Akim Demaille <akim@epita.fr>
18439
18440 * data/bison.c++: Copy the prologue of bison.simple to fetch
18441 useful M4 definitions, such as b4_header_guard.
18442
184432002-02-25 Akim Demaille <akim@epita.fr>
18444
18445 * src/getargs.c (version): Give the name of the authors, and use a
18446 translator friendly scheme for the bgr
18447 copyright notice.
18448
184492002-02-25 Akim Demaille <akim@epita.fr>
18450
18451 * src/output.c (header_output): Remove, now handled completely via
18452 M4.
18453
184542002-02-25 Akim Demaille <akim@epita.fr>
18455
18456 * m4/m4.m4: New, from CVS Autoconf.
18457 * configure.in: Invoke it.
18458 * src/output.c (output_skeleton): Use its result instead of the
18459 hard coded name.
18460
184612002-02-25 Akim Demaille <akim@epita.fr>
18462
18463 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18464 Fileutils 4.1.5.
18465 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18466 * src/output.c (output_skeleton): Use mkstemp to create a real
18467 temporary file.
18468 Move the filling of `skeleton' and its muscle to...
18469 (prepare): here.
18470 (output): Move the definition of the prologue muscle to...
18471 (prepare): here.
18472 * src/system.h (DEFAULT_TMPDIR): New.
18473
184742002-02-14 Paul Eggert <eggert@twinsun.com>
18475
18476 Remove the support for C++ namespace cleanliness; it was
18477 causing more problems than it was curing, since it didn't work
18478 properly on some nonstandard C++ compilers. This can wait
18479 for a proper C++ parser.
18480
18481 * NEWS: Document this.
18482 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18483 of C++, as it's treated like C now.
18484 * src/bison.simple (YYSTD): Remove.
18485 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18486 Treat C++ just like Standard C instead of trying to support
18487 namespace cleanliness.
18488
184892002-02-14 Akim Demaille <akim@epita.fr>
18490
18491 * tests/regression.at (else): Adjust to Andreas' change.
18492
184932002-02-14 Akim Demaille <akim@epita.fr>
18494
18495 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18496
184972002-02-13 Andreas Schwab <schwab@suse.de>
18498
18499 * src/output.c (output_rule_data): Don't output NULL, it might
18500 not be defined yet.
18501
185022002-02-11 Robert Anisko <robert@lrde.epita.fr>
18503
18504 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18505 (Copyright notice): Update.
18506
185072002-02-11 Akim Demaille <akim@epita.fr>
18508
18509 * tests/regression.at (%nonassoc and eof): Don't include
18510 nonportable headers.
18511
185122002-02-08 Robert Anisko <robert@lrde.epita.fr>
18513
18514 * data/bison.c++: Correct error recovery. Make the user able to
18515 initialize the starting location.
18516
185172002-02-07 Akim Demaille <akim@epita.fr>
18518
18519 * tests/input.at: New.
18520
185212002-02-07 Robert Anisko <robert@lrde.epita.fr>
18522
18523 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18524 more consistent when naming methods and variables. Put preprocessor
18525 directives around tables only needed for debugging.
18526
185272002-02-07 Robert Anisko <robert@lrde.epita.fr>
18528
18529 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18530 C++ parsers.
18531 (yy::b4_name::parse): Use print_.
18532
185332002-02-07 Robert Anisko <robert@lrde.epita.fr>
18534
18535 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18536
185372002-02-07 Robert Anisko <robert@lrde.epita.fr>
18538
18539 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18540 C++ parsers.
18541 (yy::b4_name::parse): Build verbose error messages, and use error_.
18542
185432002-02-06 Robert Anisko <robert@lrde.epita.fr>
18544
18545 * data/bison.c++: Fix m4 quoting in comments.
18546
185472002-02-06 Robert Anisko <robert@lrde.epita.fr>
18548
18549 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18550 not expanded by m4.
18551
185522002-02-05 Akim Demaille <akim@epita.fr>
18553
18554 * data/bison.c++: Adjust to the M4 back end.
18555 More is certainly needed.
18556
185572002-02-05 Akim Demaille <akim@epita.fr>
18558
18559 Give a try to M4 as a back end.
18560
18561 * lib/readpipe.c: New, from wdiff.
18562 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18563 BISON_HAIRY.
18564 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18565 specific values. Now it is m4 that performs the lookup.
18566 * src/parse-skel.y: Remove.
18567 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18568 * src/output.c (actions_output, guards_output)
18569 (token_definitions_output): No longer keeps track of the output
18570 line number, hence remove the second argument.
18571 (guards_output): Check against the guard member of a rule, not the
18572 action member.
18573 Adjust callers.
18574 (output_skeleton): Don't look for the skeleton location, let m4 do
18575 that.
18576 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18577 file will be used.
18578 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18579 (prepare): Given that for the time being changesyntax is not
18580 usable in M4, rename the muscles using `-' to `_'.
18581 Define `defines_flag', `output_parser_name' and `output_header_name'.
18582 * src/output.h (actions_output, guards_output)
18583 (token_definitions_output): Adjust prototypes.
18584 * src/scan-skel.l: Instead of scanning the skeletons, it now
18585 processes the output of m4: `__oline__' and `#output'.
18586 * data/bison.simple: Adjust to be used by M4(sugar).
18587 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18588 to date.
18589 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18590 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18591 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18592 shamelessly stolen from CVS Autoconf.
18593
185942002-02-05 Akim Demaille <akim@epita.fr>
18595
18596 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18597 * configure.in: Check for the declarations of free and malloc.
18598 * src/muscle_tab.c: Adjust.
18599
186002002-02-05 Akim Demaille <akim@epita.fr>
18601
18602 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18603 which have no values.
18604
186052002-02-05 Akim Demaille <akim@epita.fr>
18606
18607 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18608 * data/: here.
18609
186102002-01-29 Paul Eggert <eggert@twinsun.com>
18611
18612 * src/bison.simple (YYSIZE_T): Do not define merely because
18613 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18614 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18615
186162002-01-27 Akim Demaille <akim@epita.fr>
18617
18618 Fix `%nonassoc and eof'.
18619
18620 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18621 which were not properly copied! Replace
18622 memcpy (res->errs, src->errs, src->nerrs);
18623 with
18624 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18625 !!!
18626 * tests/regression.at (%nonassoc and eof): Adjust to newest
18627 Autotest: `.' is not in the PATH.
18628
186292002-01-27 Akim Demaille <akim@epita.fr>
18630
18631 * tests/sets.at (AT_EXTRACT_SETS): New.
18632 (Nullable): Use it.
18633 (Firsts): New.
18634
186352002-01-26 Akim Demaille <akim@epita.fr>
18636
18637 * tests/actions.at, tests/calc.at, tests/headers.at,
18638 * tests/torture.at: Adjust to the newest Autotest which no longer
18639 forces `.' in the PATH.
18640
186412002-01-25 Akim Demaille <akim@epita.fr>
18642
18643 * tests/regression.at (%nonassoc and eof): New.
18644 Suggested by Robert Anisko.
18645
186462002-01-24 Akim Demaille <akim@epita.fr>
18647
18648 Bison dumps core when trying to complain about broken input files.
18649 Reported by Cris van Pelt.
18650
18651 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18652 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18653 into...
18654 (Invalid inputs): Strengthen: exercise parse_percent_token.
18655
186562002-01-24 Robert Anisko <robert.anisko@epita.fr>
18657
18658 * src/Makefile.am: Add bison.c++.
18659 * src/bison.c++: New skeleton.
18660
186612002-01-21 Paolo Bonzini <bonzini@gnu.org>
18662
18663 * po/it.po: New.
18664
186652002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18666
18667 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18668
186692002-01-20 Marc Autret <marc@gnu.org>
18670
18671 * src/files.c (compute_output_file_names): Fix
18672
186732002-01-20 Marc Autret <marc@gnu.org>
18674
18675 * tests/output.at: New test.
18676 * src/files.c (compute_base_names): Don't map extensions when
18677 the YACC flag is set, use defaults.
18678 Reported by Evgeny Stambulchik.
18679
186802002-01-20 Marc Autret <marc@gnu.org>
18681
18682 * src/system.h: Need to define __attribute__ away for non-GCC
18683 compilers as well (i.e., the vendor C compiler).
18684 Suggested by Albert Chin-A-Young.
18685
186862002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18687
18688 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18689 canonical definition.
18690 * src/system.h: Use the canonical definition for PARAMS (avoids
18691 a conflict with the macro from lib/hash.h).
18692
186932002-01-11 Akim Demaille <akim@epita.fr>
18694
18695 * configure.in: Use AC_FUNC_STRNLEN.
18696 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18697
186982002-01-09 Akim Demaille <akim@epita.fr>
18699
18700 * src/files.c, src/files.h (output_infix): New.
18701 (tab_extension): Remove.
18702 (compute_base_names): Compute the former, drop the latter.
18703 * src/output.c (prepare): Insert the muscles `output-infix', and
18704 `output-suffix'.
18705 * src/parse-skel.y (string, string.1): New.
18706 (section.header): Use it.
18707 (section.yacc): Remove.
18708 (prefix): Remove too.
18709 * src/scan-skel.l: Adjust.
18710 * src/bison.simple, src/bison.hairy: Adjust.
18711
187122002-01-09 Akim Demaille <akim@epita.fr>
18713
18714 * configure.in (WERROR_CFLAGS): Compute it.
18715 * src/Makefile.am (CFLAGS): Pass it.
18716 * tests/atlocal.in (CFLAGS): Idem.
18717 * src/files.c: Fix a few warnings.
18718 (get_extension_index): Remove, unused.
18719
187202002-01-08 Akim Demaille <akim@epita.fr>
18721
18722 * src/getargs.c (AS_FILE_NAME): New.
18723 (getargs): Use it to convert DOSish file names.
18724 * src/files.c (base_name): Rename as full_base_name to avoid
18725 clashes with `base_name ()'.
18726 (filename_split): New.
18727 (compute_base_names): N-th rewrite, using filename_split.
18728
187292002-01-08 Akim Demaille <akim@epita.fr>
18730
18731 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18732 New, stolen from the Fileutils 4.1.
18733 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18734 * configure.in: Check for the presence of memrchr, and of its
18735 prototype.
18736
187372002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18738
18739 * lib/hash.h (__P): Added definition for this macro.
18740 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18741 BUILT_SOURCES, to ensure they are generated first.
18742 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18743 %error-verbose to allow bootstrapping with bison 1.30x.
18744
187452002-01-06 Akim Demaille <akim@epita.fr>
18746
18747 * src/reader.c (parse_braces): Don't fetch the next char, the
18748 convention is to fetch on entry.
18749 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18750 'switch' without a following semicolon.
18751 * tests/regression.at (braces parsing): New.
18752
187532002-01-06 Akim Demaille <akim@epita.fr>
18754
18755 Bison is dead wrong in its RR conflict reports.
18756
18757 * tests/torture.at (GNU Cim Grammar): New.
18758 * src/conflicts.c (count_rr_conflicts): Fix.
18759
187602002-01-06 Akim Demaille <akim@epita.fr>
18761
18762 Creating package.m4 from configure.ac causes too many problems.
18763
18764 * tests/Makefile.am (package.m4): Create it by hand,
18765 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18766
187672002-01-06 Akim Demaille <akim@epita.fr>
18768
18769 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18770 skeleton.h.
18771
187722002-01-04 Paul Eggert <eggert@twinsun.com>
18773
18774 * doc/bison.texinfo (Debugging):
18775 Remove YYSTDERR; it's no longer defined or used.
18776 Also, s/cstdio.h/cstdio/.
18777
187782002-01-03 Akim Demaille <akim@epita.fr>
18779
18780 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18781
187822002-01-03 Akim Demaille <akim@epita.fr>
18783
18784 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18785 tracing code to --trace, wait for a better --trace option, with
18786 args.
18787
187882002-01-03 Akim Demaille <akim@epita.fr>
18789
18790 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18791 The ISO C++ standard is extremely clear about it: stderr is
18792 considered a macro, not a regular symbol (see table 94 `Header
18793 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18794 Therefore std:: does not apply to it. It still does with fprintf.
18795 Also, s/cstdio.h/cstdio/.
18796
187972002-01-03 Akim Demaille <akim@epita.fr>
18798
18799 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18800 for non system headers.
18801
188022002-01-02 Akim Demaille <akim@epita.fr>
18803
18804 Equip the skeleton chain with location tracking, runtime trace,
18805 pure parser and scanner.
18806
18807 * src/parse-skel.y: Request a pure parser, locations, and prefix
18808 renaming.
18809 (%union): Having several members with the same type does not help
18810 type mismatches, simplify.
18811 (YYPRINT, yyprint): New.
18812 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18813 (skel_error): this.
18814 Handle locations.
18815 * src/scan-skel.l: Adjust to these changes.
18816 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18817 (LOCATION_PRINT, skel_control_t): New.
18818
188192001-12-30 Akim Demaille <akim@epita.fr>
18820
18821 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18822 replace `gb' with BLANKS.
18823 * src/scan-skel.l: Adjust.
18824
188252001-12-30 Akim Demaille <akim@epita.fr>
18826
18827 * src/system.h: We don't need nor want bcopy.
18828 Throw away MS-DOS crap: we don't need getpid.
18829 * configure.in: We don't need strndup. It was even causing
18830 problems: because Flex includes the headers *before* us,
18831 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18832 not visible.
18833 * lib/xstrndup.c: New.
18834 * src/scan-skel.l: Use it.
18835 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18836 * src/parse-skel.y: Use %directives instead of #defines.
18837
188382001-12-30 Akim Demaille <akim@epita.fr>
18839
18840 * src/skeleton.h: New.
18841 * src/output.c (output_parser, output_master_parser): Remove, dead
18842 code.
18843 * src/output.h (get_lines_number, actions_output, guards_output)
18844 (token_definitions_output): Prototype them.
18845 * src/parse-skel.y: Add the license notice.
18846 Include output.h and skeleton.h.
18847 (process_skeleton): Returns void, and takes a single parameter.
18848 * src/scan-skel.l: Add the license notice.
18849 Include skeleton.h.
18850 Don't use %option yylineno: it seems that then Flex imagines
18851 REJECT has been used, and therefore it won't reallocate its
18852 buffers (which makes no other sense to me than a bug). It results
18853 in warnings for `unused: yy_flex_realloc'.
18854
188552001-12-30 Robert Anisko <robert.anisko@epita.fr>
18856
18857 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18858 (MUSCLE_INSERT_PREFIX): ...to there.
18859 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18860 (MUSCLE_INSERT_PREFIX): Move from here...
18861
18862 * src/bison.hairy: Add a section directive. Put braces around muscle
18863 names. This parser skeleton is still broken, but Bison should not
18864 choke on a bad muscle 'syntax'.
18865 * src/bison.simple: Add a section directive. Put braces around muscle
18866 names.
18867
18868 * src/files.h (strsuffix, stringappend): Add declarations.
18869 (tab_extension): Add declaration.
18870 (short_base_name): Add declaration.
18871
18872 * src/files.c (strsuffix, stringappend): No longer static. These
18873 functions are used in the skeleton parser.
18874 (tab_extension): New.
18875 (compute_base_names): Use the computations done in this function
18876 to guess if the generated parsers should have '.tab' in their
18877 names.
18878 (short_base_name): No longer static.
18879
18880 * src/output.c (output_skeleton): New.
18881 (output): Disable call to output_master_parser, and give a try to
18882 a new skeleton handling system.
18883 (guards_output, actions_output): No longer static.
18884 (token_definitions_output, get_lines_number): No longer static.
18885
18886 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18887
18888 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18889 parse-skel.y.
18890
18891 * src/parse-skel.y: New file.
18892 * src/scan-skel.l: New file.
18893
188942001-12-29 Akim Demaille <akim@epita.fr>
18895
18896 %name-prefix is broken.
18897
18898 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18899 Adjust all dependencies.
18900 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18901 %name-prefix.
18902
18903 Renaming yylval but not yylloc is not consistent. Now we do.
18904
18905 * src/bison.simple: Prefix yylloc if used.
18906 * doc/bison.texinfo (Decl Summary): Document that.
18907
189082001-12-29 Akim Demaille <akim@epita.fr>
18909
18910 * doc/bison.texinfo: Promote `%long-directive' over
18911 `%long_directive'.
18912 Remove all references to fixed-output-files, yacc is enough.
18913
189142001-12-29 Akim Demaille <akim@epita.fr>
18915
18916 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18917 user prologue. These are defaults.
18918 * tests/actions.at (Mid-rule actions): Make sure the user can
18919 define YYDEBUG and YYERROR_VERBOSE.
18920
189212001-12-29 Akim Demaille <akim@epita.fr>
18922
18923 * src/output.c (header_output): Don't forget to export YYLTYPE and
18924 yylloc.
18925 * tests/headers.at (export YYLTYPE): New, make sure it does.
18926 * tests/regression.at (%union and --defines, Invalid CPP headers):
18927 Move to...
18928 * tests/headers.at: here.
18929
189302001-12-29 Akim Demaille <akim@epita.fr>
18931
18932 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18933
189342001-12-29 Akim Demaille <akim@epita.fr>
18935
18936 * tests/actions.at (Mid-rule actions): Output on a single line
18937 instead of several.
18938
189392001-12-29 Akim Demaille <akim@epita.fr>
18940
18941 * doc/bison.texinfo: Formatting changes.
18942
189432001-12-29 Akim Demaille <akim@epita.fr>
18944
18945 Don't store the token defs in a muscle, just be ready to output it
18946 on command. Now possible via `symbols'. Fixes a memory leak.
18947
18948 * src/output.c (token_definitions_output): New.
18949 (output_parser, header_output): Use it.
18950 * src/reader.c (symbols_save): Remove.
18951
189522001-12-29 Akim Demaille <akim@epita.fr>
18953
18954 * src/bison.simple: Do not provide a default for YYSTYPE and
18955 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18956 default.
18957
189582001-12-29 Akim Demaille <akim@epita.fr>
18959
18960 Mid-rule actions are simply... ignored!
18961
18962 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18963 the empty-rule associated to the dummy symbol, not to the host
18964 rule.
18965 * tests/actions.at (Mid-rule actions): New.
18966
189672001-12-29 Akim Demaille <akim@epita.fr>
18968
18969 Memory leak.
18970
18971 * src/reader.c (reader): Free grammar.
18972
189732001-12-29 Akim Demaille <akim@epita.fr>
18974
18975 Memory leak.
18976
18977 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18978 since it allocates it for each state, although only one is needed.
18979 (allocate_storage): Do it here.
18980
189812001-12-29 Akim Demaille <akim@epita.fr>
18982
18983 * src/options.h, src/options.c (create_long_option_table): Rename
18984 as...
18985 (long_option_table_new): this, with a clearer prototype.
18986 (percent_table): Remove, unused,
18987 * src/getargs.c (getargs): Adjust.
18988
189892001-12-29 Akim Demaille <akim@epita.fr>
18990
18991 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18992 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18993 as states.
18994
189952001-12-29 Akim Demaille <akim@epita.fr>
18996
18997 * src/lalr.c (build_relations): Rename `states' as `states1'.
18998 Sorry, I don't understand exactly what it is, no better name...
18999
190002001-12-29 Akim Demaille <akim@epita.fr>
19001
19002 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19003 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19004 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19005 as rules.
19006
190072001-12-29 Akim Demaille <akim@epita.fr>
19008
19009 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19010 ago.
19011
190122001-12-29 Akim Demaille <akim@epita.fr>
19013
19014 * src/reader.c, src/reader.h (user_toknums): Remove.
19015 Adjust all users to use symbols[i]->user_token_number.
19016
190172001-12-29 Akim Demaille <akim@epita.fr>
19018
19019 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19020 Adjust all users to use symbols[i]->prec or ->assoc.
19021
190222001-12-29 Akim Demaille <akim@epita.fr>
19023
19024 * src/reader.c, src/reader.h (tags): Remove.
19025 Adjust all users to use symbols[i]->tag.
19026
190272001-12-29 Akim Demaille <akim@epita.fr>
19028
19029 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19030 and rule_table.
19031 * src/reader.c (packsymbols): Fill this table.
19032 Drop sprec.
19033 * src/conflicts.c (resolve_sr_conflict): Adjust.
19034 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19035 single table.
19036 Use symbols[i]->tag instead of tags[i].
19037
190382001-12-29 Akim Demaille <akim@epita.fr>
19039
19040 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19041 In addition, put a comment in there, to replace...
19042 * tests/regression.at (%union and C comments): Remove.
19043
190442001-12-29 Akim Demaille <akim@epita.fr>
19045
19046 * tests/regression.at (Web2c Actions): Blindly move the actual
19047 output as expected output. The contents *seem* right to me, but I
19048 can't pretend reading perfectly parser tables... Nonetheless, all
19049 the other tests pass correctly, the table look OK, even though the
19050 presence of `$axiom' is to be noted: AFAICS it is useless (but
19051 harmless).
19052
190532001-12-29 Akim Demaille <akim@epita.fr>
19054
19055 * src/reader.c (readgram): Don't add the rule 0 if there were no
19056 rules read. In other words, add it _after_ having performed
19057 grammar sanity checks.
19058 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19059
190602001-12-29 Akim Demaille <akim@epita.fr>
19061
19062 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19063 visible, and some states have now a different number.
19064
190652001-12-29 Akim Demaille <akim@epita.fr>
19066
19067 * src/reader.c (readgram): Bind the initial rule's lineno to that
19068 of the first rule.
19069 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19070 (Solved SR Conflicts): Adjust rule 0's line number.
19071
190722001-12-29 Akim Demaille <akim@epita.fr>
19073
19074 Fix the `GAWK Grammar' failure.
19075
19076 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19077 the reductions of the first state which was mistakenly confused
19078 with the final state because precisely final_state was initialized
19079 to 0.
19080 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19081 now noticed by Bison.
19082 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19083 have a reduction on $default.
19084
190852001-12-29 Akim Demaille <akim@epita.fr>
19086
19087 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19088 rule line numbers.
19089 * src/closure.c (print_closure): Likewise.
19090 * src/derives.c (print_derives): Likewise.
19091 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19092 now.
19093
190942001-12-29 Akim Demaille <akim@epita.fr>
19095
19096 * src/lalr.c (lookaheads_print): New.
19097 (lalr): Call it when --trace-flag.
19098 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19099 are dumped.
19100
191012001-12-29 Akim Demaille <akim@epita.fr>
19102
19103 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19104 when walking through ritem, even via rule->rhs.
19105 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19106 (useful_production, useless_nonterminals): Likewise.
19107 (reduce_grammar_tables): Likewise, plus update nritems.
19108 * src/nullable.c (set_nullable): Likewise.
19109 * src/lalr.c (build_relations): Likewise.
19110 * tests/sets.at (Nullable): Adjust.
19111 Fortunately, now, the $axiom is no longer nullable.
19112
191132001-12-29 Akim Demaille <akim@epita.fr>
19114
19115 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19116 the 0-sentinel.
19117 * src/gram.c (ritem_longest_rhs): Likewise.
19118 * src/reduce.c (nonterminals_reduce): Likewise.
19119 * src/print_graph.c (print_graph): Likewise.
19120 * src/output.c (output_rule_data): Likewise.
19121 * src/nullable.c (set_nullable): Likewise.
19122
191232001-12-29 Akim Demaille <akim@epita.fr>
19124
19125 * src/output.c: Comment changes.
19126
191272001-12-27 Paul Eggert <eggert@twinsun.com>
19128
19129 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19130 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19131 Sparc, as they were causing more porting problems than the
19132 (minor) performance improvement was worth.
19133
19134 Also, catch up with 1.31's YYSTD.
19135
191362001-12-27 Akim Demaille <akim@epita.fr>
19137
19138 * src/output.c (output_gram): Rely on nritems, not the
19139 0-sentinel. See below.
19140 Use -1 as separator, not 0.
19141 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19142 Rely on -1 as separator in yyrhs, instead of 0.
19143 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19144 twice `Now at end of input', therefore there are two lines less to
19145 expect.
19146
191472001-12-27 Akim Demaille <akim@epita.fr>
19148
19149 * tests/regression.at (Unresolved SR Conflicts):
19150 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19151 below.
19152
191532001-12-27 Akim Demaille <akim@epita.fr>
19154
19155 * src/LR0.c (new_state): Recognize the final state by the fact it
19156 is reached by eoftoken.
19157 (insert_start_shifting_state, insert_eof_shifting_state)
19158 (insert_accepting_state, augment_automaton): Remove, since now
19159 these states are automatically computed from the initial state.
19160 (generate_states): Adjust.
19161 * src/print.c: When reporting a rule number to the user, substract
19162 1, so that the axiom rule is rule 0, and the first user rule is 1.
19163 * src/reduce.c: Likewise.
19164 * src/print_graph.c (print_core): For the time being, just as for
19165 the report, depend upon --trace-flags to dump the full set of
19166 items.
19167 * src/reader.c (readgram): Once the grammar read, insert the rule
19168 0: `$axiom: START-SYMBOL $'.
19169 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19170 number of the states has changed (the final state is no longer
19171 necessarily the last), catch up.
19172
191732001-12-27 Akim Demaille <akim@epita.fr>
19174
19175 Try to make the use of the eoftoken valid. Given that its value
19176 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19177 is used instead of > 0 where appropriate, (ii), depend upon nritems
19178 instead of the 0-sentinel.
19179
19180 * src/gram.h, src/gram.c (nritems): New.
19181 Expected to be duplication of nitems, but for the time being...
19182 * src/reader.c (packgram): Assert nritems and nitems are equal.
19183 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19184 * src/closure.c (print_closure, print_fderives): Likewise.
19185 * src/gram.c (ritem_print): Likewise.
19186 * src/print.c (print_core, print_grammar): Likewise.
19187 * src/print_graph.c: Likewise.
19188
191892001-12-27 Akim Demaille <akim@epita.fr>
19190
19191 * src/main.c (main): If there are complains after grammar
19192 reductions, then output the report anyway if requested, then die.
19193 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19194 * src/reader.c (eoftoken): New.
19195 (parse_token_decl): If the token being defined has value `0', it
19196 is the eoftoken.
19197 (packsymbols): No longer hack `tags' to insert `$' by hand.
19198 Be sure to preserve the value of the eoftoken.
19199 (reader): Make sure eoftoken is defined.
19200 Initialize nsyms to 0: now eoftoken is created just like the others.
19201 * src/print.c (print_grammar): Don't special case the eof token.
19202 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19203 lie anyway, albeit pleasant.
19204 * tests/calc.at: Exercise error messages with eoftoken.
19205 Change the grammar so that empty input is invalid.
19206 Adjust expectations.
19207 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19208
192092001-12-27 Akim Demaille <akim@epita.fr>
19210
19211 * configure.in: Check the protos of strchr ans strspn.
19212 Replace strchr if needed.
19213 * src/system.h: Provide the protos of strchr, strspn and memchr if
19214 missing.
19215 * lib/strchr.c: New.
19216 * src/reader.c (symbols_save): Use strchr.
19217
192182001-12-27 Akim Demaille <akim@epita.fr>
19219
19220 * src/print.c, src/print_graph.c (escape): New.
19221 Use it to quote the TAGS outputs.
19222 * src/print_graph.c (print_state): Now errors are in red, and
19223 reductions in green.
19224 Prefer high to wide: output the state number on a line of its own.
19225
192262001-12-27 Akim Demaille <akim@epita.fr>
19227
19228 * src/state.h, src/state.c (reductions_new): New.
19229 * src/LR0.c (set_state_table): Let all the states have a
19230 `reductions', even if reduced to 0.
19231 (save_reductions): Adjust.
19232 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19233 * src/print.c (print_reductions, print_actions): Adjust.
19234 * src/output.c (action_row): Adjust.
19235
192362001-12-27 Akim Demaille <akim@epita.fr>
19237
19238 * src/state.h, src/state.c (errs_new, errs_dup): New.
19239 * src/LR0.c (set_state_table): Let all the states have an errs,
19240 even if reduced to 0.
19241 * src/print.c (print_errs, print_reductions): Adjust.
19242 * src/output.c (output_actions, action_row): Adjust.
19243 * src/conflicts.c (resolve_sr_conflict): Adjust.
19244
192452001-12-27 Akim Demaille <akim@epita.fr>
19246
19247 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19248
192492001-12-27 Akim Demaille <akim@epita.fr>
19250
19251 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19252 * src/print.c: here.
19253 (lookaheadset, shiftset): New, used as additional storage by
19254 print_reductions.
19255 (print_results): Adjust.
19256 (print_shifts, print_gotos, print_errs): New, extracted from...
19257 (print_actions): here.
19258 * src/print_graph.c (print_actions): Remove dead code.
19259
192602001-12-27 Akim Demaille <akim@epita.fr>
19261
19262 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19263 `$n' and `@n'.
19264
192652001-12-27 Akim Demaille <akim@epita.fr>
19266
19267 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19268 (build_relations): Adjust.
19269
192702001-12-27 Akim Demaille <akim@epita.fr>
19271
19272 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19273 duplication.
19274
192752001-12-27 Akim Demaille <akim@epita.fr>
19276
19277 * src/reader.c (packgram): Catch nitems overflows.
19278
192792001-12-27 Akim Demaille <akim@epita.fr>
19280
19281 * src/files.c, src/files.h (guard_obstack): Remove.
19282 * src/output.c (output): Adjust.
19283 * src/reader.c (parse_braces): New, factoring...
19284 (copy_action, copy_guard): these two which are renamed as...
19285 (parse_action, parse_guard): these.
19286 As a voluntary consequence, using braces around guards is now
19287 mandatory.
19288
192892001-12-27 Akim Demaille <akim@epita.fr>
19290
19291 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19292 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19293 members.
19294 (symbol_list_new): Adjust.
19295 (copy_action): action_line is the first line, not the last.
19296 (copy_guard): Just as for actions, store the `action' only, not
19297 the switch/case/break flesh.
19298 Don't parse the user action that might follow the guard, let...
19299 (readgram): do it, i.e., now, there can be an action after a
19300 guard.
19301 In other words the guard is just explicitly optional.
19302 (packgram): Adjust.
19303 * src/output.c (guards_output): New.
19304 (output_parser): Call it when needed.
19305 (output): Also free the guard and attrs obstacks.
19306 * src/files.c, src/files.h (obstack_save): Remove.
19307 (output_files): Remove.
19308 As a result, if one needs the former `.act' file, using an
19309 appropriate skeleton which requires actions and guards is now
19310 required.
19311 * src/main.c (main): Adjust.
19312 * tests/semantic.at: New.
19313 * tests/regression.at: Use `input.y' as input file name.
19314 Avoid 8+3 problems by requiring input.c when the test needs the
19315 parser.
19316
193172001-12-27 Akim Demaille <akim@epita.fr>
19318
19319 * src/reader.c (symbol_list_new): Be sure to initialize all the
19320 fields.
19321
193222001-12-27 Akim Demaille <akim@epita.fr>
19323
19324 All the hacks using a final pseudo state are now useless.
19325
19326 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19327 * src/lalr.c (nLA): New.
19328 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19329 instead of lookaheadsp from the pseudo state (nstate + 1).
19330
193312001-12-27 Akim Demaille <akim@epita.fr>
19332
19333 * src/output.c (action_row, token_actions): Use a state_t instead
19334 of a integer, and nlookaheads instead of the following state's
19335 lookaheadsp.
19336
193372001-12-27 Akim Demaille <akim@epita.fr>
19338
19339 * src/conflicts.c (log_resolution, flush_shift)
19340 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19341 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19342 (conflicts_print, print_reductions): Use a state_t instead of an
19343 integer when referring to a state.
19344 As much as possible, depend upon nlookaheads, instead of the
19345 `lookaheadsp' member of the following state (since lookaheads of
19346 successive states are successive, the difference between state n + 1
19347 and n served as the number of lookaheads for state n).
19348 * src/lalr.c (add_lookback_edge): Likewise.
19349 * src/print.c (print_core, print_actions, print_state)
19350 (print_results): Likewise.
19351 * src/print_graph.c (print_core, print_actions, print_state)
19352 (print_graph): Likewise.
19353 * src/conflicts.h: Adjust.
19354
193552001-12-27 Akim Demaille <akim@epita.fr>
19356
19357 * src/bison.hairy: Formatting/comment changes.
19358 ANSIfy.
19359 Remove `register' indications.
19360 Add plenty of `static'.
19361
193622001-12-27 Akim Demaille <akim@epita.fr>
19363
19364 * src/output.c (prepare): Drop the muscle `ntbase' which
19365 duplicates ntokens.
19366 * src/bison.simple: Formatting/comment changes.
19367 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19368 is an undocumented synonym.
19369
193702001-12-22 Akim Demaille <akim@epita.fr>
19371
19372 * src/output.c (output_table_data): Change the prototype to use
19373 `int' for array ranges: some invocations do pass an int, not a
19374 short.
19375 Reported by Wayne Green.
19376
193772001-12-22 Akim Demaille <akim@epita.fr>
19378
19379 Some actions of web2c.y are improperly triggered.
19380 Reported by Mike Castle.
19381
19382 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19383 * tests/regression.at (Web2c): Rename as...
19384 (Web2c Report): this.
19385 (Web2c Actions): New.
19386
193872001-12-22 Akim Demaille <akim@epita.fr>
19388
19389 Reductions in web2c.y are improperly reported.
19390 Reported by Mike Castle.
19391
19392 * src/conflicts.c (print_reductions): Fix.
19393 * tests/regression.at (Web2c): New.
19394
193952001-12-18 Akim Demaille <akim@epita.fr>
19396
19397 Some host fail on `assert (!"foo")', which expands to
19398 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19399 Reported by Nelson Beebee.
19400
19401 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19402 `#define it_succeeded 0' and `assert (it_succeeded)'.
19403
194042001-12-17 Marc Autret <autret_m@epita.fr>
19405
19406 * src/bison.simple: Don't hard code the skeleton line and filename.
19407 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19408 New line counter 'skeleton_line' (skeleton-line muscle).
19409
194102001-12-17 Paul Eggert <eggert@twinsun.com>
19411
19412 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19413 YYDEBUG must be defined to a nonzero value.
19414
19415 * src/bison.simple (yytname): Do not assume that the user defines
19416 YYDEBUG to a properly parenthesized expression.
19417
194182001-12-17 Akim Demaille <akim@epita.fr>
19419
19420 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19421 nlookaheads is a new member.
19422 Adjust all users.
19423 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19424 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19425 state.
19426
194272001-12-17 Akim Demaille <akim@epita.fr>
19428
19429 * src/files.h, src/files.c (open_files, close_files): Remove.
19430 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19431 let...
19432 * src/reader.c (reader): Do it.
19433
194342001-12-17 Akim Demaille <akim@epita.fr>
19435
19436 * src/conflicts.c (print_reductions): Formatting changes.
19437
194382001-12-17 Akim Demaille <akim@epita.fr>
19439
19440 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19441 (flush_reduce): New.
19442 (resolve_sr_conflict): Adjust.
19443
194442001-12-17 Akim Demaille <akim@epita.fr>
19445
19446 * src/output.c (output_obstack): Be static and rename as...
19447 (format_obstack): this, to avoid any confusion with files.c's
19448 output_obstack.
19449 * src/reader.h (muscle_obstack): Move to...
19450 * src/output.h: here, since it's defined in output.c.
19451
194522001-12-17 Akim Demaille <akim@epita.fr>
19453
19454 * src/output.c (action_row, save_column, default_goto)
19455 (sort_actions, matching_state, pack_vector): Better variable
19456 locality.
19457
194582001-12-17 Akim Demaille <akim@epita.fr>
19459
19460 * src/output.c: Various formatting changes.
19461
194622001-12-17 Akim Demaille <akim@epita.fr>
19463
19464 * src/files.c (output_files): Free the output_obstack.
19465 * src/main.c (main): Call print and print_graph conditionally.
19466 * src/print.c (print): Work unconditionally.
19467 * src/print_graph.c (print_graph): Work unconditionally.
19468 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19469
194702001-12-16 Marc Autret <autret_m@epita.fr>
19471
19472 * src/output.c (actions_output): Fix. When we use %no-lines,
19473 there is one less line per action.
19474
194752001-12-16 Marc Autret <autret_m@epita.fr>
19476
19477 * src/bison.simple: Remove a useless #line directive.
19478 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19479 * src/output.c (get_lines_number): New.
19480 (output_parser): Adjust, now takes care about the lines of a
19481 output muscles.
19482 Fix line numbering.
19483 (actions_output): Computes the number of lines taken by actions.
19484 (output_master_parser): Insert new skeleton which is the name of
19485 the output parser file name.
19486
194872001-12-15 Marc Autret <autret_m@epita.fr>
19488
19489 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19490
194912001-12-15 Marc Autret <autret_m@epita.fr>
19492
19493 * src/output.c (output_gram): Keep track of the hairy one.
19494
194952001-12-15 Akim Demaille <akim@epita.fr>
19496
19497 Make `make distcheck' work.
19498
19499 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19500 system.h which uses libgettext.h.
19501
195022001-12-15 Akim Demaille <akim@epita.fr>
19503
19504 * src/nullable.c (set_nullable): Useless rules must be skipped,
19505 otherwise, since we range over their symbols, we might look at a
19506 nonterminal which no longer ``exists'', i.e., it is not counted in
19507 `nvars', hence we overflow our arrays.
19508
195092001-12-15 Akim Demaille <akim@epita.fr>
19510
19511 The header can also be produced directly, without any obstack!
19512 Yahoo!
19513
19514 * src/files.c, src/files.h (defines_obstack): Remove.
19515 (compute_header_macro): Global.
19516 (defines_obstack_save): Remove.
19517 * src/reader.c (parse_union_decl): No longer output to
19518 defines_obstack: its content can be found in the `stype' muscle
19519 anyway.
19520 (output_token_translations): Merge into...
19521 (symbols_output): this.
19522 Rename as...
19523 (symbols_save): this.
19524 (reader): Adjust.
19525 * src/output.c (header_output): New.
19526 (output): Call it.
19527
195282001-12-15 Akim Demaille <akim@epita.fr>
19529
19530 * src/reader.c (parse_union_decl): Instead of handling two obstack
19531 simultaneously, use one to define the `stype' muscle, and use the
19532 value of the latter to fill defines_obstack.
19533 (copy_comment): Remove.
19534 (copy_comment2): Work for a single obstack.
19535 Rename as...
19536 (copy_comment): this.
19537
195382001-12-15 Akim Demaille <akim@epita.fr>
19539
19540 * src/lex.c, src/lex.h (xgetc): No longer static.
19541 * src/reader.c (parse_union_decl): Revamp.
19542
195432001-12-15 Akim Demaille <akim@epita.fr>
19544
19545 Still making progress in separating Bison into (i) input, (ii)
19546 process, (iii) output: now we can directly output the parser file
19547 without using table_obstack at all.
19548
19549 * src/files.c, src/files.h (table_obstack): Bye bye.
19550 (parser_file_name): New.
19551 * src/files.c (compute_output_file_names): Compute it.
19552 * src/output.c (actions_output, output_parser)
19553 (output_master_parser): To a file instead of an obstack.
19554
195552001-12-15 Akim Demaille <akim@epita.fr>
19556
19557 Attach actions to rules, instead of pre-outputting them to
19558 actions_obstack.
19559
19560 * src/gram.h (rule_t): action and action_line are new members.
19561 * src/reader.c (symbol_list): Likewise.
19562 (copy_action): Save the actions within the rule.
19563 (packgram): Save them in rule_table.
19564 * src/output.c (actions_output): New.
19565 (output_parser): Use it on `%%actions'.
19566 (output_rule_data): Don't free rule_table.
19567 (output): Do it.
19568 (prepare): Don't save the `action' muscle.
19569 * src/bison.simple: s/%%action/%%actions/.
19570
195712001-12-15 Akim Demaille <akim@epita.fr>
19572
19573 * src/reader.c (copy_action): When --yacc, don't append a `;'
19574 to the user action: let it fail if lacking.
19575 Suggested by Arnold Robbins and Tom Tromey.
19576
195772001-12-14 Akim Demaille <akim@epita.fr>
19578
19579 * src/lex.c (literalchar): Simply return the char you decoded, non
19580 longer mess around with obstacks and int pointers.
19581 Adjust all callers.
19582
195832001-12-14 Akim Demaille <akim@epita.fr>
19584
19585 * src/lex.c (literalchar): Don't escape the special characters,
19586 just decode them, and keep them as char (before, eol was output as
19587 the 2 char string `\n' etc.).
19588 * src/output.c (output_rule_data): Use quotearg to output the
19589 token strings.
19590
195912001-12-13 Paul Eggert <eggert@twinsun.com>
19592
19593 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19594 Do not infringe on the global user namespace when using C++.
19595 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19596 All uses of `fprintf' and `stderr' changed.
19597
19598 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19599
196002001-12-13 Akim Demaille <akim@epita.fr>
19601
19602 The computation of nullable is broken: it doesn't handle empty
19603 RHS's properly.
19604
19605 * tests/torture.at (GNU AWK Grammar): New.
19606 * tests/sets.at (Nullable): New.
19607 * src/nullable.c (set_nullable): Instead of blindly looping over
19608 `ritems', loop over the rules, and then over their rhs's.
19609
19610 Work around Autotest bugs.
19611
19612 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19613 frame, because Autotest understand lines starting with a `+' as
19614 traces from the shell. Then, they are not processed properly.
19615 Admittedly an Autotest bug, but we don't have time to wait for
19616 Autotest to catch up.
19617 * tests/regression.at (Broken Closure): Adjust to the new table
19618 frames.
19619 Move to...
19620 * tests/sets.at: here.
19621
196222001-12-13 Akim Demaille <akim@epita.fr>
19623
19624 * src/closure.c (closure): Use nrules instead of playing tricks
19625 with BITS_PER_WORD.
19626
196272001-12-13 Akim Demaille <akim@epita.fr>
19628
19629 * src/print.c (print_actions): Output the handling of `$' as the
19630 traces do: shifting the token EOF. Before EOF was treated as a
19631 nonterminal.
19632 * tests/regression.at: Adjust some tests.
19633 * src/print_graph.c (print_core): Complete the set of items via
19634 closure. The next-to-final and final states are still unsatisfying,
19635 but that's to be addressed elsewhere.
19636 No longer output the rule numbers, but do output the state number.
19637 A single loop for the shifts + gotos is enough, but picked a
19638 distinct color for each.
19639 (print_graph): Initialize and finalize closure.
19640
196412001-12-13 Akim Demaille <akim@epita.fr>
19642
19643 * src/reader.c (readgram): Remove dead code, an strip useless
19644 braces.
19645 (get_type): Remove, unused.
19646
196472001-12-12 Akim Demaille <akim@epita.fr>
19648
19649 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19650 on that of lib/error.c.
19651
196522001-12-12 Akim Demaille <akim@epita.fr>
19653
19654 Some hosts don't like `/' in includes.
19655
19656 * src/system.h: Include libgettext.h without qualifying the path.
19657 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19658 $(top_srcdir).
19659
196602001-12-11 Marc Autret <autret_m@epita.fr>
19661
19662 * src/output.c (output_parser): Remove useless muscle.
19663
196642001-12-11 Marc Autret <autret_m@epita.fr>
19665
19666 * src/bison.simple: Remove #line just before %%epilogue. It
19667 is now handled in ...
19668 * src/reader.c (read_additionnal_code): Add the output of a
19669 #line for the epilogue.
19670
196712001-12-10 Marc Autret <autret_m@epita.fr>
19672
19673 * src/reader.c (copy_definition): Re-use CPP-outed code which
19674 replace precedent remove.
19675 * src/bison.simple: Remove #line before %%prologue because
19676 %%input-line is wrong at this time.
19677
196782001-12-10 Marc Autret <autret_m@epita.fr>
19679
19680 * src/reader.c (symbols_output): Clean up.
19681 * src/output.c (output_gram, output): Clean up.
19682
196832001-12-10 Akim Demaille <akim@epita.fr>
19684
19685 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19686 * src/LR0.c (set_state_table): here.
19687 * src/lalr.c (lalr): Call it.
19688
196892001-12-10 Akim Demaille <akim@epita.fr>
19690
19691 * src/state.h (shifts): Remove the `number' member: shifts are
19692 attached to state, hence no longer need to be labelled with a
19693 state number.
19694
196952001-12-10 Akim Demaille <akim@epita.fr>
19696
19697 Now that states have a complete set of members, the linked list of
19698 shifts is useless: just fill directly the state's shifts member.
19699
19700 * src/state.h (shifts): Remove the `next' member.
19701 * src/LR0.c (first_state, last_state): Remove.
19702 Adjust the callers.
19703 (augment_automaton): Don't look for the shifts that must be added
19704 a shift on EOF: it is those of the state we looked for! But now,
19705 since shifts are attached, it is no longer needed to looking
19706 merely by its id: its number.
19707
197082001-12-10 Akim Demaille <akim@epita.fr>
19709
19710 * src/LR0.c (augment_automaton): Better variable locality.
19711 Remove an impossible branch: if there is a state corresponding to
19712 the start symbol being shifted, then there is shift for the start
19713 symbol from the initial state.
19714
197152001-12-10 Akim Demaille <akim@epita.fr>
19716
19717 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19718 only when appropriate: when insert_start_shifting_state' is not
19719 invoked.
19720 * tests/regression.at (Rule Line Numbers): Adjust.
19721
197222001-12-10 Akim Demaille <akim@epita.fr>
19723
19724 * src/LR0.c (augment_automaton): Now that all states have shifts,
19725 merge the two cases addition shifts to the initial state.
19726
197272001-12-10 Akim Demaille <akim@epita.fr>
19728
19729 * src/lalr.c (set_state_table): Move to...
19730 * src/LR0.c: here.
19731 * src/lalr.c (lalr): Don't call it...
19732 * src/LR0.c (generate_states): do it.
19733 * src/LR0.h (first_state): Remove, only the table is used.
19734
197352001-12-10 Akim Demaille <akim@epita.fr>
19736
19737 * src/LR0.h (first_shift, first_reduction): Remove.
19738 * src/lalr.c: Don't use first_shift: find shifts through the
19739 states.
19740
197412001-12-10 Akim Demaille <akim@epita.fr>
19742
19743 * src/LR0.c: Attach shifts to states as soon as they are
19744 computed.
19745 * src/lalr.c (set_state_table): Instead of assigning shifts to
19746 state, just assert that the mapping was properly done.
19747
197482001-12-10 Akim Demaille <akim@epita.fr>
19749
19750 * src/LR0.c (insert_start_shift): Rename as...
19751 (insert_start_shifting_state): this.
19752 (insert_eof_shifting_state, insert_accepting_state): New.
19753 (augment_automaton): Adjust.
19754 Better locality of the variables.
19755 When looking if the start_symbol is shifted from the initial
19756 state, using `while (... symbol != start_symbol ...)' sounds
19757 better than `while (... symbol < start_symbol ...)': If fail
19758 to see how the order between symbols could be relevant!
19759
197602001-12-10 Akim Demaille <akim@epita.fr>
19761
19762 * src/getargs.h: Don't declare `spec_name_prefix' and
19763 `spec_file_prefix', declared by src/files.h.
19764 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19765 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19766 * src/output.c (prepare): Adjust.
19767 * src/reader.c (symbols_output): Likewise.
19768 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19769
197702001-12-10 Akim Demaille <akim@epita.fr>
19771
19772 * src/muscle_tab.c (muscle_init): NULL is a better default than
19773 `"0"'.
19774
197752001-12-10 Akim Demaille <akim@epita.fr>
19776
19777 * src/reader.c (reader): Calling symbols_output once is enough.
19778
197792001-12-10 Akim Demaille <akim@epita.fr>
19780
19781 Now that states have a complete set of members, the linked list of
19782 reductions is useless: just fill directly the state's reductions
19783 member.
19784
19785 * src/state.h (struct reductions): Remove member `number' and
19786 `next'.
19787 * src/LR0.c (first_reduction, last_reduction): Remove.
19788 (save_reductions): Don't link the new reductions, store them in
19789 this_state.
19790 * src/lalr.c (set_state_table): No need to attach reductions to
19791 states, it's already done.
19792 * src/output.c (output_actions): No longer free the shifts, then
19793 the reductions, then the states: free all the states and their
19794 members.
19795
197962001-12-10 Akim Demaille <akim@epita.fr>
19797
19798 * src/options.c (OPTN, DRTV, BOTH): New.
19799 (option_table): Use them.
19800
19801 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19802 the job of system.h.
19803 * src/options.c: Don't include stdio.h and xalloc.h for the same
19804 reasons.
19805
198062001-12-10 Akim Demaille <akim@epita.fr>
19807
19808 * src/output.c (output, prepare): Make sure the values of the
19809 muscles `action' and `prologue' are 0-terminated.
19810
198112001-12-10 Akim Demaille <akim@epita.fr>
19812
19813 Clean up GCC warnings.
19814
19815 * src/reader.c (copy_action): `buf' is not used.
19816 (parse_skel_decl): Be static.
19817 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19818 * src/options.h (create_long_option_table): Have a real prototype.
19819 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19820 (hash_delete_at): Return const void *.
19821 Adjust casts to preserve the const.
19822
198232001-12-10 Akim Demaille <akim@epita.fr>
19824
19825 * configure.in: Require 2.52g.
19826 M4 is not needed, but AUTOM4TE is.
19827 * m4/m4.m4: Remove.
19828 * tests/Makefile.am: Adjust.
19829
198302001-12-10 Akim Demaille <akim@epita.fr>
19831
19832 One structure for states is enough, even though theoretically
19833 there are LR(0) states and LALR(1) states.
19834
19835 * src/lalr.h (state_t): Remove.
19836 (state_table): Be state_t **, not state_t *.
19837 * src/state.h (core, CORE_ALLOC): Rename as...
19838 (state_t, STATE_ALLOC): this.
19839 Add the LALR(1) members: shifts, reductions, errs.
19840 * src/LR0.c (state_table): Rename as...
19841 (state_hash): this, to avoid name clashes with the global
19842 `state_table'.
19843 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19844 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19845
198462001-12-10 Akim Demaille <akim@epita.fr>
19847
19848 Bison dumps core on bash.y.
19849 Reported by Pascal Bart.
19850
19851 * src/warshall.c (bitmatrix_print): New.
19852 (TC): Use it.
19853 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19854 j must be the outer loop.
19855 * tests/regression.at (Broken Closure): New.
19856
198572001-12-05 Akim Demaille <akim@epita.fr>
19858
19859 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19860 its argument.
19861 Reported by Peter Hamorsky.
19862
198632001-12-05 Akim Demaille <akim@epita.fr>
19864
19865 * src/conflicts.c (err_table): Remove.
19866 (resolve_sr_conflict): Adjust.
19867 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19868 Rename as...
19869 (state_t.reductions, state_t.shifts): this.
19870
198712001-12-05 Akim Demaille <akim@epita.fr>
19872
19873 * src/reduce.c (reduce_grammar_tables): No longer disable the
19874 removal of useless rules via CPP but via `if (0)', so that the
19875 compiler still check the code is valid.
19876 For instance, it should have noticed `rline' no longer exists: use
19877 the `line' member of rule_t.
19878 * src/gram.c (dummy, rline): Remove, unused.
19879
198802001-12-05 Akim Demaille <akim@epita.fr>
19881
19882 * src/output.c (pack_vector): Use assert, not berror.
19883 * src/main.c (berror): Remove, unused.
19884
198852001-12-05 Akim Demaille <akim@epita.fr>
19886
19887 New experimental feature: if --verbose --trace output all the
19888 items of a state, not only its kernel.
19889
19890 * src/print.c (print_core): If `trace_flag', then invoke closure
19891 before outputting the items of the state (print_core is no longer
19892 a correct name them).
19893 (print_results): Invoke new_closure/free_closure if needed.
19894
198952001-12-05 Akim Demaille <akim@epita.fr>
19896
19897 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19898 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19899 (nitemset): for consistency with the rest of the project.
19900
199012001-12-05 Akim Demaille <akim@epita.fr>
19902
19903 * src/closure.c (print_closure): Improve.
19904 (closure): Use it for printing input and output.
19905
199062001-12-05 Akim Demaille <akim@epita.fr>
19907
19908 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19909 indexed by nonterminals.
19910
199112001-12-05 Akim Demaille <akim@epita.fr>
19912
19913 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19914 what it was!).
19915 * src/warshall.h: Remove accidental duplication of the content.
19916
199172001-12-05 Akim Demaille <akim@epita.fr>
19918
19919 * src/closure.c (set_fderives): De-obfuscate.
19920
199212001-12-05 Akim Demaille <akim@epita.fr>
19922
19923 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19924
199252001-12-05 Akim Demaille <akim@epita.fr>
19926
19927 * src/closure.c (set_firsts): De-obfuscate.
19928
199292001-12-05 Akim Demaille <akim@epita.fr>
19930
19931 * src/output.c (action_row): De-obfuscate
19932 using the good o' techniques: arrays not pointers, variable
19933 locality, BITISSET, RESETBIT etc.
19934
199352001-12-05 Akim Demaille <akim@epita.fr>
19936
19937 Pessimize the code to simplify it: from now on, all the states
19938 have a valid SHIFTS, which NSHIFTS is possibly 0.
19939
19940 * src/LR0.c (shifts_new): Be global and move to..
19941 * src/state.c, src/state.h: here.
19942 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19943 * src/print_graph: Adjust.
19944
199452001-12-05 Akim Demaille <akim@epita.fr>
19946
19947 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19948 * src/conflicts.c: Use it.
19949 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19950 incorrectly ``simplified''.
19951
199522001-12-05 Akim Demaille <akim@epita.fr>
19953
19954 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19955 using the good o' techniques: arrays not pointers, variable
19956 locality, BITISSET, RESETBIT etc.
19957
199582001-12-05 Akim Demaille <akim@epita.fr>
19959
19960 * src/state.h (SHIFT_SYMBOL): New.
19961 * src/conflicts.c: Use it to deobfuscate.
19962
199632001-12-05 Akim Demaille <akim@epita.fr>
19964
19965 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19966 (print_reductions): De-obfuscate using the good o' techniques:
19967 arrays not pointers, variable locality, BITISSET.
19968
199692001-12-05 Akim Demaille <akim@epita.fr>
19970
19971 * src/conflicts.c (print_reductions): Arrays, not pointers.
19972 Use BITISSET.
19973
199742001-12-05 Akim Demaille <akim@epita.fr>
19975
19976 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19977
199782001-12-05 Akim Demaille <akim@epita.fr>
19979
19980 * src/conflicts.c (print_reductions): Improve variable locality.
19981
199822001-12-05 Akim Demaille <akim@epita.fr>
19983
19984 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19985
199862001-12-05 Akim Demaille <akim@epita.fr>
19987
19988 * src/conflicts.c (print_reductions): Improve variable locality.
19989
199902001-12-05 Akim Demaille <akim@epita.fr>
19991
19992 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19993 * src/lalr.c: Use them.
19994
199952001-12-05 Akim Demaille <akim@epita.fr>
19996
19997 * src/LR0.c (augment_automaton): Formatting changes.
19998 Better variable locality.
19999
200002001-12-05 Akim Demaille <akim@epita.fr>
20001
20002 * src/lalr.c (matrix_print): New.
20003 (transpose): Use it.
20004 Use arrays instead of pointers.
20005
200062001-12-05 Akim Demaille <akim@epita.fr>
20007
20008 * src/lalr.c (maxrhs): Move to...
20009 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20010 * src/lalr.c (build_relations): Adjust.
20011
200122001-12-05 Akim Demaille <akim@epita.fr>
20013
20014 * src/lalr.c (transpose): Free the memory allocated to the
20015 argument, as it is replaced by the results by the unique caller.
20016 (build_relations): Merely invoke transpose: it handles the memory
20017 deallocation.
20018 Improve variable locality.
20019 Avoid variables used as mere abbreviations.
20020 (compute_lookaheads): Use arrays instead of pointers.
20021
200222001-12-05 Akim Demaille <akim@epita.fr>
20023
20024 * src/lalr.c (initialize_F): Improve variable locality.
20025 Avoid variables used as mere abbreviations.
20026
200272001-12-05 Akim Demaille <akim@epita.fr>
20028
20029 * src/derives.c (print_derives): Display the ruleno.
20030 * src/lalr.c (initialize_F, transpose): Better variable locality
20031 to improve readability.
20032 Avoid variables used as mere abbreviations.
20033
200342001-12-05 Akim Demaille <akim@epita.fr>
20035
20036 * src/lalr.c (traverse): Use arrays instead of pointers.
20037
200382001-12-05 Akim Demaille <akim@epita.fr>
20039
20040 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20041 the handling of squeue.
20042 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20043
200442001-12-05 Akim Demaille <akim@epita.fr>
20045
20046 Because useless nonterminals are now kept alive (instead of being
20047 `destroyed'), we now sometimes examine them, and store information
20048 related to them. Hence we need to know their number, and adjust
20049 memory allocations.
20050
20051 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20052 static.
20053 * src/LR0.c (allocate_itemsets): The memory allocated to
20054 `symbol_count' was used for two different purpose: once to count
20055 the number of occurrences of each symbol, and later reassigned to
20056 `shift_symbol', containing the symbol that can be shifted from a
20057 given state.
20058 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20059 only, and...
20060 (new_itemsets): Allocate `shift_symbol' here.
20061 (allocate_itemsets): symbol_count includes useless nonterminals.
20062 Make room for them.
20063 (free_storage): Use `free', not `XFREE', for pointers that cannot
20064 be null.
20065
200662001-12-05 Akim Demaille <akim@epita.fr>
20067
20068 * src/nullable.c (set_nullable): Deobfuscate the handling of
20069 ritem.
20070 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20071
200722001-12-05 Akim Demaille <akim@epita.fr>
20073
20074 * src/gram.c, src/gram.h (ritem_print): New.
20075 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20076 (This useless function was defined only to work around VMS linkers
20077 that can't handle compilation units with variables only).
20078 * src/reduce.c (dump_grammar): Use it to trace the construction of
20079 ritem.
20080
200812001-12-04 Paul Eggert <eggert@twinsun.com>
20082
20083 * src/bison.simple (union yyalloc): Change member names
20084 to be the same as the stack names.
20085 (yyparse): yyptr is now union yyalloc *, not char *.
20086 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20087 and may generate better code on some machines.
20088 (yystpcpy): Use prototype if __STDC__ is defined, not just
20089 if __cplusplus is defined.
20090
200912001-11-30 Akim Demaille <akim@epita.fr>
20092
20093 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20094 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20095 Gettext doesn't compile cleanly, and dies with -Werror.
20096 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20097 Include WARNING_CFLAGS here.
20098 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20099 before being defined.
20100
201012001-11-27 Paul Eggert <eggert@twinsun.com>
20102
20103 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20104 First arg is int, not unsigned.
20105 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20106 (SIZE_MAX, UINT_MAX): New macros.
20107 (quotearg_n_options): Abort if N is negative.
20108 Avoid overflow check on hosts where size_t is 64 bits and int
20109 is 32 bits, as overflow is impossible there.
20110 Fix off-by-one typo that caused unnecessary reallocation.
20111
201122001-11-29 Paul Eggert <eggert@twinsun.com>
20113
20114 Name space cleanup in generated parser.
20115
20116 * doc/bison.texinfo (Bison Parser): Discuss system headers
20117 and their effect on the user name space.
20118
20119 * src/bison.simple:
20120 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20121 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20122 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20123
20124 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20125 on user names when possible.
20126
20127 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20128 Simplify test for whather <alloca.h> exists.
20129
20130 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20131
20132 (<stdio.h>): Include if YYDEBUG.
20133
20134 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20135 ! defined (yyoverflow) && ! defined (yymemcpy).
20136
20137 (yymemcpy, yyparse): Rename local variables as needed so that
20138 they all begin with 'yy'.
20139
20140 (yystrlen, yystpcpy): New functions.
20141
20142 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20143 All uses changed.
20144
20145 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20146 instead of relying on string.h functions. Use YYSTACK_ALLOC
20147 and YYSTACK_FREE instead of malloc and free.
20148
201492001-11-30 Akim Demaille <akim@epita.fr>
20150
20151 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20152 before their first uses.
20153 (YYBISON, YYPURE): Move to the top of the output.
20154
201552001-11-30 Akim Demaille <akim@epita.fr>
20156
20157 * tests/reduce.at (Useless Nonterminals): Fix.
20158
201592001-11-30 Akim Demaille <akim@epita.fr>
20160
20161 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20162 if body instead of `;' to pacify GCC's warnings.
20163
201642001-11-30 Akim Demaille <akim@epita.fr>
20165
20166 Instead of mapping the LHS of unused rules to -1, keep the LHS
20167 valid, but flag the rules as invalid.
20168
20169 * src/gram.h (rule_t): `useful' is a new member.
20170 * src/print.c (print_grammar): Adjust.
20171 * src/derives.c (set_derives): Likewise.
20172 * src/reader.c (packgram, reduce_output): Likewise.
20173 * src/reduce.c (reduce_grammar_tables): Likewise.
20174 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20175
201762001-11-30 Akim Demaille <akim@epita.fr>
20177
20178 * src/reduce.c (reduce_output): Formatting changes.
20179 * src/print.c (print_results, print_grammar): Likewise.
20180 * tests/regression.at (Rule Line Numbers)
20181 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20182
201832001-11-30 Akim Demaille <akim@epita.fr>
20184
20185 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20186 useless nonterminals, move them at the end of the symbol arrays.
20187 (reduce_output): Adjust.
20188 * tests/reduce.at (Useless Nonterminals): Adjust.
20189
201902001-11-30 Akim Demaille <akim@epita.fr>
20191
20192 * src/reduce.c: Various comment/formatting changes.
20193 (nonterminals_reduce): New, extracted from...
20194 (reduce_grammar_tables): here.
20195 (reduce_grammar): Call nonterminals_reduce.
20196
201972001-11-29 Paul Eggert <eggert@twinsun.com>
20198
20199 * src/bison.simple (YYSTACK_REALLOC): Remove.
20200 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20201 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20202 New macros.
20203 (union yyalloc): New type.
20204 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20205 an arbitrary restriction on hosts where size_t is wider than int.
20206
20207 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20208 a parser stack overflow. Allocate just one block of memory for all
20209 three stacks, instead of allocating three blocks; this typically is
20210 faster and reduces fragmentation.
20211
20212 Do not limit the number of items in the stack to a value that fits
20213 in 'int', as this is an arbitrary limit on hosts with 64-bit
20214 size_t and 32-bit int.
20215
202162001-11-29 Marc Autret <autret_m@epita.fr>
20217
20218 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20219 of defining YYERROR_VERBOSE.
20220 [AT_DATA]: $4 is now out of C declarations in the prologue.
20221
202222001-11-28 Marc Autret <autret_m@epita.fr>
20223
20224 * src/reader.c (parse_dquoted_param): New.
20225 (parse_skel_decl): Use it.
20226 * src/lex.h: Add its prototype.
20227 * src/lex.c (literalchar): Become not static.
20228
202292001-11-28 Marc Autret <autret_m@epita.fr>
20230
20231 * src/output.h: And put its extern declaration here.
20232 * src/output.c (error_verbose): Define here.
20233 (prepare): Echo name modification.
20234 * src/getargs.h: Clean its extern declaration.
20235 * src/getargs.c (error_verbose_flag): Remove.
20236 (getargs): Remove case 'e'.
20237 * src/options.c (option_table): 'error-verbose' is now seen as simple
20238 percent option.
20239 Include output.h.
20240
20241 * src/reader.c (read_declarations): Remove case tok_include.
20242 (parse_include_decl): Remove.
20243 * src/lex.h (token_t): Remove tok_include.
20244 * src/options.c (option_table): 'include' is now a simple command line
20245 option.
20246
202472001-11-28 Marc Autret <autret_m@epita.fr>
20248
20249 * src/bison.simple: Adjust muscle names.
20250 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20251 * src/output.c (prepare): s/_/-/ for the muscles names.
20252 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20253
202542001-11-28 Marc Autret <autret_m@epita.fr>
20255
20256 * src/bison.simple: Fix debug.
20257 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20258
202592001-11-28 Akim Demaille <akim@epita.fr>
20260
20261 * src/LR0.c (shifts_new): New.
20262 (save_shifts, insert_start_shift, augment_automaton): Use it.
20263
202642001-11-28 Akim Demaille <akim@epita.fr>
20265
20266 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20267 keep ruleno only.
20268
202692001-11-28 Akim Demaille <akim@epita.fr>
20270
20271 * src/closure.c (closure): Instead of looping over word in array
20272 then bits in words, loop over bits in array.
20273
202742001-11-28 Akim Demaille <akim@epita.fr>
20275
20276 * src/closure.c (closure): No longer optimize the special case
20277 where all the bits of `ruleset[r]' are set to 0, to make the code
20278 clearer.
20279
202802001-11-28 Akim Demaille <akim@epita.fr>
20281
20282 * src/closure.c (closure): `r' and `c' are new variables, used to
20283 de-obfuscate accesses to RULESET and CORE.
20284
202852001-11-28 Akim Demaille <akim@epita.fr>
20286
20287 * src/reduce.c (reduce_print): Use ngettext.
20288 (dump_grammar): Improve the trace accuracy.
20289
202902001-11-28 Akim Demaille <akim@epita.fr>
20291
20292 * src/reduce.c (dump_grammar): Don't translate trace messages.
20293
202942001-11-28 Akim Demaille <akim@epita.fr>
20295
20296 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20297 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20298 as all tags are free'ed afterwards.
20299 From Enrico Scholz.
20300
203012001-11-27 Paul Eggert <eggert@twinsun.com>
20302
20303 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20304 use alloca when we didn't want to, and vice versa.
20305
203062001-11-27 Marc Autret <autret_m@epita.fr>
20307
20308 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20309 initialization.
20310 * src/output.c (prepare): Remove its update.
20311
203122001-11-27 Marc Autret <autret_m@epita.fr>
20313
20314 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20315 Use %error-verbose.
20316
203172001-11-27 Marc Autret <autret_m@epita.fr>
20318
20319 * src/bison.simple: Remove YYERROR_VERBOSE using.
20320 Use %%error_verbose.
20321 (yyparse): Likewise.
20322 * src/output.c (prepare): Give its final value.
20323 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20324 * src/getargs.h: Add its extern declaration.
20325 * src/getargs.c (error_verbose_flag): New int.
20326 (getargs): Update to catch new case.
20327 * src/options.c (option_table): 'error-verbose' is a new option.
20328 (shortopts): Update.
20329
203302001-11-27 Akim Demaille <akim@epita.fr>
20331
20332 * src/system.h: Use intl/libgettext.h.
20333 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20334
203352001-11-27 Akim Demaille <akim@epita.fr>
20336
20337 * tests/torture.at (Exploding the Stack Size with Malloc):
20338 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20339
203402001-11-27 Akim Demaille <akim@epita.fr>
20341
20342 * src/files.c: Include error.h.
20343 Reported by Hans Aberg.
20344
203452001-11-26 Marc Autret <autret_m@epita.fr>
20346
20347 * src/reader.c (parse_include_decl): New, not yet implemented.
20348 (read_declarations): Add case tok_include.
20349 * src/getargs.h (include): Add its extern definition.
20350 * src/getargs.c (include): New const char *.
20351 (getargs): Add case '-I'.
20352 * src/options.c (option_table): Add include as command line and
20353 percent option.
20354 * src/lex.h (token_t): Add tok_include.
20355
203562001-11-26 Akim Demaille <akim@epita.fr>
20357
20358 * src/reader.c (readgram): Make sure rules for mid-rule actions
20359 have a lineno equal to that of their host rule.
20360 Reported by Hans Aberg.
20361 * tests/regression.at (Rule Line Numbers): New.
20362
203632001-11-26 Akim Demaille <akim@epita.fr>
20364
20365 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20366 size_ts.
20367
203682001-11-26 Akim Demaille <akim@epita.fr>
20369
20370 * src/complain.c, src/complain.h (error): Remove, provided by
20371 lib/error.[ch].
20372
203732001-11-26 Akim Demaille <akim@epita.fr>
20374
20375 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20376 issue an error message.
20377 * tests/regression.at (Invalid %directive): New.
20378 Reported by Hans Aberg.
20379
203802001-11-26 Akim Demaille <akim@epita.fr>
20381
20382 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20383 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20384
203852001-11-26 Akim Demaille <akim@epita.fr>
20386
20387 * src/conflicts.c (conflicts_print): Don't complain at all when
20388 there are no reduce/reduce conflicts, and as many shift/reduce
20389 conflicts as expected.
20390 * tests/regression.at (%expect right): Adjust.
20391
203922001-11-23 Akim Demaille <akim@epita.fr>
20393
20394 * lib/alloca.c: Update, from fileutils.
20395
203962001-11-23 Akim Demaille <akim@epita.fr>
20397
20398 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20399
204002001-11-23 Akim Demaille <akim@epita.fr>
20401
20402 * src/system.h: Include alloca.h.
20403 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20404
204052001-11-23 Akim Demaille <akim@epita.fr>
20406
20407 * src/print_graph.c (print_actions): Remove `rule', unused.
20408 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20409 pacify GCC's signed < unsigned warnings.
20410 * src/closure.c (itemsetsize): Likewise.
20411 * src/reader.c (symbol_list_new): Static.
20412
204132001-11-23 Akim Demaille <akim@epita.fr>
20414
20415 Attaching lineno to buckets is stupid, since only one copy of each
20416 symbol is kept, only the line of the first occurrence is kept too.
20417
20418 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20419 * src/reader.c (rline_allocated): Remove, unused.
20420 (symbol_list): Have a `line' member.
20421 (symbol_list_new): New.
20422 (readgram): Use it.
20423 * src/print.c (print_grammar): Output the rule line numbers.
20424 * tests/regression.at (Solved SR Conflicts)
20425 (Unresolved SR Conflicts): Adjust.
20426 Reported by Hans Aberg.
20427
204282001-11-22 Marc Autret <autret_m@epita.fr>
20429
20430 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20431
204322001-11-22 Marc Autret <autret_m@epita.fr>
20433
20434 * src/muscle_tab.c (muscle_init): Remove initialization of
20435 skeleton muscle.
20436 * src/output.c (output_master_parser): Do it here.
20437
204382001-11-20 Akim Demaille <akim@epita.fr>
20439
20440 * po/sv.po: New.
20441 * configure.in (ALL_LINGUAS): Adjust.
20442 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20443 longer contains strings to translate.
20444
204452001-11-19 Akim Demaille <akim@epita.fr>
20446
20447 * src/conflicts.c (conflicts_print): Add a missing \n.
20448
204492001-11-19 Akim Demaille <akim@epita.fr>
20450
20451 * src/nullable.c (nullable_print): New.
20452 (set_nullable): Call it when tracing.
20453 Better locality of variables.
20454
204552001-11-19 Akim Demaille <akim@epita.fr>
20456
20457 * src/print.c (print_actions): Better locality of variables.
20458
204592001-11-19 Akim Demaille <akim@epita.fr>
20460
20461 * src/derives.c (print_derives): Fix and enrich.
20462 * src/closure.c (print_fderives): Likewise.
20463
204642001-11-19 Akim Demaille <akim@epita.fr>
20465
20466 * src/closure.c (itemsetend): Remove, replaced with...
20467 (itemsetsize): new.
20468
204692001-11-19 Akim Demaille <akim@epita.fr>
20470
20471 * src/LR0.c (kernel_end): Remove, replaced with...
20472 (kernel_size): new.
20473
204742001-11-19 Akim Demaille <akim@epita.fr>
20475
20476 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20477 to clarify.
20478
204792001-11-19 Akim Demaille <akim@epita.fr>
20480
20481 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20482
204832001-11-19 Akim Demaille <akim@epita.fr>
20484
20485 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20486 trace messages.
20487 * src/LR0.c: Likewise.
20488 (allocate_itemsets): Use arrays instead of pointers to clarify.
20489
204902001-11-19 Akim Demaille <akim@epita.fr>
20491
20492 * src/getargs.c (statistics_flag): Replace with...
20493 (trace_flag): New.
20494 (longopts): Accept --trace instead of --statistics.
20495 * src/getargs.h, src/options.c: Adjust.
20496 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20497 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20498
204992001-11-19 Akim Demaille <akim@epita.fr>
20500
20501 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20502 pointers to clarify the code.
20503 (save_reductions, save_shifts): Factor common parts of alternatives.
20504
205052001-11-19 Akim Demaille <akim@epita.fr>
20506
20507 * src/LR0.c (new_state, get_state): Complete TRACE code.
20508 * src/closure.c: Include `reader.h' to get `tags', needed by the
20509 trace code.
20510 Rename the conditional DEBUG as TRACE.
20511 Output consistently TRACEs to stderr, not stdout.
20512 * src/derives.c: Likewise.
20513 * src/reduce.c: (inaccessable_symbols): Using if is better style
20514 than goto.
20515 Use `#if TRACE' instead of `#if 0' for tracing code.
20516
205172001-11-19 Akim Demaille <akim@epita.fr>
20518
20519 * src/system.h (LIST_FREE, shortcpy): New.
20520 * src/LR0.c: Use them.
20521 * src/output.c (free_itemsets, free_reductions, free_shifts):
20522 Remove, replaced by LIST_FREE.
20523
205242001-11-19 Akim Demaille <akim@epita.fr>
20525
20526 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20527 (REDUCTIONS_ALLOC): New.
20528 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20529 allocation.
20530
205312001-11-19 Akim Demaille <akim@epita.fr>
20532
20533 * src/LR0.c (new_state): Complete trace code.
20534 * src/nullable.c (set_nullable): Don't translate traces.
20535
205362001-11-19 Akim Demaille <akim@epita.fr>
20537
20538 * src/print_graph.c (print_core): Better locality of variables.
20539 * src/print.c (print_core): Likewise.
20540
205412001-11-19 Akim Demaille <akim@epita.fr>
20542
20543 * src/vcg.c: You do the output, so you are responsible of the
20544 handling of VCG syntax, in particular: use quotearg.
20545 * src/print_graph.c: Don't.
20546 (print_actions): Don't output the actions as part of the nodes,
20547 since that's the job of the edges.
20548 (print_state): Don't output by hand: fill the node description,
20549 and ask for its output.
20550
205512001-11-19 Akim Demaille <akim@epita.fr>
20552
20553 * src/bison.simple (yyparse): When verbosely reporting an error,
20554 no longer put additional quotes around token names.
20555 * tests/calc.at: Adjust.
20556
205572001-11-19 Akim Demaille <akim@epita.fr>
20558
20559 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20560 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20561 * src/output.c: Adjust.
20562
205632001-11-19 Akim Demaille <akim@epita.fr>
20564
20565 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20566 (rule_t): this.
20567 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20568
205692001-11-19 Akim Demaille <akim@epita.fr>
20570
20571 * src/gram.h (rule_t): New.
20572 (rule_table): New.
20573 (rrhs, rlhs): Remove, part of state_t.
20574 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20575 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20576 * src/reader.c, src/reduce.c: Adjust.
20577
205782001-11-19 Akim Demaille <akim@epita.fr>
20579
20580 * src/reader.c (symbols_output): New, extracted from...
20581 (packsymbols): Here.
20582 (reader): Call it.
20583
205842001-11-19 Akim Demaille <akim@epita.fr>
20585
20586 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20587 (maxrhs): this new function.
20588
205892001-11-19 Akim Demaille <akim@epita.fr>
20590
20591 * src/lalr.c (F): New macro to access the variable F.
20592 Adjust.
20593
205942001-11-19 Akim Demaille <akim@epita.fr>
20595
20596 * src/lalr.h (LA): New macro to access the variable LA.
20597 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20598 * src/lalr.c: Adjust.
20599
206002001-11-19 Akim Demaille <akim@epita.fr>
20601
20602 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20603 (set_state_table): handle the `lookaheads' members.
20604
206052001-11-19 Akim Demaille <akim@epita.fr>
20606
20607 * src/lalr.h (lookaheads): Removed array, whose contents is now
20608 a member of...
20609 (state_t): this structure.
20610 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20611 Adjust.
20612
206132001-11-19 Akim Demaille <akim@epita.fr>
20614
20615 * src/lalr.h (consistent): Removed array, whose contents is now
20616 a member of...
20617 (state_t): this structure.
20618 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20619 Adjust.
20620
206212001-11-19 Akim Demaille <akim@epita.fr>
20622
20623 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20624 contents are now members of...
20625 (state_t): this structure.
20626 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20627 Adjust.
20628
206292001-11-19 Akim Demaille <akim@epita.fr>
20630
20631 * src/lalr.h (state_t): New.
20632 (state_table): Be a state_t * instead of a core **.
20633 (accessing_symbol): Remove, part of state_t.
20634 * src/lalr.c: Adjust.
20635 (set_accessing_symbol): Merge into...
20636 (set_state_table): this.
20637 * src/print_graph.c, src/conflicts.c: Adjust.
20638
206392001-11-14 Akim Demaille <akim@epita.fr>
20640
20641 * tests/calc.at, tests/output.at, tests/regression.at,
20642 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20643 now the tests are run in private dirs, therefore AC_CLEANUP and
20644 family can be simplified to 0-ary.
20645 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20646 use abs. path to find config.h.
20647 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20648 stderr, there can be way too much random noise.
20649 Instead pass -Werror to GCC and rely on the exit status.
20650 Reported by Wolfram Wagner.
20651
206522001-11-14 Akim Demaille <akim@epita.fr>
20653
20654 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20655 defined only if yyoverflow is defined, to avoid `warning: unused
20656 variable `yyvs1''.
20657 Reported by The Test Suite.
20658
206592001-11-14 Akim Demaille <akim@epita.fr>
20660
20661 * src/print.c: Include reduce.h.
20662 Reported by Hans Aberg.
20663
206642001-11-14 Akim Demaille <akim@epita.fr>
20665
20666 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20667 Revert a previous patch: these are really const.
20668 * src/conflicts.c (conflict_report): Additional useless pair of
20669 braces to pacify GCC's warnings for `if () if () {} else {}'.
20670 * src/lex.c (parse_percent_token): Replace equal_offset with
20671 arg_offset.
20672 arg is const.
20673 Be sure to strdup `arg' when used, since there is no reason for
20674 token_buffer not to change.
20675
206762001-11-14 Akim Demaille <akim@epita.fr>
20677
20678 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20679 definition.
20680 * src/main.c (main): Use them.
20681 Suggested by Hans Aberg.
20682
206832001-11-12 Akim Demaille <akim@epita.fr>
20684
20685 * src/system.h (ngettext): Now that we use ngettext, be sure to
20686 provide a default definition when NLS are not used.
20687
206882001-11-12 Akim Demaille <akim@epita.fr>
20689
20690 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20691 Use @kbd to denote user input.
20692 (Language and Grammar): ANSIfy the example.
20693 Adjust its layout for info/notinfo.
20694 (Location Tracking Calc): Output error messages to stderr.
20695 Output locations in a more GNUtically correct way.
20696 Fix a couple of Englishos.
20697 Adjust @group/@end group pairs.
20698
206992001-11-12 Akim Demaille <akim@epita.fr>
20700
20701 %expect was not functioning at all.
20702
20703 * src/conflicts.c (expected_conflicts): Set to -1.
20704 (conflict_report): Use ngettext.
20705 (conflicts_print): Check %expect and make its violation an error.
20706 * doc/bison.texinfo (Expect Decl): Adjust.
20707 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20708 * tests/regression.at (%expect not enough, %expect right)
20709 (%expect too much): New.
20710
207112001-11-12 Akim Demaille <akim@epita.fr>
20712
20713 * tests/regression.at (Conflicts): Rename as...
20714 (Unresolved SR Conflicts): this.
20715 (Solved SR Conflicts): New.
20716
207172001-11-12 Akim Demaille <akim@epita.fr>
20718
20719 * src/reduce.c (print_results): Rename as...
20720 (reduce_output): This.
20721 Output to OUT, passed as argument, instead of output_obstack.
20722 (dump_grammar): Likewise.
20723 (reduce_free): New.
20724 Also free V1.
20725 (reduce_grammar): No longer call reduce_output, since...
20726 * src/print.c (print_results): do it.
20727 * src/main.c (main): Call reduce_free;
20728
207292001-11-12 Akim Demaille <akim@epita.fr>
20730
20731 * src/conflicts.c (print_reductions): Accept OUT as argument.
20732 Output to it, not to output_obstack.
20733 * src/print.c (print_actions): Adjust.
20734
207352001-11-12 Akim Demaille <akim@epita.fr>
20736
20737 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20738 the result instead of using...
20739 (src_total, rrc_total, src_count, rrc_count): Remove.
20740 (any_conflicts): Remove.
20741 (print_conflicts): Split into...
20742 (conflicts_print, conflicts_output): New.
20743 * src/conflicts.h: Adjust.
20744 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20745 * src/print.c (print_grammar): Issue `\n' between two rules.
20746 * tests/regression.at (Conflicts): New.
20747 Reported by Tom Lane.
20748
207492001-11-12 Akim Demaille <akim@epita.fr>
20750
20751 * tests/regression.at (Invalid input): Remove, duplicate with
20752 ``Invalid input: 1''.
20753
207542001-11-12 Akim Demaille <akim@epita.fr>
20755
20756 * tests/torture.at (AT_DATA_STACK_TORTURE)
20757 (Exploding the Stack Size with Alloca)
20758 (Exploding the Stack Size with Malloc): New.
20759
207602001-11-12 Akim Demaille <akim@epita.fr>
20761
20762 * src/bison.simple (YYSTACK_REALLOC): New.
20763 (yyparse) [!yyoverflow]: Use it and free the old stack.
20764 Reported by Per Allansson.
20765
207662001-11-12 Pascal Bart <pascal.bart@epita.fr>
20767
20768 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20769 define CPP macro, which substitute YYSTYPE by yystype.
20770 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20771 with yyltype/YYLTYPE. This allows inclusion of the generated
20772 header within the parser if the compiler, such as GGC, accepts
20773 multiple equivalent #defines.
20774 From Akim.
20775
207762001-11-05 Akim Demaille <akim@epita.fr>
20777
20778 * src/reader.c (symbols_output): New, extracted from...
20779 (packsymbols): here.
20780 (reader): Adjust.
20781
207822001-11-05 Akim Demaille <akim@epita.fr>
20783
20784 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20785
207862001-11-05 Akim Demaille <akim@epita.fr>
20787
20788 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20789 pattern.
20790
207912001-11-05 Akim Demaille <akim@epita.fr>
20792
20793 * src/options.h (struct option_table_struct): set_flags is void*.
20794 * src/options.c (longopts): Support `--output' and `%output'.
20795 (usage): Adjust.
20796 * src/lex.h (tok_setopt): Remove, replaced with...
20797 (tok_intopt, tok_stropt): these new guys.
20798 * src/lex.c (getopt.h): Not needed.
20799 (token_buffer, unlexed_token_buffer): Not const.
20800 (percent_table): Promote `-' over `_' in directive names.
20801 Active `%name-prefix', `file-prefix', and `output'.
20802 (parse_percent_token): Accept possible arguments to directives.
20803 Promote `-' over `_' in directive names.
20804
208052001-11-04 Akim Demaille <akim@epita.fr>
20806
20807 * doc/bison.texinfo (Decl Summary): Split the list into
20808 `directives for grammars' and `directives for bison'.
20809 Sort'em.
20810 Add description of `%name-prefix', `file-prefix', and `output'.
20811 Promote `-' over `_' in directive names.
20812 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20813 Simplify the description of `--name-prefix'.
20814 Promote `-' over `_' in directive names.
20815 Promote `--output' over `--output-file'.
20816 Fix the description of `--defines'.
20817 * tests/output.at: Exercise %file-prefix and %output.
20818
208192001-11-02 Akim Demaille <akim@epita.fr>
20820
20821 * doc/refcard.tex: Update.
20822
208232001-11-02 Akim Demaille <akim@epita.fr>
20824
20825 * src/symtab.h (SUNDEF): New.
20826 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20827 stand for `uninitialized', instead of 0.
20828 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20829 * src/lex.c (lex): Adjust.
20830
20831 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20832 Number it 0.
20833 Let yylex return it instead of a plain 0.
20834 Reported by Dick Streefland.
20835
208362001-11-02 Akim Demaille <akim@epita.fr>
20837
20838 * tests/regression.at (Mixing %token styles): New test.
20839
208402001-11-02 Akim Demaille <akim@epita.fr>
20841
20842 * src/reader.c (parse_thong_decl): Formatting changes.
20843 (token_translations_init): New, extracted from...
20844 (packsymbols): Here.
20845 Adjust.
20846
208472001-11-01 Akim Demaille <akim@epita.fr>
20848
20849 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20850 Check that `9foo.y' produces correct cpp guards.
20851 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20852 guards.
20853 Reported by Wwp.
20854
208552001-11-01 Akim Demaille <akim@epita.fr>
20856
20857 * tests/regression.at (Invalid input: 2): New.
20858 * src/lex.c (unlexed_token_buffer): New.
20859 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20860 too.
20861 Reported by Wwp.
20862
208632001-11-01 Akim Demaille <akim@epita.fr>
20864
20865 * tests/calc.at: Catch up with 1.30.
20866 * configure.in: Bump to 1.49a.
20867 Adjust to newer Autotest.
20868
208692001-10-19 Pascal Bart <pascal.bart@epita.fr>
20870
20871 * src/conflicts.c: Move global variables rrc_total and src_total ...
20872 (print_conflicts): here.
20873 * src/output.c (output): Free global variable user_toknums.
20874 * src/lex.c (token_obstack): Become static.
20875
208762001-10-18 Akim Demaille <akim@epita.fr>
20877
20878 * tests/atlocal.in (GCC): Add.
20879 * tests/calc.at: s/m4_match/m4_bmatch/.
20880 s/m4_patsubst/m4_bpatsubst/.
20881 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20882 * configure.in: AC_SUBST(GCC).
20883
208842001-10-14 Marc Autret <autret_m@epita.fr>
20885
20886 * src/options.c (create_long_option_table): Fix.
20887
208882001-10-10 Akim Demaille <akim@epita.fr>
20889
20890 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20891
208922001-10-04 Akim Demaille <akim@epita.fr>
20893
20894 * src/reader.c (parse_union_decl): Push the caracters in
20895 union_obstack, not attrs_obstack.
20896
208972001-10-04 Akim Demaille <akim@epita.fr>
20898
20899 Merge in the branch 1.29.
20900
20901 * src/reader.c (packsymbols): Use a temporary obstack for
20902 `%%tokendef', since output_stack is already used elsewhere.
20903
20904 2001-10-02 Akim Demaille <akim@epita.fr>
20905
20906 Bump 1.29d.
20907
20908 2001-10-02 Akim Demaille <akim@epita.fr>
20909
20910 Version 1.29c.
20911
20912 2001-10-02 Akim Demaille <akim@epita.fr>
20913
20914 * tests/regression.at (Invalid CPP headers): New.
20915 From Alexander Belopolsky.
20916 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20917
20918 2001-10-02 Akim Demaille <akim@epita.fr>
20919
20920 * tests/regression.at (Invalid input): New.
20921 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20922 Reported by Shura.
20923
20924 2001-10-02 Akim Demaille <akim@epita.fr>
20925
20926 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20927
20928 2001-10-02 Akim Demaille <akim@epita.fr>
20929
20930 * src/output.c (output_parser): Assert `skeleton'.
20931 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20932 systems.
20933 From Shura.
20934
20935 2001-10-01 Marc Autret <autret_m@epita.fr>
20936
20937 * src/lex.h: Echo modifications.
20938 * src/lex.c (unlex): Parameter is now token_t.
20939 From Hans Aberg.
20940
20941 2001-10-01 Marc Autret <autret_m@epita.fr>
20942
20943 * src/main.c: Include lex.h.
20944 From Hans Aberg.
20945
20946 2001-09-29 Akim Demaille <akim@epita.fr>
20947
20948 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20949
20950 2001-09-28 Akim Demaille <akim@epita.fr>
20951
20952 * tests/testsuite.at: Update to newer Autotest.
20953 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20954
20955 2001-09-27 Akim Demaille <akim@epita.fr>
20956
20957 Position independent wrapper.
20958
20959 * tests/bison: Remove.
20960 * tests/bison.in: New.
20961 * configure.in: Adjust.
20962
20963 2001-09-27 Paul Eggert <eggert@twinsun.com>
20964
20965 Port quotearg fixes from tar 1.13.24.
20966
20967 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20968 tm to be declared.
20969 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20970 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20971
20972 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20973 * m4/mbrtowc.m4: New file.
20974 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20975 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20976
20977 2001-09-27 Akim Demaille <akim@epita.fr>
20978
20979 Bump to 1.29c.
20980
20981 2001-09-27 Akim Demaille <akim@epita.fr>
20982
20983 Version 1.29b.
20984
20985 2001-09-25 Akim Demaille <akim@epita.fr>
20986
20987 * src/system.h: Include `xalloc.h'.
20988 Remove it from the C files.
20989 * src/files.c (output_files): Free the obstacks.
20990 * src/lex.c (init_lex): Rename as...
20991 (lex_init): this.
20992 (lex_free): New.
20993 * src/main.c (main): Use it.
20994
20995 2001-09-24 Marc Autret <autret_m@epita.fr>
20996
20997 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20998 to output informations in fout (FILE*).
20999 (open_graph, close_graph): Likewise.
21000 (output_graph, output_edge, output_node): Likewise.
21001 * src/vcg.h: Update function prototypes.
21002 * src/print_graph.c (print_graph): Open output graph file.
21003 (print_actions): Adjust.
21004 * src/files.h: Remove extern declaration.
21005 * src/files.c: Remove graph_obstack declaration.
21006 (open_files): Remove graph_obstack initialization.
21007 (output_files): Remove graph_obstack saving.
21008
21009 2001-09-24 Marc Autret <autret_m@epita.fr>
21010
21011 * src/files.c (compute_output_file_names): Fix.
21012
21013 2001-09-24 Marc Autret <autret_m@epita.fr>,
21014 Akim Demaille <akim@epita.fr>
21015
21016 * src/reader.c (reader): Remove call to free_symtab ().
21017 * src/main.c (main): Call it here.
21018 Include symtab.h.
21019 * src/conflicts.c (initialize_conflicts): Rename as...
21020 (solve_conflicts): this.
21021 * src/print.c (print_core, print_actions, print_state)
21022 (print_grammar): Dump to a file instead a `output_obstack'.
21023 (print_results): Dump `output_obstack', and then proceed with the
21024 FILE *.
21025 * src/files.c (compute_output_file_names, close_files): New.
21026 (output_files): Adjust.
21027 * src/main.c (main): Adjust.
21028
21029 2001-09-23 Marc Autret <autret_m@epita.fr>
21030
21031 * src/files.c (compute_header_macro): Computes header macro name
21032 from spec_defines_file when given.
21033
21034 2001-09-23 Marc Autret <autret_m@epita.fr>
21035
21036 * src/files.c (output_files): Add default extensions.
21037
21038 2001-09-22 Akim Demaille <akim@epita.fr>
21039
21040 * src/conflicts.c (finalize_conflicts): Rename as...
21041 (free_conflicts): this.
21042
21043 2001-09-22 Akim Demaille <akim@epita.fr>
21044
21045 * src/gram.c (gram_free): Rename back as...
21046 (dummy): this.
21047 (output_token_translations): Free `token_translations'.
21048 * src/symtab.c (free_symtab): Free the tag field.
21049
21050 2001-09-22 Akim Demaille <akim@epita.fr>
21051
21052 Remove `translations' as it is always set to true.
21053
21054 * src/gram.h: Adjust.
21055 * src/reader.c (packsymbols, parse_token_decl): Adjust
21056 * src/print.c (print_grammar): Adjust.
21057 * src/output.c (output_token_translations): Adjust.
21058 * src/lex.c (lex): Adjust.
21059 * src/gram.c: Be sure the set pointers to NULL.
21060 (dummy): Rename as...
21061 (gram_free): this.
21062
21063 2001-09-22 Akim Demaille <akim@epita.fr>
21064
21065 * configure.in: Invoke AM_LIB_DMALLOC.
21066 * src/system.h: Use dmalloc.
21067 * src/LR0.c: Be sure to have pointers initialized to NULL.
21068 (allocate_itemsets): Allocate kernel_items only if needed.
21069
21070 2001-09-22 Akim Demaille <akim@epita.fr>
21071
21072 * configure.in: Bump to 1.29b.
21073 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21074 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21075 need xmalloc.c in calc.y.
21076 From Pascal Bart.
21077
21078 2001-09-21 Akim Demaille <akim@epita.fr>
21079
21080 Version 1.29a.
21081 * Makefile.maint, config/config.guess, config/config.sub,
21082 * config/missing: Update from masters.
21083 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21084 upon package.m4.
21085 * configure.in (ALL_LINGUAS): Add `tr'.
21086
21087 2001-09-21 Akim Demaille <akim@epita.fr>
21088
21089 * tests/Makefile.am (package.m4): Move to...
21090 ($(srcdir)/$(TESTSUITE)): here.
21091
21092 2001-09-20 Akim Demaille <akim@epita.fr>
21093
21094 * src/complain.c: No longer try to be standalone: use system.h.
21095 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21096 * src/complain.h: Likewise.
21097 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21098 Remove the unused variable `n'.
21099 From Albert Chin-A-Young.
21100
21101 2001-09-18 Marc Autret <autret_m@epita.fr>
21102
21103 * doc/bison.1: Update.
21104 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21105 descriptions.
21106 (Option Cross Key): Update.
21107 Add --graph.
21108
21109 2001-09-18 Marc Autret <autret_m@epita.fr>
21110
21111 * tests/regression.at: New test (comment in %union).
21112
21113 2001-09-18 Marc Autret <autret_m@epita.fr>
21114
21115 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21116 do that.
21117 Reported by Keith Browne.
21118
21119 2001-09-18 Marc Autret <autret_m@epita.fr>
21120
21121 * tests/output.at: Add tests for --defines and --graph.
21122
21123 2001-09-18 Marc Autret <autret_m@epita.fr>
21124
21125 * tests/output.at: Removes tests of %{header,src}_extension features.
21126
21127 2001-09-18 Akim Demaille <akim@epita.fr>
21128
21129 * tests/Makefile.am (package.m4): New.
21130 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21131 (_AT_CHECK_CALC_ERROR): Likewise.
21132 Factor the `, ' part of verbose error messages.
21133
21134 2001-09-18 Marc Autret <autret_m@epita.fr>
21135
21136 * src/getargs.c (longopts): Declare --defines and --graph as options
21137 with optional arguments.
21138 * src/files.h: Add extern declarations.
21139 * src/files.c (spec_graph_file, spec_defines_file): New.
21140 (output_files): Update.
21141 Remove CPP-outed code.
21142
21143 2001-09-18 Marc Autret <autret_m@epita.fr>
21144
21145 Turn off %{source,header}_extension feature.
21146
21147 * src/files.c (compute_exts_from_gf): Update.
21148 (compute_exts_from_src): Update.
21149 (output_files): CPP-out useless code.
21150 * src/files.h: Remove {header,source}_extension extern declarations.
21151 * src/reader.c (parse_dquoted_param): CPP-out.
21152 (parse_header_extension_decl): Remove.
21153 (parse_source_extension_decl): Remove.
21154 (read_declarations): Remove cases tok_{hdrext,srcext}.
21155 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21156 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21157
21158 2001-09-10 Akim Demaille <akim@epita.fr>
21159
21160 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21161 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21162 (AT_CHECK_OUTPUT): this.
21163 Merely check ls' exit status, its output is useless.
21164
21165 2001-09-10 Akim Demaille <akim@epita.fr>
21166
21167 * tests/calc.at: Use m4_match.
21168 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21169
21170 2001-09-10 Marc Autret <autret_m@epita.fr>,
21171 Akim Demaille <akim@epita.fr>
21172
21173 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21174 enum color_e.
21175 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21176 to `normal'.
21177 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21178 * src/lex.h: Adjust prototype.
21179 (token_t): Add `tok_undef'.
21180 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21181 (parse_percent_token): Now returns token_t.
21182 Add default statement in switch.
21183 (lex): Separate `c' as an input variable, from the token_t result
21184 part.
21185 (unlexed): Is a token_t.
21186
21187 2001-09-10 Akim Demaille <akim@epita.fr>
21188
21189 * configure.in: Bump to 1.29a.
21190
21191 2001-09-07 Akim Demaille <akim@epita.fr>
21192
21193 Version 1.29.
21194
21195 2001-08-30 Akim Demaille <akim@epita.fr>
21196
21197 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21198 * m4/atconfig.m4: Remove.
21199 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21200 * tests/bison: New.
21201 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21202 m4_if, m4_patsubst, and m4_regexp.
21203 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21204 `input' file instead of echo.
21205
21206 2001-08-29 Akim Demaille <akim@epita.fr>
21207
21208 Bump to 1.28e.
21209
21210 2001-08-29 Akim Demaille <akim@epita.fr>
21211
21212 Version 1.28d.
21213
21214 2001-08-29 Paul Eggert <eggert@twinsun.com>
21215
21216 * src/bison.simple (yyparse): Don't take the address of an
21217 item before the start of an array, as that doesn't conform to
21218 the C Standard.
21219
21220 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21221
21222 * doc/bison.texinfo (Location Tracking Calc): New node.
21223
21224 2001-08-29 Paul Eggert <eggert@twinsun.com>
21225
21226 * src/output.c (output): Do not define const, as this now
21227 causes more problems than it cures.
21228
21229 2001-08-29 Akim Demaille <akim@epita.fr>
21230
21231 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21232 the nodes.
21233 Be sure to tag the `detailmenu'.
21234
21235 2001-08-29 Akim Demaille <akim@epita.fr>
21236
21237 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21238 download in a tmp dir.
21239
21240 2001-08-28 Marc Autret <autret_m@epita.fr>
21241
21242 * config/depcomp: New file.
21243
21244 2001-08-28 Marc Autret <autret_m@epita.fr>
21245
21246 * doc/bison.1 (mandoc): Adjust.
21247 From Juan Manuel Guerrero.
21248
21249 2001-08-28 Marc Autret <autret_m@epita.fr>
21250
21251 * src/print_graph.c (print_state): Fix.
21252
21253 2001-08-27 Marc Autret <autret_m@epita.fr>
21254
21255 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21256 char * members.
21257 Echo modifications to the functions prototypes.
21258 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21259
21260 2001-08-27 Marc Autret <autret_m@epita.fr>
21261
21262 * src/vcg.c: Include `xalloc.h'.
21263 (add_colorentry): New.
21264 (add_classname): New.
21265 (add_infoname): New.
21266 * src/vcg.h: Add new prototypes.
21267
21268 2001-08-27 Akim Demaille <akim@epita.fr>
21269
21270 * Makefile.maint: Sync. again with CVS Autoconf.
21271
21272 2001-08-27 Akim Demaille <akim@epita.fr>
21273
21274 * Makefile.maint: Formatting changes.
21275 (po-update, cvs-update, update): New targets.
21276 (AMTAR): Remove.
21277
21278 2001-08-27 Akim Demaille <akim@epita.fr>
21279
21280 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21281 * Makefile.maint: Sync. with CVS Autoconf.
21282
21283 2001-08-27 Marc Autret <autret_m@epita.fr>
21284
21285 * src/vcg.h (struct infoname_s): New.
21286 (struct colorentry_s): New.
21287 (graph_s): New fields {vertical,horizontal}_order in structure.
21288 Add `infoname' field.
21289 Add `colorentry' field;
21290 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21291 (G_HORIZONTAL_ORDER): New.
21292 (G_INFONAME): New.
21293 (G_COLORENTRY): New.
21294 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21295 Add output of `infoname'.
21296 Add output of `colorentry'.
21297
21298 2001-08-27 Marc Autret <autret_m@epita.fr>
21299
21300 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21301 This one shadowed a global parameter.
21302
21303 2001-08-24 Marc Autret <autret_m@epita.fr>
21304
21305 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21306 instead of `unsigned'.
21307 (print_state): Do not call obstack_object_size () in obstack_grow ()
21308 to avoid macro variables shadowing.
21309
21310 2001-08-23 Marc Autret <autret_m@epita.fr>
21311
21312 * src/lex.c (percent_table): Typo: s/naem/name/.
21313 Add graph option.
21314 Normalize new options declarations.
21315
21316 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21317
21318 * tests/suite.at: Exercise %header_extension and %source_extension.
21319
21320 2001-08-16 Marc Autret <autret_m@epita.fr>
21321
21322 * src/reader.c (parse_dquoted_param): New.
21323 (parse_header_extension_decl): Use it.
21324 (parse_source_extension_decl): Likewise.
21325
21326 2001-08-16 Marc Autret <autret_m@epita.fr>
21327
21328 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21329 (get_xxxx_str): Use assert () instead of complain ().
21330 Remove return invokations in default cases.
21331 (get_decision_str): Modify default behaviour. Remove second argument.
21332 Echo modifications on calls.
21333 (output_graph): Fix.
21334
21335 2001-08-16 Marc Autret <autret_m@epita.fr>
21336
21337 * src/getargs.c (usage): Update with ``-g, --graph''.
21338
21339 2001-08-16 Marc Autret <autret_m@epita.fr>
21340
21341 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21342 (Option Cross Key): Likewise.
21343 * doc/bison.1: Update.
21344
213452001-09-25 Pascal Bart <pascal.bart@epita.fr>
21346
21347 * src/output.c (output_master_parser): Don't finish action_obstack.
21348 (output_parser): Don't care about the muscle action, here.
21349 (prepare): Copy the action_obstack in the action muscle.
21350 (output): Free action_obstack.
21351
213522001-09-23 Pascal Bart <pascal.bart@epita.fr>
21353
21354 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21355 will contain `%union' declaration.
21356 (parse_union_decl): Delete #line directive output.
21357 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21358 informations about %union.
21359 (parse_union_decl): Copy the union_obstack in the muscle stype.
21360 * src/bison.simple: Add new #line directive.
21361 Add typdef %%stype YYSTYPE.
21362
213632001-09-23 Pascal Bart <pascal.bart@epita.fr>
21364
21365 * src/bison.simple: Add new `#line' directive.
21366
213672001-09-22 Pascal Bart <pascal.bart@epita.fr>
21368
21369 * src/bison.simple: New `#line' directive.
21370 * src/output.c (output_parser): Support new dynamic muscle input_line.
21371
213722001-09-22 Marc Autret <autret_m@epita.fr>
21373
21374 * src/output.c (output_master_parser): New.
21375 (output_parser): Be more re-entrant.
21376
213772001-09-21 Marc Autret <autret_m@epita.fr>
21378
21379 * src/reader.c (copy_definition, parse_union_decl): Update and use
21380 `linef' muscle.
21381 (copy_action): Likewise.
21382 Use obstack_1grow ().
21383 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21384
213852001-09-21 Marc Autret <autret_m@epita.fr>
21386
21387 * src/options.c (option_table): Adjust.
21388 * src/lex.c (parse_percent_token): Fix.
21389
213902001-09-20 Pascal Bart <pascal.bart@epita.fr>
21391
21392 * src/options.c (symtab.h): Include it, need by lex.h.
21393
213942001-09-20 Pascal Bart <pascal.bart@epita.fr>
21395
21396 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21397 is now an option_table_struct*.
21398 (option_strcmp): New function option_strcmp.
21399 (parse_percent_token): Call option_strcmp.
21400 * src/getargs.c (xalloc.h, options.h): Include it.
21401 (getargs): Call create_long_option_table.
21402 (getargs): Free longopts at the end of the function.
21403 (shortopts): Move in options.c.
21404 * src/options.c (create_long_option_table): New function. Convert
21405 information from option_table to option structure.
21406 * src/reader.c (options.h): Include it.
21407
21408 * src/Makefile.am: Adjust.
21409 * src/options.c (option_table): Create from longopts and percent_table.
21410 * src/getargs.c (longopts): Delete.
21411 * src/lex.c (struct percent_table_struct): Delete.
21412 (percent_table): Delete.
21413 (options.h): Include it.
21414 * src/options.c: Create.
21415 * src/options.h: Create.
21416 Declare enum opt_access_e.
21417 Define struct option_table_struct.
21418
214192001-09-20 Marc Autret <autret_m@epita.fr>
21420
21421 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21422 sections of Bison.
21423
214242001-09-19 Pascal Bart <pascal.bart@epita.fr>
21425
21426 * src/bison.simple: s/%%filename/%%skeleton.
21427 * src/muscle_tab.c (getargs.h): Include it.
21428 (muscle_init): Insert new muscle skeleton.
21429
214302001-09-18 Pascal Bart <pascal.bart@epita.fr>
21431
21432 * src/output.c (output_parser): Delete unused variable actions_dumped.
21433
214342001-09-07 Pascal Bart <pascal.bart@epita.fr>
21435
21436 * src/output.c (output): Delete call to reader_output_yylsp.
21437 * src/reader.c (reader): Likewise.
21438 * src/reader.h: Delete declaration of reader_output_yylsp.
21439
214402001-09-02 Marc Autret <autret_m@epita.fr>
21441
21442 * src/reader.c: Include muscle_tab.h.
21443 (parse_union_decl): Update.
21444 (parse_macro_decl): Rename parse_muscle_decl.
21445 Update to use renamed functions and variable.
21446 (read_declarations, copy_action, read_additionnal_code, : Updated
21447 with correct variables and functions names.
21448 (packsymbols, reader): Likewise.
21449
21450 * src/reader.h (muscle_obstack): Extern declaration update.
21451
21452 * src/output.c: Include muscle_tab.h
21453 In all functions using macro_insert, change by using muscle_insert ().
21454 (macro_obstack): Rename muscle_obstack.
21455 Echo modifications in the whole file.
21456 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21457 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21458 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21459
21460 * src/muscle_tab.h: Update double inclusion macros.
21461 (macro_entry_s): Rename muscle_entry_s.
21462 Update prototypes.
21463
21464 * src/muscle_tab.c: Include muscle_tab.h.
21465 Rename macro_tabble to muscle_table.
21466 (mhash1, mhash2, mcmp): Use muscle_entry.
21467 (macro_init): Rename muscle_init. Update.
21468 (macro_insert): Rename muscle_insert. Update.
21469 (macro_find): Rename muscle_find. Update.
21470
21471 * src/main.c: Include muscle_tab.h.
21472 (main): Call muscle_init ().
21473 * src/Makefile.am (bison_SOURCES): Echo modifications.
21474
214752001-09-02 Marc Autret <autret_m@epita.fr>
21476
21477 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21478
21479 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21480
214812001-09-02 Marc Autret <autret_m@epita.fr>
21482
21483 * src/macrotab.c, src/macrotab.h: Remove.
21484
214852001-09-01 Pascal Bart <pascal.bart@epita.fr>
21486
21487 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21488 filename.
21489
214902001-09-01 Marc Autret <autret_m@epita.fr>
21491
21492 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21493 to an explicit value to activate the feature. We do it here.
21494
214952001-08-31 Pascal Bart <pascal.bart@epita.fr>
21496
21497 * src/output.c (prepare): Delete the `filename' muscule insertion.
21498 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21499 (parse_union_decl): Likewise.
21500 * src/macrotab.c (macro_init): Initialize filename by infile.
21501
215022001-08-31 Marc Autret <autret_m@epita.fr>
21503
21504 * src/bison.simple (YYLSP_NEEDED): New definition.
21505 * src/output.c (prepare): Add macro insertion of `locations_flag'
21506
215072001-08-31 Pascal Bart <pascal.bart@epita.fr>
21508
21509 * src/output.c (prepare): Delete insertion of previous muscles,
21510 and insert the `prefix' muscles.
21511 * src/macrotab.c (macro_init): Likewise.
21512 (macro_init): Initialization prefix directive by `yy'.
21513 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21514 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21515 yylval, yydebug, yyerror, yynerrs and yyparse.
21516 New directive `#define' to substitute yydebug, ... with option
21517 name_prefix.
21518
215192001-08-31 Pascal Bart <pascal.bart@epita.fr>
21520
21521 * src/main.c (main): Standardize.
21522 * src/output.c (output_table_data, output_parser): Likewise.
21523 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21524
215252001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21526
21527 * src/reader.c (read_additionnal_code): Rename %%user_code to
21528 %%epilogue.
21529 * src/output.c (output): Rename %%declarations to %%prologue.
21530 * src/bison.simple: Echo modifications.
21531
215322001-08-31 Marc Autret <autret_m@epita.fr>
21533
21534 * src/reader.c (readgram): CleanUp.
21535 (output_token_defines): Likewise.
21536 (packsymbols): Likewise.
21537 (reader): Likewise.
21538 * src/output.c (output): CPP-out useless code.
21539
215402001-08-31 Pascal Bart <pascal.bart@epita.fr>
21541
21542 * src/reader.c (reader): Delete obsolete call to function
21543 output_trailers and output_headers.
21544 * src/output.h: Remove obsolete functions prototypes of output_headers
21545 and output_trailers.
21546
215472001-08-30 Pascal Bart <pascal.bart@epita.fr>
21548
21549 * src/main.c: Include macrotab.h.
21550 * src/macrotab.h (macro_entry_s): Constify fields.
21551 Adjust functions prototypes.
21552 * src/macrotab.c (macro_insert): Constify key and value.
21553 (macro_find): Constify key.
21554 (macro_insert): Include 'xalloc.h'
21555 (macro_insert): Use XMALLOC.
21556 (macro_find): Constify return value.
21557 * src/output.c (output_table_data): Rename table to table_data.
21558 (output_parser): Constify macro_key, macro_value.
21559
215602001-08-30 Marc Autret <autret_m@epita.fr>
21561
21562 * src/reader.c (parse_skel_decl): New.
21563 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21564 * src/lex.h (token_t): New token `tok_skel'.
21565 * src/lex.c (percent_table): Add skeleton option entry.
21566 Standardize.
21567
215682001-08-29 Marc Autret <autret_m@epita.fr>
21569
21570 * src/bison.simple: Add %%user_code directive at the end.
21571 * src/reader.c (read_additionnal_code): New.
21572 (reader): Use it.
21573 * src/output.c (output_program): Remove.
21574 (output): Update.
21575
215762001-08-28 Marc Autret <autret_m@epita.fr>
21577
21578 * src/output.c (output_actions): Clean up.
21579 (output_gram): CPP-out useless code.
21580 * src/reader.c (reader): Clean up, CPP-out useless code.
21581
215822001-08-28 Pascal Bart <pascal.bart@epita.fr>
21583
21584 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21585 directive.
21586 * src/bison.simple: Add `%%definitions'.
21587
215882001-08-28 Marc Autret <autret_m@epita.fr>
21589
21590 * config/depcomp: New file.
21591
215922001-08-27 Paul Eggert <eggert@twinsun.com>
21593
21594 * src/bison.simple (yyparse): Don't take the address of an
21595 item before the start of an array, as that doesn't conform to
21596 the C Standard.
21597
215982001-08-27 Robert Anisko <robert.anisko@epita.fr>
21599
21600 * src/output.c (output): Remove the initialization of the macro
21601 obstack. It was done too late here.
21602
21603 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21604 completely wrong.
21605 (reader): Initialize the macro obstack here, since we need it to grow
21606 '%define' directives.
21607
21608 * src/reader.h: Declare the macro obstack as extern.
21609
216102001-08-27 Robert Anisko <robert.anisko@epita.fr>
21611
21612 * src/output.c (output_parser): Fix. Store single '%' characters in
21613 the output obstack instead of throwing them away.
21614
216152001-08-27 Akim Demaille <akim@epita.fr>
21616
21617 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21618
216192001-08-25 Robert Anisko <robert.anisko@epita.fr>
21620
21621 * lib/Makefile.am: Adjust.
21622
216232001-08-25 Robert Anisko <robert.anisko@epita.fr>
21624
21625 * src/bison.simple: Update and add '%%' directives.
21626
216272001-08-25 Robert Anisko <robert.anisko@epita.fr>
21628
21629 * src/reader.c (reader): Remove calls to 'output_headers' and
21630 'output_trailers'. Remove some C output.
21631 (readgram): Disable a piece of code that was writing a default
21632 definition for 'YYSTYPE'.
21633 (reader_output_yylsp): Remove.
21634 (packsymbols): Output token defintions to a macro.
21635 (copy_definition): Disable C output.
21636
21637 * src/reader.c (parse_macro_decl): New function used to parse macro
21638 declarations.
21639 (copy_string2): Put the body of copy_string into this new function.
21640 Add a parameter to let the caller choose whether he wants to copy the
21641 string delimiters or not.
21642 (copy_string): Be a simple call to copy_string2 with the last argument
21643 bound to true.
21644 (read_declarations): Add case for macro definition.
21645 (copy_identifier): New.
21646 (parse_macro_decl): Read macro identifiers using copy_identifier
21647 rather than lex.
21648
216492001-08-25 Robert Anisko <robert.anisko@epita.fr>
21650
21651 * src/output.c (prepare): Add prefixed names.
21652 (output_parser): Output semantic actions.
21653 (output_parser): Fix bug on '%%line' directives.
21654
21655 * src/output.c (output_headers): Remove. The C code printed by this
21656 function should now be in the skeletons.
21657 (output_trailers): Remove.
21658 (output): Disable call to 'reader_output_yylsp'.
21659 (output_rule_data): Do not output tables to the table obstack.
21660
21661 * src/output.c: Remove some C dedicated output.
21662 Improve the use of macro and output obstacks.
21663 (output_defines): Remove.
21664
21665 * src/output.c (output_token_translations): Associate 'translate'
21666 table with a macro. No output to the table obstack.
21667 (output_gram): Same for 'rhs' and 'prhs'.
21668 (output_stos): Same for 'stos'.
21669 (output_rule_data): Same for 'r1' and 'r2'.
21670 (token_actions): Same for 'defact'.
21671 (goto_actions): Same for 'defgoto'.
21672 (output_base): Same for 'pact' and 'pgoto'.
21673 (output_table): Same for 'table'.
21674 (output_check): Same for 'check'.
21675
21676 * src/output.c (output_table_data): New function.
21677 (output_short_table): Remove.
21678 (output_short_or_char_table): Remove.
21679
21680 * src/output.c (output_parser): Replace most of the skeleton copy code
21681 with something new. Skeletons are now processed character by character
21682 rather than line by line, and Bison looks for '%%' macros. This is the
21683 first step in making Bison's output process (a lot) more flexible.
21684 (output_parser): Use the macro table.
21685
216862001-08-25 Robert Anisko <robert.anisko@epita.fr>
21687
21688 * src/main.c (main): Initialize the macro table.
21689
216902001-08-25 Robert Anisko <robert.anisko@epita.fr>
21691
21692 * src/lex.c (percent_table): Add tok_define.
21693 * src/lex.h: Add tok_define.
21694
216952001-08-25 Robert Anisko <robert.anisko@epita.fr>
21696
21697 * src/macrotab.c: New file.
21698 * src/macrotab.h: New file.
21699 * src/Makefile.am: Update.
21700
217012001-08-25 Robert Anisko <robert.anisko@epita.fr>
21702
21703 * lib/hash.c: New file.
21704 * lib/hash.h: New file.
21705 * lib/Makefile.am: Update.
21706
217072001-08-15 Akim Demaille <akim@epita.fr>
21708
21709 Version 1.28c.
21710
217112001-08-15 Marc Autret <autret_m@epita.fr>
21712
21713 * src/reader.c (readgram): Indent output macro YYSTYPE.
21714 (packsymbols): Likewise.
21715 (output_token_defines): Likewise.
21716 * src/files.c: Standardize.
21717 (compute_header_macro): New.
21718 (defines_obstack_save): New. Use compute_header_macro.
21719 (output_files): Update. Use defines_obstack_save.
21720
217212001-08-15 Akim Demaille <akim@epita.fr>
21722
21723 * doc/bison.texinfo (Table of Symbols): Document
21724 YYSTACK_USE_ALLOCA.
21725
217262001-08-15 Akim Demaille <akim@epita.fr>
21727
21728 * missing: Update from CVS Automake.
21729 * config/config.guess, config/config.sub, config/texinfo.tex:
21730 Update from gnu.org.
21731
217322001-08-15 Akim Demaille <akim@epita.fr>
21733
21734 * Makefile.maint: Sync with CVS Autoconf.
21735
217362001-08-14 Pascal Bart <pascal.bart@epita.fr>
21737
21738 * doc/bison.texinfo: Include GNU Free Documentation License from
21739 `fdl.texi'.
21740 * doc/fdl.texi: Add to package.
21741
217422001-08-14 Marc Autret <autret_m@epita.fr>
21743
21744 Turn on %{source,header}_extension features.
21745
21746 * src/lex.c (percent_table): Un-CPP out header_extension and
21747 source_extension.
21748 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21749 (compute_exts_from_src): Remove conditions. It restores priorities
21750 between options.
21751
217522001-08-14 Marc Autret <autret_m@epita.fr>
21753
21754 * src/files.c (compute_base_names): Add extensions computing when
21755 `--file-prefix' used.
21756 Standardize function calls.
21757
217582001-08-13 Marc Autret <autret_m@epita.fr>
21759
21760 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21761 defining it (defined but null disables alloca).
21762
217632001-08-13 Marc Autret <autret_m@epita.fr>
21764
21765 * src/bison.simple (_yy_memcpy): CPP reformat.
21766
217672001-08-13 Pascal Bart <pascal.bart@epita.fr>
21768
21769 * tests/atconfig.in (CPPFLAGS): Fix.
21770
217712001-08-10 Pascal Bart <pascal.bart@epita.fr>
21772
21773 * doc/bison.texinfo: Include GNU General Public License from
21774 `gpl.texi'.
21775 * doc/gpl.texi: Add to package.
21776
217772001-08-10 Marc Autret <autret_m@epita.fr>
21778
21779 * src/print_graph.h: Fix.
21780 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21781
217822001-08-10 Akim Demaille <akim@epita.fr>
21783
21784 * src/system.h: Provide default declarations for stpcpy, strndup,
21785 and strnlen.
21786
217872001-08-10 Robert Anisko <anisko_r@epita.fr>
21788
21789 * doc/bison.texinfo (Locations): Update @$ stuff.
21790
217912001-08-09 Robert Anisko <anisko_r@epita.fr>
21792
21793 * src/bison.simple (YYLLOC_DEFAULT): Update.
21794 (yyparse): Adjust.
21795
217962001-08-08 Marc Autret <autret_m@epita.fr>
21797
21798 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21799 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21800 Reported by Fabrice Bauzac.
21801
218022001-08-08 Marc Autret <autret_m@epita.fr>
21803
21804 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21805 * src/vcg.c (output_node): Fix.
21806 * src/vcg.h: Cleanup.
21807 * src/print_graph.c: Add comments.
21808 (node_output_size): New global variable. Simplify the formatting of
21809 the VCG graph output.
21810 (print_actions): Unused code is now used. It notifies the final state
21811 and no action states in the VCG graph. It also give the reduce actions.
21812 The `shift and goto' edges are red and the `go to state' edges are
21813 blue.
21814 Get the current node name and node_obstack by argument.
21815 (node_obstack): New variable.
21816 (print_state): Manage node_obstack.
21817 (print_core): Use node_obstack given by argument.
21818 A node is not only computed here but in print_actions also.
21819 (print_graph): CPP out useless code instead of commenting it.
21820
218212001-08-07 Pascal Bart <pascal.bart@epita.fr>
21822
21823 * tests/atconfig.in (CPPFLAGS): Fix.
21824
218252001-08-07 Akim Demaille <akim@epita.fr>
21826
21827 * src/print_graph.c (quote): New.
21828 (print_core): Use it.
21829
218302001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21831
21832 * src/vcg.c (complain.h): Include it.
21833 Unepitaize `return' invocations.
21834 [NDEBUG] (main): Remove.
21835 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21836 * src/files.c (open_files): Initialize graph_obstack.
21837 * src/print_graph.c (print_actions): CPP out useless code.
21838 (print_core): Don't output the last `\n' in labels.
21839 Use `quote'.
21840 * src/files.c (output_files): Output the VCG file.
21841 * src/main.c (main): Invoke print_graph ();
21842
218432001-08-06 Marc Autret <autret_m@epita.fr>
21844
21845 Automaton VCG graph output.
21846 Using option ``-g'' or long option ``--graph'', you can generate
21847 a gram_filename.vcg file containing a VCG description of the LALR (1)
21848 automaton of your grammar.
21849
21850 * src/main.c: Call to print_graph() function.
21851 * src/getargs.h: Update.
21852 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21853 (graph_flag): New flag.
21854 (longopts): Update.
21855 (getargs): Add case `g'.
21856 * src/files.c (graph_obstack): New obstack struct.
21857 (open_files): Initialize new obstack.
21858 (output_files): Saves graph_obstack if required.
21859 * src/files.h (graph_obstack): New extern declaration.
21860 * src/Makefile.am: Add new source files.
21861
218622001-08-06 Marc Autret <autret_m@epita.fr>
21863
21864 * src/print_graph.c, src/print_graph.h (graph): New.
21865 * src/vcg.h: New file.
21866 * src/vcg.c: New file, VCG graph handling.
21867
218682001-08-06 Marc Autret <autret_m@epita.fr>
21869
21870 Add of %source_extension and %header_extension which specify
21871 the source or/and the header output file extension.
21872
21873 * src/files.c (compute_base_names): Remove initialisation of
21874 src_extension and header_extension.
21875 (compute_exts_from_gf): Update.
21876 (compute_exts_from_src): Update.
21877 (output_files): Update.
21878 * src/reader.c (parse_header_extension_decl): New.
21879 (parse_source_extension_decl): New.
21880 (read_declarations): New case statements for the new tokens.
21881 * src/lex.c (percent_table): Add entries for %source_extension
21882 and %header_extension.
21883 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21884
218852001-08-06 Marc Autret <autret_m@epita.fr>
21886
21887 * configure.in: Bump to 1.28c.
21888 * doc/bison.texinfo: Texinfo thingies.
21889
218902001-08-04 Pascal Bart <pascal.bart@epita.fr>
21891
21892 * tests/atconfig.in (CPPFLAGS): Add.
21893 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21894
218952001-08-03 Akim Demaille <akim@epita.fr>
21896
21897 Version 1.28b.
21898
218992001-08-03 Akim Demaille <akim@epita.fr>
21900
21901 * tests/Makefile.am (check-local): Ship testsuite.
21902 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21903 Include `string.h'.
21904
219052001-08-03 Akim Demaille <akim@epita.fr>
21906
21907 * configure.in: Try using -Wformat when compiling.
21908
219092001-08-03 Akim Demaille <akim@epita.fr>
21910
21911 * configure.in: Bump to 1.28b.
21912
219132001-08-03 Akim Demaille <akim@epita.fr>
21914
21915 * src/complain.c: Adjust strerror_r portability issues.
21916
219172001-08-03 Akim Demaille <akim@epita.fr>
21918
21919 Version 1.28a.
21920
219212001-08-03 Akim Demaille <akim@epita.fr>
21922
21923 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21924 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21925 * src/getargs.c: Include complain.h.
21926 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21927 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21928
219292001-08-03 Akim Demaille <akim@epita.fr>
21930
21931 * src/reader.c (readgram): Display hidden chars in error messages.
21932
219332001-08-03 Akim Demaille <akim@epita.fr>
21934
21935 Update to gettext 0.10.39.
21936
219372001-08-03 Akim Demaille <akim@epita.fr>
21938
21939 * lib/strspn.c: New.
21940
219412001-08-01 Marc Autret <autret_m@epita.fr>
21942
21943 * doc/bison.texinfo: Update.
21944 * doc/bison.1 (mandoc): Update.
21945 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21946 * src/files.c: Support output files extensions computing.
21947 (src_extension): New static variable.
21948 (header_extension): New static variable.
21949 (tr): New function.
21950 (get_extension_index): New function, gets the index of an extension
21951 filename in a string.
21952 (compute_exts_from_gf): New function, computes extensions from the
21953 grammar file extension.
21954 (compute_exts_from_src): New functions, computes extensions from the
21955 C source file extension, file given by ``-o'' option.
21956 (compute_base_names): Update.
21957 (output_files): Update.
21958
219592001-08-01 Robert Anisko <anisko_r@epita.fr>
21960
21961 * doc/bison.texi: Document @$.
21962 (Locations): New section.
21963
219642001-07-18 Akim Demaille <akim@epita.fr>
21965
21966 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21967 * config/prev-version.txt, config/move-if-change: New.
21968 * Makefile.am: Adjust.
21969
219702001-07-08 Pascal Bart <pascal.bart@epita.fr>
21971
21972 * src/bison.simple (yyparse): Suppress warning `comparaison
21973 between signed and unsigned'.
21974
219752001-07-05 Pascal Bart <pascal.bart@epita.fr>
21976
21977 * src/getargs.h (raw_flag): Remove.
21978 * src/getargs.c: Die on `-r'/`--raw'.
21979 * src/lex.c (parse_percent_token): Die on `%raw'.
21980 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21981 * tests/calc.at: Suppress test with option `--raw'.
21982
219832001-07-14 Akim Demaille <akim@epita.fr>
21984
21985 * config/: New.
21986 * configure.in: Require Autoconf 2.50.
21987 Update to gettext 0.10.38.
21988
219892001-03-16 Akim Demaille <akim@epita.fr>
21990
21991 * doc/bison.texinfo: ANSIfy the examples.
21992
219932001-03-16 Akim Demaille <akim@epita.fr>
21994
21995 * getargs.c (skeleton): New variable.
21996 (longopts): --skeleton is a new option.
21997 (shortopts, getargs): -S is a new option.
21998 * getargs.h: Declare skeleton.
21999 * output.c (output_parser): Use it.
22000
220012001-03-16 Akim Demaille <akim@epita.fr>
22002
22003 * m4/strerror_r.m4: New.
22004 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22005 * lib/error.h, lib/error.c: Update.
22006
220072001-03-16 Akim Demaille <akim@epita.fr>
22008
22009 * src/getargs.c (longopts): Clean up.
22010
220112001-02-21 Akim Demaille <akim@epita.fr>
22012
22013 * src/reader.c (gensym): `gensym_count' is your own.
22014 Use a static buf to create the symbol name, as token_buffer is no
22015 longer a buffer.
22016
220172001-02-08 Akim Demaille <akim@epita.fr>
22018
22019 * src/conflicts.c (conflict_report): Be sure not to append to res
22020 between two calls, which could happen if both first sprintf were
22021 skipped, but not the first cp += strlen.
22022
220232001-02-08 Akim Demaille <akim@epita.fr>
22024
22025 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22026 New, from fileutils 4.0.37.
22027 * configure.in: Require Autoconf 2.49c. I took some time before
22028 making this decision. This is the only way out for portability
22029 issues in Bison, it would mean way too much duplicate effort to
22030 import in Bison features implemented in 2.49c since 2.13.
22031 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22032
220332001-02-02 Akim Demaille <akim@epita.fr>
22034
22035 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22036 * lib/xalloc.h, lib/xmalloc.c: Update.
22037
220382001-01-19 Akim Demaille <akim@epita.fr>
22039
22040 Get rid of the ad hoc handling of token_buffer in the scanner: use
22041 the obstacks.
22042
22043 * src/lex.c (token_obstack): New.
22044 (init_lex): Initialize it. No longer call...
22045 (grow_token_buffer): this. Remove it.
22046 Adjust all the places which used it to use the obstack.
22047
220482001-01-19 Akim Demaille <akim@epita.fr>
22049
22050 * src/lex.h: Rename all the tokens:
22051 s/\bENDFILE\b/tok_eof/g;
22052 s/\bIDENTIFIER\b/tok_identifier/g;
22053 etc.
22054 Let them be enums, not #define, to ease debugging.
22055 Adjust all the code.
22056
220572001-01-18 Akim Demaille <akim@epita.fr>
22058
22059 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22060 * src/lex.c (maxtoken, grow_token_buffer): Static.
22061
220622001-01-18 Akim Demaille <akim@epita.fr>
22063
22064 Since we now use obstacks, more % directives can be enabled.
22065
22066 * src/lex.c (percent_table): Also accept `%yacc',
22067 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22068 `%debug'.
22069 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22070 instead of returning a token.
22071 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22072 * src/reader.c (read_declarations): Adjust.
22073 * src/files.c (open_files): Don't call `compute_base_names', don't
22074 compute `attrsfile' since they depend upon data which might be
22075 *in* the input file now.
22076 (output_files): Do it here.
22077 * src/output.c (output_headers): Document the fact that this patch
22078 introduces a guaranteed SEGV for semantic parsers.
22079 * doc/bison.texinfo: Document them.
22080 * tests/suite.at: Exercise these %options.
22081
220822000-12-20 Akim Demaille <akim@epita.fr>
22083
22084 Also handle the output file (--verbose) with obstacks.
22085
22086 * files.c (foutput): Remove.
22087 (output_obstack): New.
22088 Adjust all dependencies.
22089 * src/conflicts.c: Return a string.
22090 * src/system.h (obstack_grow_string): Rename as...
22091 (obstack_sgrow): this. Be ready to work with non literals.
22092 (obstack_fgrow4): New.
22093
220942000-12-20 Akim Demaille <akim@epita.fr>
22095
22096 * src/files.c (open_files): Fix the computation of short_base_name
22097 in the case of `-o foo.tab.c'.
22098
220992000-12-20 Akim Demaille <akim@epita.fr>
22100
22101 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22102 (copy_dollar): Now that everything uses obstacks, get rid of the
22103 FILE * parameters.
22104
221052000-12-20 Akim Demaille <akim@epita.fr>
22106
22107 * src/files.c (open_files): Actually the `.output' file is based
22108 on the short_base_name, not base_name.
22109 * tests/suite.at (Checking output file names): Adjust.
22110
221112000-12-20 Akim Demaille <akim@epita.fr>
22112
22113 * src/bison.s1: Remove, we now use directly...
22114 * src/bison.simple: this.
22115 * src/Makefile.am: Use pkgdata instead of data.
22116
221172000-12-20 Akim Demaille <akim@epita.fr>
22118
22119 * src/files.c (guard_obstack): New.
22120 (open_files): Initialize it.
22121 (output_files): Dump it...
22122 * src/files.h: Export it.
22123 * src/reader.c (copy_guard): Use it.
22124
221252000-12-19 Akim Demaille <akim@epita.fr>
22126
22127 * src/files.c (outfile, defsfile, actfile): Removed as global
22128 vars.
22129 (open_files): Don't compute them.
22130 (output_files): Adjust.
22131 (base_name, short_base_name): Be global.
22132 Adjust dependencies.
22133
221342000-12-19 Akim Demaille <akim@epita.fr>
22135
22136 * src/files.c (strsuffix): New.
22137 (stringappend): Be just like strcat but allocate.
22138 (base_names): Eve out from open_files.
22139 Try to simplify the rather hairy computation of base_name and
22140 short_base_name.
22141 (open_files): Use it.
22142 * tests/suite.at (Checking output file names): New test.
22143
221442000-12-19 Akim Demaille <akim@epita.fr>
22145
22146 * src/system.h (obstack_grow_literal_string): Rename as...
22147 (obstack_grow_string): this.
22148 * src/output.c (output_parser): Recognize `%% actions' instead of
22149 `$'.
22150 * src/bison.s1: s/$/%% actions/.
22151 * src/bison.hairy: Likewise.
22152
221532000-12-19 Akim Demaille <akim@epita.fr>
22154
22155 * src/output.c (output_parser): Compute the `#line' lines when
22156 there are.
22157 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22158 Suggested by Hans Aberg.
22159
221602000-12-19 Akim Demaille <akim@epita.fr>
22161
22162 Let the handling of the skeleton files be local to the procedures
22163 that use it.
22164
22165 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22166 longer static.
22167 (fparser, open_extra_files): Remove.
22168 (open_files, output_files): Don't take care of fparser.
22169 * src/files.h: Adjust.
22170 * src/output.c (output_parser): Open and close the file to the
22171 skeleton.
22172 * src/reader.c (read_declarations): When %semantic_parser, open
22173 fguard.
22174
221752000-12-19 Akim Demaille <akim@epita.fr>
22176
22177 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22178 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22179
221802000-12-19 Akim Demaille <akim@epita.fr>
22181
22182 * src/files.c (open_files): Yipee! We no longer need all the code
22183 looking for `/tmp' since we have no tmp file.
22184
221852000-12-19 Akim Demaille <akim@epita.fr>
22186
22187 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22188 New macros.
22189 * src/files.c (open_files): Less dependency on MSDOS etc.
22190
221912000-12-14 Akim Demaille <akim@epita.fr>
22192
22193 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22194 Provide a default definition.
22195 Use it when executing the default @ action.
22196 * src/reader.c (reader_output_yylsp): No longer include
22197 `timestamp' and `text' in the default YYLTYPE.
22198
221992000-12-12 Akim Demaille <akim@epita.fr>
22200
22201 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22202 (copy_guard): Quote the file names.
22203 Reported by Laurent Mascherpa.
22204
222052000-12-12 Akim Demaille <akim@epita.fr>
22206
22207 * src/output.c (output_headers, output_program, output): Be sure
22208 to escape special characters when outputting filenames.
22209 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22210 (output_headers): Don't depend on them, Use ACTSTR.
22211
222122000-11-17 Akim Demaille <akim@epita.fr>
22213
22214 * lib/obstack.h: Formatting changes.
22215 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22216 prevents type checking.
22217 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22218 cast the value to (void *): assigning a `foo *' to a `void *'
22219 variable is valid.
22220 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22221 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22222 append characters.
22223
222242000-11-17 Akim Demaille <akim@epita.fr>
22225
22226 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22227 as...
22228 (suite.m4, regression.m4, calc.m4): these.
22229 * tests/atgeneral.m4: Update from CVS Autoconf.
22230
222312000-11-17 Akim Demaille <akim@epita.fr>
22232
22233 * tests/regression.m4 (%union and --defines): New test,
22234 demonstrating a current bug in the obstack implementation.
22235
222362000-11-17 Akim Demaille <akim@epita.fr>
22237
22238 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22239 macros.
22240 Use them to declare the variables which are global or local to
22241 `yyparse'.
22242
222432000-11-17 Akim Demaille <akim@epita.fr>
22244
22245 * acconfig.h: Remove, no longer used.
22246
222472000-11-07 Akim Demaille <akim@epita.fr>
22248
22249 * src: s/Copyright (C)/Copyright/g.
22250
222512000-11-07 Akim Demaille <akim@epita.fr>
22252
22253 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22254 defining.
22255 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22256
222572000-11-07 Akim Demaille <akim@epita.fr>
22258
22259 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22260 Merge in a single CPP if/else.
22261
222622000-11-07 Akim Demaille <akim@epita.fr>
22263
22264 * src/output.c (output): Remove useless variables.
22265 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22266 argument `data' for consistency with the prototypes.
22267 Qualify it `const'.
22268 (obstack_copy, obstack_copy0): Rename the second argument as
22269 `address' for consistency. Qualify it `const'.
22270 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22271 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22272 `const' their input argument (`data' or `address').
22273 Adjust the corresponding macros to include `const' in casts.
22274
222752000-11-03 Akim Demaille <akim@epita.fr>
22276
22277 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22278 s/PFILE1/BISON_HAIRY/.
22279 Adjust dependencies.
22280
222812000-11-03 Akim Demaille <akim@epita.fr>
22282
22283 For some reason, this was not applied.
22284
22285 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22286 `unlink': it's no longer used.
22287
222882000-11-03 Akim Demaille <akim@epita.fr>
22289
22290 * src/files.c (skeleton_find): New function, eved out of...
22291 (open_files, open_extra_files): here.
22292
222932000-11-03 Akim Demaille <akim@epita.fr>
22294
22295 Don't use `atexit'.
22296
22297 * src/files.c (obstack_save): New function.
22298 (done): Rename as...
22299 (output_files): this.
22300 Use `obstack_save'.
22301 * src/main.c (main): Don't use `atexit' to register `done', since
22302 it no longer has to remove tmp files, just call `output_files'
22303 when there are no errors.
22304
223052000-11-02 Akim Demaille <akim@epita.fr>
22306
22307 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22308 `unlink': it's no longer used.
22309 * src/files.h: Formatting changes.
22310
223112000-11-02 Akim Demaille <akim@epita.fr>
22312
22313 Remove the last uses of mktemp and unlink/delete.
22314
22315 * src/files.c (fdefines, ftable): Removed.
22316 (defines_ostack, table_obstack): New.
22317 Adjust dependencies of the former into uses of the latter.
22318 * src/output.c (output_short_or_char_table, output_short_table):
22319 Convert to using obstacks.
22320 * src/reader.c (copy_comment2): Accept one FILE * and two
22321 obstacks.
22322 (output_token_defines, reader_output_yylsp): Use obstacks.
22323 * src/system.h (obstack_fgrow3): New.
22324 * po/POTFILES.in: Adjust.
22325
223262000-11-01 Akim Demaille <akim@epita.fr>
22327
22328 Change each use of `fattrs' into a use of `attrs_obstack'.
22329
22330 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22331 * src/files.c (fattrs): Remove.
22332 (attrs_obstack): New.
22333 Adjust all dependencies.
22334 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22335
223362000-11-01 Akim Demaille <akim@epita.fr>
22337
22338 Introduce obstacks.
22339 Change each use of `faction' into a use of `action_obstack'.
22340
22341 * lib/obstack.h, lib/obstack.c: New files.
22342 * src/files.c (faction): Remove.
22343 (action_obstack): New.
22344 Adjust all dependencies.
22345
223462000-10-20 Akim Demaille <akim@epita.fr>
22347
22348 * lib/quote.h (PARAMS): New macro. Use it.
22349
223502000-10-16 Akim Demaille <akim@epita.fr>
22351
22352 * src/output.c (output_short_or_char_table): New function.
22353 (output_short_table, output_token_translations): Use it.
22354 (goto_actions): Use output_short_table.
22355
223562000-10-16 Akim Demaille <akim@epita.fr>
22357
22358 * src/symtab.c (bucket_new): New function.
22359 (getsym): Use it.
22360
22361 * src/output.c (output_short_table): New argument to display the
22362 comment associated with the table.
22363 Adjust dependencies.
22364 (output_gram): Use it.
22365 (output_rule_data): Nicer output layout for YYTNAME.
22366
223672000-10-16 Akim Demaille <akim@epita.fr>
22368
22369 * src/lex.c (read_typename): New function.
22370 (lex): Use it.
22371 * src/reader.c (copy_dollar): Likewise.
22372
223732000-10-16 Akim Demaille <akim@epita.fr>
22374
22375 * src/reader.c (copy_comment2): Expect the input stream to be on
22376 the `/' which is suspected to open a comment, instead of being
22377 called after `//' or `/*' was read.
22378 (copy_comment, copy_definition, parse_union_decl, copy_action)
22379 (copy_guard): Adjust.
22380
223812000-10-16 Akim Demaille <akim@epita.fr>
22382
22383 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22384 `read_signed_integer'.
22385
223862000-10-16 Akim Demaille <akim@epita.fr>
22387
22388 * src/reader.c (copy_dollar): New function.
22389 (copy_guard, copy_action): Use it.
22390
223912000-10-16 Akim Demaille <akim@epita.fr>
22392
22393 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22394 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22395 New files, from Fileutils 4.0.27.
22396 * src/main.c (printable_version): Remove.
22397 * src/lex.c, src/reader.c: Use `quote'.
22398
223992000-10-04 Akim Demaille <akim@epita.fr>
22400
22401 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22402
224032000-10-04 Akim Demaille <akim@epita.fr>
22404
22405 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22406
224072000-10-04 Akim Demaille <akim@epita.fr>
22408
22409 When a literal string is used to define two different tokens,
22410 `bison -v' segfaults.
22411 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22412
22413 * tests/regression.m4: New file.
22414 Include the core of the sample provided by Piotr Gackiewicz.
22415 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22416 properly.
22417
224182000-10-04 Akim Demaille <akim@epita.fr>
22419
22420 * src/reader.c (parse_expect_decl): Keep `count' within the size
22421 of `buffer'.
22422 From Neil Booth.
22423
224242000-10-02 Paul Eggert <eggert@twinsun.com>
22425
22426 * bison.s1 (yyparse): Assign the default value
22427 unconditionally, to avoid a GCC warning and make the parser a
22428 tad smaller.
22429
224302000-10-02 Akim Demaille <akim@epita.fr>
22431
22432 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22433 options.
22434
224352000-10-02 Akim Demaille <akim@epita.fr>
22436
22437 * src/derives.c, src/print.c, src/reduce.c: To ease the
22438 translation, move some `\n' out of the translated strings.
22439
224402000-10-02 Akim Demaille <akim@epita.fr>
22441
22442 The location tracking mechanism is precious for parse error
22443 messages. Nevertheless, it is enabled only when `@n' is used in
22444 the grammar, which is a different issue (you can use it in error
22445 message, but not in the grammar per se). Therefore, there should
22446 be another means to enable it.
22447
22448 * src/getargs.c (getargs): Support `--locations'.
22449 (usage): Report it.
22450 * src/getargs.h (locationsflag): Export it.
22451 * src/lex.c (percent_table): Support `%locations'.
22452 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22453 with `locationsflag'.
22454 * doc/bison.texinfo: Document `--locations' and `%locations'.
22455 Sort the options.
22456 * tests/calc.m4: Test it.
22457
22458 For regularity of the names, replace each
22459 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22460 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22461 In addition replace each `flag' with `_flag'.
22462
224632000-10-02 Akim Demaille <akim@epita.fr>
22464
22465 Also test parse error messages, including with YYERROR_VERBOSE.
22466
22467 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22468 associative).
22469 Use it to check the computations.
22470 Use it to check `nonassoc' is honored.
22471 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22472 `--yyerror-verbose'.
22473 (_AT_CHECK_CALC): Adjust to this option.
22474 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22475
224762000-10-02 Akim Demaille <akim@epita.fr>
22477
22478 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22479 the latter demonstrates a flaw in the handling of non debugging
22480 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22481 was used in order to simplify:
22482
22483 #if YYDEBUG
22484 if (yydebug)
22485 {
22486 ...
22487 }
22488 #endif
22489
22490 into
22491
22492 if (yydebug)
22493 {
22494 ...
22495 }
22496
22497 unfortunately this leads to a CPP conflict when
22498 `--name-prefix=foo' is used since it produces `#define yydebug
22499 foodebug'.
22500
22501 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22502 (YYDPRINTF): New macro.
22503 Spread its use.
22504 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22505 the bison options.
22506 Also test `--verbose', `--defines' and `--name-prefix'.
22507
225082000-10-02 Akim Demaille <akim@epita.fr>
22509
22510 Improve the readability of the produced parsers.
22511
22512 * src/bison.s1: Formatting changes.
22513 Improve the comment related to the `$' mark.
22514 (yydefault): Don't fall through to `yyresume': `goto' there.
22515 * src/output.c (output_parser): When the `$' is met, skip the end
22516 of its line.
22517 New variable, `number_of_dollar_signs', to check there's exactly
22518 one `$' in the parser skeleton.
22519
225202000-10-02 Akim Demaille <akim@epita.fr>
22521
22522 * lib/xstrdup.c: New file, from the fileutils.
22523 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22524 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22525 instead of strlen + xmalloc + strcpy.
22526 * src/symtab.c (copys): Remove, use xstrdup instead.
22527
225282000-10-02 Akim Demaille <akim@epita.fr>
22529
22530 * src/gram.h (associativity): New enum type which replaces the
22531 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22532 `right_assoc', `left_assoc' and `non_assoc'.
22533 Adjust all dependencies.
22534 * src/reader.c: Formatting changes.
22535 (LTYPESTR): Don't define it, use it as a literal in
22536 `reader_output_yylsp'.
22537 * src/symtab.h (symbol_class): New enum type which replaces the
22538 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22539 `sunknown', `stoken and `snterm'.
22540
225412000-10-02 Akim Demaille <akim@epita.fr>
22542
22543 * src/getargs.c (fixed_outfiles): Rename as...
22544 (yaccflag): for consistency and accuracy.
22545 Adjust dependencies.
22546
225472000-10-02 Akim Demaille <akim@epita.fr>
22548
22549 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22550 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22551 difficult and introduced a lot of core dump. It turns out that
22552 Bison used an implementation of `xmalloc' based on `calloc', and
22553 at various places it does depend upon the initialization to 0. I
22554 have not tried to isolate the pertinent places, and all the former
22555 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22556 someone should address this issue.
22557
22558 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22559 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22560 files.
22561 Adjust dependencies.
22562 * src/warshall.h: New file.
22563 Propagate.
22564
225652000-10-02 Akim Demaille <akim@epita.fr>
22566
22567 Various anti-`extern in *.c' changes.
22568
22569 * src/system.h: Include `assert.h'.
22570
225712000-10-02 Akim Demaille <akim@epita.fr>
22572
22573 * src/state.h (nstates, final_state, first_state, first_shift)
22574 (first_reduction): Move their exportation from here...
22575 * src/LR0.h: to here.
22576 Adjust dependencies.
22577 * src/getargs.c (statisticsflag): New variable.
22578 Add support for `--statistics'.
22579 Adjust dependencies.
22580
22581 Remove a lot of now useless `extern' statements in most files.
22582
225832000-10-02 Akim Demaille <akim@epita.fr>
22584
22585 * src/LR0.h: New file.
22586 Propagate its use.
22587
225882000-10-02 Akim Demaille <akim@epita.fr>
22589
22590 * src/print.h: New file.
22591 Propagate its use.
22592 * src/print.c: Formatting and ordering changes.
22593 (verbose, terse): Replace with...
22594 (print_results): this new function.
22595 Adjust dependencies.
22596
225972000-10-02 Akim Demaille <akim@epita.fr>
22598
22599 * src/conflicts.c (conflict_report): New function.
22600 (conflict_log, verbose_conflict_log): Replace with...
22601 (print_conflicts): this function.
22602 Adjust dependencies.
22603 * src/conflicts.h: New file.
22604 Propagate its inclusion.
22605
226062000-10-02 Akim Demaille <akim@epita.fr>
22607
22608 * src/nullable.h: New file.
22609 Propagate its inclusion.
22610 * src/nullable.c: Formatting changes.
22611
226122000-10-02 Akim Demaille <akim@epita.fr>
22613
22614 * src/reduce.h: New file.
22615 Propagate its inclusion.
22616 * src/reduce.c: Topological sort and other formatting changes.
22617 (bool, TRUE, FALSE): Move their definition to...
22618 * src/system.h: here.
22619
226202000-10-02 Akim Demaille <akim@epita.fr>
22621
22622 * src/files.c: Formatting changes.
22623 (tryopen, tryclose, openfiles): Rename as...
22624 (xfopen, xfclose, open_files): this.
22625 (stringappend): static.
22626 * src/files.h: Complete the list of exported symbols.
22627 Propagate its use.
22628
226292000-10-02 Akim Demaille <akim@epita.fr>
22630
22631 * src/reader.h: New file.
22632 Propagate its use instead of tedious list of `extern' and
22633 prototypes.
22634 * src/reader.c: Formatting changes, topological sort,
22635 s/register//.
22636
226372000-10-02 Akim Demaille <akim@epita.fr>
22638
22639 * src/lex.h: Prototype `lex.c' exported functions.
22640 * src/reader.c: Adjust.
22641 * src/lex.c: Formatting changes.
22642 (safegetc): Rename as...
22643 (xgetc): this.
22644
226452000-10-02 Akim Demaille <akim@epita.fr>
22646
22647 * src/lalr.h: New file.
22648 Propagate its inclusion instead of prototypes and `extern'.
22649 * src/lalr.c: Formatting changes, topological sorting etc.
22650
226512000-10-02 Akim Demaille <akim@epita.fr>
22652
22653 * src/output.c (token_actions): Introduce a temporary array,
22654 YYDEFACT, that makes it possible for this function to use
22655 output_short_table.
22656
226572000-10-02 Akim Demaille <akim@epita.fr>
22658
22659 `user_toknums' is output as a `short[]' in `output.c', while it is
22660 defined as a `int[]' in `reader.c'. For consistency with the
22661 other output tables, `user_toknums' is now defined as a table of
22662 shorts.
22663
22664 * src/reader.c (user_toknums): Be a short table instead of an int
22665 table.
22666 Adjust dependencies.
22667
22668 Factor the short table outputs.
22669
22670 * src/output.c (output_short_table): New function.
22671 * src/output.c (output_gram, output_stos, output_rule_data)
22672 (output_base, output_table, output_check): Use it.
22673
226742000-10-02 Akim Demaille <akim@epita.fr>
22675
22676 * src/output.c (output): Topological sort of the functions, in
22677 order to get rid of the `static' prototypes.
22678 No longer use `register'.
22679 * src/output.h: New file.
22680 Propagate its inclusion in files explicitly prototyping functions
22681 from output.c.
22682
226832000-09-21 Akim Demaille <akim@epita.fr>
22684
22685 * src/atgeneral.m4: Update from Autoconf.
22686
226872000-09-21 Akim Demaille <akim@epita.fr>
22688
22689 * src/closure.h: New file.
22690 * src/closure.c: Formatting changes, topological sort over the
22691 functions, use of closure.h.
22692 (initialize_closure, finalize_closure): Rename as...
22693 (new_closure, free_closure): these. Adjust dependencies.
22694 * src/LR0.c: Formatting changes, topological sort, use of
22695 cloture.h.
22696 (initialize_states): Rename as...
22697 (new_states): this.
22698 * src/Makefile.am (noinst_HEADERS): Adjust.
22699
227002000-09-20 Akim Demaille <akim@epita.fr>
22701
22702 * src/acconfig.h: Don't protect config.h against multiple
22703 inclusion.
22704 Don't define PARAMS.
22705 * src/system.h: Define PARAMS.
22706 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22707 purpose of config.h. system.h must not try to fix wrong
22708 definitions in config.h.
22709
227102000-09-20 Akim Demaille <akim@epita.fr>
22711
22712 * src/derives.h: New file.
22713 * src/main.c, src/derives.h: Use it.
22714 Formatting changes.
22715 * src/Makefile.am (noinst_HEADERS): Adjust.
22716
227172000-09-20 Akim Demaille <akim@epita.fr>
22718
22719 * tests/atgeneral.m4: Update from Autoconf.
22720 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22721 (AT_CHECK_CALC): New macros.
22722 Use these macros to test bison with options `', `--raw',
22723 `--debug', `--yacc', `--yacc --debug'.
22724
227252000-09-19 Akim Demaille <akim@epita.fr>
22726
22727 * src/output.c: Formatting changes.
22728 * src/machine.h: Remove, leaving its contents in...
22729 * src/system.h: here.
22730 Include stdio.h.
22731 Adjust all dependencies on stdio.h and machine.h.
22732 * src/getargs.h: New file.
22733 Let all `extern' declarations about getargs.c be replaced with
22734 inclusion of `getargs.h'.
22735 * src/Makefile.am (noinst_HEADERS): Adjust.
22736
22737 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22738 scope.
22739 (yyerror): Returns void, not int.
22740 * doc/bison.texinfo: Formatting changes.
22741
227422000-09-19 Akim Demaille <akim@epita.fr>
22743
22744 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22745 portable.
22746
227472000-09-18 Akim Demaille <akim@epita.fr>
22748
22749 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22750 * src/Makefile.am (INCLUDES): Don't.
22751 Be ready to fetch headers in lib/.
22752
227532000-09-18 Akim Demaille <akim@epita.fr>
22754
22755 * doc/bison.texinfo: Update the copyright.
22756 ANSIfy and GNUify the examples.
22757 Remove the old menu.
22758
227592000-09-18 Akim Demaille <akim@epita.fr>
22760
22761 First set of tests: use the `calc' example from the documentation.
22762
22763 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22764 is defined only when YYDEBUG is.
22765 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22766 * src/files.c (tryopen, tryclose): Formatting changes.
22767 Move to the top and be static.
22768 * src/reader.c (read_signed_integer): Likewise.
22769 * tests/calc.m4: New file.
22770 * Makefile.am, suite.m4: Adjust.
22771 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22772
227732000-09-18 Akim Demaille <akim@epita.fr>
22774
22775 Add support for an Autotest test suite for Bison.
22776
22777 * m4/m4.m4, m4/atconfig.m4: New files.
22778 * m4/Makefile.am (EXTRA_DIST): Adjust.
22779 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22780 files.
22781 * src/getargs.c: Display a more standard --version message.
22782 * src/reader.c (reader): Formatting changes.
22783 No longer depend upon VERSION_STRING.
22784 * configure.in: No longer use `dnl'.
22785 Set up the test suite and the new directory `tests/.
22786 (VERSION_STRING): Remove.
22787
227882000-04-14 Akim Demaille <akim@epita.fr>
22789
22790 * src/reader.c (copy_comment2): New function, same as former
22791 `copy_comment', but outputs into two FILE *.
22792 (copy_comment): Use it.
22793 (parse_union_decl): Use it.
22794 (get_type, parse_start_decl): Use the same `invalid' message.
22795 (parse_start_decl, parse_union_decl): Use the same `multiple'
22796 message.
22797 (parse_union_decl, copy_guard, copy_action): Use the same
22798 `unmatched' message.
22799 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22800
228012000-03-31 Akim Demaille <akim@epita.fr>
22802
22803 * src/files.c (tryopen, tryclose): Move to the top.
22804 Be static.
22805
228062000-03-31 Akim Demaille <akim@epita.fr>
22807
22808 * src/main.c (main): Don't call `done', exit does it.
22809
228102000-03-31 Akim Demaille <akim@epita.fr>
22811
22812 * allocate.c: s/return (foo)/return foo/.
22813 * lalr.c: Likewise.
22814 * LR0.c: Likewise.
22815 * output.c: Likewise.
22816 * reader.c: Likewise.
22817 * symtab.c: Likewise.
22818 * vmsgetargs.c: Likewise.
22819
228202000-03-31 Akim Demaille <akim@epita.fr>
22821
22822 Clean up the error reporting functions.
22823
22824 * src/report.c: New file.
22825 * src/report.h: Likewise.
22826 * src/Makefile.am: Adjust.
22827 * m4/error.m4: New file.
22828 * m4/Makefile.am: Adjust.
22829 * configure.in (jm_PREREQ_ERROR): Call it.
22830 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22831 Remove.
22832 (fatal, fatals): Remove. All callers use complain.c::fatal.
22833 (warn, warni, warns, warnss, warnss): Remove. All callers use
22834 complain.c::complain.
22835 (toomany): Remove, use fatal instead.
22836 * src/files.c (done): No argument, use complain_message_count.
22837 * src/main.c (main): Register `done' to `atexit'.
22838
22839 * src/getargs.c (usage): More `fputs', less `fprintf'.
22840
228412000-03-28 Akim Demaille <akim@epita.fr>
22842
22843 * lib/: New directory.
22844 * Makefile.am (SUBDIRS): Adjust.
22845 * configure.in: Adjust.
22846 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22847 useless.
22848 * src/alloca.c: Moved to lib/.
22849 * src/getopt.c: Likewise.
22850 * src/getopt1.c: Likewise.
22851 * src/getopt.h: Likewise.
22852 * src/ansi2knr.c: Likewise.
22853 * src/ansi2knr.1: Likewise.
22854 * src/Makefile.am: Adjust.
22855 * lib/Makefile.am: New file.
22856
228572000-03-28 Akim Demaille <akim@epita.fr>
22858
22859 * src/getargs.c (usage): Refresh the help message.
22860
228612000-03-17 Akim Demaille <akim@epita.fr>
22862
22863 * src/getopt1.c: Updated from textutils 2.0e
22864 * src/getopt.c: Likewise.
22865 * src/getopt.h: Likewise.
22866
228672000-03-17 Akim Demaille <akim@epita.fr>
22868
22869 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22870 the file name, not the whole `#line LINE FILE'.
22871
228722000-03-17 Akim Demaille <akim@epita.fr>
22873
22874 On syntax errors, report the token on which we choked.
22875
22876 * src/bison.s1 (yyparse): In the label yyerrlab, when
22877 YYERROR_VERBOSE, add yychar in msg.
22878
228792000-03-17 Akim Demaille <akim@epita.fr>
22880
22881 * src/reader.c (copy_at): New function.
22882 (copy_guard): Use it.
22883 (copy_action): Use it.
22884
228852000-03-17 Akim Demaille <akim@epita.fr>
22886
22887 Be kind to translators, save some useless translations.
22888
22889 * src/main.c (banner): New function.
22890 (fatal_banner): Use it.
22891 (warn_banner): Use it.
22892
228932000-03-17 Akim Demaille <akim@epita.fr>
22894
22895 * src/reader.c (copy_definition): Use copy_string and
22896 copy_comment. Removed now unused `match', `ended',
22897 `cplus_comment'.
22898 (copy_comment, copy_string): Moved, to be visible from
22899 copy_definition.
22900
229012000-03-17 Akim Demaille <akim@epita.fr>
22902
22903 * src/reader.c (copy_string): Declare `static inline'. No
22904 problems with inline, since it is checked by configure.
22905 (copy_comment): Likewise.
22906
229072000-03-17 Akim Demaille <akim@epita.fr>
22908
22909 * src/reader.c (packsymbols): Formatting changes.
22910
229112000-03-17 Akim Demaille <akim@epita.fr>
22912
22913 * src/reader.c (copy_comment): New function, factored out from:
22914 (copy_action): Use it. Removed now unused `match', `ended',
22915 `cplus_comment'.
22916 (copy_guard): Likewise.
22917
229182000-03-17 Akim Demaille <akim@epita.fr>
22919
22920 * src/reader.c (copy_string): New function, factored out from:
22921 (copy_action): Use it.
22922 (copy_guard): Likewise.
22923
229242000-03-17 Akim Demaille <akim@epita.fr>
22925
22926 Change the handling of @s so that they behave exactly like $s.
22927 There is now a pseudo variable @$ (readble and writable), location
22928 of the lhs of the rule (by default ranging from the location of
22929 the first symbol of the rhs, to the location of the last symbol,
22930 or, if the rhs is empty, YYLLOC).
22931
22932 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22933 yyval.
22934 (yyparse): When providing a default semantic action, provide a
22935 default location action.
22936 (after the $): No longer change `*YYLSP', just stack YYLOC the
22937 same way you stack YYVAL.
22938 * src/reader.c (read_declarations): Use warns.
22939 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22940 (copy_action, case '@'): Likewise.
22941 Use a standard error message, to save useless work from
22942 translators.
22943
229442000-03-17 Akim Demaille <akim@epita.fr>
22945
22946 * src/bison.s1: Formatting and cosmetics changes.
22947 * src/reader.c: Likewise.
22948 Update the Copyright notice.
22949
229502000-03-17 Akim Demaille <akim@epita.fr>
22951
22952 * src/bison.s1 (#line): All set to `#line' only, since the
22953 Makefile now handles them.
22954
229552000-03-16 Akim Demaille <akim@epita.fr>
22956
22957 * src/output.c (output_rule_data): Output the documentation of
22958 some of the tables.
22959 (Copyright notice): Update.
22960 Formatting changes.
22961
229622000-03-16 Akim Demaille <akim@epita.fr>
22963
22964 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22965 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22966 One `#if YYDEBUG' remains, since it uses variables which are
22967 defined only if `YYDEBUG != 0'.
22968
229692000-03-16 Akim Demaille <akim@epita.fr>
22970
22971 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22972 and related variables so that the similarities are highlighted.
22973
229742000-03-16 Akim Demaille <akim@epita.fr>
22975
22976 * src/bison.s1: Properly indent CPP directives.
22977
229782000-03-16 Akim Demaille <akim@epita.fr>
22979
22980 * src/bison.s1: Properly indent the `alloca' CPP section.
22981
229822000-03-16 Akim Demaille <akim@epita.fr>
22983
22984 Do not hard code values of directories in `configure.in'.
22985 Update the `configure' tool chain.
22986
22987 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22988 src/makefile.am.
22989 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22990 (AC_OUTPUT): Add m4/Makefile.
22991 Bump to bison 1.28a, 1.29 has never been released.
22992 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22993 handled via src/Makefile.am.
22994 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22995 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22996 autoheader.
22997 * Makefile.am (SUBDIRS): Add m4.
22998 (ACLOCAL_AM_FLAGS): New variable.
22999 (AUTOMAKE_OPTIONS): Add check-news.
23000 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23001 the proper line number and file name.
23002 (DEFS): Propagate the location of bison library files and of the
23003 locale files.
23004 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23005 builddir.
23006 * acinclude.m4: Remove, replaced by the directory m4.
23007 * m4/Makefile.am (EXTRA_DIST): New variable.
23008 * m4/gettext.m4: New file, from the fileutils.
23009 * m4/lcmessage.m4: Likewise
23010 * m4/progtest.m4: Likewise.
23011 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23012
230132000-03-10 Akim Demaille <akim@epita.fr>
23014
23015 * src/closure.c:
23016 Formatting changes of various comments.
23017 Respect the GNU coding standards at various places.
23018 Don't use `_()' when no translation is needed.
23019
230201999-12-13 Jesse Thilo <jthilo@gnu.org>
23021
23022 * src/files.c:
23023 OS/2 honors TMPDIR environment variable.
23024
230251999-12-13 Jesse Thilo <jthilo@gnu.org>
23026
23027 * doc/bison.texinfo: Tweaked spelling and grammar.
23028 Updated ISBN.
23029 Removed reference to price of printed copy.
23030 Mention BISON_SIMPLE and BISON_HAIRY.
23031
230321999-12-13 Jesse Thilo <jthilo@gnu.org>
23033
23034 * configure.in, NEWS:
23035 Bison 1.29 released.
23036
230371999-10-27 Jesse Thilo <jthilo@gnu.org>
23038
23039 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23040 Added reference card.
23041
230421999-07-26 Jesse Thilo <jthilo@gnu.org>
23043
23044 * po/ru.po: Added Russian translation.
23045
230461999-07-26 Jesse Thilo <jthilo@gnu.org>
23047
23048 * configure.in: Added Russian translation.
23049
230501999-07-06 Jesse Thilo <jthilo@gnu.org>
23051
23052 * configure.in, NEWS, README:
23053 Released version 1.28.
23054
230551999-06-14 Jesse Thilo <jthilo@gnu.org>
23056
23057 * src/system.h:
23058 Squashed redefinition warning on some systems.
23059
23060 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23061 Have configure build version string instead of relying on ANSI string
23062 concatentation.
23063
230641999-06-14 Jesse Thilo <jthilo@gnu.org>
23065
23066 * po/POTFILES.in: Got rid of version.c.
23067
230681999-06-14 Jesse Thilo <jthilo@gnu.org>
23069
23070 * acconfig.h, configure.in:
23071 Have configure build version string instead of relying on ANSI string
23072 concatentation.
23073
230741999-06-08 Jesse Thilo <jthilo@gnu.org>
23075
23076 * doc/bison.1:
23077 Dropped mention of `+' for long-named options.
23078
230791999-05-30 Jesse Thilo <jthilo@gnu.org>
23080
23081 * src/files.c: Added <unistd.h> for unlink().
23082
23083 * src/Makefile.am, src/system.h:
23084 I18n fixes.
23085
230861999-05-30 Jesse Thilo <jthilo@gnu.org>
23087
23088 * README: Added a FAQ list.
23089
23090 * configure.in, acconfig.h:
23091 I18n fixes.
23092
230931999-05-30 Jesse Thilo <jthilo@gnu.org>
23094
23095 * doc/FAQ, doc/Makefile.am:
23096 Added a FAQ list.
23097
230981999-05-19 Jesse Thilo <jthilo@gnu.org>
23099
23100 * src/alloc.h, src/symtab.h, src/version.c:
23101 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23102
231031999-04-18 Jesse Thilo <jthilo@gnu.org>
23104
23105 * src/.cvsignore, src/Makefile.am:
23106 Reorganized: sources in `src', documentation in `doc'.
23107
23108 * src/lex.c (literalchar):
23109 fixed the code for escaping double quotes (thanks
23110 Jonathan Czisny.)
23111
231121999-04-18 Jesse Thilo <jthilo@gnu.org>
23113
23114 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23115 Adjusted paths to reflect directory reorganization.
23116
231171999-04-18 Jesse Thilo <jthilo@gnu.org>
23118
23119 * doc/.cvsignore, doc/Makefile.am:
23120 Reorganized: sources in `src', documentation in `doc'.
23121
231221999-04-18 Jesse Thilo <jthilo@gnu.org>
23123
23124 * configure.in:
23125 Updated AC_INIT file to reflect directory reorganization.
23126
23127 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23128 Reorganized: sources in `src', documentation in `doc'.
23129
231301999-04-13 Jesse Thilo <jthilo@gnu.org>
23131
23132 * src/allocate.c:
23133 Don't declare calloc() and realloc() if not necessary.
23134
231351999-04-13 Jesse Thilo <jthilo@gnu.org>
23136
23137 * configure.in, acconfig.h, acinclude.m4:
23138 Don't declare calloc() and realloc() if not necessary.
23139
231401999-03-23 Jesse Thilo <jthilo@gnu.org>
23141
23142 * po/.cvsignore: Added i18n support.
23143
231441999-03-23 Jesse Thilo <jthilo@gnu.org>
23145
23146 * acconfig.h, configure.in, Makefile.am:
23147 Added i18n support.
23148
231491999-03-22 Jesse Thilo <jthilo@gnu.org>
23150
23151 * src/bison.s1: Fixed #line numbers.
23152
231531999-03-15 Jesse Thilo <jthilo@gnu.org>
23154
23155 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23156 Added PO files from Translation Project.
23157
231581999-03-03 Jesse Thilo <jthilo@gnu.org>
23159
23160 * Makefile.am:
23161 Added support for non-ANSI compilers (ansi2knr).
23162
231631999-02-16 Jesse Thilo <jthilo@gnu.org>
23164
23165 * configure.in: Bumped version number to 1.27.
23166
23167 * Makefile.am:
23168 Added `bison.simple' to list of files removed by `make distclean'.
23169
231701999-02-12 Jesse Thilo <jthilo@gnu.org>
23171
23172 * src/files.c, src/files.h:
23173 Defined locations of parser files in config.h instead of Makefile.
23174
231751999-02-12 Jesse Thilo <jthilo@gnu.org>
23176
23177 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23178 Defined locations of parser files in config.h instead of Makefile.
23179
231801999-02-09 Jesse Thilo <jthilo@gnu.org>
23181
23182 * Makefile.am:
23183 Removed inappropriate use of $< macro.
23184
231851999-02-05 Jesse Thilo <jthilo@gnu.org>
23186
23187 * po/Makefile.in.in, po/POTFILES.in:
23188 Add `po' directory skeleton.
23189
231901999-01-27 Jesse Thilo <jthilo@gnu.org>
23191
23192 * README: Document help-bison list.
23193
23194 * configure.in: Add check for mkstemp().
23195
231961999-01-20 Jesse Thilo <jthilo@gnu.org>
23197
23198 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23199 Hush a few compiler warnings.
23200
23201 * src/files.c:
23202 Add tryclose(), which verifies that fclose was successful.
23203 Hush a couple of compiler warnings.
23204
232051999-01-20 Jesse Thilo <jthilo@gnu.org>
23206
23207 * Makefile.am, OChangeLog:
23208 ChangeLog is now automatically generated. Include the old version as
23209 OChangeLog.
23210
232111999-01-14 Jesse Thilo <jthilo@gnu.org>
23212
23213 * 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:
23214 Update FSF address.
23215
232161999-01-14 Jesse Thilo <jthilo@gnu.org>
23217
23218 * doc/bison.texinfo: Fix formatting glitch.
23219
23220 * doc/bison.texinfo: Update FSF address.
23221
232221999-01-14 Jesse Thilo <jthilo@gnu.org>
23223
23224 * acconfig.h: Update FSF address.
23225
232261999-01-08 Jesse Thilo <jthilo@gnu.org>
23227
23228 * src/system.h:
23229 Don't define PACKAGE here, since config.h defines it.
23230
232311998-12-30 Jesse Thilo <jthilo@gnu.org>
23232
23233 * src/reader.c: Update copyright date.
23234
23235 * src/main.c:
23236 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23237 favor of output directly to stderr (avoids buffer overruns).
23238
23239 * src/reader.c: Some checks for premature EOF.
23240
23241 * 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:
23242 Use prototypes if the compiler understands them.
23243
23244 * src/files.c: Honor TMPDIR on Unix hosts.
23245 Use prototypes if the compiler understands them.
23246
23247 * src/reader.c:
23248 Fix a couple of buffer overrun bugs.
23249 Use prototypes if the compiler understands them.
23250
23251 * src/system.h: Include unistd.h and ctype.h.
23252 Use #ifdef instead of #if for NLS symbols.
23253
232541998-12-30 Jesse Thilo <jthilo@gnu.org>
23255
23256 * doc/bison.texinfo:
23257 Delete comment "consider using @set for edition number, etc..." since
23258 we now are doing so.
23259
232601998-12-30 Jesse Thilo <jthilo@gnu.org>
23261
23262 * configure.in:
23263 Use prototypes if the compiler understands them.
23264
23265 * NEWS: Document 1.26 highlights.
23266
23267 * Makefile.am: Require Automake 1.3 or later.
23268
23269 * acconfig.h:
23270 Use prototypes if the compiler understands them.
23271
232721998-12-29 Jesse Thilo <jthilo@gnu.org>
23273
23274 * src/version.c:
23275 Use VERSION symbol from automake for version number.
23276
232771998-12-29 Jesse Thilo <jthilo@gnu.org>
23278
23279 * acconfig.h, configure.in, version.cin:
23280 Use VERSION symbol from automake for version number.
23281
232821998-11-28 Jesse Thilo <jthilo@gnu.org>
23283
23284 * Makefile.am:
23285 Distribute original version of simple parser (bison.s1), not built
23286 version (bison.simple).
23287
232881998-11-28 Jesse Thilo <jthilo@gnu.org>
23289
23290 * doc/bison.texinfo: Add info dir entry.
23291
23292 * doc/bison.texinfo:
23293 Let automake put version number into documentation.
23294
232951998-11-26 Jesse Thilo <jthilo@gnu.org>
23296
23297 * src/bison.cld, src/build.com, src/vmshlp.mar:
23298 Add non-RCS files from /gd/gnu/bison.
23299
233001998-11-26 Jesse Thilo <jthilo@gnu.org>
23301
23302 * doc/bison.1:
23303 Document the BISON_HAIRY and BISON_SIMPLE variables.
23304
233051998-11-25 Jesse Thilo <jthilo@gnu.org>
23306
23307 * src/version.c: Build version.c automatically.
23308
23309 * src/reader.c:
23310 Fix token numbering (used to start at 258, not 257).
23311
23312 * src/system.h: Include config.h.
23313
23314 * src/getargs.c: Update bug report address.
23315
23316 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23317 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23318
233191998-11-25 Jesse Thilo <jthilo@gnu.org>
23320
23321 * Makefile.am:
23322 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23323
23324 * configure.in, version.cin:
23325 Build version.c automatically.
23326
23327 * AUTHORS: Add AUTHORS file.
23328
23329 * README: Update bug report address.
23330
23331 * bison.simple:
23332 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23333
23334 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23335 Add automake stuff.
23336
233371998-11-25 Jesse Thilo <jthilo@gnu.org>
23338
23339 * doc/bison.texinfo: Clean up some formatting.
23340
233411998-05-05 Richard Stallman <rms@gnu.org>
23342
23343 * doc/bison.texinfo:
23344 Explain better why to make a pure parser.
23345
233461998-01-05 Richard Stallman <rms@gnu.org>
23347
23348 * src/files.c (openfiles):
23349 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23350 find a temporary directory, if possible. Do not unlink files while
23351 they are open.
23352
233531997-08-25 Richard Stallman <rms@gnu.org>
23354
23355 * src/reader.c (stack_offset;):
23356 Change some warni to warns.
23357
23358 * src/lex.c (literalchar): Use warns, not warni.
23359
233601997-06-28 Richard Stallman <rms@gnu.org>
23361
23362 * src/bison.s1: Add a Bison version comment.
23363
23364 * src/main.c (fatal, warn, berror):
23365 Use program_name.
23366
233671997-06-28 Richard Stallman <rms@gnu.org>
23368
23369 * Makefile.in (bison_version): New variable.
23370 (dist): Use that variable.
23371 (bison.s1): Substitute the Bison version into bison.simple.
23372
23373 * bison.simple: Add a Bison version comment.
23374
233751997-06-18 Richard Stallman <rms@gnu.org>
23376
23377 * src/main.c (fatal, warn, berror):
23378 Make error messages standard.
23379 (toomany): Improve error message text.
23380
23381 * 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:
23382 new.h renamed to alloc.h.
23383
233841997-06-18 Richard Stallman <rms@gnu.org>
23385
23386 * Makefile.in: new.h renamed to alloc.h.
23387
233881997-05-24 Richard Stallman <rms@gnu.org>
23389
23390 * src/lex.c (literalchar):
23391 Fix the code for escaping \, " and '.
23392
23393 (lex): Avoid trouble when there are many chars
23394 to discard in a char literal with just several chars in it.
23395
233961997-05-17 Richard Stallman <rms@gnu.org>
23397
23398 * src/bison.s1:
23399 Use malloc, if using alloca is troublesome.
23400 (YYSTACK_USE_ALLOCA): New flag macro.
23401 Define it for some systems and compilers.
23402 (YYSTACK_ALLOC): New macro.
23403 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23404 If it was malloc'd, free it.
23405
234061997-05-17 Richard Stallman <rms@gnu.org>
23407
23408 * bison.simple:
23409 Use malloc, if using alloca is troublesome.
23410 (YYSTACK_USE_ALLOCA): New flag macro.
23411 Define it for some systems and compilers.
23412 (YYSTACK_ALLOC): New macro.
23413 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23414 If it was malloc'd, free it.
23415
234161997-04-23 Richard Stallman <rms@gnu.org>
23417
23418 * src/bison.s1:
23419 (alloca) [__hpux]: Always define as __builtin_alloca.
23420
234211997-04-23 Richard Stallman <rms@gnu.org>
23422
23423 * bison.simple:
23424 (alloca) [__hpux]: Always define as __builtin_alloca.
23425
234261997-04-22 Richard Stallman <rms@gnu.org>
23427
23428 * src/bison.s1:
23429 [__hpux]: Include alloca.h (right for HPUX 10)
23430 instead of declaring alloca (right for HPUX 9).
23431
23432 * src/bison.s1 (__yy_memcpy):
23433 Declare arg `count' as unsigned int.
23434 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23435
234361997-04-22 Richard Stallman <rms@gnu.org>
23437
23438 * bison.simple:
23439 [__hpux]: Include alloca.h (right for HPUX 10)
23440 instead of declaring alloca (right for HPUX 9).
23441
23442 * bison.simple (__yy_memcpy):
23443 Declare arg `count' as unsigned int.
23444 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23445
234461997-01-03 Richard Stallman <rms@gnu.org>
23447
23448 * src/allocate.c: [__STDC__ or _MSC_VER]:
23449 Declare calloc and realloc to return void *.
23450
234511997-01-02 Richard Stallman <rms@gnu.org>
23452
23453 * src/system.h:
23454 [_MSC_VER]: Include stdlib.h and process.h.
23455 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23456
23457 * src/main.c (main): Return FAILURE as a value.
23458 (printable_version): Declare arg as int, not char.
23459
234601997-01-02 Richard Stallman <rms@gnu.org>
23461
23462 * Makefile.in (dist):
23463 Explicitly check for symlinks, and copy them.
23464
234651996-12-19 Richard Stallman <rms@gnu.org>
23466
23467 * src/files.c:
23468 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23469
234701996-12-18 Paul Eggert <eggert@gnu.org>
23471
23472 * src/bison.s1 (yyparse):
23473 If __GNUC__ and YYPARSE_PARAM are both defined,
23474 declare yyparse to have a void * argument.
23475
234761996-12-18 Paul Eggert <eggert@gnu.org>
23477
23478 * bison.simple (yyparse):
23479 If __GNUC__ and YYPARSE_PARAM are both defined,
23480 declare yyparse to have a void * argument.
23481
234821996-12-17 Richard Stallman <rms@gnu.org>
23483
23484 * src/reduce.c (nbits): Add some casts.
23485
234861996-08-12 Richard Stallman <rms@gnu.org>
23487
23488 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23489
234901996-08-12 Richard Stallman <rms@gnu.org>
23491
23492 * bison.simple: Test _MSDOS as well as _MSDOS_.
23493
234941996-07-31 Richard Stallman <rms@gnu.org>
23495
23496 * src/bison.s1:
23497 [__sun && __i386]: Include alloca.h.
23498
234991996-07-31 Richard Stallman <rms@gnu.org>
23500
23501 * bison.simple:
23502 [__sun && __i386]: Include alloca.h.
23503
235041996-07-30 Richard Stallman <rms@gnu.org>
23505
23506 * src/bison.s1: Comment change.
23507
23508 * src/bison.s1: Test _MSDOS_, not MSDOS.
23509
235101996-07-30 Richard Stallman <rms@gnu.org>
23511
23512 * bison.simple: Comment change.
23513
23514 * bison.simple: Test _MSDOS_, not MSDOS.
23515
235161996-06-01 Richard Stallman <rms@gnu.org>
23517
23518 * 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:
23519 Insert `_' macro around many string constants.
23520
23521 * src/main.c:
23522 Insert `_' macro around many string constants.
23523
23524 (main): Call setlocale, bindtextdomain and textdomain.
23525
23526 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23527 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23528 [ENABLE_NLS]: Include libintl.h.
23529 [ENABLE_NLS] (gettext): Define.
23530 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23531 (N_, PACKAGE, LOCALEDIR): New macros.
23532
235331996-06-01 Richard Stallman <rms@gnu.org>
23534
23535 * POTFILES.in: New file.
23536
23537 * Makefile.in (allocate.o):
23538 Define target explicitly.
23539
23540 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23541 (LDFLAGS): Set to @LDFLAGS@.
23542 (configure): Run autoconf only if preceding `cd' succeeds.
23543 (bison.s1): Redirect output to temporary file then move the
23544 temporary to the target, rather than redirecting directly to bison.s1.
23545 (clean): Remove config.status and config.log.
23546 (distclean): Don't remove config.status here.
23547
235481996-05-12 Richard Stallman <rms@gnu.org>
23549
23550 * src/bison.s1:
23551 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23552
235531996-05-12 Richard Stallman <rms@gnu.org>
23554
23555 * bison.simple:
23556 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23557
235581996-05-11 Richard Stallman <rms@gnu.org>
23559
23560 * src/bison.s1 (__yy_memcpy):
23561 Really reorder the args, as was supposedly done on Feb 14 1995.
23562 (yyparse): Calls changed accordingly.
23563
235641996-05-11 Richard Stallman <rms@gnu.org>
23565
23566 * Makefile.in (dist): Don't use $(srcdir).
23567
23568 * bison.simple (__yy_memcpy):
23569 Really reorder the args, as was supposedly done on Feb 14 1995.
23570 (yyparse): Calls changed accordingly.
23571
235721996-01-27 Richard Stallman <rms@gnu.org>
23573
23574 * src/output.c (output_rule_data):
23575 Test YYERROR_VERBOSE in the conditional
23576 around the definition of ttyname.
23577
235781995-12-29 Richard Stallman <rms@gnu.org>
23579
23580 * src/bison.s1:
23581 Fix line numbers in #line commands.
23582
235831995-12-29 Richard Stallman <rms@gnu.org>
23584
23585 * bison.simple:
23586 Fix line numbers in #line commands.
23587
235881995-12-27 Richard Stallman <rms@gnu.org>
23589
23590 * src/bison.s1 (YYPARSE_PARAM_DECL):
23591 In C++, make it always null.
23592 (YYPARSE_PARAM_ARG): New macro.
23593 (yyparse): Use YYPARSE_PARAM_ARG.
23594
235951995-12-27 Richard Stallman <rms@gnu.org>
23596
23597 * bison.simple (YYPARSE_PARAM_DECL):
23598 In C++, make it always null.
23599 (YYPARSE_PARAM_ARG): New macro.
23600 (yyparse): Use YYPARSE_PARAM_ARG.
23601
236021995-11-29 Richard Stallman <rms@gnu.org>
23603
23604 * doc/bison.texinfo:
23605 Describe literal string tokens, %raw, %no_lines, %token_table.
23606
236071995-11-29 Daniel Hagerty <hag@gnu.org>
23608
23609 * doc/bison.texinfo: Fixed update date
23610
236111995-10-16 Richard Stallman <rms@gnu.org>
23612
23613 * src/version.c: Version 1.25.
23614
236151995-10-16 Richard Stallman <rms@gnu.org>
23616
23617 * NEWS: *** empty log message ***
23618
236191995-10-16 Richard Stallman <rms@gnu.org>
23620
23621 * doc/bison.1, doc/bison.rnh:
23622 Add new options.
23623
236241995-10-15 Richard Stallman <rms@gnu.org>
23625
23626 * src/vmsgetargs.c, src/getargs.c:
23627 Added -n, -k, and -raw switches.
23628 (noparserflag, toknumflag, rawtoknumflag): New variables.
23629
23630 * src/symtab.h (SALIAS):
23631 New #define for adding aliases to %token.
23632 (struct bucket): Added `alias' field.
23633
23634 * src/reduce.c (reduce_grammar):
23635 Revise error message.
23636 (print_notices): Remove final `.' from error message.
23637
23638 * src/reader.c (reader_output_yylsp):
23639 New function.
23640 (readgram): Use `#if 0' around code that accepted %command
23641 inside grammar rules: The documentation doesn't allow it,
23642 and it will fail since the %command processors scan for the next %.
23643 (parse_token_decl): Extended the %token
23644 declaration to allow a multi-character symbol as an alias.
23645 (parse_thong_decl): New function.
23646 (read_declarations): Added %thong declarations.
23647 (read_declarations): Handle NOOP to deal with allowing
23648 % declarations as another means to specify the flags.
23649 (readgram): Allow %prec prior to semantics embedded in a rule.
23650 (skip_to_char, read_declarations, copy_definition)
23651 (parse_token_decl, parse_start_decl, parse_type_decl)
23652 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23653 (get_type_name, copy_guard, copy_action, readgram)
23654 (get_type, packsymbols): Revised most error messages.
23655 Changed `fatal' to `warnxxx' to avoid aborting for error.
23656 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23657 (read_declarations): Improve the error message for
23658 an invalid character. Do not abort.
23659 (read_declarations, copy_guard, copy_action): Use
23660 printable_version to avoid unprintable characters in printed output.
23661 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23662 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23663 Allow the type of a non-terminal can be given
23664 more than once, as long as all specifications give the same type.
23665
23666 * src/output.c:
23667 (output_headers, output_trailers, output, output_gram)
23668 (output_rule_data): Implement noparserflag variable.
23669 Implement toknumflag variable.
23670 (output): Call reader_output_yylsp to output LTYPESTR.
23671
23672 * src/main.c (main):
23673 If reader sees an error, don't process the grammar.
23674 (fatals): Updated to not use VARARGS1.
23675 (printable_version, int_to_string, warn, warni, warns, warnss)
23676 (warnsss): New error reporting functions. Avoid abort for error.
23677
23678 * src/lex.h:
23679 Added THONG and NOOP for alias processing.
23680 Added SETOPT for the new code that allows setting options with %flags.
23681
23682 * src/lex.c:
23683 Include getopt.h. Add some extern decls.
23684 (safegetc): New function to deal with EOF gracefully.
23685 (literalchar); new function to deal with reading \ escapes.
23686 (lex): Use literalchar.
23687 (lex): Implemented "..." tokens.
23688 (literalchar, lex, parse_percent_token): Made tokenbuffer
23689 always contain the token. This includes growing the token
23690 buffer while reading an integer.
23691 (parse_percent_token): Replaced if-else statement with percent_table.
23692 (parse_percent_token): Added % declarations as another
23693 way to specify the flags -n, -l, and -r. Also added hooks for
23694 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23695 major changes to files.c.
23696 (lex) Retain in the incoming stream a character following
23697 an incorrect '/'.
23698 (skip_white_space, lex): Revised most error messages
23699 and changed fatal to warn to avoid aborting.
23700 (percent_table): Added %thong declarations.
23701
23702 * src/gram.h: Comment changes.
23703
23704 * src/files.c (openfiles, open_extra_files, done):
23705 Add faction flag
23706 and actfile file. Handle noparserflag. Both for -n switch.
23707
23708 * src/conflicts.c (resolve_sr_conflict):
23709 Remove use of alloca.
23710
237111995-06-01 Jim Meyering <meyering@gnu.org>
23712
23713 * doc/bison.texinfo: *** empty log message ***
23714
237151995-05-06 Richard Stallman <rms@gnu.org>
23716
23717 * src/bison.s1: Comment change.
23718
237191995-05-06 Richard Stallman <rms@gnu.org>
23720
23721 * bison.simple: Comment change.
23722
237231995-05-03 Richard Stallman <rms@gnu.org>
23724
23725 * src/version.c: Version now 1.24.
23726
23727 * src/bison.s1: Change distribution terms.
23728
23729 * src/version.c: Version now 1.23.
23730
237311995-05-03 Richard Stallman <rms@gnu.org>
23732
23733 * doc/bison.texinfo:
23734 Rewrite "Conditions for Using Bison".
23735 Update version to 1.24.
23736
237371995-05-03 Richard Stallman <rms@gnu.org>
23738
23739 * bison.simple: Change distribution terms.
23740
237411995-02-23 Richard Stallman <rms@gnu.org>
23742
23743 * src/files.c: Test __VMS_POSIX as well as VMS.
23744
237451995-02-14 Jim Meyering <meyering@gnu.org>
23746
23747 * src/bison.s1 (__yy_memcpy):
23748 Renamed from __yy_bcopy to avoid
23749 confusion. Reverse FROM and TO arguments to be consistent with
23750 those of memcpy.
23751
237521995-02-14 Jim Meyering <meyering@gnu.org>
23753
23754 * bison.simple (__yy_memcpy):
23755 Renamed from __yy_bcopy to avoid
23756 confusion. Reverse FROM and TO arguments to be consistent with
23757 those of memcpy.
23758
237591994-11-10 David J. MacKenzie <djm@gnu.org>
23760
23761 * NEWS: reformat
23762
23763 * NEWS: New file.
23764
23765 * Makefile.in (DISTFILES): Include NEWS.
23766
23767 * Makefile.in (DISTFILES):
23768 Include install-sh, not install.sh.
23769
23770 * configure.in: Update to Autoconf v2 macro names.
23771
237721994-10-05 David J. MacKenzie <djm@gnu.org>
23773
23774 * Makefile.in: fix typo
23775
23776 * Makefile.in (prefix, exec_prefix):
23777 Let configure set them.
23778
237791994-09-28 David J. MacKenzie <djm@gnu.org>
23780
23781 * Makefile.in: Set datadir to $(prefix)/share.
23782
237831994-09-15 Richard Stallman <rms@gnu.org>
23784
23785 * src/bison.s1:
23786 Update copyright notice and GPL version.
23787
237881994-09-15 Richard Stallman <rms@gnu.org>
23789
23790 * bison.simple:
23791 Update copyright notice and GPL version.
23792
237931994-07-12 Richard Stallman <rms@gnu.org>
23794
23795 * src/reduce.c, src/reader.c:
23796 entered into RCS
23797
237981994-05-05 David J. MacKenzie <djm@gnu.org>
23799
23800 * Makefile.in: entered into RCS
23801
238021994-03-26 Richard Stallman <rms@gnu.org>
23803
23804 * src/bison.s1: entered into RCS
23805
238061994-03-26 Richard Stallman <rms@gnu.org>
23807
23808 * bison.simple: entered into RCS
23809
238101994-03-25 Richard Stallman <rms@gnu.org>
23811
23812 * src/main.c: entered into RCS
23813
238141994-03-24 Richard Stallman <rms@gnu.org>
23815
23816 * src/conflicts.c: entered into RCS
23817
238181994-01-02 Richard Stallman <rms@gnu.org>
23819
23820 * Makefile.in: *** empty log message ***
23821
238221993-11-21 Richard Stallman <rms@gnu.org>
23823
23824 * src/bison.s1: *** empty log message ***
23825
238261993-11-21 Richard Stallman <rms@gnu.org>
23827
23828 * doc/bison.texinfo: entered into RCS
23829
23830 * doc/bison.texinfo: *** empty log message ***
23831
238321993-11-21 Richard Stallman <rms@gnu.org>
23833
23834 * bison.simple: *** empty log message ***
23835
238361993-10-25 David J. MacKenzie <djm@gnu.org>
23837
23838 * doc/bison.texinfo: *** empty log message ***
23839
238401993-10-19 Richard Stallman <rms@gnu.org>
23841
23842 * src/bison.s1: *** empty log message ***
23843
238441993-10-19 Richard Stallman <rms@gnu.org>
23845
23846 * bison.simple: *** empty log message ***
23847
238481993-10-14 Richard Stallman <rms@gnu.org>
23849
23850 * src/bison.s1: *** empty log message ***
23851
238521993-10-14 Richard Stallman <rms@gnu.org>
23853
23854 * bison.simple: *** empty log message ***
23855
238561993-09-14 David J. MacKenzie <djm@gnu.org>
23857
23858 * doc/bison.texinfo: *** empty log message ***
23859
238601993-09-13 Noah Friedman <friedman@gnu.org>
23861
23862 * Makefile.in: *** empty log message ***
23863
238641993-09-10 Richard Stallman <rms@gnu.org>
23865
23866 * src/conflicts.c: *** empty log message ***
23867
23868 * src/system.h: entered into RCS
23869
238701993-09-10 Richard Stallman <rms@gnu.org>
23871
23872 * doc/bison.1: entered into RCS
23873
238741993-09-06 Noah Friedman <friedman@gnu.org>
23875
23876 * src/version.c: entered into RCS
23877
238781993-09-06 Noah Friedman <friedman@gnu.org>
23879
23880 * Makefile.in: *** empty log message ***
23881
238821993-07-30 David J. MacKenzie <djm@gnu.org>
23883
23884 * Makefile.in: *** empty log message ***
23885
238861993-07-24 Richard Stallman <rms@gnu.org>
23887
23888 * src/bison.s1: *** empty log message ***
23889
238901993-07-24 Richard Stallman <rms@gnu.org>
23891
23892 * bison.simple: *** empty log message ***
23893
238941993-07-08 David J. MacKenzie <djm@gnu.org>
23895
23896 * Makefile.in: *** empty log message ***
23897
238981993-07-04 Richard Stallman <rms@gnu.org>
23899
23900 * src/bison.s1: *** empty log message ***
23901
239021993-07-04 Richard Stallman <rms@gnu.org>
23903
23904 * bison.simple: *** empty log message ***
23905
239061993-06-26 David J. MacKenzie <djm@gnu.org>
23907
23908 * src/getargs.c: entered into RCS
23909
239101993-06-26 David J. MacKenzie <djm@gnu.org>
23911
23912 * doc/bison.texinfo: *** empty log message ***
23913
23914 * doc/bison.1: New file.
23915
239161993-06-25 Richard Stallman <rms@gnu.org>
23917
23918 * src/getargs.c: New file.
23919
239201993-06-16 Richard Stallman <rms@gnu.org>
23921
23922 * src/bison.s1: *** empty log message ***
23923
239241993-06-16 Richard Stallman <rms@gnu.org>
23925
23926 * bison.simple: *** empty log message ***
23927
239281993-06-03 Richard Stallman <rms@gnu.org>
23929
23930 * src/bison.s1: New file.
23931
239321993-06-03 Richard Stallman <rms@gnu.org>
23933
23934 * doc/bison.texinfo: *** empty log message ***
23935
239361993-06-03 Richard Stallman <rms@gnu.org>
23937
23938 * bison.simple: New file.
23939
239401993-05-19 Richard Stallman <rms@gnu.org>
23941
23942 * doc/bison.texinfo: New file.
23943
239441993-05-07 Noah Friedman <friedman@gnu.org>
23945
23946 * Makefile.in: *** empty log message ***
23947
239481993-04-28 Noah Friedman <friedman@gnu.org>
23949
23950 * src/reader.c: *** empty log message ***
23951
239521993-04-23 Noah Friedman <friedman@gnu.org>
23953
23954 * src/alloc.h: entered into RCS
23955
239561993-04-20 David J. MacKenzie <djm@gnu.org>
23957
23958 * src/version.c: *** empty log message ***
23959
23960 * src/files.c, src/allocate.c:
23961 entered into RCS
23962
23963 * src/reader.c: *** empty log message ***
23964
23965 * src/lex.c: entered into RCS
23966
23967 * src/conflicts.c: New file.
23968
23969 * src/symtab.c: entered into RCS
23970
23971 * src/alloc.h: New file.
23972
23973 * src/LR0.c: entered into RCS
23974
239751993-04-18 Noah Friedman <friedman@gnu.org>
23976
23977 * src/reader.c: New file.
23978
23979 * src/version.c: *** empty log message ***
23980
239811993-04-18 Noah Friedman <friedman@gnu.org>
23982
23983 * Makefile.in: *** empty log message ***
23984
239851993-04-17 Noah Friedman <friedman@gnu.org>
23986
23987 * Makefile.in: *** empty log message ***
23988
239891993-04-15 Richard Stallman <rms@gnu.org>
23990
23991 * src/main.c, src/files.c:
23992 New file.
23993
239941993-04-15 Noah Friedman <friedman@gnu.org>
23995
23996 * configure.in: entered into RCS
23997
23998 * configure.in: *** empty log message ***
23999
24000 * configure.in: New file.
24001
240021993-04-14 Richard Stallman <rms@gnu.org>
24003
24004 * Makefile.in: New file.
24005
240061993-04-13 Richard Stallman <rms@gnu.org>
24007
24008 * src/version.c: New file.
24009
240101993-03-25 Richard Stallman <rms@gnu.org>
24011
24012 * src/output.c: entered into RCS
24013
240141992-09-25 Richard Stallman <rms@gnu.org>
24015
24016 * configure.bat: entered into RCS
24017
240181992-06-22 Richard Stallman <rms@gnu.org>
24019
24020 * src/vmsgetargs.c: entered into RCS
24021
240221992-06-22 Richard Stallman <rms@gnu.org>
24023
24024 * doc/bison.rnh: entered into RCS
24025
240261992-04-20 David J. MacKenzie <djm@gnu.org>
24027
24028 * README: entered into RCS
24029
240301992-01-22 Richard Stallman <rms@gnu.org>
24031
24032 * src/machine.h: entered into RCS
24033
240341991-12-21 Richard Stallman <rms@gnu.org>
24035
24036 * src/lalr.c, src/closure.c:
24037 entered into RCS
24038
240391991-12-20 Richard Stallman <rms@gnu.org>
24040
24041 * src/state.h: entered into RCS
24042
240431991-12-18 Richard Stallman <rms@gnu.org>
24044
24045 * src/print.c, src/nullable.c, src/derives.c:
24046 entered into RCS
24047
240481991-11-03 David J. MacKenzie <djm@gnu.org>
24049
24050 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24051 entered into RCS
24052
240531988-09-09 Richard Stallman <rms@gnu.org>
24054
24055 * src/bison.hairy: entered into RCS
24056
240571987-12-16 Richard Stallman <rms@gnu.org>
24058
24059 * REFERENCES: entered into RCS
24060
24061
24062 -----
24063
24064 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
24065 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24066 2008, 2009 Free Software Foundation, Inc.
24067
24068 Copying and distribution of this file, with or without
24069 modification, are permitted provided the copyright notice and this
24070 notice are preserved.