]> git.saurik.com Git - bison.git/blob - ChangeLog
Warn about character literals not of length one.
[bison.git] / ChangeLog
1 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Warn about character literals not of length one.
4 * NEWS (2.5): Document.
5 * src/scan-gram.l (INITIAL): Remove comment that we don't check
6 the length.
7 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
8 * tests/input.at (Bad character literals): New test group.
9
10 2009-07-24 Alex Rozenman <rozenmam@gmail.com>
11
12 Fix some memory leaks.
13 * src/named-ref.c: Add a pointer check (named_ref_free).
14 * src/scan-code.l: New function (variant_table_free). Called in
15 code_scanner_free.
16 * src/symlist.c: Call to named_ref_free (symbol_list_free).
17
18 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
19
20 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
21
22 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
23
24 Some M4 cleanup in the testsuite.
25 Suggested by Eric Blake at
26 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
27 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
28 complicate the code by distinguishing between a missing value
29 and an empty string value for an optional argument. This fix is
30 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
31 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
32 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
33 arguments are not needed because of the following changes.
34 Fix stale comments.
35 Bison developers should use GNU M4 and should not use
36 POSIXLY_CORRECT when building the test suite, so do not
37 complicate the code by avoiding $10 and above.
38 Do not quote an empty string value for an optional argument, and
39 do not distinguish between a missing value and an empty string
40 value.
41
42 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
43
44 Revert unnecessary column realignment in --help output.
45 Reported by Akim Demaille at
46 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
47 * src/getargs.c (usage): Here.
48
49 2009-07-04 Alex Rozenman <rozenman@gmail.com>
50
51 Alphabetical order in src/local.mk.
52 * src/local.mk: Adjust.
53
54 2009-07-04 Alex Rozenman <rozenman@gmail.com>
55
56 Style changes and factoring.
57 * src/named-ref.h: Add comments.
58 * src/parse-gram.y: Readability and style changes.
59 * src/reader.c: Factoring: assign_named_ref function.
60 * src/scan-code.l: Factoring and style changes. Rename
61 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
62 Use "unsigned" type for variant index. Improve readablity.
63 * src/scan-gram.l: Change error messages and add comments.
64 * src/symlist.h: symbol_list_null: New function decl.
65 * src/symlist.c: symbol_list_null: Implement here.
66 * tests/named-refs.at: Adjust for new error messages.
67
68 2009-06-29 Eric Blake <ebb9@byu.net>
69
70 scan-code: avoid compiler warnings
71 * src/scan-code.l (parse_named_ref): Use correct specifiers.
72
73 2009-06-29 Akim Demaille <demaille@gostai.com>
74
75 build: avoid concurrent extraction of calc++.
76 * examples/calc++/Makefile.am (calc.stamp): New.
77 Depend on it to create the sources of calc++ so that concurrent
78 builds don't launch several "extexi" in parallel.
79 Not only this is inefficient, this also builds incorrect sources
80 with several extractions mixed together.
81
82 2009-06-29 Akim Demaille <demaille@gostai.com>
83
84 parse.error: fix.
85 * data/bison.m4: Move code related to specific variables after the
86 definition of the variable-maintaining macros so that we don't
87 "invoke" b4_percent_define_check_values before it is defined.
88
89 2009-06-29 Akim Demaille <demaille@gostai.com>
90
91 variables: parse.error
92
93 Implement, document, and test the replacement of %error-verbose
94 by %define parse.error "verbose".
95 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
96 values of the parse.error variable.
97 Make "simple" its default value.
98 Check the valid values.
99 * src/parse-gram.y: Use %define parse.error.
100 (PERCENT_ERROR_VERBOSE): New token.
101 Support it.
102 * src/scan-gram.l: Support %error-verbose.
103
104 * doc/bison.texinfo (Decl Summary): Replace the documentation of
105 %define error-verbose by that of %define parse.error.
106 * NEWS: Document it.
107
108 * tests/actions.at, tests/calc.at: Use parse.error instead of
109 %error-verbose.
110
111 2009-06-27 Alex Rozenman <rozenman@gmail.com>
112
113 Implement support for named symbol references.
114 * src/parse-gram.y: Add new syntax (named_ref.opt).
115 * src/reader.c: Store named refs in symbol lists.
116 * src/reader.h: New argument for symbol_append and
117 action_append functions.
118 * src/scan-code.h: Add new field (named_ref) into
119 code_props data structure. Keeps named ref of midrule
120 actions.
121 * src/scan-code.l: Support for named refs in semantic
122 action code. New function 'parse_named_ref'.
123 * src/scan-gram.l: Support bracketed id.
124 * src/symlist.c: Store named refs in symbol lists.
125 * src/symlist.h: New field in symbol list: named_ref.
126 * src/named-ref.h: New file, a struct for named_ref.
127 * src/named-ref.cp: New file, named_ref_new function.
128 * src/local.mk: Add two new files.
129 * tests/testsuite.at: Include new test group:
130 * tests/named-refs.at: this new file.
131
132 2009-06-25 Akim Demaille <demaille@gostai.com>
133
134 hash: check insertion for memory exhaustion.
135 * src/uniqstr.c (uniqstr_new): New.
136
137 2009-06-24 Akim Demaille <demaille@gostai.com>
138
139 variables: rename namespace as api.namespace.
140 Discussed in
141 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
142
143 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
144 New.
145 (b4_percent_define_use): New.
146 Use it where applicable.
147 * data/c++.m4: Replace uses of the variable "namespace" by
148 "api.namespace".
149 Default the latter to the former.
150 * doc/bison.texinfo (Decl Summary): Document "namespace" as
151 obsolete.
152 Document api.namespace.
153 Use @samp to document %define uses, keep @code for identifiers.
154 * NEWS: Likewise.
155 * tests/c++.at, tests/input.at: Test api.namespace instead of
156 namespace. (The tests passed with namespace.)
157
158 2009-06-11 Akim Demaille <demaille@gostai.com>
159
160 style changes.
161 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
162 * src/print-xml.c: Style changes.
163 * tests/conflicts.at: Comment changes.
164
165 2009-06-11 Akim Demaille <demaille@gostai.com>
166
167 xml: beware of user strings used to give a %prec to rules.
168 * tests/conflicts.at (%prec with user strings): New.
169 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
170 XML output.
171
172 2009-06-11 Akim Demaille <demaille@gostai.com>
173
174 hash: check insertion for memory exhaustion.
175 * src/muscle-tab.c (muscle_insert, muscle_grow)
176 * src/state.c (state_hash_insert): Check the return value of
177 hash_insert.
178
179 2009-06-11 Akim Demaille <demaille@gostai.com>
180
181 tests: honor TESTSUITEFLAGS in every check target.
182 * tests/local.mk (RUN_TESTSUITE): New.
183 (check-local, installcheck-local, maintainer-check-g++)
184 (maintainer-check-posix, maintainer-check-valgrind): Use it.
185
186 2009-06-10 Akim Demaille <demaille@gostai.com>
187
188 deterministic test suite.
189 Some consistency checks on symbols are performed after all the
190 symbols were read, by an iteration over the symbol table. This
191 traversal is nondeterministic, which can be a problem for test
192 cases.
193 Avoid this.
194 Addresses another form of nondeterminism reported by Joel E. Denny.
195 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
196
197 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
198 test in two.
199 Use different file names for the three tests to make the
200 maintenance easier.
201
202 2009-06-10 Akim Demaille <demaille@gostai.com>
203
204 gnulib: update.
205 * gnulib: Update to latest.
206 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
207 * m4/.gitignore: Regen.
208 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
209 Call xalloc_die on hash_insert failures.
210 Requested by the new __warn_unused_result__ attribute of
211 hash_insert.
212
213 2009-06-10 Akim Demaille <demaille@gostai.com>
214
215 deterministic user-token-number redeclaration errors.
216 Address nondeterminism reported by Joel E. Denny.
217 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
218
219 * src/uniqstr.h: Comment changes.
220 * src/location.h (boundary_cmp, location_cmp): New.
221 * src/symtab.c (user_token_number_redeclaration): New.
222 (symbol_translation): Use it.
223 * tests/input.at (Numbered tokens): Adjust the expected output.
224
225 2009-05-25 Akim Demaille <demaille@gostai.com>
226
227 build: avoid ignored errors.
228 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
229 errors, they pollute the output.
230
231 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
232
233 Convert multiple variable definition warnings to complaints.
234 * NEWS (2.5): Add a new entry for that change.
235 * doc/bison.texinfo (Decl Summary): Update %define entry.
236 (Bison Options): Update -D/--define/-F/--force-define entry.
237 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
238 * src/muscle-tab.h (muscle_percent_define_insert): Update
239 comments.
240 * tests/input.at (`%define errors'): Update.
241 (`%define, --define, --force-define'): Update.
242
243 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
244
245 -F/--force-define and relative %define/-D/--define priorities.
246 * NEWS (2.5): Add documentation to -D/--define entry.
247 * build-aux/cross-options.pl: Hard-code association of
248 --force-define with %define.
249 * doc/bison.texinfo (Decl Summary): In %define entry,
250 cross-reference command-line options.
251 (Bison Options): Add documentation to -D/--define entry.
252 (Option Cross Key): Widen column for --force-define row.
253 * src/getargs.c (usage): Document -F/--force-define. Realign
254 options in output.
255 (short_options, long_options, getargs): Parse -F/--force-define,
256 and update muscle_percent_define_insert invocations.
257 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
258 (muscle_percent_define_insert): Add argument with that type.
259 * src/muscle-tab.c (muscle_percent_define_insert): Implement
260 -F/--force-define behavior and priorities.
261 (muscle_percent_define_ensure): Update
262 muscle_percent_define_insert invocation.
263 * src/parse-gram.y (prologue_declaration): Update
264 muscle_percent_define_insert invocations.
265 * tests/input.at (`%define, --define'): Rename to...
266 (`%define, --define, --force-define'): ... this and extend.
267
268 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
269
270 Update some comments to make sense for -D.
271 * data/bison.m4 (b4_check_user_names): In header comments, say
272 "user occurrence" instead of "grammar occurrence".
273 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
274 (muscle_percent_code_grow): Likewise just for consistency.
275
276 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
277
278 * data/c++.m4 (b4_namespace_close): Simplify slightly.
279
280 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
281
282 Handle a trailing `:' in a user-supplied C++ namespace better.
283 * data/c++.m4 (b4_namespace_close): Don't let it be printed
284 among the closing braces here. This fix might make the
285 generated code easier to debug, but otherwise it should be
286 insignificant because a trailing `:' is a C++ error already.
287
288 2009-05-19 Akim Demaille <demaille@gostai.com>
289
290 remove useless variable.
291 * src/getargs.c (skeleton_arg): Remove now useless variable.
292 Should help the compiler see that this printf-like call is sane.
293
294 2009-05-15 Akim Demaille <demaille@gostai.com>
295
296 Rename token.prefix as api.tokens.prefix.
297 Discussed here.
298 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
299
300 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
301 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
302 (token.prefix): Rename as...
303 (api.tokens.prefix): this.
304
305 2009-05-11 Akim Demaille <demaille@gostai.com>
306
307 doc: use C++ headers.
308 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
309 headers.
310
311 2009-05-11 Akim Demaille <demaille@gostai.com>
312
313 doc: token.prefix
314 * doc/bison.simple (Decl Summary): Document token.prefix.
315 (Calc++ Parser): Various fixes.
316 Formatting changes.
317 Use token.prefix.
318 Introduce a macro TOKEN to shorten the code and make it more
319 readable.
320 (Calc++ Scanner): Adjust.
321 * NEWS (Variable token.prefix): New.
322
323 2009-05-04 Akim Demaille <demaille@gostai.com>
324
325 bison: catch bad symbol names.
326 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
327 * tests/input.at: Adjust.
328
329 2009-05-04 Akim Demaille <demaille@gostai.com>
330
331 identifiers: dashes are letters.
332 Dashes can now start identifiers (symbols and directives).
333
334 * src/scan-gram.l ({letter}): Add dash.
335 ({id}): Remove it.
336 * tests/input.at (Symbols): Adjust.
337 Remove stray comment.
338 * tests/regression.at (Invalid inputs): Adjust error message.
339 * doc/bison.texinfo (Symbols): Update.
340
341 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
342
343 Declare %code to be a permanent feature.
344 * NEWS (2.4.2): Here.
345 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
346 experimental.
347 (Decl Summary): Likewise.
348
349 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
350
351 Convert underscores to dashes in some %define variable names.
352 For now, just api.push-pull and lr.keep-unreachable-states.
353 Maintain old names for backward compatibility.
354 * NEWS (2.5): Document.
355 * data/c.m4 (b4_identification): Update comment.
356 * data/yacc.c: Update access.
357 * doc/bison.texinfo: Update.
358 * etc/bench.pl.in (bench_push_parser): Update use.
359 * src/files.c (tr): Move to...
360 * src/getargs.c, src/getargs.h (tr): ... here because I can't
361 think of a better place to expose it. My logic is that, for all
362 uses of tr so far, command-line arguments can be involved, and
363 getargs.h is already included.
364 * src/main.c (main): Update access.
365 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
366 variable names to new variable names before assigning value.
367 * src/reader.c (reader): Update setting default.
368 * tests/calc.at: Update uses.
369 * tests/conflicts.at (Unreachable States After Conflict
370 Resolution): Update use.
371 * tests/input.at (%define enum variables): Update use.
372 (%define backward compatibility): New test group.
373 * tests/push.at: Update uses.
374 * tests/reduce.at: Update uses.
375 * tests/torture.at: Update uses.
376
377 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
378
379 Set all front-end %define defaults in one place.
380 * src/main.c (main): Move lr.keep_unreachable_states default...
381 * src/reader.c (reader): ... to here.
382
383 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
384
385 Rename lr.default_reductions to lr.default-reductions.
386 * NEWS (2.5): Here.
387 * doc/bison.texinfo: Here.
388 * src/lalr.c (initialize_LA): Here.
389 * src/print.c (print_reductions): Here.
390 * src/reader.c (reader): Here.
391 * src/tables.c (action_row): Here.
392 * tests/input.at (%define enum variables): Here.
393 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
394
395 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
396
397 Pacify ./configure --enable-gcc-warnings.
398 * tests/input.at (Symbols): Prototype yyerror and yylex.
399
400 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
401
402 Document how `%define "var" "value"' is not M4-friendly.
403 * src/parse-gram.y (variable): In comments here.
404
405 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
406
407 Clean up recent patches a little.
408 Reported by Akim Demaille.
409 * doc/bison.texinfo (Understanding): Fix typos.
410 * src/print.c (print_reductions): Don't use negated variable.
411
412 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
413
414 List accepted values for a %define enum variable with an invalid value.
415 Suggested by Akim Demaille at
416 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
417 * data/bison.m4 (_b4_percent_define_check_values): Implement.
418 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
419 * tests/input.at (%define lr.default_reductions invalid values): Merge
420 into...
421 (%define enum variables): ... here, and update output.
422
423 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
424
425 Rename "default rule" to "default reduction".
426 This includes changing variable names in code, changing
427 comments, and renaming %define lr.default_rules to %define
428 lr.default_reductions.
429 * NEWS (2.5): Update IELR documentation.
430 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
431 documentation.
432 * data/glr.c, data/lalr1.java: Sync copyright dates.
433 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
434 and lr.type documentation. Make some other wording
435 improvements.
436 (Glossary): Adjust cross-references and Default Reduction
437 definition.
438 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
439 Remove a confusing comment pointed out by Akim Demaille.
440 (initialize_LA): Adjust code.
441 * src/print-xml.c (print_reductions): Adjust code.
442 * src/print.c (print_reductions): Adjust code.
443 * src/reader.c (reader): Adjust code.
444 * src/tables.c (action_row): Adjust code.
445 (token_actions): Adjust code.
446 * src/tables.h: Adjust YYDEFACT documentation.
447 * tests/input.at (%define lr.default_rules invalid values):
448 Rename test group to...
449 (%define lr.default_reductions invalid values): ... this, and
450 update grammar file and expected output.
451 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
452 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
453
454 2009-04-21 Akim Demaille <demaille@gostai.com>
455
456 tests: check the use of dashes and periods in symbols.
457 * tests/input.at (Symbol): New test group.
458
459 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
460
461 Document %define lr.type and lr.default_rules.
462 * NEWS (2.5): Add an entry.
463 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
464 besides just LALR(1) and GLR(1).
465 * doc/bison.texinfo (Introduction): Likewise.
466 (Language and Grammar): Bison is no longer limited to LALR(1)
467 restrictions.
468 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
469 when trying to distinguish from GLR. Talk about LR(1) grammars
470 rather than LALR(1) grammars.
471 (Decl Summary): In %define api.push_pull entry, say it applies
472 to deterministic parsers in C rather than LALR(1) parsers in C.
473 Add lr.default_rules entry.
474 Add lr.type entry.
475 (Mystery Conflicts): Bison is no longer limited to LALR(1)
476 restrictions.
477 (Generalized LR Parsing): Same changes as for the previous GLR
478 section.
479 (Memory Management): Say deterministic rather than LALR(1).
480 (Understanding): Correct some bison output.
481 Index discussion of "accepting state".
482 Say deterministic rather than LALR(1).
483 (Bison Options): In --yacc entry, say deterministic rather than
484 LALR(1).
485 In --report, --graph, and --xml entries, just don't mention
486 LALR(1).
487 (C++ Parsers): Say deterministic rather than LALR(1).
488 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
489 (Glossary): Add Accepting State, Consistent State, Default Rule,
490 and IELR(1) definitions.
491 In Generalized LR (GLR) definition, make same changes as in
492 previous GLR sections.
493 In LALR(1) definition, say Bison uses LALR(1) by default rather
494 than implying Bison is limited to LALR(1).
495 (LocalWords): Add IELR.
496
497 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
498
499 Finish implementing %define lr.type.
500 Its value can be "LALR", "IELR", or "canonical LR".
501 * lib/timevar.def (TV_IELR_PHASE1): New var.
502 (TV_IELR_PHASE2): New var.
503 (TV_IELR_PHASE3): New var.
504 (TV_IELR_PHASE4): New var.
505 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
506 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
507 Sbitset.h, ielr.h, and ielr.c.
508 * src/getargs.h, src/getargs.c (enum trace, trace_args,
509 trace_types): Add trace_ielr.
510 * src/lalr.h, src/lalr.c (ngotos): Export it.
511 (F): Rename to...
512 (goto_follows): ... this, update all uses, and export it.
513 (set_goto_map): Export it.
514 (map_goto): Export it.
515 (compute_lookahead_tokens): Don't free goto_follows yet. Now
516 handled in ielr.
517 (initialize_LA): Export it. Move lookback allocation to...
518 (lalr): ... here because, for canonical LR, initialize_LA must
519 be invoked but lookback and much of the rest of LALR isn't
520 needed.
521 * main.c (main): Instead of lalr, invoke ielr, which invokes
522 lalr.
523 * src/reader.c (reader): Default lr.type to "LALR".
524 Default lr.default_rules to "accepting" if lr.type is "canonical
525 LR". Leave the default as "all" otherwise.
526 Check for a valid lr.type value.
527 * src/state.h, src/state.c (struct state_list): Add state_list
528 member.
529 (state_new): Initialize state_list member to NULL.
530 (state_new_isocore): New function, exported.
531 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
532 exercises all values of lr.type.
533 (GNU AWK Grammar): Rename test group to...
534 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
535 AT_TEST_EXISTING_GRAMMAR.
536 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
537 (GNU pic Grammar): Rename test group to...
538 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
539 AT_TEST_EXISTING_GRAMMAR.
540 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
541 all values of lr.type.
542 (Single State Split): New test groups using AT_TEST_LR_TYPE.
543 (Lane Split): Likewise.
544 (Complex Lane Split): Likewise.
545 (Split During Added Lookahead Propagation): Likewise.
546
547 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
548
549 Add new files for IELR and canonical LR implementation.
550 * src/AnnotationList.c: New.
551 * src/AnnotationList.h: New.
552 * src/InadequacyList.c: New.
553 * src/InadequacyList.h: New.
554 * src/Sbitset.c: New.
555 * src/Sbitset.h: New.
556 * src/ielr.c: New.
557 * src/ielr.h: New.
558
559 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
560
561 Implement %define lr.default_rules.
562 Its value describes the states that are permitted to contain
563 default rules: "all", "consistent", or "accepting".
564 * src/reader.c (reader): Default lr.default_rules to "all".
565 Check for a valid lr.default_rules value.
566 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
567 is "accepting", then only mark the accepting state as
568 consistent.
569 (initialize_LA): Tell state_lookahead_tokens_count whether
570 lr.default_rules is "accepting".
571 * src/tables.c (action_row): If lr.default_rules is not "all",
572 then disable default rules in inconsistent states.
573 * src/print.c (print_reductions): Use this opportunity to
574 perform some assertions about whether lr.default_rules was
575 obeyed correctly.
576 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
577 helps with checking the parser tables for a grammar.
578 * tests/input.at (%define lr.default_rules invalid values): New
579 test group.
580 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
581 AT_TEST_TABLES_AND_PARSE.
582 (`no %define lr.default_rules'): New test group generated by
583 AT_TEST_LR_DEFAULT_RULES.
584 (`%define lr.default_rules "all"'): Likewise.
585 (`%define lr.default_rules "consistent"'): Likewise.
586 (`%define lr.default_rules "accepting"'): Likewise.
587
588 2009-04-20 Akim Demaille <demaille@gostai.com>
589
590 Formatting change.
591
592 2009-04-20 Akim Demaille <demaille@gostai.com>
593
594 bison: factoring.
595 * src/output.c (token_definitions_output): Use symbol_id_get
596 instead of duplicating its logic.
597 * TODO (YYERRCODE): Extend.
598
599 2009-04-20 Akim Demaille <demaille@gostai.com>
600
601 variables: prefer error-verbose to error_verbose.
602 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
603 instead of error_verbose.
604 * src/scan-gram.l (%error-verbose): Map to the error-verbose
605 variable.
606 * doc/bison.texinfo: Promote %define error-verbose instead of
607 %error-verbose.
608 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
609
610 2009-04-15 Akim Demaille <demaille@gostai.com>
611
612 variables: accept dashes.
613 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
614 underscores.
615 * src/scan-gram.l ({id}): Also accept dashes after the initial
616 letter.
617 ({directive}): Use {id}.
618 * src/parse-gram.y: Comment and formatting changes.
619 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
620 symbols.
621 * src/complain.h, src/complain.c (yacc_at): New.
622 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
623 symbol names.
624 * src/output.c (token_definitions_output): Do not #define token
625 names with dashes.
626
627 2009-04-20 Akim Demaille <demaille@gostai.com>
628
629 Consistently refer to Yacc, not YACC.
630 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
631
632 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
633
634 Pacify make maintainer-check-posix.
635 * tests/input.at (%define, --define): Move bison command-line
636 options before grammar file name.
637
638 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
639
640 Document semicolon warnings.
641 * NEWS (2.5): Here.
642
643 2009-04-14 Akim Demaille <demaille@gostai.com>
644
645 variables: use `parse.assert' instead of `assert'.
646 * TODO (assert): Remove.
647 * data/bison.m4 (b4_assert_if): Replace with...
648 (b4_parse_assert_if): this.
649 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
650 * doc/bison.texinfo (Decl Summary): Document parse.assert.
651
652 2009-04-14 Akim Demaille <demaille@gostai.com>
653
654 variables: use `parse.trace' instead of `debug'.
655 * src/getargs.c (getargs): Map -t to %define trace.parse.
656 * src/scan-gram.l (%debug): Map to %define trace.parse.
657 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
658 names to `_' in macro names.
659 (b4_debug_if): Replace with...
660 (b4_parse_trace_if): this.
661 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
662 * data/yacc.c: Adjust.
663 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
664 Use @code to label the variable list.
665 Document the variable parse.trace.
666 (Tracing): Promote the parse.trace variable.
667 * TODO: %printer is not documented.
668
669 2009-04-14 Akim Demaille <demaille@gostai.com>
670
671 doc: minor fixes.
672 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
673 (Table of Symbols): Remove duplicate entry for %debug.
674
675 2009-04-10 Eric Blake <ebb9@byu.net>
676
677 submodules: update to latest
678 * submodules/autoconf: Use latest upstream Autoconf.
679
680 2009-04-06 Eric Blake <ebb9@byu.net>
681
682 Work around autoconf 2.63b bug in testsuite.
683 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
684 autoconf bug related to # in test.
685
686 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
687
688 * NEWS (2.5): New section. Describe new -D/--define feature.
689
690 2009-04-06 Akim Demaille <demaille@gostai.com>
691
692 Regen.
693 * src/parse-gram.h, src/parse-gram.c: Regen.
694
695 2009-04-06 Akim Demaille <demaille@gostai.com>
696
697 rename muscle_tab.* as muscle-tab.* for consistency.
698 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
699 * src/muscle-tab.h, src/muscle-tab.c: these.
700 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
701 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
702
703 2009-04-06 Akim Demaille <demaille@gostai.com>
704
705 Makefile: introduce $(BISON).
706 * src/local.mk (BISON): New.
707 (YACC): Use it.
708
709 2009-04-06 Akim Demaille <demaille@gostai.com>
710
711 parser: handle %locations as %define locations.
712 * src/getargs.h, src/getargs.c (locations_flag): Remove.
713 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
714 to set "locations" to true.
715 * src/output.c (prepare): Don't output "locations".
716 * src/scan-gram.l (%locations): Handle it as a %<flag>.
717 * src/parse-gram.y: It's no longer a token.
718 Don't handle it.
719 * data/bison.m4 (b4_locations_if): Define it with
720 b4_percent_define_if_define.
721 * data/c.m4, data/glr.cc: Adjust.
722
723 2009-04-06 Akim Demaille <demaille@gostai.com>
724
725 Regen.
726 * src/parse-gram.c: Regen.
727
728 2009-04-06 Akim Demaille <demaille@gostai.com>
729
730 muscle: factor the handling of obsolete of obsolete directives.
731 Suggested by Joel E. Denny.
732
733 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
734 New, extracted from...
735 * src/parse-gram.y (prologue_declaration: pure-parser): here.
736 Remove it.
737 (prologue_declaration: "%<flag>"): Use
738 muscle_percent_define_ensure.
739 (%error-verbose, %pure-parser): No longer tokens.
740 * src/scan-gram.l (pure-parser): Return as a %<flag>.
741
742 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
743
744 Fix options documentation.
745 * build-aux/cross-options.pl: As in --help output, write optional
746 arguments as [=ARG] not =[ARG].
747 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
748
749 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
750
751 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
752 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
753 requirements for a correct m4 are stricter.
754 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
755 * configure.ac: Update to use AC_PROG_GNU_M4.
756 Reported by Eric Blake.
757
758 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
759
760 Help with updating web manual.
761 * HACKING: Incorporate instructions from gnulib/doc/README.
762 * bootstrap.conf (gnulib_modules): Add gendocs.
763
764 2009-04-03 Akim Demaille <demaille@gostai.com>
765
766 Regen.
767 * src/parse-gram.h, src/parse-gram.c: Regen.
768
769 2009-04-03 Akim Demaille <demaille@gostai.com>
770
771 Factor %FLAG at scan level.
772 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
773 definitions and associated rules, replaced by....
774 (PERCENT_FLAG): this new token type, and rule.
775 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
776 Use it for %debug and %error-verbose.
777
778 2009-04-03 Akim Demaille <demaille@gostai.com>
779
780 Regen.
781 * src/parse-gram.h, src/parse-gram.c: Regen.
782
783 2009-04-03 Akim Demaille <demaille@gostai.com>
784
785 Treat %debug as %define debug.
786 * data/bison.m4 (b4_debug_if): New.
787 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
788 * data/lalr1.java: Use it instead of b4_debug_flag.
789 * src/getargs.h, src/getargs.c (debug_flag): Remove.
790 * src/output.c (prepare): Don't output it.
791 * src/parse-gram.y: Treat %debug as %define debug.
792
793 2009-04-03 Akim Demaille <demaille@gostai.com>
794
795 Treat %error-verbose as %define error_verbose.
796 This allows to pass -Derror_verbose on the command line. Better
797 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
798 ERROR_VERBOSE being defined as false or true.
799 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
800 on b4_percent_define_ifdef, for does not check the defined value,
801 but only whether the symbol is defined, rely on
802 b4_percent_define_flag_if, so that a value of "false" is processed
803 as a false.
804 If not defined, define the flag to "false".
805 (b4_error_verbose_if): New.
806 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
807 b4_error_verbose_flag.
808 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
809 * src/output.c (prepare): Don't output it.
810 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
811
812 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
813
814 Fix strange %define locations for default values.
815 Reported by Akim Demaille at
816 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
817 and discussed again starting at
818 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
819 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
820 because location information is bogus.
821 Use angle brackets to delimit fake file name because square brackets
822 look like underexpanded m4. Choose a better fake file name.
823 Use negative line numbers.
824 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
825 * src/location.c (location_print): If line for a boundary is negative,
826 only print that boundary's file name.
827 * src/location.h: Document that.
828 * tests/skeletons.at (%define Boolean variables: invalid skeleton
829 defaults): Update output.
830
831 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
832
833 Pacify ./configure --enable-gcc-warnings.
834 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
835 in lib won't compile with it.
836 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
837
838 2009-03-31 Akim Demaille <demaille@gostai.com>
839
840 bootstrap: --help to stdout.
841 * bootstrap (usage): Don't send --help to stderr.
842 Use a here doc instead of a long string.
843
844 2009-03-31 Akim Demaille <demaille@gostai.com>
845
846 bootstrap: README-hacking no longer exists
847 * bootstrap (checkout_only_file): Set to HACKING.
848
849 2009-03-26 Akim Demaille <demaille@gostai.com>
850
851 doc: merge HACKING and README-hacking.
852 Two files is confusing.
853 Reported by Alexandre Duret-Lutz.
854
855 * README-hacking: Merge into...
856 * HACKING (Working from the repository): here.
857
858 2009-03-26 Akim Demaille <demaille@gostai.com>
859
860 doc: update README-hacking.
861 * README-hacking: We now use git and git submodules.
862 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
863
864 2009-03-26 Akim Demaille <demaille@gostai.com>
865
866 lalr1.cc: avoid GCC 4.3 warnings.
867 GCC 4.3 now warns about "a || b && c" and asks for explicit
868 parentheses.
869 Reported by Alexandre Duret-Lutz.
870 * data/location.cc: Update copyright years.
871 (Position::operator==): Use parens to make precedence explicit.
872 Compare lines and columns first, as they are more likely to be
873 different, and they are faster to compare.
874
875 2009-03-26 Akim Demaille <demaille@gostai.com>
876
877 gnulib: update.
878 * gnulib: Update to latest.
879 * src/local.mk (AM_CFLAGS): Move to...
880 * Makefile.am: here.
881 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
882 AM_CFLAGS.
883
884 2009-03-02 Akim Demaille <demaille@gostai.com>
885
886 Comment changes.
887
888 2009-03-02 Akim Demaille <demaille@gostai.com>
889
890 Share b4_yytranslate_define.
891 * data/lalr1.cc (b4_yytranslate_define): Move to...
892 * data/c++.m4: here.
893
894 2009-03-02 Akim Demaille <demaille@gostai.com>
895
896 Use locations in the variant example.
897 Yes, this obfuscates the point of this example, variants only.
898 But glr.cc cannot work (yet?) without locations. This change
899 makes it easier to use this example with glr.cc.
900
901 * examples/variant.yy (assert): %define it.
902 (locations): Request them.
903 (yylex): Bind the location to the stage.
904
905 2009-03-02 Akim Demaille <demaille@gostai.com>
906
907 Dub make_TOKEN as a public type interface.
908 * data/c++.m4 (b4_symbol_constructor_declare)
909 (b4_symbol_constructor_define): New empty stubs.
910 (b4_public_types_declare, b4_public_types_define): Use them.
911 * data/lalr1.cc (b4_symbol_constructor_declare)
912 (b4_symbol_constructor_declare_)
913 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
914 Move to...
915 * data/variant.hh: here.
916 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
917 needed.
918 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
919 b4_symbol_constructor_declare, as it is now done by
920 b4_public_types_define and b4_public_types_declare.
921
922 2009-03-02 Akim Demaille <demaille@gostai.com>
923
924 Coding style changes.
925 * data/lalr1.cc (b4_symbol_constructor_declaration_)
926 (b4_symbol_constructor_declarations)
927 (b4_symbol_constructor_definition_)
928 (b4_symbol_constructor_definitions)
929 (b4_yytranslate_definition): Rename as...
930 (b4_symbol_constructor_declare_)
931 (b4_symbol_constructor_declare)
932 (b4_symbol_constructor_define_)
933 (b4_symbol_constructor_define)
934 (b4_yytranslate_define): these.
935 * data/variant.hh (b4_variant_definition): Rename as...
936 (b4_variant_define): this.
937
938 2009-03-02 Akim Demaille <demaille@gostai.com>
939
940 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
941 * data/bison.m4 (b4_percent_define_if_define): New.
942 * data/c++.m4 (b4_variant_if): Move to...
943 * data/bison.m4: Here, using b4_percent_define_if_define.
944 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
945 * data/bison.m4: Here, using b4_percent_define_if_define.
946
947 2009-03-02 Akim Demaille <demaille@gostai.com>
948
949 Dub symbol_type_base as a public type.
950 * data/c++.m4 (b4_public_types_declare): Now define
951 symbol_type_base and symbol_type.
952 (b4_public_types_define): New.
953 In both cases, the definitions are taken verbatim from lalr1.cc.
954 * data/lalr1.cc: Adjust.
955
956 2009-03-02 Akim Demaille <demaille@gostai.com>
957
958 b4_public_types_declare.
959 * data/c++.m4 (b4_public_types_declare): New.
960 * data/glr.cc, data/lalr1.cc: Use it.
961
962 2009-03-02 Akim Demaille <demaille@gostai.com>
963
964 b4_semantic_type_declare.
965 * data/c++.m4 (b4_semantic_type_declare): New.
966 Factors and generalizes what was in glr.cc and lalr1.cc.
967 * data/variant.hh (b4_semantic_type_declare): Redefine it for
968 variants.
969 * data/lalr1.cc, data/glr.cc: Use it.
970
971 2009-02-26 Akim Demaille <demaille@gostai.com>
972
973 Upgrade gnulib.
974 * gnulib: Upgrade from master.
975 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
976 Regen.
977
978 2009-02-25 Akim Demaille <demaille@gostai.com>
979
980 Remove useless arguments.
981 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
982 relevant.
983
984 2009-02-25 Akim Demaille <demaille@gostai.com>
985
986 Comment changes.
987 * data/lalr1.cc: here.
988
989 2009-02-25 Akim Demaille <demaille@gostai.com>
990
991 Fix glr.cc's debug level handling.
992 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
993 glr.c which is used.
994 (debug_level, set_debug_level): Adjust.
995
996 2009-02-25 Akim Demaille <demaille@gostai.com>
997
998 Copyright years.
999 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1000
1001 2009-02-25 Akim Demaille <demaille@gostai.com>
1002
1003 Style changes.
1004 * etc/bench.pl.in (generate_grammar_list): Consitently use
1005 location_type, not yy::location.
1006
1007 2009-02-25 Akim Demaille <demaille@gostai.com>
1008
1009 Comment change.
1010 * data/lalr1.cc: here.
1011
1012 2009-02-19 Akim Demaille <demaille@gostai.com>
1013
1014 Make yyparser::error public.
1015 * data/lalr1.cc: here.
1016 There is no good reason to keep it private (and it is convenient
1017 to use it from the scanner for instance). It is already public in
1018 glr.cc.
1019
1020 2009-02-19 Akim Demaille <demaille@gostai.com>
1021
1022 Comment changes.
1023 * data/glr.cc: here.
1024
1025 2009-02-19 Akim Demaille <demaille@gostai.com>
1026
1027 Remove trailing blanks.
1028 The epilogue has its own ending \n, no need to add another.
1029
1030 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1031 epilogue.
1032 * data/glr.cc: dnl when extending the epilogue.
1033 Remove stray "private:".
1034
1035 2009-02-19 Akim Demaille <demaille@gostai.com>
1036
1037 Use b4_c_modern.
1038 * data/c.m4 (b4_c_function_decl): Here.
1039
1040 2009-02-19 Akim Demaille <demaille@gostai.com>
1041
1042 Comment changes.
1043 * data/lalr1.cc: here.
1044
1045 2009-02-19 Akim Demaille <demaille@gostai.com>
1046
1047 Extract variant.hh
1048 * data/variant.hh: New, extracted from...
1049 * data/lalr1.cc: here.
1050 Adjust.
1051 * data/local.mk: Adjust.
1052
1053 2009-02-19 Akim Demaille <demaille@gostai.com>
1054
1055 Extract stack.hh from lalr1.cc.
1056 * data/stack.hh: New.
1057 * data/lalr1.cc: Extract from here.
1058 * data/local.mk: Adjust.
1059
1060 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1061
1062 Add reminder about uploading public key to keys.gnupg.net.
1063 * HACKING (Release Procedure): Here.
1064
1065 2009-01-28 Akim Demaille <demaille@gostai.com>
1066
1067 * NEWS: Update information about 2.4.1 and 2.4.2.
1068
1069 2008-11-04 Akim Demaille <demaille@gostai.com>
1070
1071 Reformat NEWS.
1072 * NEWS: Use more outline-mode markup.
1073 Suggested by Jim Meyering.
1074
1075 2009-01-08 Akim Demaille <demaille@gostai.com>
1076
1077 Fix grep portability issues.
1078 Grep on Solaris does not support -q.
1079 Reported by Summum Bonum.
1080
1081 * NEWS: Add a stub for 2.4.2.
1082 * THANKS: Add Summum Bonum.
1083 * tests/atlocal.in (EGREP): New.
1084 (CC, CXX, XSLTPROC): Make it possible to override them via
1085 envvars.
1086 * tests/java.at: Use $EGREP instead of egrep.
1087 Use AT_CHECK's ignore instead of grep's -q.
1088
1089 2008-12-11 Akim Demaille <demaille@gostai.com>
1090
1091 Pass the token type to yysyntax_error.
1092 * data/yacc.c (yysyntax_error): Take the transated token instead
1093 of the raw number.
1094 Adjust callers.
1095 * TODO: Update.
1096
1097 2008-12-11 Akim Demaille <demaille@gostai.com>
1098
1099 Formatting changes.
1100 * data/glr.c: Formatting changes.
1101
1102 2008-12-11 Akim Demaille <demaille@gostai.com>
1103
1104 Propagate i18n changes into glr.c.
1105 * TODO: Update.
1106 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1107 building the error message format dynamically.
1108 * data/lalr1.java: Formatting changes.
1109
1110 2008-12-11 Akim Demaille <demaille@gostai.com>
1111
1112 Use testsuite -C.
1113 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1114 Solves problems when top_srcdir is an absolute path.
1115 Suggested by Eric Blake.
1116 * configure.ac: Require Autoconf 2.62.
1117
1118 2008-12-11 Akim Demaille <demaille@gostai.com>
1119
1120 Simplify the i18n of the error messages.
1121 * data/lalr1.cc: Comment changes.
1122 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1123 lalr1.cc instead of building dynamically the format string.
1124
1125 2008-12-08 Akim Demaille <demaille@gostai.com>
1126
1127 Fix portability issue in the test suite.
1128 * tests/local.at (AT_MATCHES_CHECK): New.
1129 Based on Perl instead of Sed. Sed has too many portability
1130 pitfalls, not ever Sed is GNU Sed.
1131 * tests/actions.at (Fix user actions without a trailing semicolon):
1132 Use it.
1133
1134 2008-12-08 Akim Demaille <demaille@gostai.com>
1135
1136 Update data/README.
1137 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1138
1139 2008-12-08 Akim Demaille <demaille@gostai.com>
1140
1141 Install autoconf as a submodule to get m4sugar.
1142 * .gitmodules: Add submodules/autoconf.
1143 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1144 submodules/autoconf.
1145
1146 2008-12-08 Akim Demaille <demaille@gostai.com>
1147
1148 Test token.prefix in all the skeletons.
1149 * data/java.m4 (b4_token_enum): Use the token.prefix.
1150 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1151 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1152 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1153 * tests/java.at: Comment changes.
1154 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1155 (Java parser class and package names): Add token.prefix check.
1156
1157 2008-12-08 Akim Demaille <demaille@gostai.com>
1158
1159 Fix regeneration of atconfig.
1160 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1161 remove it: now that there is no tests/Makefile.am, the top-level
1162 Makefile properly updates atconfig when needed.
1163
1164 2008-12-07 Di-an Jan <dianj@freeshell.org>
1165
1166 Implement the FIXME that ends an user action with a semicolon
1167 if it seems necessary.
1168 * src/scan-code.l (flex rules section): Flag cpp directive from
1169 any `#' to the first unescaped end-of-line. Semicolon is not
1170 needed after `;', `{', '}', or cpp directives and is needed after
1171 any other token (whitespaces and comments have no effect).
1172 * tests/actions.at (Fix user actions without a trailing semicolon):
1173 New test.
1174 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1175 to make user actions complete statements.
1176 Adjust column numbers in error messages.
1177 * tests/regression.at (Fix user actions without a trailing semicolon):
1178 Remove. Covered by new test.
1179
1180 2008-12-07 Akim Demaille <demaille@gostai.com>
1181
1182 Update gnulib.
1183 * gnulib: Update from master.
1184
1185 2008-12-05 Eric Blake <ebb9@byu.net>
1186
1187 Avoid compiler warning.
1188 * src/output.c (muscle_insert_item_number_table): Delete unused
1189 function.
1190
1191 2008-12-02 Eric Blake <ebb9@byu.net>
1192
1193 Build testsuite with newer autoconf.
1194 * tests/output.at (m4_expand): Don't override in newer autoconf,
1195 where the underlying implementation changed.
1196 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1197 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1198 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1199 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1200 since some of them contain unbalanced ')'.
1201
1202 2008-12-01 Akim Demaille <demaille@gostai.com>
1203
1204 Use b4_symbol for printers and destructors everywhere.
1205 * data/bison.m4 (b4_symbol_action_location): New.
1206 * data/c.m4 (b4_symbol_actions): Remove.
1207 Adjust all callers to use by b4_symbol_foreach and the corresponding
1208 b4_symbol_printer/destructor macro.
1209 * data/glr.cc: Adjust.
1210 * data/lalr1.java: Adjust the %destructor sanity check.
1211 * src/output.c (symbol_code_props_output): Remove, we no longer
1212 need the b4_symbol_printers/destructors tables.
1213
1214 2008-12-01 Akim Demaille <demaille@gostai.com>
1215
1216 Use b4_symbol_case_.
1217 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1218 b4_symbol_case_.
1219
1220 2008-12-01 Akim Demaille <demaille@gostai.com>
1221
1222 Move b4_symbol based macro to bison.m4.
1223 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1224 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1225 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1226 (b4_type_foreach): Move to...
1227 * data/bison.m4: Here.
1228 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1229 b4_symbol_value_template instead of b4_symbol_value.
1230
1231 2008-12-01 Akim Demaille <demaille@gostai.com>
1232
1233 b4_symbol/type_foreach.
1234 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1235 Use them.
1236
1237 2008-12-01 Akim Demaille <demaille@gostai.com>
1238
1239 Use the symbol properties to output the printer/destructor for lalr1.cc.
1240 Instead of defining complex list of tuples to define various
1241 properties of the symbols, we now prefer to define symbols as
1242 "structs" in m4: using the symbol key (its number), and the
1243 property name, b4_symbol gives it value. Use this to handle
1244 destructors and printers.
1245
1246 * src/output.c (CODE_PROP): New.
1247 (prepare_symbol_definitions): Use it to define the printer and
1248 destructor related attributes of the symbols.
1249 * data/lalr1.cc (b4_symbol_actions): Rename as...
1250 (b4_symbol_action): this.
1251 Use b4_symbol instead of 6 arguments.
1252 (b4_symbol_printer, b4_symbol_destructor): New.
1253 Use them instead of b4_symbol_actions.
1254
1255 2008-12-01 Akim Demaille <demaille@gostai.com>
1256
1257 Avoid capturing variables too easily.
1258 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
1259 v__ and p__ instead of v and p.
1260
1261 2008-12-01 Akim Demaille <demaille@gostai.com>
1262
1263 Remove spurious empty line before syncline.
1264 * data/bison.m4 (b4_syncline): Don't output an empty line before
1265 the output.
1266
1267 2008-11-26 Akim Demaille <demaille@gostai.com>
1268
1269 Convert lib/Makefile.am into lib/local.mk.
1270 The real problem is rather gnulib.mk, which itself is extracted
1271 from a Makefile.am that gnulib expects to the "recursive". The
1272 tool prefix-gnulib-mk converts such a gnulib.mk to be
1273 non-recursive. Also, some AC_SUBST variables need to be adjusted.
1274
1275 * etc/prefix-gnulib-mk: New.
1276 * bootstrap (slurp): Use it to convert further gnulib.mk.
1277 No longer try to avoid re-creation of lib/gnulib.mk as the changes
1278 are deeper.
1279 * lib/Makefile.am: Rename as...
1280 * lib/local.mk: this.
1281 Adjust to be prefixed.
1282 * Makefile.am, configure.ac: Adjust.
1283 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
1284
1285 2008-11-26 Akim Demaille <demaille@gostai.com>
1286
1287 s/_FLAGS/FLAGS/.
1288 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1289 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1290 Reported by Eric Blake.
1291
1292 2008-11-26 Akim Demaille <demaille@gostai.com>
1293
1294 Use b4_parser_tables_define in glr.cc.
1295 * data/glr.c: Use b4_parser_tables_define instead of defining the
1296 (deterministic integral) tables by hand.
1297
1298 2008-11-26 Akim Demaille <demaille@gostai.com>
1299
1300 Use b4_parser_tables_define in Java.
1301 * data/java.m4 (b4_typed_parser_table): Rename as...
1302 (b4_typed_parser_table_define): this, for consistency.
1303 Accept a comment as $4.
1304 Move $2 into yy*_.
1305 (b4_integral_parser_table): Rename as...
1306 (b4_integral_parser_table_define): this.
1307 * data/lalr1.java: Adjust all uses.
1308 Use b4_parser_tables_define instead of generation by hand.
1309
1310 2008-11-26 Akim Demaille <demaille@gostai.com>
1311
1312 Prepare the convergence bw C style and Java table generation.
1313 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1314 (b4_tables_define): Rename as...
1315 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1316 (b4_parser_tables_define): these.
1317 * data/c.m4 (b4_table_define): Rename as...
1318 (b4_integral_parser_table_define): this.
1319 * data/lalr1.cc: Adjust.
1320 (b4_table_define, b4_table_declare): Rename as...
1321 (b4_integral_parser_table_define)
1322 (b4_integral_parser_table_declare): these.
1323 (yyrline_): Move the comment where it is actually used.
1324 * data/yacc.c: Adjust.
1325 (yyrline): Use b4_integral_parser_table_define.
1326
1327 2008-11-26 Akim Demaille <demaille@gostai.com>
1328
1329 Regen.
1330 * src/parse-gram.h, src/parse-gram.c: Regen.
1331
1332 2008-11-26 Akim Demaille <demaille@gostai.com>
1333
1334 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1335 * data/lalr1.cc (b4_tables_map): Move to...
1336 * data/bison.m4: here.
1337 Update the comment for yytable during the flight.
1338 (b4_tables_declare, b4_tables_define): New.
1339 * data/lalr1.cc: Use them.
1340 * data/c.m4 (b4_table_define): New.
1341 * data/yacc.c: Use b4_tables_define instead of output the tables
1342 by hand.
1343 * tests/regression.at (Web2c Actions): Adjust the expected output,
1344 the order of the tables changed.
1345
1346 2008-11-26 Akim Demaille <demaille@gostai.com>
1347
1348 Get rid of (yy)rhs and (yy)prhs.
1349 These tables are no longer needed in the parsers, and they don't seem to
1350 be useful. They are not documented either.
1351
1352 * src/output.c (prepare_rules): Get rid of rhs and prhs.
1353 Adjust the computation of (yy)r2.
1354
1355 2008-11-26 Akim Demaille <demaille@gostai.com>
1356
1357 Rule length is unsigned.
1358 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
1359
1360 2008-11-26 Akim Demaille <demaille@gostai.com>
1361
1362 Get rid of lalr1-split.cc.
1363 It was no longer maintainer.
1364
1365 * data/lalr1-split.cc: Remove.
1366 * etc/bench.pl.in (bench_fusion_parser): Remove.
1367 Adjust.
1368
1369 2008-11-26 Akim Demaille <demaille@gostai.com>
1370
1371 Use yy* consistently.
1372 * data/glr.c: Now that yyrhs no longer exists as a global
1373 variable, rename local "rhs" variables into "yyrhs" for
1374 consistency.
1375
1376 2008-11-25 Akim Demaille <demaille@gostai.com>
1377
1378 Get rid of yyrhs and yyprhs in glr.c.
1379 * data/glr.c (yyrhs, yyprhs): Remove.
1380 Instead, use the state stack and yystos.
1381
1382 2008-11-25 Akim Demaille <demaille@gostai.com>
1383
1384 Flag glr tests.
1385 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
1386 as an Autotest keyword.
1387
1388 2008-11-25 Akim Demaille <demaille@gostai.com>
1389
1390 Prefer TESTSUITE_FLAGS.
1391 TESTSUITEFLAGS is barely readable.
1392
1393 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
1394 for backward compatibility.
1395 Use the former instead of the latter.
1396
1397 2008-11-25 Akim Demaille <demaille@gostai.com>
1398
1399 Get rid of yyrhs and yyprhs in larl1.java.
1400 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
1401 (yy_reduce_print): Rather, use yystos_ and the state stack.
1402
1403 2008-11-25 Akim Demaille <demaille@gostai.com>
1404
1405 Formatting changes.
1406
1407 2008-11-25 Akim Demaille <demaille@gostai.com>
1408
1409 Get rid of yyrhs and yyprhs in yacc.c.
1410 They were used to get the symbol types, given a rule number, when
1411 displaying the top of the stack before a reduction. But the
1412 symbol type is available from the state stack. This has two be
1413 benefits: two tables less in the parser (making it smaller), and a
1414 more consistent use of the three stacks which will help to fuse
1415 them.
1416
1417 * data/yacc.c (yyprhs, yyrhs): Remove.
1418 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
1419 (yy_reduce_print): Take yyssp as argument.
1420 Use it, together with yystos, to get the symbol type.
1421 * tests/regression.at (Web2c Report): Remove these tables from the
1422 expected output.
1423
1424 2008-11-25 Akim Demaille <demaille@gostai.com>
1425
1426 b4_tables_map.
1427 The point is to factor the generation of the tables across skeletons.
1428 This is language dependant.
1429
1430 * data/c.m4 (b4_comment_): New.
1431 Should be usable to define how to generate tables independently of
1432 the language.
1433 (b4_c_comment): New.
1434 (b4_comment): Bounce to b4_c_comment.
1435 Now support $2 = [PREFIX] for indentation.
1436 * data/lalr1.cc (b4_table_declare): Don't output a comment if
1437 there is no comment.
1438 Indent it properly when there is one.
1439 Output the ending semicolon.
1440 (b4_table_define): Space changes.
1441 Output the ending semicolon.
1442 (b4_tables_map): New.
1443 Use it twice instead of declaring and defining the (integral)
1444 tables by hand.
1445
1446 2008-11-25 Akim Demaille <demaille@gostai.com>
1447
1448 b4_table_declare.
1449 * data/lalr1.cc (b4_table_declare): New.
1450 Use it to declare the tables defined with b4_table_define.
1451 (b4_table_define): Declare a third arg to match b4_table_declare
1452 signature.
1453 Move all the comments around invocations of b4_table_define into
1454 the invocations itselves.
1455 Move things around to have the order for declarations and
1456 definitions.
1457
1458 2008-11-25 Akim Demaille <demaille@gostai.com>
1459
1460 Formatting changes.
1461 * data/lalr1.java: here.
1462
1463 2008-11-25 Akim Demaille <demaille@gostai.com>
1464
1465 b4_args is more general than only C++.
1466 * data/lalr1.cc (b4_args, _b4_args): Move to...
1467 * data/bison.m4: here.
1468
1469 2008-11-21 Di-an Jan <dianj@freeshell.org>
1470
1471 Implement no-XXX arguments for --warnings, --report, --trace.
1472 * src/getargs.c (flags_argmatch): Handles no-XXX.
1473 Fix typo in doxygen comment.
1474
1475 2008-11-21 Akim Demaille <demaille@gostai.com>
1476
1477 Display the changes in cross-options.texi.
1478 * build-aux/cross-options.pl ($sep): New, to separate items.
1479 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
1480 changes.
1481
1482 2008-11-20 Di-an Jan <dianj@freeshell.org>
1483
1484 Improves options in the manual.
1485 * doc/bison.texinfo (-g, -x): Add space before argument.
1486 (Option Cross Key): Implement FIXME: listing directives also.
1487 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1488 (Short Option): Special case -d. Put arguments inside @option.
1489 (Bison Directive): Add column, automatically extracted from
1490 src/scan-gram.l (actual name passed as the first argument)
1491 with special case for %define.
1492 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
1493 to build-aux/cross-options.pl.
1494 * src/getargs.c (usage): Document limitations of cross-options.pl.
1495 * src/scan-gram.l: Likewise.
1496
1497 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1498
1499 Fix unexpanded macros in GLR defines file.
1500 Reported by Csaba Raduly at
1501 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1502 * THANKS (Csaba Raduly): Add.
1503 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1504 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1505 lexer in a separate module that includes the defines file.
1506 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
1507 source.
1508 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1509 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1510 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1511 (AT_DATA_SOURCE_PROLOGUE): New.
1512 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1513 (AT_DATA_SOURCE): New.
1514 (AT_FULL_COMPILE): Extend to support an additional source file.
1515
1516 2008-11-18 Akim Demaille <demaille@gostai.com>
1517
1518 More TODO.
1519 * TODO: More short term issues.
1520
1521 2008-11-18 Akim Demaille <demaille@gostai.com>
1522
1523 Regen.
1524 * src/parse-gram.h, src/parse-gram.c: Regen.
1525
1526 2008-11-18 Akim Demaille <demaille@gostai.com>
1527
1528 Use b4_subtract where possible.
1529 * data/lalr1.cc (b4_subtract): Move to...
1530 * data/bison.m4: here.
1531 * data/glr.c (b4_rhs_data): Use it.
1532 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
1533
1534 2008-11-18 Akim Demaille <demaille@gostai.com>
1535
1536 Remove incorrect mode specification.
1537 * data/glr.cc: Don't pretend it's C code.
1538
1539 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1540
1541 Simplify last patch slightly.
1542 * src/getargs.c (getargs): Here.
1543
1544 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1545
1546 Fix last warning from --enable-gcc-warnings.
1547 * src/getargs.c (getargs): Don't assign const address to non-const
1548 pointer.
1549
1550 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1551
1552 Don't let maintainer-*-check targets force a version update.
1553 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1554 handled.
1555
1556 2008-11-17 Di-an Jan <dianj@freeshell.org>
1557
1558 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1559 Align menus. Adjust word wrapping. Use node names for menu names.
1560 (Examples): Don't abbreviate node names.
1561 (LocalWords): Remove abbreviations.
1562 (Copying): Make description a sentence.
1563 (Java Action Features): Remove period to match the rest of menu.
1564
1565 2008-11-17 Di-an Jan <dianj@freeshell.org>
1566
1567 Handles several --enable-gcc-warnings.
1568 * src/getargs.c (command_line_location): Set parameters to void.
1569 * src/output.c (symbol_type_name_cmp): Make static.
1570 (symbols_by_type_name): Set parameters to void.
1571 (symbol_definitions_output): Remove unused parameter. Rename as...
1572 (prepare_symbol_definitions): this.
1573 (muscles_output): Move symbol_definitions_output to...
1574 (output): here as prepare_symbol_definitions.
1575 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
1576 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
1577
1578 2008-11-17 Di-an Jan <dianj@freeshell.org>
1579
1580 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
1581 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
1582
1583 2008-11-16 Akim Demaille <demaille@gostai.com>
1584
1585 Add missing $(EXEEXT).
1586 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
1587 "src/bison$(EXEEXT)".
1588 Reported by Di-an Jan.
1589
1590 2008-11-15 Akim Demaille <demaille@gostai.com>
1591
1592 * TODO: Update.
1593
1594 2008-11-15 Akim Demaille <demaille@gostai.com>
1595
1596 Formatting changes.
1597 * tests/input.at: here.
1598
1599 2008-11-15 Akim Demaille <demaille@gostai.com>
1600
1601 Remove duplicate header inclusion.
1602 * src/LR0.c: here.
1603
1604 2008-11-15 Akim Demaille <demaille@gostai.com>
1605
1606 * src/parse-gram.h, src/parse-gram.c: Regen.
1607
1608 2008-11-15 Akim Demaille <demaille@gostai.com>
1609
1610 Support parametric types.
1611
1612 There are two issues to handle: first scanning nested angle
1613 bracket pairs to support types such as std::pair< std::string,
1614 std::list<std::string> > >.
1615
1616 Another issue is to address idiosyncracies of C++: do not glue two
1617 closing angle brackets together (otherwise it's operator>>), and
1618 avoid sticking blindly a TYPE to the opening <, as it can result
1619 in '<:' which is a digraph for '['.
1620
1621 * src/scan-gram.l (brace_level): Rename as...
1622 (nesting): this.
1623 (SC_TAG): New.
1624 Implement support for complex tags.
1625 (tag): Accept
1626 , but not <.
1627 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
1628 (b4_symbol_variant): Leave space around types as parameters.
1629 * examples/variant.yy: Use nested template types and leading ::.
1630 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
1631 Rename as...
1632 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
1633 * tests/c++.at: Test parametric types.
1634
1635 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1636
1637 Test token.prefix.
1638 This is not sufficient, but we test at least that the make_SYMBOL
1639 interface is not affected by token.prefix. A more general test
1640 will be implemented when the support of token.prefix is generalized
1641 to more skeletons.
1642
1643 * tests/c++.at: One more variant test, using token.prefix.
1644
1645 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1646
1647 Test the make_TOKEN interface.
1648 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
1649 Factor the common code in yylex.
1650 Use it to test "%define lex_symbol".
1651
1652 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1653
1654 Formatting change.
1655
1656 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1657
1658 Simplify code for variants bench marks.
1659 * etc/bench.pl.in (&generate_grammar_list): Define and use
1660 location_type.
1661 Factor the common code in yylex.
1662
1663 2008-11-15 Akim Demaille <demaille@gostai.com>
1664
1665 Better error message.
1666 * bootstrap (find_tool): Fix the error message.
1667
1668 2008-11-15 Akim Demaille <demaille@gostai.com>
1669
1670 Update variant.yy to newest interface.
1671 * examples/variant.yy: Define lex_symbol.
1672 Adjust.
1673
1674 2008-11-15 Akim Demaille <demaille@gostai.com>
1675
1676 Don't use locations in variant.yy.
1677 * examples/variant.yy: Adjust to not using locations.
1678
1679 2008-11-15 Akim Demaille <demaille@gostai.com>
1680
1681 Comment changes.
1682 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
1683 comments for the license.
1684
1685 2008-11-15 Akim Demaille <demaille@gostai.com>
1686
1687 Remove tests/Makefile.am.
1688 * tests/Makefile.am: Rename as...
1689 * tests/local.mk: this.
1690 * Makefile.am, configure.ac: Adjust.
1691 * Makefile.am (DISTCLEANFILES): Define.
1692 (maintainer-check, maintainer-xml-check, maintainer-push-check):
1693 Remove, we no longer need to bounce to the real targets.
1694
1695 2008-11-15 Akim Demaille <demaille@gostai.com>
1696
1697 Comment changes.
1698
1699 2008-11-15 Akim Demaille <demaille@gostai.com>
1700
1701 djgpp/local.mk.
1702 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
1703 * djgpp/local.mk: this new file.
1704
1705 2008-11-15 Akim Demaille <demaille@gostai.com>
1706
1707 Remove doc/Makefile.am.
1708 * doc/Makefile.am: Rename as...
1709 * doc/local.mk: this.
1710 Adjust paths
1711 * Makefile.am, configure.ac: Adjust.
1712 * Makefile.am (MOSTLYCLEANFILES): New.
1713 * src/local.mk: Adjust.
1714
1715 2008-11-15 Akim Demaille <demaille@gostai.com>
1716
1717 Move sc_tight_scope into maint.mk.
1718 It does not work, and I don't know how it was supposed to work: it
1719 seems to be looking for sources in the build tree. I just moved
1720 it at a better place, fixing it is still required.
1721
1722 * src/local.mk (echo): Remove.
1723 (sc_tight_scope): Move to...
1724 * maint.mk: here.
1725
1726 2008-11-15 Akim Demaille <demaille@gostai.com>
1727
1728 Regen.
1729 * src/parse-gram.h, src/parse-gram.h: Regen.
1730
1731 2008-11-15 Akim Demaille <demaille@gostai.com>
1732
1733 Remove src/Makefile.am.
1734 * src/Makefile.am: Rename as...
1735 * src/local.mk: this.
1736 Prefix all the paths with src/.
1737 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
1738 (AM_CPPFLAGS): Find find in builddir/src.
1739 (YACC): Move the flags into...
1740 (AM_YFLAGS): here.
1741 * maint.mk (sc_tight_scope): Disable.
1742 It used to bounce to the version in src/Makefile.am which is now
1743 part of this very Makefile.
1744 * Makefile.am, configure.ac: Adjust.
1745 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
1746 include "..." to find files "here": we are no longer in src/, so
1747 qualify the includes with src/.
1748 * doc/Makefile.am (PREPATH): No longer include the top_builddir
1749 prefix.
1750 (.x.1): Adjust to be able to create src/foo from the top level
1751 Makefile, instead of going bounce to src/Makefile the creation of
1752 foo.
1753
1754 2008-11-15 Akim Demaille <demaille@gostai.com>
1755
1756 Remove useless variable.
1757 * doc/Makefile.am (srcsrcdir): Remove.
1758
1759 2008-11-15 Akim Demaille <demaille@gostai.com>
1760
1761 Remove data/Makefile.am.
1762 * data/Makefile.am: Rename as...
1763 * data/local.mk: this.
1764 Adjust paths.
1765 * Makefile.am, configure.ac: Adjust.
1766
1767 2008-11-15 Akim Demaille <demaille@gostai.com>
1768
1769 Remove etc/Makefile.am.
1770 * etc/Makefile.am: Rename as...
1771 * etc/local.mk: this.
1772 Adjust.
1773 * Makefile.am, configure.ac: Adjust.
1774
1775 2008-11-15 Akim Demaille <demaille@gostai.com>
1776
1777 Remove examples/local.mk.
1778 examples/calc++/Makefile.am might be interesting to keep as is, since
1779 it is an example in itself.
1780
1781 * examples/Makefile.am: Rename as...
1782 * examples/local.mk: this.
1783 Adjust.
1784 * Makefile.am, configure.ac: Adjust.
1785
1786 2008-11-15 Akim Demaille <demaille@gostai.com>
1787
1788 Remove build-aux/Makefile.am.
1789 Recursive Makefiles are really way too slow, let's get rid of some of
1790 them.
1791
1792 * build-aux/Makefile.am: Rename as...
1793 * build-aux/local.mk: this.
1794 Adjust paths.
1795 * Makefile.am, configure.ac: Adjust.
1796
1797 2008-11-15 Akim Demaille <demaille@gostai.com>
1798
1799 Provide convenience constructors for locations and positions.
1800 * data/location.cc (position::position): Accept file, line and
1801 column as arguments with default values.
1802 Always qualify initial line and column literals as unsigned.
1803 (location::location): Provide convenience constructors.
1804
1805 2008-11-15 Akim Demaille <demaille@gostai.com>
1806
1807 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
1808 token type.
1809 Using template buys us nothing, and makes it uselessly complex to
1810 construct a symbol. Besides, it could not be generalized to other
1811 languages, while make_FOO would work in C/Java etc.
1812
1813 * data/lalr1.cc (b4_symbol_): New.
1814 (b4_symbol): Use it.
1815 (b4_symbol_constructor_declaration_)
1816 (b4_symbol_constructor_definition_): Instead of generating
1817 specializations of an overloaded template function, just generate
1818 several functions whose names are forged from the token names
1819 without the token.prefix.
1820 (b4_symbol_constructor_declarations): Generate them for all the
1821 symbols, not just by class of symbol type, now that instead of
1822 specializing a function template by the token, we generate a
1823 function named after the token.
1824 (b4_symbol_constructor_specialization_)
1825 (b4_symbol_constructor_specializations): Remove.
1826 * etc/bench.pl.in: Adjust to this new API.
1827
1828 2008-11-13 Akim Demaille <demaille@gostai.com>
1829
1830 %define token.prefix.
1831 Provide a means to add a prefix to the name of the tokens as
1832 output in the generated files. Because of name clashes, it is
1833 good to have such a prefix such as TOK_ that protects from names
1834 such as EOF, FILE etc. But it clutters the grammar itself.
1835
1836 * data/bison.m4 (token.prefix): Empty by default.
1837 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
1838 * data/lalr1.cc (b4_symbol): Ditto.
1839
1840 2008-11-13 Akim Demaille <demaille@gostai.com>
1841
1842 Compute at M4 time some of the subtractions.
1843 * data/lalr1.cc (b4_subtract): New.
1844 (b4_rhs_data): Use it.
1845
1846 2008-11-13 Akim Demaille <demaille@gostai.com>
1847
1848 symbol::token.
1849 This allows the user to get the type of a token returned by yylex.
1850
1851 * data/lalr1.cc (symbol::token): New.
1852 (yytoknum_): Define when %define lex_symbol, independently of
1853 %debug.
1854 (yytoken_number_): Move into...
1855 (symbol::token): here, since that's the only use.
1856 The other one is YYPRINT which was not officially supported
1857 by lalr1.cc, and anyway it did not work since YYPRINT uses this
1858 array under a different name (yytoknum).
1859
1860 2008-11-13 Akim Demaille <demaille@gostai.com>
1861
1862 YYERRCODE.
1863 * TODO (YYERRCODE): Mention the case of $undef.
1864
1865 2008-11-13 Akim Demaille <demaille@gostai.com>
1866
1867 TODO: YYPRINT.
1868 * TODO (YYPRINT): New.
1869
1870 2008-11-13 Akim Demaille <demaille@gostai.com>
1871
1872 Comment changes.
1873 * data/lalr1.cc, data/yacc.c: Fix the description of the
1874 yytranslate and yytoknum tables.
1875
1876 2008-11-13 Akim Demaille <demaille@gostai.com>
1877
1878 Define make_symbol in the header.
1879 To reach good performances these functions should be inlined (yet
1880 this is to measure precisely). To this end they must be available
1881 to the caller.
1882
1883 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
1884 location_type with the class name.
1885 Since will now be output in the header, declare "inline".
1886 No longer use b4_symbol_constructor_specializations, but
1887 b4_symbol_constructor_definitions in the header.
1888 Don't call it in the *.cc file.
1889
1890 2008-11-13 Akim Demaille <demaille@gostai.com>
1891
1892 Define yytranslate in the header for lex_symbol.
1893 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
1894 into the header file when using %define lex_symbol.
1895 (yytranslate_): Declare inline.
1896
1897 2008-11-13 Akim Demaille <demaille@gostai.com>
1898
1899 Define the constructors of symbol_type in
1900 b4_symbol_constructor_definitions.
1901 The constructors are called by the make_symbol functions, which a
1902 forthcoming patch will move elsewhere. Hence the interest of
1903 putting them together.
1904
1905 The stack_symbol_type does not need to be moved, it is used only
1906 by the parser.
1907
1908 * data/lalr1.cc: Move symbol_type and symbol_base_type
1909 constructors into...
1910 (b4_symbol_constructor_definitions): here.
1911 Adjust.
1912
1913 2008-11-13 Akim Demaille <demaille@gostai.com>
1914
1915 Make it easier to move the definition of yytranslate_.
1916 Forthcoming changes will make it possible to use yytranslate_
1917 from outside the parser implementation file.
1918
1919 * data/lalr1.cc (b4_yytranslate_definition): New.
1920 Use it.
1921
1922 2008-11-13 Akim Demaille <demaille@gostai.com>
1923
1924 Remove useless class specification.
1925 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1926 to refer to the class name to use a type defined by the class for
1927 arguments of member functions.
1928
1929 2008-11-13 Akim Demaille <demaille@gostai.com>
1930
1931 Finer input type for yytranslate.
1932 This patch is debatable: the tradition expects yylex to return an int
1933 which happens to correspond to token_number (which is an enum). This
1934 allows for instance to return characters (such as '*' etc.). But this
1935 goes against the stronger typing I am trying to have with the new
1936 lex interface which return a symbol_type. So in this case, feed
1937 yytranslate_ with a token_type.
1938
1939 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1940 expect a token_type.
1941
1942 2008-11-13 Akim Demaille <demaille@gostai.com>
1943
1944 Honor lex-params in %define lex_symbol mode.
1945 * data/lalr1.cc: Use b4_lex_param.
1946
1947 2008-11-13 Akim Demaille <demaille@gostai.com>
1948
1949 Simplify names.
1950 * src/output.c (symbol_definitions_output): Rename symbol
1951 attributes type_name and has_type_name as type and has_type.
1952 * data/lalr1.cc: Adjust uses.
1953
1954 2008-11-13 Akim Demaille <demaille@gostai.com>
1955
1956 Use b4_type_names for the union type.
1957 The union used to compute the size of the variant used to iterate
1958 over the type of all the symbols, with a lot of redundancy. Now
1959 iterate over the lists of symbols having the same type-name.
1960
1961 * data/lalr1.cc (b4_char_sizeof_): New.
1962 (b4_char_sizeof): Use it.
1963 Adjust to be called with a list of numbers instead of a single
1964 number.
1965 Adjust its caller for new-line issues.
1966
1967 2008-11-13 Akim Demaille <demaille@gostai.com>
1968
1969 Define the "identifier" of a symbol.
1970 Symbols may have several string representations, for instance if
1971 they have an alias. What I call its "id" is a string that can be
1972 used as an identifier. May not exist.
1973
1974 Currently the symbols which have the "tag_is_id" flag set are
1975 those that don't have an alias. Look harder for the id.
1976
1977 * src/output.c (is_identifier): Move to...
1978 * src/symtab.c (is_identifier): here.
1979 * src/symtab.h, src/symtab.c (symbol_id_get): New.
1980 * src/output.c (symbol_definitions_output): Use it to define "id"
1981 and "has_id".
1982 Remove the definition of "tag_is_id".
1983 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
1984 "tag_is_id" were used to produce code.
1985 We still use "tag" for documentation.
1986
1987 2008-11-11 Akim Demaille <demaille@gostai.com>
1988
1989 Locations are no longer required by lalr1.cc.
1990 * data/lalr1.cc (_b4_args, b4_args): New.
1991 Adjust all uses of locations to make them optional.
1992 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
1993 (AT_CHECK_NAMESPACE): Check the use of locations.
1994 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
1995 without locations with lalr1.cc.
1996 Test these cases.
1997 * tests/output.at: Check lalr1.cc with and without location
1998 support.
1999 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2000 Don't use locations.
2001
2002 2008-11-11 Akim Demaille <demaille@gostai.com>
2003
2004 AT_FULL_COMPILE.
2005 * tests/local.at (AT_FULL_COMPILE): New.
2006 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2007
2008 2008-11-11 Akim Demaille <demaille@gostai.com>
2009
2010 Support parens in calc++.
2011 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2012 * examples/calc++/test (run): Check the expected output.
2013 Adjust callers.
2014 Check parens too.
2015
2016 2008-11-11 Akim Demaille <demaille@gostai.com>
2017
2018 Simplify lalr1.cc since %defines is mandatory.
2019 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2020
2021 2008-11-11 Akim Demaille <demaille@gostai.com>
2022
2023 TODO: yyfmt.
2024 * TODO (yysyntax_error): New item.
2025
2026 2008-11-11 Akim Demaille <demaille@gostai.com>
2027
2028 Prefer M4 to CPP.
2029 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2030 YYERROR_VERBOSE.
2031
2032 2008-11-11 Akim Demaille <demaille@gostai.com>
2033
2034 Support i18n of the parse error messages.
2035 * TODO (lalr1.cc/I18n): Remove.
2036 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2037 error messages, as done in yacc.c.
2038 Stay within the yy* pseudo namespace.
2039
2040 2008-11-11 Akim Demaille <demaille@gostai.com>
2041
2042 More TODO.
2043 * TODO (single stack, yysyntax_error): New.
2044
2045 2008-11-11 Akim Demaille <demaille@gostai.com>
2046
2047 Make it possible to return a symbol_type from yylex.
2048 * data/lalr1.cc (b4_lex_symbol_if): New.
2049 (parse): When lex_symbol is defined, expected yylex to return the
2050 complete lookahead.
2051 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2052 yylex interface.
2053 (bench_variant_parser): Exercise it.
2054
2055 2008-11-11 Akim Demaille <demaille@gostai.com>
2056
2057 Remove useless bench case.
2058 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2059 no longer used.
2060
2061 2008-11-11 Akim Demaille <demaille@gostai.com>
2062
2063 Improve display of directives.
2064 * etc/bench.pl.in (parse_term): Don't add useless eol.
2065
2066 2008-11-11 Akim Demaille <demaille@gostai.com>
2067
2068 Use string_cast in the bench.
2069 * etc/bench.pl.in (generate_grammar_list): Define and use
2070 string_cast.
2071
2072 2008-11-11 Akim Demaille <demaille@gostai.com>
2073
2074 Replace yychar with a Boolean.
2075 * data/lalr1.cc (parse::yychar): Replace by...
2076 (parse::yyempty): this.
2077
2078 2008-11-11 Akim Demaille <demaille@gostai.com>
2079
2080 Factor the tables.
2081 * TODO: New item.
2082
2083 2008-11-11 Akim Demaille <demaille@gostai.com>
2084
2085 Let yytranslate handle the eof case.
2086 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2087 Adjust callers.
2088 No longer expect yychar to be equal to yyeof_, rather, test the
2089 lookahead's (translated) kind.
2090
2091 2008-11-11 Akim Demaille <demaille@gostai.com>
2092
2093 yychar cannot be empty in yyerrlab.
2094 * TODO (yychar == yyempty_): New.
2095 * data/lalr1.cc: Remove the handling of this case.
2096 This eases forthcoming changes related to yychar and yytranslate.
2097
2098 2008-11-11 Akim Demaille <demaille@gostai.com>
2099
2100 Bench: syntactic sugar for %define/#define.
2101 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2102 (&bench_push_parser, bench_variant_parser): Use this feature.
2103 (&eat): New.
2104 Use it.
2105
2106 2008-11-11 Akim Demaille <demaille@gostai.com>
2107
2108 Less memory pressure on the "list" bench.
2109 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2110 the values, to limit memory pressure.
2111
2112 2008-11-11 Akim Demaille <demaille@gostai.com>
2113
2114 Introduce make_symbol.
2115 make_symbol provides a means to construct a full symbol (kind,
2116 value, location) in a single shot. It is meant to be a Symbol
2117 constructor, parameterized by the symbol kind so that overloading
2118 would prevent incorrect kind/value pairs. Unfortunately
2119 parameterized constructors do not work well in C++ (unless the
2120 parameter also appears as an argument, which is not acceptable),
2121 hence the use of a function instead of a constructor.
2122
2123 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2124 (b4_symbol_constructor_declarations)
2125 (b4_symbol_constructor_specialization_)
2126 (b4_symbol_constructor_specializations)
2127 (b4_symbol_constructor_definition_)
2128 (b4_symbol_constructor_definitions): New.
2129 Use them where appropriate to generate declaration, declaration of
2130 the specializations, and implementations of the templated
2131 overloaded function "make_symbol".
2132 (variant::variant): Always define a default ctor.
2133 Also provide a copy ctor.
2134 (symbol_base_type, symbol_type): New ctor overloads for value-less
2135 symbols.
2136 (symbol_type): Now public, so that functions such as yylex can use
2137 it.
2138
2139 2008-11-11 Akim Demaille <demaille@gostai.com>
2140
2141 Inform m4 whether a tag is a valid id.
2142 * src/output.c (is_identifier): New.
2143 (symbol_definitions_output): Use it to define tag_is_id.
2144 But maybe this should be done at m4 level?
2145
2146 2008-11-11 Akim Demaille <demaille@gostai.com>
2147
2148 Test 214 was failing: it greps with a pattern containing [ ]*
2149 which obviously meant to catch spaces and tabs, but contained only
2150 spaces. Tabulations in sources are a nuisance, so to simplify the
2151 matter, get rid of all the tabulations in the Java sources. The
2152 other skeletons will be treated equally later.
2153
2154 * data/java.m4, data/lalr1.java: Untabify.
2155 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2156 tabulations are no longer generated.
2157
2158 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2159
2160 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2161 * configure.ac: Adjust usage.
2162 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2163 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2164 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2165
2166 2008-11-10 Di-an Jan <dianj@freeshell.org>
2167
2168 Workaround Java's ``code too large'' problem for parser tables
2169 in most cases, by using one function per initialization.
2170 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2171 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2172 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2173 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2174 (yytname_): Use b4_typed_parser_table.
2175 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2176 ``code too large'' error.
2177
2178 2008-11-10 Di-an Jan <dianj@freeshell.org>
2179
2180 * NEWS: Document them.
2181
2182 General Java skeleton improvements.
2183 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2184 using gcj < 4.3 in the testsuite, according to comments in
2185 gnulib/m4/javacomp.m4.
2186 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2187 location_type, position_type): Remove extraneous brackets from
2188 b4_percent_define_default.
2189 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2190 m4_define and m4_define_default.
2191 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2192 which marks the end of user code with appropriate syncline, like all
2193 the other skeletons.
2194 (b4_user_post_prologue): Add. Don't silently drop.
2195 (yylex): Remove.
2196 (parse): Inline yylex.
2197 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2198 (%{...%}): Fix typo of %code imports.
2199 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2200
2201 Support annotations on parser class with %define annotations.
2202 * data/lalr1.java (annotations): Add to parser class modifier.
2203 * doc/bison.texinfo (Java Parser Interface): Document
2204 %define annotations.
2205 (Java Declarations Summary): Document %define annotations.
2206 * tests/java.at (Java parser class modifiers): Test annotations.
2207
2208 Do not generate code for %error-verbose unless requested.
2209 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2210 Make private. Make conditional on %error-verbose.
2211 (getErrorVerbose, setErrorVerbose): New.
2212 (yytnamerr_): Make conditional on %error-verbose.
2213 (yysyntax_error): Make some code conditional on %error-verbose.
2214 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2215 about %error-verbose having no effect.
2216 (getErrorVerbose, setErrorVerbose): Document.
2217
2218 Move constants for token names to Lexer interface.
2219 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2220 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2221 (parse): Qualify EOF to Lexer.EOF.
2222 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2223 EOF and token names to Java Lexer Interface.
2224 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2225
2226 Make yyerror public.
2227 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2228 (yyerror): Change to public. Add Javadoc comments. Use longer
2229 parameter names. Make the body rather than the declarator
2230 conditional on %locations.
2231 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2232
2233 Allow user to add code to the constructor with %code init.
2234 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2235 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2236 Add %code init to the front of the constructor body.
2237 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2238 and %define init_throws.
2239 (Java Declarations Summary): Document %code init and
2240 %define init_throws.
2241 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2242 (Java constructor init and init_throws): Add tests.
2243
2244 2008-11-10 Akim Demaille <demaille@gostai.com>
2245
2246 Update TODO.
2247 * TODO (-D): is implemented.
2248 (associativity): Same precedence must have the same associativity.
2249 For instance, how can a * b / c be parsed if * is %left and / is
2250 %right?
2251 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2252
2253 2008-11-10 Akim Demaille <demaille@gostai.com>
2254
2255 Formatting changes.
2256
2257 2008-11-10 Akim Demaille <demaille@gostai.com>
2258
2259 More information about the symbols.
2260 * src/output.c (type_names_output): Document all the symbols,
2261 including those that don't have a type-name.
2262 (symbol_definitions_output): Define "is_token" and
2263 "has_type_name".
2264 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
2265 type-name, now that they are defined too in b4_type_names.
2266
2267 2008-11-10 Akim Demaille <demaille@gostai.com>
2268
2269 Regen.
2270
2271 2008-11-10 Akim Demaille <demaille@gostai.com>
2272
2273 Make parser::yytranslate static.
2274 Small speedup (1%) on the list grammar. And makes yytranslate_
2275 available in non member functions.
2276
2277 * data/lalr1.cc (yytranslate_): Does not need to be a instance
2278 function.
2279
2280 2008-11-10 Akim Demaille <demaille@gostai.com>
2281
2282 Avoid trailing spaces.
2283 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
2284 * data/lalr1.cc: Don't indent before rule and symbol actions, as
2285 they can be empty, and anyway this incorrectly indents the first
2286 action.
2287
2288 2008-11-10 Akim Demaille <demaille@gostai.com>
2289
2290 Comment changes.
2291
2292 2008-11-10 Akim Demaille <demaille@gostai.com>
2293
2294 Use "enum" for integral constants.
2295 This is just nicer to read, I observed no speedup.
2296
2297 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2298 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2299 (yyuser_token_number_max_, yyundef_token_): Move into...
2300 (yytranslate_): here.
2301
2302 2008-11-10 Akim Demaille <demaille@gostai.com>
2303
2304 Shortcuts in bench directives.
2305 * etc/bench.pl.in (parse_dirs): New.
2306 Use it.
2307 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2308 Create the benches in "benches/".
2309
2310 2008-11-10 Akim Demaille <demaille@gostai.com>
2311
2312 Formatting changes.
2313 * data/lalr1.cc: here.
2314
2315 2008-11-10 Akim Demaille <demaille@gostai.com>
2316
2317 Adjust verbose message to using emacs.
2318 * etc/bench.pl.in: Inform compilation-mode when we change the
2319 directory.
2320 (generate_grammar_list): Recognize %define "variant" in addition
2321 to %define variant.
2322
2323 2008-11-10 Akim Demaille <demaille@gostai.com>
2324
2325 Classify symbols by type-name.
2326 * src/uniqstr.h (UNIQSTR_CMP): New.
2327 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2328 (type_names_output): New.
2329 (muscles_output): Use it.
2330 * data/lalr1.cc (b4_symbol_action_): Remove.
2331 (b4_symbol_case_, b4_type_action_): New.
2332 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2333
2334 2008-11-10 Akim Demaille <demaille@gostai.com>
2335
2336 Change the handling of the symbols in the skeletons.
2337 Before we were using tables which lines were the symbols and which
2338 columns were things like number, tag, type-name etc. It is was
2339 difficult to extend: each time a column was added, all the numbers had
2340 to be updated (you asked for colon $2, not for "tag"). Also, it was
2341 hard to filter these tables when only a subset of the symbols (say the
2342 tokens, or the nterms, or the tokens that have and external number
2343 *and* a type-name) was of interest.
2344
2345 Now instead of monolithic tables, we define one macro per cell. For
2346 instance "b4_symbol(0, tag)" is a macro name which contents is
2347 self-decriptive. The macro "b4_symbol" provides easier access to
2348 these cells.
2349
2350 * src/output.c (type_names_output): Remove.
2351 (symbol_numbers_output, symbol_definitions_output): New.
2352 (muscles_output): Call them.
2353 (prepare_symbols): Define b4_symbols_number.
2354
2355 2008-11-10 Akim Demaille <demaille@gostai.com>
2356
2357 --trace=muscles
2358 * src/getargs.h, src/getargs.c (trace_muscle): New.
2359 (trace_types, trace_args): Support it.
2360 * src/output.c (output_skeleton): Use it.
2361
2362 2008-11-10 Akim Demaille <demaille@gostai.com>
2363
2364 muscles_output.
2365 * src/output.c (muscles_output): New, extracted from...
2366 (output_skeleton): here.
2367 Adjust.
2368
2369 2008-11-10 Akim Demaille <demaille@gostai.com>
2370
2371 Formatting changes.
2372
2373 2008-11-10 Akim Demaille <demaille@gostai.com>
2374
2375 Update the variant example.
2376 * examples/variant.yy: Formatting changes.
2377 One stage build.
2378
2379 2008-11-10 Akim Demaille <demaille@gostai.com>
2380
2381 Support constructor with an argument.
2382 This improves the "list" bench by 2%.
2383
2384 * data/lalr1.cc (variant::build): Add an overloaded version with
2385 an argument.
2386 * tests/c++.at (AT_CHECK_VARIANT): Check it.
2387
2388 2008-11-10 Akim Demaille <demaille@gostai.com>
2389
2390 Test variants.
2391 * tests/c++.at (AT_CHECK_VARIANTS): New.
2392 Use it with and without %define assert.
2393
2394 2008-11-10 Akim Demaille <demaille@gostai.com>
2395
2396 Add %precedence support.
2397 Unfortunately it is not possible to reuse the %prec directive. This
2398 is because to please POSIX, we do not require to end the rules with a
2399 semicolon. As a result,
2400
2401 foo: bar %prec baz
2402
2403 is ambiguous: either a rule which precedence is that of baz, or a rule,
2404 and then a declaration of the precedence of the token baz.
2405
2406 * doc/bison.texinfo: Document %precedence.
2407 (Precedence Only): New.
2408 * src/assoc.h, src/assoc.c (precedence_assoc): New.
2409 * src/conflicts.c (resolve_sr_conflict): Support it.
2410 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
2411 Parse it.
2412 * tests/calc.at: Use %precedence for NEG.
2413 * tests/conflicts.at (%precedence does not suffice)
2414 (%precedence suffices): New tests.
2415
2416 2008-11-09 Akim Demaille <demaille@gostai.com>
2417
2418 Make benches in a sub dirs.
2419 * etc/bench.pl.in ($dir): New.
2420 Use it.
2421 Check the use of constructors with an argument.
2422 (bench_variant_parser): Fix.
2423
2424 2008-11-09 Akim Demaille <demaille@gostai.com>
2425
2426 fix eof condition
2427
2428 2008-11-09 Akim Demaille <demaille@gostai.com>
2429
2430 Fix --help.
2431
2432 2008-11-09 Akim Demaille <demaille@gostai.com>
2433
2434 Require the generation of parse-gram.output.
2435 * src/Makefile.am (YACC): Pass --report=all.
2436
2437 2008-11-09 Akim Demaille <demaille@gostai.com>
2438
2439 Formatting changes.
2440
2441 2008-11-09 Akim Demaille <demaille@gostai.com>
2442
2443 Update TODO.
2444 * TODO: Remove obsolete items.
2445 Update others.
2446
2447 2008-11-09 Akim Demaille <demaille@gostai.com>
2448
2449 Enhance bench.pl.
2450 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
2451 (@token, $grammar, $bench): New.
2452 (generate_grammar_variant): Rename as...
2453 (generate_grammar_list): this.
2454 (generate_grammar): Adjust.
2455 (bench_grammar): Rename as...
2456 (bench): this.
2457 Use it in the various bench-marking routines.
2458 (-b, -g): New options.
2459
2460 2008-11-09 Akim Demaille <demaille@gostai.com>
2461
2462 Use a static hierarchy for symbols in the C++ parser.
2463 * data/lalr1.cc (symbol_base_type, symbol_type)
2464 (stack_symbol_type): Make it a static hierarchy.
2465 Adjust dependencies.
2466
2467 2008-11-09 Akim Demaille <demaille@gostai.com>
2468
2469 bench.pl -d, --directive.
2470 * etc/bench.pl.in (@directive): New.
2471 (&bench_grammar): Use it.
2472 (&bench_list_grammar): New, to provide access to the "variant"
2473 grammar.
2474 Use it.
2475 (getopts): Support -d, --directive.
2476
2477 2008-11-09 Akim Demaille <demaille@gostai.com>
2478
2479 Use inline for small operations.
2480 * data/lalr1.cc (symbol_base_type, symbol_type)
2481 (stack_symbol_type): Declare constructor and other operations as
2482 inline.
2483 (yy_destroy_): Inline.
2484
2485 2008-11-09 Akim Demaille <demaille@gostai.com>
2486
2487 Introduce a hierarchy for symbols.
2488 * data/lalr1.cc (symbol_base_type, symbol_type): New.
2489 (data_type): Rename as...
2490 (stack_symbol_type): this.
2491 Derive from symbol_base_type.
2492 (yy_symbol_value_print_): Merge into...
2493 (yy_symbol_print_): this.
2494 Rename as...
2495 (yy_print_): this.
2496 (yydestruct_): Rename as...
2497 (yy_destroy_): this.
2498 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
2499 (parser::parse): yyla is now of symbol_type.
2500 Use its type member instead of yytoken.
2501
2502 2008-11-09 Akim Demaille <demaille@gostai.com>
2503
2504 Rename data_type and stack_symbol_type.
2505 * data/lalr1.cc (data_type): Rename as...
2506 (stack_symbol_type): this.
2507
2508 2008-11-09 Akim Demaille <demaille@gostai.com>
2509
2510 Handle semantic value and location together.
2511 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
2512 yydata.value and yydata.location.
2513 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
2514 (YY_SYMBOL_PRINT): Now take semantic value and location as a
2515 single arg.
2516 Adjust all callers.
2517 (yydestruct_): New overload for a stack symbol.
2518
2519 2008-11-09 Akim Demaille <demaille@gostai.com>
2520
2521 Push a complete symbol, not connected parts.
2522 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
2523 state, value and location.
2524 Adjust callers.
2525
2526 2008-11-09 Akim Demaille <demaille@gostai.com>
2527
2528 Agregate yylval and yylloc.
2529 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
2530 (parser::yyla): this.
2531
2532 2008-11-09 Akim Demaille <demaille@gostai.com>
2533
2534 Rely on the state stack to display reduction traces.
2535 To display rhs symbols before a reduction, we used information
2536 about the rule reduced, which required the tables yyrhs and
2537 yyprhs. Now use rely only on the state stack to get the same
2538 information.
2539
2540 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
2541 Use them.
2542 (parser::yyrhs_, parser::yyprhs_): Remove.
2543 (parser::yy_reduce_print_): Use the state stack.
2544
2545 2008-11-09 Akim Demaille <demaille@gostai.com>
2546
2547 Fuse yyval and yyloc into yylhs.
2548 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
2549 yylhs.
2550 (parse): Replace yyval and yyloc with yylhs.value and
2551 yylhs.location.
2552 After a user action, compute yylhs.state earlier.
2553 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
2554 fresh error_token.
2555
2556 2008-11-09 Di-an Jan <dianj@freeshell.org>
2557
2558 Remove unused variable.
2559 * src/output.c (type_names_output): Remove unused variable sep.
2560
2561 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
2562
2563 Change tests/output.at quoting.
2564 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
2565 expanding arguments.
2566
2567 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2568
2569 Don't add a semicolon to actions for %skeleton or %language.
2570 It breaks Java test cases as reported by Akim Demaille.
2571 * src/scan-code.l: Implement.
2572
2573 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2574
2575 Clean up %skeleton and %language priority implementation.
2576 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2577 remove static qualifier because others will soon need to see it.
2578 (language_prio): Likewise.
2579 (getargs): Use command_line_prio rather than 0.
2580 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2581 enum fields.
2582 (skeleton_prio): Extern it.
2583 (language_prio): Extern it.
2584 * src/parse-gram.y: Use grammar_prio rather than 1.
2585
2586 2008-11-07 Akim Demaille <demaille@gostai.com>
2587
2588 Moving push traces into yypush_.
2589 * data/lalr1.cc (yypush_): Now takes a optional trace message.
2590 Adjust all uses.
2591
2592 2008-11-07 Akim Demaille <demaille@gostai.com>
2593
2594 The single-stack C++ parser is now the standard one.
2595 * data/lalr1.cc: Rename as...
2596 * data/lalr1-split.cc: this.
2597 * data/lalr1-fusion.cc: Rename as...
2598 * data/lalr1.cc: this.
2599 * etc/bench.pl.in: Adjust.
2600
2601 2008-11-07 Akim Demaille <demaille@gostai.com>
2602
2603 Avoid empty-if warnings.
2604 Reported by Quentin Hocquet.
2605
2606 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
2607 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
2608
2609 2008-11-07 Akim Demaille <demaille@gostai.com>
2610
2611 Pass command line location to skeleton_arg and language_argmatch.
2612 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2613 The location argument is now mandatory.
2614 Adjust all dependencies.
2615 (getargs): Use command_line_location.
2616
2617 2008-11-07 Akim Demaille <demaille@gostai.com>
2618
2619 -D, --define.
2620 * src/getargs.c (usage): Document -D.
2621 Fix help string for --locations.
2622 (command_line_location): New.
2623 (short_options, long_options, getargs): Support -D, --define.
2624 (getargs): Move -d support at the right place.
2625 * doc/bison.texinfo (Bison Options): Update.
2626 * tests/input.at (%define, --define): New.
2627
2628 2008-11-07 Akim Demaille <demaille@gostai.com>
2629
2630 Initialize the muscle table before parsing the command line.
2631 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2632 (getargs): Define file_name.
2633 * src/main.c (main): Initialize muscle_tab before calling
2634 getargs.
2635 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2636 its value is not available yet.
2637
2638 2008-11-07 Akim Demaille <demaille@gostai.com>
2639
2640 Locations without columns for command line arguments.
2641 * src/location.c (location_print): Don't display negative columns.
2642 * src/location.h: Document this.
2643
2644 2008-11-07 Akim Demaille <demaille@gostai.com>
2645
2646 Fix --help.
2647 * src/getargs.c (usage): Fix help string for -W.
2648
2649 2008-11-07 Akim Demaille <demaille@gostai.com>
2650
2651 Handle more general types of option arguments.
2652 * build-aux/cross-options.pl: The argument ends at the first
2653 space, not the first non-symbol character.
2654 Use @var for each word appearing the argument description.
2655
2656 2008-11-07 Akim Demaille <demaille@gostai.com>
2657
2658 Destroy the variants that remain on the stack in case of error.
2659 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
2660 destructor.
2661 Display the value only if yymsg is nonnull.
2662 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
2663
2664 2008-11-07 Akim Demaille <demaille@gostai.com>
2665
2666 Add "%define assert" to variants.
2667 This is used to help the user catch cases where some value gets
2668 ovewritten by a new one. This should not happen, as this will
2669 probably leak.
2670
2671 Unfortunately this uncovered a bug in the C++ parser itself: the
2672 lookahead value was not destroyed between two calls to yylex. For
2673 instance if the previous lookahead was a std::string, and then an int,
2674 then the value of the std::string was correctly taken (i.e., the
2675 lookahead was now an empty string), but std::string structure itself
2676 was not reclaimed.
2677
2678 This is now done in variant::build(other&) (which is used to take the
2679 value of the lookahead): other is not only stolen from its value, it
2680 is also destroyed. This incurs a new performance penalty of a few
2681 percent, and union becomes faster again.
2682
2683 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
2684 (b4_variant_if): New.
2685 (variant::built): New.
2686 Use it whereever the status of the variant changes.
2687 * etc/bench.pl.in: Check the penalty of %define assert.
2688
2689 2008-11-07 Akim Demaille <demaille@gostai.com>
2690
2691 Use "%define variant" in bench.pl.
2692 * etc/bench.pl.in: No longer use the pseudo directive %variants,
2693 just use %define variants.
2694
2695 2008-11-07 Akim Demaille <demaille@gostai.com>
2696
2697 Regen.
2698 * src/parse-gram.h, src/parse-gram.c: Regen.
2699
2700 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2701
2702 Fix user actions without a trailing semicolon.
2703 Reported by Sergei Steshenko at
2704 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2705 * THANKS (Sergei Steshenko): Add.
2706 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2707 * tests/regression.at (Fix user actions without a trailing semicolon):
2708 New test case.
2709
2710 2008-11-04 Akim Demaille <demaille@gostai.com>
2711
2712 Use b4_copyright_years.
2713 * data/yacc.c (b4_copyright_years): New.
2714 Fix its value according to the comments in the file.
2715 Use it and undefine it.
2716
2717 2008-11-04 Akim Demaille <demaille@gostai.com>
2718
2719 Formatting changes.
2720 * data/lalr1-fusion.cc, src/parse-gram.y: here.
2721
2722 2008-11-04 Akim Demaille <demaille@gostai.com>
2723
2724 Formatting changes.
2725 * data/lalr1-fusion.cc: here.
2726
2727 2008-11-04 Akim Demaille <demaille@gostai.com>
2728
2729 Use strict on bench.pl.
2730 * etc/bench.pl.in (&run, &generate_grammar): New.
2731 Rename the grammar generating functions for consistency.
2732 Change the interface so that the list of benches to run is passed
2733 as (optionless) arguments.
2734 (&compile): Use &run.
2735
2736 2008-11-04 Akim Demaille <demaille@gostai.com>
2737
2738 Remove spurious initial empty lines.
2739 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2740 * data/yacc.c: End the @output lines with an @.
2741
2742 2008-11-04 Akim Demaille <demaille@gostai.com>
2743
2744 Improve the display of sizes.
2745 * etc/bench.p.in: Higher precision.
2746 Sort by decreasing size.
2747
2748 2008-11-04 Akim Demaille <demaille@gostai.com>
2749
2750 Don't memcpy C++ structures.
2751 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
2752 arguments.
2753 (variant::build): New overload for
2754 copy-construction-that-destroys.
2755 (variant::swap): New.
2756 (parser::yypush_): Use it in variant mode.
2757
2758 2008-11-04 Akim Demaille <demaille@gostai.com>
2759
2760 Better defaults for bench.pl.
2761 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
2762 default values.
2763 Adjust &verbose uses.
2764 (-q, --quiet): New.
2765
2766 2008-11-04 Akim Demaille <demaille@gostai.com>
2767
2768 Make variant.yy more complex.
2769 std::list cannot be copied via memcpy, they are more demanding than
2770 std::string. Use one std::list to strengthen the test.
2771
2772 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
2773 Adjust.
2774 Create a list of strings, instead of a single large string.
2775
2776 2008-11-04 Akim Demaille <demaille@gostai.com>
2777
2778 bench.pl --bench.
2779 * etc/bench.pl.in (--bench, $bench): New.
2780
2781 2008-11-04 Akim Demaille <demaille@gostai.com>
2782
2783 Sort methods.
2784 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
2785 Define it after as().
2786
2787 2008-11-04 Akim Demaille <demaille@gostai.com>
2788
2789 Useless parens.
2790 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
2791
2792 2008-11-04 Akim Demaille <demaille@gostai.com>
2793
2794 Issue missing synclines after user actions.
2795 * data/c.m4 (b4_case): Issue synclines on the output file.
2796
2797 2008-11-04 Akim Demaille <demaille@gostai.com>
2798
2799 Remove trailing empty line.
2800 * data/lalr1-fusion.cc: Don't add an empty line after the user's
2801 epilogue.
2802
2803 2008-11-04 Akim Demaille <demaille@gostai.com>
2804
2805 Fix output of copyright years.
2806 * data/bison.m4 (b4_copyright): Fix the indentation of the
2807 copyright year paragraph.
2808 Use b4_copyright_years when no years are given.
2809 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
2810 (b4_copyright_years): New.
2811 Use it.
2812
2813 2008-11-04 Akim Demaille <demaille@gostai.com>
2814
2815 Avoid the spurious initial empty line.
2816 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
2817 the end of @output request to suppress the empty line that
2818 results.
2819
2820 2008-11-04 Akim Demaille <demaille@gostai.com>
2821
2822 Remove parser::rhs_number_type.
2823 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
2824 (yyrhs_): Use b4_table_define.
2825
2826 2008-11-04 Akim Demaille <demaille@gostai.com>
2827
2828 Fix iteration type.
2829 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
2830
2831 2008-11-04 Akim Demaille <demaille@gostai.com>
2832
2833 Factor the declaration of the integer tables.
2834 * data/lalr1-fusion.cc (b4_table_define): New.
2835 Use it.
2836
2837 2008-11-03 Akim Demaille <demaille@gostai.com>
2838
2839 Fix indentation of tables in lalr1.cc
2840 * data/lalr1-fusion.cc: Fix the indentation.
2841
2842 2008-11-03 Akim Demaille <demaille@gostai.com>
2843
2844 Destroy the lhs symbols after reduction.
2845 * data/lalr1-fusion.cc (parse): After the user action, when in
2846 variant mode, destroy the lhs symbols.
2847
2848 2008-11-03 Akim Demaille <demaille@gostai.com>
2849
2850 Simplify yysyntax_error_ use.
2851 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
2852 type, but make it unnamed in the declaration when it is not used.
2853
2854 2008-11-03 Akim Demaille <demaille@gostai.com>
2855
2856 Let yy::variant::build return an lvalue.
2857 * data/lalr1-fusion.cc (variant::build): Return a reference to the
2858 object.
2859
2860 2008-11-03 Akim Demaille <demaille@gostai.com>
2861
2862 Define yy::variant only when needed.
2863 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
2864 used.
2865
2866 2008-11-03 Akim Demaille <demaille@gostai.com>
2867
2868 Bench the three-stack lalr1.cc.
2869 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
2870 one-stack one.
2871
2872 2008-11-03 Akim Demaille <demaille@gostai.com>
2873
2874 Fail on parse error in calc++.
2875 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2876 status.
2877 * examples/calc++/test ($me, $number, $exit, run): New.
2878 Use them to propagate errors to the exit status.
2879
2880 2008-11-03 Akim Demaille <demaille@gostai.com>
2881
2882 Don't specify the skeleton twice in the example.
2883 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
2884 file does what is needed.
2885
2886 2008-11-03 Akim Demaille <demaille@gostai.com>
2887
2888 bench: Improve output.
2889 * etc/bench.pl.in (bench_grammar): Tune the printf format.
2890
2891 2008-11-03 Akim Demaille <demaille@gostai.com>
2892
2893 bench: check impact of %debug on variants.
2894 * etc/bench.pl.in (variant_grammar): Fix the computation of
2895 $variant.
2896 Generate a grammar file that can work with or without %debug.
2897 Do use the @directive.
2898 (bench_variant_parser): Check impact of %debug.
2899 (@directives): Rename all the occurrences to...
2900 (@directive): this, for consistency.
2901
2902 2008-11-03 Akim Demaille <demaille@gostai.com>
2903
2904 bench: report the size too.
2905 * etc/bench.pl.in ($iterations): Defaults to -3.
2906 (&bench_grammar): Require hireswallclock.
2907 Compute and display the size of the result.
2908 More comments.
2909
2910 2008-11-03 Akim Demaille <demaille@gostai.com>
2911
2912 bench: More use of the verbosity level.
2913 * etc/bench.pl.in ($verbose, &verbose): New.
2914 Use them.
2915 More POD documentation.
2916
2917 2008-11-03 Akim Demaille <demaille@gostai.com>
2918
2919 bench.pl: a command line interface
2920 * etc/bench.pl.in: More doc.
2921 Some fixes in the documentation.
2922 ($cflags, $iterations, &help, &getopt): New.
2923 Use them.
2924 (&variant_grammar): Let the number of stages be 10 times what is
2925 specified.
2926
2927 2008-11-03 Akim Demaille <demaille@gostai.com>
2928
2929 Bench the use of Boost.Variants.
2930 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2931 New.
2932 (&compile): Be ready to compile C++ parsers.
2933 (&bench_push_parser): Move debug information to the outermost
2934 level.
2935 * THANKS: Add Michiel De Wilde.
2936
2937 2008-11-03 Akim Demaille <demaille@gostai.com>
2938
2939 bench.pl: Pass directives as a list instead of as a string.
2940 * etc/bench.pl.in (&directives): New.
2941 (&triangular_grammar, &calc_grammar): Use it to format the Bison
2942 directives.
2943 (&triangular_grammar): Do use the directives (were ignored).
2944 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2945 directives.
2946
2947 2008-11-03 Akim Demaille <demaille@gostai.com>
2948
2949 Improve genericity of bench.pl.
2950 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2951 argument.
2952 (&bench_push_parser): New.
2953 Call it.
2954
2955 2008-11-03 Akim Demaille <demaille@gostai.com>
2956
2957 Add documentation to bench.pl.
2958 * etc/bench.pl.in: Comment changes.
2959
2960 2008-11-03 Akim Demaille <demaille@gostai.com>
2961
2962 Fuse the three stacks into a single one.
2963
2964 In order to make it easy to perform benchmarks to ensure that
2965 there are no performance loss, lalr1.cc is forked into
2966 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
2967 lalr1.cc.
2968
2969 Meanwhile, to make sure that lalr1-fusion.cc is correctly
2970 exercized by the test suite, the user must install a symbolic link
2971 from lalr1.cc to it.
2972
2973 Instead of having three stacks (state, value, location), use a
2974 stack of triples. This considerably simplifies the code (and it
2975 will be easier not to require locations as currently does the C++
2976 parser), and also gives a 10% speedup according to
2977 etc/bench (probably mainly since memory allocation is done once
2978 instead of three times).
2979
2980 Another motivation is to make it easier to destruct properly
2981 semantic values: now that they are bound to their state (hence
2982 symbol type) it will be easier to call the appropriate destructor.
2983
2984 These changes should probably benefit the C parser too.
2985
2986 * data/lalr1.cc: Copy as...
2987 * data/lalr1-fusion.cc: this new file.
2988 (b4_rhs_value, b4_rhs_location): New definitions overriding those
2989 from c++.m4.
2990 (state_stack_type, semantic_stack_type, location_stack_type)
2991 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
2992 (data_type, stack_type, yystack_): New.
2993 (YYLLOC_DEFAULT, yypush_): Adjust.
2994 (yyerror_range): Now based on data_type, not location_type.
2995
2996 2008-11-03 Akim Demaille <demaille@gostai.com>
2997
2998 Push the state, value, and location at the same time.
2999 This is needed to prepare a forthcoming patch that fuses the three
3000 stacks into one.
3001
3002 * data/lalr1.cc (parser::yypush_): New.
3003 (parser::yynewstate): Change the semantics: instead of arriving to
3004 this label when value and location have been pushed, but yystate
3005 is to be pushed on the state stack, now the three of them must
3006 have been pushed before. yystate still must be the new state.
3007 This allows to use yypush_ everywhere instead of individual
3008 handling of the stacks.
3009
3010 2008-11-03 Akim Demaille <demaille@gostai.com>
3011
3012 Prefer references to pointers.
3013 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3014 definition to use references instead of pointers.
3015 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3016 Take the value and location as references.
3017 Adjust callers.
3018
3019 2008-11-03 Akim Demaille <demaille@gostai.com>
3020
3021 stack::size instead of stack::height.
3022 * data/lalr1.cc (stack::height): Rename as...
3023 (stack::size): this.
3024 Fix the output type.
3025 Comment changes.
3026
3027 2008-11-03 Akim Demaille <demaille@gostai.com>
3028
3029 Use variants to support objects as semantic values.
3030 This patch was inspired by work by Michiel De Wilde. But he used
3031 Boost variants which (i) requires Boost on the user side, (ii) is
3032 slow, and (iii) has useless overhead (the parser knows the type of
3033 the semantic value there is no reason to duplicate this
3034 information as Boost.Variants do).
3035
3036 This implementation reserves a buffer large enough to store the
3037 largest objects. yy::variant implements this buffer. It was
3038 implemented with Quentin Hocquet.
3039
3040 * src/output.c (type_names_output): New.
3041 (output_skeleton): Invoke it.
3042 * data/c++.m4 (b4_variant_if): New.
3043 (b4_symbol_value): If needed, provide a definition for variants.
3044 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3045 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3046 (b4_char_sizeof, yy::variant): New.
3047 (parser::parse): If variants are requested, define
3048 parser::union_type, parser::variant, change the definition of
3049 semantic_type, construct $$ before running the user action instead
3050 of performing a default $$ = $1.
3051 * examples/variant.yy: New.
3052 Based on an example by Michiel De Wilde.
3053
3054 2008-11-03 Akim Demaille <demaille@gostai.com>
3055
3056 Parameterize the extraction of semantic values.
3057 To make future changes easier, no longer rely on ".TYPE" being the
3058 way to get a semantic value.
3059
3060 * data/c.m4 (b4_symbol_value): New.
3061 Use it.
3062 * data/c++.m4, data/yacc.c: Use it.
3063 * data/glr.c: Use b4_symbol_value.
3064 (b4_rhs_data): New.
3065 Use it.
3066
3067 2008-11-03 Akim Demaille <demaille@gostai.com>
3068
3069 Prepare easier M4 changes.
3070 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3071 future changes.
3072
3073 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3074
3075 Initiate further development.
3076 * NEWS: Create an empty section for new entries.
3077 * gnulib: Update submodule to HEAD.
3078
3079 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3080
3081 * NEWS: Version 2.4.
3082
3083 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3084
3085 Prepare for next release.
3086 * NEWS: Briefly mention changes since 2.3b.
3087 * README: Say GNU m4 1.4.6, which we've been requiring in release
3088 announcements already, not 1.4.3, which breaks the build.
3089
3090 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3091
3092 Say %language is experimental.
3093 We're thinking of extending it's effect on output file naming. See the
3094 thread at
3095 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3096 * NEWS: Say it's experimental.
3097 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3098 recommend it over %skeleton for now.
3099 (Bison Options): Likewise.
3100 (C++ Bison Interface): Use %skeleton not %language.
3101 (Calc++ Parser): Use %skeleton not %language.
3102 * src/getargs.c (usage): Say it's experimental.
3103
3104 2008-11-01 Di-an Jan <dianj@freeshell.org>
3105 Paolo Bonzini <bonzini@gnu.org>
3106
3107 Support all Java parser class modifiers.
3108 * data/java.m4 (b4_percent_define_get3): New.
3109 (b4_final_if, b4_strictfp_if): New.
3110 * data/lalr1.java (final, strictfp, extends, implements): Support.
3111 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3112 documentation.
3113 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3114 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3115 (AT_CHECK_JAVA_GREP): New.
3116 (Java parser class modifiers): New test.
3117 (Java parser class extends and implements): New test.
3118
3119 Model exception propagation better with throws and lex_throws.
3120 * data/java.m4 (b4_list2): New.
3121 (throws): Change default.
3122 * data/lalr1.java (yyaction): Add throws.
3123 (parse): Add lex_throws in addition to throws.
3124 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3125 * tests/java.at (Java throws specifications): New test.
3126
3127 Improve documentation for Java parsers.
3128 * doc/bison.texinfo (Java Parsers): Add subsections.
3129 Don't quote first argument of %define.
3130 (Java Bison Interface): Document output files. Move documentation
3131 of parser class and merge into Java Parser Interface. Document
3132 features that error out. Document directives with no effect.
3133 Move note about Javadoc higher.
3134 (Java Semantic Values): Explicitly mention stype.
3135 Document that generic types cannot be used.
3136 (Java Location Values): Use @deftypeivar. Document constructors.
3137 Correct return value for toString.
3138 (Java Parser Interface): List undocumented constants/fields.
3139 Move documentation of fields added by %parse-param closer to list
3140 of members. Document that token names are added as fields.
3141 Document constructors accurately. Remove error method.
3142 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3143 Interface. Describe %code lexer and yylex accutately.
3144 Remove documentation that does not match the code.
3145 (Java Action Features): New.
3146 (Java Differences): Add reference. Add item on semantic values.
3147 Add note about @{ ... @}. Clarify %% epilogue placement.
3148 (Java Declarations Summary): New.
3149
3150 Fix Java skeleton.
3151 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3152 (b4_remove_comma): Quote test argument.
3153 (b4_identification): Remove "bison" field.
3154 * tests/java.at (Java parser class and package names): New test.
3155 (Java %parse-param and %lex-param): New test.
3156 (Java stype, position_class and location_class): New test.
3157
3158 2008-10-31 Di-an Jan <dianj@freeshell.org>
3159
3160 * data/lalr1.jave: Update copyright years.
3161 (YYParser): Correct name of "generated from" file in Javadoc:
3162 use b4_file_name instead of @ofile@.
3163 (Location constructor): Correct Javadoc parameter name.
3164 (yylloc): Add missing opening m4 quote after b4_location_if.
3165 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3166 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3167 (YYParser constructor): Correct Javadoc parameter name.
3168
3169 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3170
3171 Always put auxiliary code files in the same dir as other output files.
3172 * src/files.c (compute_file_name_parts): When the user specifies
3173 --output but not --file-prefix, extract the directory prefix from the
3174 file prefix not from the grammar file name. This affects the location
3175 of files like location.hh generated by the C++ skeleton. The includes
3176 in the other output files require this fix.
3177 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3178 for expected output files.
3179 (Output files): Add a test for the above.
3180
3181 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3182
3183 * gnulib: Update submodule to HEAD.
3184
3185 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3186
3187 Update copyright year.
3188 * src/files.c: Here.
3189
3190 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3191
3192 Don't overwrite the input file.
3193 * src/files.c (output_file_name_check): Fatal error if using input file
3194 for output.
3195 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3196 argument.
3197 (Conflicting output files): Add test.
3198
3199 2008-10-28 Akim Demaille <demaille@gostai.com>
3200
3201 Space changes.
3202 * data/lalr1.cc: Formatting changes.
3203
3204 2008-10-28 Akim Demaille <demaille@gostai.com>
3205
3206 Don't define debugging functions when !YYDEBUG.
3207 * data/lalr1.cc (debug_stream, set_debug_stream)
3208 (debug_level_type, debug_level, set_debug_level): Don't
3209 declare them when YYDEBUG is not defined.
3210 The implementation are already YYDEBUG-aware.
3211
3212 2008-10-28 Akim Demaille <demaille@gostai.com>
3213
3214 Prefer "continue" for empty loop bodies.
3215 * etc/bench.pl.in: Use "continue" instead of {}.
3216
3217 2008-10-28 Akim Demaille <demaille@gostai.com>
3218
3219 Space and comments changes.
3220 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3221 * data/c.m4, data/lalr1.cc: Space changes.
3222
3223 2008-10-28 Akim Demaille <demaille@gostai.com>
3224
3225 Make gnulib a submodule.
3226 * gnulib: New.
3227 * .gitmodules (gnulib): New.
3228
3229 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3230
3231 Fix yyerror_range for user-defined location type in C++. Reported by
3232 Georg Sauthoff at
3233 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3234 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3235 * THANKS (Georg Sauthoff): Add.
3236
3237 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3238
3239 Update several administrative files mainly to facilitate releasing.
3240 * HACKING (Administrivia): Make the git-merge-changelog notes more
3241 helpful.
3242 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3243 (Release Procedure): Update for git and add numerous details that were
3244 previously missing.
3245 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3246 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3247 that announcements don't claim we bootstrapped with whatever bison
3248 happened to be in PATH. Add flex as a bootstrap tool.
3249 * Makefile.maint: Remove, previously replaced by maint.mk.
3250 * Makefile.cfg: Remove, and migrate settings to...
3251 * cfg.mk: ... here for the sake of `make announcement'.
3252 * bootstrap.conf (gnulib_modules): Add announce-gen.
3253 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3254 Berry.
3255
3256 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3257
3258 Small but important bugfixes for the Java skeleton.
3259 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3260 (yy_symbol_print): Call toString on yyvaluep.
3261
3262 2008-08-29 Akim Demaille <demaille@gostai.com>
3263
3264 Clarify UPDATED use.
3265 * doc/bison.texinfo: It refers to the last edition of this file,
3266 not to the release date of Bison.
3267 Reported by Joel E. Denny.
3268
3269 2008-08-29 Akim Demaille <demaille@gostai.com>
3270
3271 * README: Update FAQ pointer.
3272 Reported by Joel E. Denny.
3273
3274 2008-08-27 Eric Blake <ebb9@byu.net>
3275
3276 Resync m4sugar from autoconf.
3277 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3278 (m4_init): Adjust to latest m4.git changes.
3279 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3280 effects.
3281 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3282 (_m4_list_cmp): Reduce side effects.
3283
3284 2008-08-27 Akim Demaille <demaille@gostai.com>
3285
3286 Check yyerrok in calc.at.
3287 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3288 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3289 expected.
3290
3291 2008-08-27 Akim Demaille <demaille@gostai.com>
3292
3293 Support yyerrok in lalr1.cc.
3294 YYBACKUP is still to import back into lalr1.cc.
3295 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3296
3297 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3298
3299 For maintainer-check*, don't recompile for a $(VERSION) update.
3300 * cfg.mk: New file.
3301 (_is-dist-target): Override the one in GNUmakefile.
3302 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3303
3304 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3305
3306 Update for recent change to gnulib.
3307 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3308 string.h now.
3309
3310 2008-08-15 Eric Blake <ebb9@byu.net>
3311
3312 Remaining m4sugar merge from autoconf.
3313 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3314 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3315 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3316 * src/output.c (output_skeleton): Tell m4 how to find it.
3317
3318 Partial m4sugar merge from autoconf: m4_map.
3319 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3320 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3321 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3322 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3323 for empty list.
3324 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3325 Likewise.
3326 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3327 declares it.
3328
3329 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3330
3331 Keep .version and PACKAGE_VERSION in sync.
3332 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3333 dependency, and add comments justifying this in more detail. Discussed
3334 starting at
3335 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3336
3337 2008-08-06 Eric Blake <ebb9@byu.net>
3338
3339 Partial m4sugar merge from autoconf: m4_shiftn.
3340 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3341 (m4_shift2, m4_shift3): New macros.
3342 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3343 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3344 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3345 * data/java.m4 (b4_remove_comma): Likewise.
3346
3347 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3348 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3349 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3350 (m4_init): Consolidate wrapped text into single m4_wrap.
3351 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3352 in wrapped text.
3353
3354 2008-08-05 Eric Blake <ebb9@byu.net>
3355
3356 Partial m4sugar merge from autoconf: builtins, version.m4.
3357 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3358 (m4_prepend): Remove, as it is unused and inherently quadratic,
3359 whereas m4_append is linear in newer m4.
3360 (m4_mkstemp): New builtin.
3361 (m4_symbols): Make rename conditional.
3362 (m4_version_prereq): Ensure fatal error if used in bison, which
3363 intentionally lacks version.m4.
3364
3365 Fix comments in m4sugar.
3366 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3367
3368 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3369
3370 Update for recent .gitignore fix in Gnulib.
3371 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3372 anchored .gitignore entries.
3373
3374 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3375
3376 Set gnu or gnits strictness.
3377 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3378 development and gnits strictness for releases. Based on Eric Blake's
3379 suggestion at
3380 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3381
3382 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3383
3384 * NEWS: Clarify documentation of %language.
3385
3386 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3387
3388 Support usage of git-merge-changelog.
3389 * .gitattributes: New.
3390 * HACKING: Document usage of git-merge-changelog.
3391 * bootstrap: Install git-merge-changelog entries in .git/config
3392 if appropriate.
3393
3394 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3395
3396 Remove remaining dependence on CVS Id keyword.
3397 * ChangeLog: For the sake of people still using CVS, don't use dollars
3398 when mentioning Id.
3399 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3400 unusual anyway.
3401 * data/xslt/xml2dot.xsl: Likewise.
3402 * data/xslt/xml2text.xsl: Likewise.
3403 * data/xslt/xml2xhtml.xsl: Likewise.
3404 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3405 * doc/Makefile.am (neutralize): Remove, no longer needed.
3406 (.x.1): Don't use neutralize.
3407 (edit): Don't substitute for ID.
3408 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3409
3410 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3411
3412 Fix dependence on computed configure variables.
3413 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3414 $(top_srcdir)/configure.ac so that changes to computed variables, such
3415 as PACKAGE_VERSION, are seen.
3416 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3417
3418 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3419
3420 Update copyright dates for recent changes.
3421 * Makefile.am: Here.
3422 * src/Makefile.am: Here.
3423 * src/reduce.c: Here.
3424 * tests/reduce.at: Here.
3425
3426 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3427
3428 Use git-version-gen for version names between releases.
3429 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3430 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3431 * .prev-version: New.
3432 * .version.in: Remove.
3433 * ChangeLog: Remove the Id previously used for capturing the CVS
3434 revision.
3435 * GNUmakefile: Remove, now copied from Gnulib.
3436 * Makefile.am: Add code suggested by comments in
3437 build-aux/git-version-gen.
3438 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3439 .prev-version, and .version.
3440 * NEWS (2.3b+): Rename to...
3441 (?.?): ... this because we're dropping the "+" version naming scheme,
3442 but, in general, we still can't be sure of our next release name.
3443 * bootstrap: Add a quick hack to remove from .gitignore the
3444 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3445 entry. This should really be fixed in gnulib instead.
3446 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3447 * configure.ac (AC_INIT): Set version name by invoking
3448 build-aux/git-version-gen.
3449 (AC_CONFIG_FILES): Remove .version, now generated by
3450 build-aux/git-version-gen.
3451 * maint.mk: New, copied from coreutils.
3452 * doc/.cvsignore (bison.1): Add.
3453 * doc/.gitignore (/bison.1): Add.
3454 * doc/bison.1: Remove, generated.
3455 * src/.cvsignore (revision.c): Remove.
3456 * src/.gitignore (/revision.c): Remove.
3457 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3458 (BUILT_SOURCES): Remove revision.c.
3459 (revision.c): Remove.
3460 * src/getargs.c (version): Don't print revision after the VERSION.
3461 * src/revision.h: Remove.
3462
3463 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3464
3465 Fix untranslatable composition of sentences. Reported by Goran
3466 Uddeborg at
3467 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3468 * THANKS (Goran Uddeborg): Add.
3469 * src/reduce.c (reduce_print): Report the number of nonterminals and
3470 rules useless in the grammar in separate sentences.
3471 * tests/reduce.at (Useless Rules): Update output.
3472 (Reduced Automaton): Likewise.
3473 (Underivable Rules): Likewise.
3474 (Empty Language): Likewise.
3475
3476 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3477
3478 Fix some .gitignore and .cvsignore problems.
3479 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3480 (insert_vc_ignore): ... this new function, which prepends `/' to all
3481 .gitignore entries before passing them to insert_sorted_if_absent.
3482 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3483 .cvsignore files are maintained even though Bison developers run
3484 bootstrap while using Git.
3485 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3486 unneeded by Bison.
3487 (gnulib): Add.
3488 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3489 unneeded. Reported by Eric Blake.
3490 * lib/.gitignore (/*~): Add.
3491 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3492 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3493 Blake.
3494 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3495
3496 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3497
3498 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3499 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3500 * bootstrap.conf (gnulib_modules): Add unsetenv.
3501 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3502 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3503 (/setenv.m4): Add.
3504 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3505 the first argument because it may become position-dependent, and unset
3506 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3507 Add comments explaining these issues in more detail.
3508
3509 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3510
3511 Add .gitignore everywhere based on .cvsignore.
3512 * .gitignore: New.
3513 * build-aux/.gitignore: New.
3514 * data/.gitignore: New.
3515 * doc/.gitignore: New.
3516 * etc/.gitignore: New.
3517 * examples/.gitignore: New.
3518 * examples/calc++/.gitignore: New.
3519 * lib/.gitignore: New.
3520 * m4/.gitignore: New.
3521 * po/.gitignore: New.
3522 * runtime-po/.gitignore: New.
3523 * src/.gitignore: New.
3524 * tests/.gitignore: New.
3525
3526 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3527
3528 * NEWS (2.3b+): New section, empty for now.
3529 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3530
3531 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3532
3533 * NEWS (2.3b): Update release date since there has been a delay in
3534 getting the announcements and tarballs out.
3535
3536 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3537
3538 * NEWS: Version 2.3b.
3539 * configure.ac (AC_INIT): Likewise.
3540 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3541
3542 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3543
3544 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3545 been doing it for years.
3546 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3547 (Release Procedure): Add FIXME about make alpha being unmaintained.
3548
3549 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3550
3551 * data/yacc.c: Reformat m4 a little for readability.
3552 * src/lalr.c (build_relations): Correct comment.
3553
3554 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3555
3556 DJGPP specific issue.
3557 * djgpp/config.sed: Fixes required to run configure scripts generated
3558 by autoconf 2.62.
3559
3560 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3561
3562 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3563 coordinator@translationproject.org.
3564
3565 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3566
3567 * THANKS: Add Eric Blake.
3568
3569 2008-04-23 Eric Blake <ebb9@byu.net>
3570
3571 Revert prior patch, by working around autoconf regression.
3572 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3573 ("Output file name: ("): Uncomment test.
3574 ("Output file name: )"): Likewise.
3575 Based on an idea from Noah Misch.
3576
3577 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3578
3579 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3580 2.61. Reported by Juan Manuel Guerrero at
3581 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3582 * tests/output.at ("Output file name: ("): Comment out test case for
3583 now.
3584 ("Output file name: )"): Likewise.
3585
3586 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3587
3588 * GNUmakefile: Update git-version-gen invocation so make dist
3589 succeeds.
3590
3591 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3592
3593 Update to the current gnulib CVS repository, and fix trigraph handling
3594 in Bison.
3595 * bootstrap: Update gnulib CVS repository URL.
3596 (symlink_to_dir): Encapsulate the code that guarantees the destination
3597 directory exists into...
3598 (check_dst_dir): ... this new function, and...
3599 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3600 fail when copying files into lib/uniwidth/.
3601 * src/output.c (prepare_symbols): When writing yytname muscles, where
3602 symbol names will be encoded in C-string literals, tell quotearg to
3603 escape trigraphs. This used to be the default in gnulib.
3604 * tests/regression.at (Token definitions): Because of the change in
3605 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3606 escapes trigraphs in symbol names. Thus, yytname no longer has
3607 trigraphs unnecessarily doubly escaped. Update test case output.
3608 Extend test case to be sure Bison's own error messages will no longer
3609 have trigraphs in symbol names unnecessarily escaped once.
3610
3611 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3612
3613 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3614 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3615 * .cvsignore: Add .version.
3616 * .version.in: New.
3617 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3618 * configure.ac (AC_CONFIG_FILES): Add .version.
3619 * build-aux/.cvsignore: Add git-version-gen.
3620
3621 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3622
3623 * NEWS (2.3a+): Mention that -g now takes an argument.
3624 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3625 consistency. Update the -g and -x entries now that they take
3626 arguments. Use brackets to indicate optional arguments.
3627 * src/getargs.c (usage): Explain the relationship between arguments of
3628 long and short options more completely. Document --defines and -d
3629 separately since the former takes an argument but, for POSIX Yacc, the
3630 latter does not.
3631 (short_options): Let -W take an optional argument like --warnings.
3632 (getargs): Sort cases.
3633
3634 2008-02-28 Akim Demaille <demaille@gostai.com>
3635
3636 * doc/bison.texinfo: Fix a few typos.
3637
3638 2008-02-28 Akim Demaille <akim@epita.fr>
3639
3640 * doc/bison.texinfo (Bison Options): Document -W.
3641 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3642
3643 2008-02-28 Akim Demaille <akim@epita.fr>
3644
3645 * src/getargs.c (short_options): Split and sort for readability.
3646 -g and -x take optional arguments, just like their long options.
3647 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3648 understand.
3649 Fix the handling of $opt which resulted in all the argument to be
3650 considered as optional.
3651
3652 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3653
3654 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3655 say its interface is experimental.
3656 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3657 Java.
3658 (Bison Options): In the -L and --language entry, mention Java.
3659 (Java Bison Interface): Say the interface is experimental.
3660 * src/getargs.c (usage): Mention -L and --language.
3661
3662 * NEWS (2.3a+): Say the push parsing interface is experimental.
3663 * doc/bison.texinfo (Push Decl): Likewise.
3664 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3665 (Push Parser Function): Likewise.
3666 (Pull Parser Function): Likewise.
3667 (Parser Create Function): Likewise.
3668 (Parser Delete Function): Likewise.
3669 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3670 yypull_parse, and yypush_parse entries.
3671
3672 * NEWS (2.3a+): Mention XML support, and say the schema is
3673 experimental.
3674 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3675 * src/getargs.c (usage): Say the XML schema is experimental.
3676
3677 * NEWS (2.3a+): Say option instead of flag.
3678
3679 2008-02-21 Wojciech Polak <polak@gnu.org>
3680
3681 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3682 text.
3683
3684 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3685
3686 Fix impure push parser compile error reported by Bob Rossi at
3687 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3688 * data/yacc.c: Clean up whitespace in the output a little.
3689 (yypstate_allocated): Define for impure push parsers regardless of
3690 whether the pull interface is also requested.
3691 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3692 check impure push parsers without the pull interface.
3693
3694 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3695 yyerror takes arguments specified by %parse-param while yypstate_new
3696 does not.
3697 * doc/bison.texinfo (Parser Create Function): Document that
3698 yypstate_new returns 0 for multiple impure parser instances.
3699 * tests/push.at (Push Parsing: Multiple impure instances): Update
3700 expected stderr output.
3701
3702 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3703
3704 * runtime-po/POTFILES.in (push.c): Remove.
3705
3706 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3707
3708 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3709 * data/push.c: Rename to...
3710 * data/yacc.c: ... this, overwriting it.
3711 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3712 `%push-pull-parser' -> `%define api.push_pull "both"'.
3713 Remove old yacc.c tests, and update push.c tests to yacc.c.
3714
3715 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3716
3717 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3718 `"%code top" blocks' instead of `%code "top" blocks'.
3719 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3720 Clean up whitespace in the output a little.
3721
3722 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3723
3724 Fix documentation problems reported by Tim Josling at
3725 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3726 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3727 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3728 integers. Explain the effect of literal string aliases on error
3729 messages. Copy token 0 documentation from the C++ skeleton
3730 documentation.
3731
3732 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3733
3734 Accept a token number in a %left, %right, or %nonassoc for POSIX
3735 conformance. Reported by Tim Josling at
3736 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3737 * NEWS (2.3a+): Mention.
3738 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3739 and code numbers are treated by precedence declarations.
3740 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3741 of symbols.1.
3742 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3743 of symbol.
3744 (symbol.prec): New, just like symbol but allows INT.
3745 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3746 longer holds.
3747 * tests/regression.at (Token number in precedence declaration): New
3748 test case.
3749
3750 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3751
3752 DJGPP specific issues.
3753 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3754 be changed. Copyright timestamp adjusted.
3755 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3756 be changed. Copyright timestamp adjusted.
3757 * djgpp/config.site: Copyright timestamp adjusted.
3758 * djgpp/config_h.sed: Copyright timestamp adjusted.
3759 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3760 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3761 filename translation list.
3762 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3763 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3764 files shall be created. Before trying to use the temp dir where the
3765 environment variable points to check that the dir really exists. If
3766 not default to the cwd as temp dir. Copyright timestamp adjusted.
3767 * djgpp/subpipe.h: Copyright timestamp adjusted.
3768 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3769
3770 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3771
3772 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3773
3774 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3775
3776 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3777 Problem reported by Claudio Saavedra in
3778 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3779
3780 2008-01-05 Wojciech Polak <polak@gnu.org>
3781
3782 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3783 document's title with the input grammar file name.
3784
3785 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3786
3787 Automate regression testing of the XML/XSLT implementation. Discussed
3788 starting at
3789 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3790 * configure.ac (XSLTPROC): New substitution.
3791 * Makefile.am (maintainer-xml-check): New phony target invoking...
3792 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3793 invoking make maintainer-check with BISON_TEST_XML=1.
3794 * tests/atlocal.in (XSLTPROC): New.
3795 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3796 not to report reachable memory when Bison is expected to have a
3797 non-zero exit status and (2) to compare XML/XSLT output with --graph
3798 and --report=all output for every working grammar when
3799 BISON_TEST_XML=1.
3800 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3801 (AT_BISON_CHECK_XML): New.
3802 (AT_QUELL_VALGRIND): New.
3803 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3804 (AT_CHECK): ... don't redefine this since this was the old way to
3805 quell Valgrind.
3806 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3807 AT_BISON_CHECK invocations.
3808 * tests/c++.at: Likewise.
3809 * tests/calc.at: Likewise.
3810 * tests/conflicts.at: Likewise.
3811 * tests/cxx-type.at: Likewise.
3812 * tests/existing.at: Likewise.
3813 * tests/glr-regression.at: Likewise.
3814 * tests/headers.at: Likewise.
3815 * tests/input.at: Likewise.
3816 * tests/java.at: Likewise.
3817 * tests/output.at: Likewise.
3818 * tests/push.at: Likewise.
3819 * tests/reduce.at: Likewise.
3820 * tests/regression.at: Likewise.
3821 * tests/sets.at: Likewise.
3822 * tests/skeletons.at: Likewise.
3823 * tests/synclines.at: Likewise.
3824 * tests/torture.at: Likewise.
3825 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3826 tends to hang xsltproc.
3827 (Big horizontal): Likewise.
3828
3829 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3830
3831 In XML output, remove redundant class attribute on symbol element.
3832 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3833 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3834 look up a symbol to determine whether it's a nonterminal or terminal.
3835 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3836 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3837
3838 Add prec/assoc information to XML output.
3839 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3840 %prec, add a percent_prec attribute.
3841 * src/print-xml.c (print_grammar): For each terminal that has a
3842 precedence or associativity, add a prec or assoc attribute.
3843 (xml_indent): New.
3844 (xml_puts): Use xml_indent.
3845 (xml_printf): Use xml_indent.
3846 * src/print-xml.h (xml_indent): Prototype.
3847
3848 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3849 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3850
3851 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3852
3853 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3854 (bison:ruleByNumber): ... this for clarity.
3855 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3856 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3857 (xsl:template match="reduction"): Update.
3858 (xsl:template match="item"): Update.
3859 (xsl:template match="reduction"): Update.
3860
3861 In the XML output, don't print the list of rules where symbols appear.
3862 Compute it in XSLT instead. Discussed at
3863 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3864 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3865 (bison:ruleByRhs): New.
3866 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3867 bison:ruleByRhs.
3868 (xsl:template match="terminal/rule"): Remove.
3869 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3870 bison:ruleByRhs.
3871 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3872 Remove.
3873 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3874 bison:ruleByRhs and mode="number-link" for rule template.
3875 (xsl:template match="terminal/rule"): Remove.
3876 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3877 bison:ruleByRhs and mode="number-link" for rule template.
3878 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3879 Rewrite as...
3880 (xsl:template match="rule" mode="number-link"): ... this.
3881 * src/print-xml.c (print_grammar): Don't print the list of rules.
3882
3883 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3884
3885 Don't let --report affect XML output; always print all information.
3886 Discussed at
3887 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3888 * src/conflicts.c (log_resolution): Implement.
3889 * src/print-xml.c (print_core): Implement.
3890 (print_state): Implement.
3891 (print_xml): Implement.
3892
3893 * NEWS (2.3a+): Fix quotes.
3894 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3895 don't let %verbose clear the list specified by --report.
3896
3897 2007-11-26 Akim Demaille <akim@epita.fr>
3898
3899 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3900
3901 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3902
3903 In the XML output, list useless and unused symbols and rules with the
3904 useful ones and add a "usefulness" attribute. Discussed starting at
3905 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3906 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3907 (grammar_rules_print_xml): Print all rules instead of just those
3908 useful in the grammar, and add a "usefulness" attribute.
3909 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3910 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3911 (print_grammar): Print all nonterminals instead of just useful ones,
3912 and add a "usefulness" attribute to nonterminals and terminals.
3913 (print_xml): Don't print a separate "reductions" or
3914 "rules-useless-in-parser" element.
3915 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3916 (reduce_xml): Remove.
3917 (reduce_token_unused_in_grammar): New.
3918 (reduce_nonterminal_useless_in_grammar): New.
3919 * src/reduce.h (reduce_xml): Remove prototype.
3920 (reduce_token_unused_in_grammar): Add prototype.
3921 (reduce_nonterminal_useless_in_grammar): Add prototype.
3922 * data/xslt/xml2text.xsl: Update for XML changes.
3923 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3924 * tests/reduce.at (Useless Terminals): Update output.
3925 (Useless Rules): Update output.
3926 (Reduced Automaton): Update output.
3927
3928 Say "Terminals unused in grammar" instead of "Unused terminals".
3929 * NEWS (2.3a+): Update.
3930 * doc/bison.texinfo (Understanding): Update example output.
3931 * src/reduce.c (reduce_output): Implement.
3932 * data/xslt/xml2text.xsl: Implement.
3933 * data/xslt/xml2xhtml.xsl: Implement.
3934
3935 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3936
3937 Accept --report-file=FILE to override the default `.output' filename.
3938 * NEWS (2.3a+): Mention.
3939 * doc/bison.texinfo (Bison Options): Add an entry.
3940 * src/files.c (compute_output_file_names): Don't override
3941 spec_verbose_file if already set.
3942 * src/getargs.c (usage): Document --report-file.
3943 (REPORT_FILE_OPTION): New anonymous enum member.
3944 (long_options): Add entry for it.
3945 (getargs): Add case for it setting spec_verbose_file.
3946
3947 * build-aux/cross-options.pl: Don't record a short option just because
3948 there's an arg.
3949 * doc/.cvsignore: Add yacc.1.
3950
3951 2007-11-14 Akim Demaille <akim@epita.fr>
3952
3953 * doc/yacc.1.in: New.
3954 * configure.ac, doc/Makefile.am: Adjust.
3955 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3956 config.h symbol.
3957 Use AC_SUBST for assignments too.
3958 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3959
3960 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3961
3962 * src/gram.c: Remove comments that duplicate comments in gram.h.
3963
3964 When reporting useless rules and nonterminals, say "useless in grammar"
3965 instead of "useless", and say "useless in parser" instead of "never
3966 reduced". Discussed starting at
3967 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3968 * NEWS (2.3a+): Mention this change.
3969 * data/xslt/xml2text.xsl: Update output text and expected input XML
3970 element names to match changes below.
3971 * data/xslt/xml2xhtml.xsl: Likewise.
3972 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3973 Contents: "Rules useless in parser due to conflicts".
3974 * doc/bison.texinfo (Decl Summary): Reword a little.
3975 (Understanding): Update example output for changes below.
3976 * src/gram.c: (rule_useful_p): Rename to...
3977 (rule_useful_in_grammar_p): ... this.
3978 (rule_useless_p): Rename to...
3979 (rule_useless_in_grammar_p): ... this.
3980 (rule_never_reduced_p): Rename to...
3981 (rule_useless_in_parser_p): ... this.
3982 (grammar_rules_print): Update for renames.
3983 (grammar_rules_print_xml): Update for renames.
3984 (grammar_rules_never_reduced_report): Rename to...
3985 (grammar_rules_useless_report): ... this since it is used for either
3986 kind of useless rule.
3987 * src/gram.h: Reword comments and update function names in prototypes.
3988 * src/main.c (main): Say "rule useless in parser due to conflicts".
3989 * src/print-xml.c (print_rules_never_reduced): Rename to...
3990 (print_rules_useless_in_parser): ... this, and rename output XML
3991 element "rules-never-reduced" to "rules-useless-in-parser".
3992 (print_xml): Update for rename.
3993 * src/print.c (print_results): Say "Rules useless in parser due to
3994 conflicts".
3995 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3996 (nonterminals_reduce): Say "nonterminal useless in grammar".
3997 (reduce_output): Say "Nonterminals useless in grammar".
3998 Say "Rules useless in grammar".
3999 (reduce_xml): Rename output XML element "useless" to
4000 "useless-in-grammar".
4001 (reduce_print): Don't report the count of grammatically useless rules
4002 as "rules never reduced" just because %yacc is specified.
4003 In the correct report of this count, say nonterminal(s) and rule(s)
4004 "useless in grammar".
4005 * tests/conflicts.at (S/R in initial): Update expected output.
4006 (Defaulted Conflicted Reduction): Likewise.
4007 (Unreachable States After Conflict Resolution): Likewise.
4008 * tests/existing.at (GNU pic Grammar): Likewise.
4009 * tests/reduce.at (Useless Nonterminals): Likewise.
4010 (Useless Rules): Likewise.
4011 (Reduced Automaton): Likewise.
4012 (Underivable Rules): Likewise.
4013 (Empty Language): Likewise.
4014
4015 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4016
4017 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4018 here document and before the EOF so that BSD's implementation of Bourne
4019 shell doesn't parse the delimiter as part of the here document.
4020 * doc/.cvsignore: Add cross-options.texi.
4021 * src/getargs.c (usage): Add a blank line after the warning categories.
4022
4023 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4024
4025 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4026
4027 2007-11-05 Akim Demaille <akim@epita.fr>
4028
4029 Remove Id: from bison.1.
4030 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4031 (perl -0777 -pi -e 's/\.PP\nId): New.
4032 (.x.1): Use it to ignore the version control revision.
4033
4034 2007-11-05 Akim Demaille <demaille@gostai.com>
4035
4036 * build-aux/Makefile.am: Ship cross-options.pl.
4037 * doc/Makefile.am: Always refer to cross-options.texi with
4038 $(srcdir).
4039 (MAINTAINERCLEANFILES): Add it.
4040
4041 2007-11-04 Akim Demaille <demaille@gostai.com>
4042
4043 Generate the long/short option cross-table.
4044 * build-aux/cross-options.pl: New.
4045 * doc/Makefile.am (cross-options.texi): New.
4046 * doc/bison.texinfo: Use it.
4047
4048 2007-11-04 Akim Demaille <demaille@gostai.com>
4049
4050 Generate bison.1 using help2man.
4051 * doc/common.x, doc/bison.x: New.
4052 * doc/Makefile.am (bison.1, .x.1): New.
4053 The code is taken from autoconf-2.61/man/Makefile.am.
4054 * configure.ac: Look for help2man.
4055
4056 2007-11-04 Akim Demaille <demaille@gostai.com>
4057
4058 Complete --help.
4059 * src/getargs.c (usage): Document -W, make it clear that -d,
4060 -g and -x have optional arguments.
4061
4062 2007-11-04 Akim Demaille <demaille@gostai.com>
4063
4064 Find sha1sum when named gsha1sum.
4065 * bootstrap (find_tool): New.
4066 ($SHA1SUM): New.
4067
4068 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4069
4070 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4071 at
4072 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4073 * NEWS (2.3a+): Mention.
4074 * data/bison.m4 (b4_pure_if): Don't define it here.
4075 * data/c.m4 (b4_identification): Depend on individual skeletons to
4076 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4077 values of the %define variables api.pure or api.push_pull. Define
4078 YYPURE, YYPUSH, and YYPULL accordingly.
4079 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4080 glr.cc has already defined b4_pure_flag.
4081 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4082 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4083 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4084 * doc/bison.texinfo (Pure Decl): Update.
4085 (Push Decl): Update.
4086 (Decl Summary): Add api.pure to %define entry.
4087 In %pure-parser entry, say it's deprecated and reference %define.
4088 (Pure Calling): Update.
4089 (Error Reporting): Update.
4090 (C++ Scanner Interface): Update.
4091 (How Can I Reset the Parser): Update.
4092 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4093 reference %define.
4094 * src/getargs.c (pure_parser): Remove global variable.
4095 * src/getargs.h (pure_parser): Remove extern.
4096 * src/output.c (prepare): Don't define pure_flag muscle.
4097 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4098 wrapper around `%define api.pure'.
4099 * tests/calc.at (Simple LALR Calculator): Update.
4100 (Simple GLR Calculator): Update.
4101 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4102 Update.
4103 (GLR: Resolve ambiguity, pure, locations): Update.
4104 (GLR: Merge conflicting parses, pure, no locations): Update.
4105 (GLR: Merge conflicting parses, pure, locations): Update.
4106 * tests/glr-regression.at (Uninitialized location when reporting
4107 ambiguity): Update
4108 * tests/input.at (Unused %define api.pure): New test case.
4109 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4110 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4111 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4112
4113 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4114
4115 %define push_pull -> %define api.push_pull. Discussed starting at
4116 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4117 * data/push.c: Expect the new name.
4118 * data/yacc.c: Likewise.
4119 * doc/bison.texinfo (Push Decl): Update.
4120 (Decl Summary): Update %define entry.
4121 (Push Parser Function): Update.
4122 (Pull Parser Function): Update.
4123 (Parser Create Function): Update.
4124 (Parser Delete Function): Update.
4125 * tests/calc.at (Simple LALR Calculator): Update.
4126 * tests/input.at (%define enum variables): Update.
4127 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4128 (Push Parsing: Multiple impure instances): Update.
4129 (Push Parsing: Unsupported Skeletons): Update.
4130 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4131 (Exploding the Stack Size with Malloc): Update.
4132
4133 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4134 other entries some.
4135
4136 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4137
4138 For the XML output's terminal element, rename @number to @token-number,
4139 and add @symbol-number. In the nonterminal element, rename @number to
4140 @symbol-number. Discussed starting at
4141 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4142 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4143 renames.
4144 (xsl:template match="nonterminal"): Likewise.
4145 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4146 (xsl:template match="nonterminal"): Likewise.
4147 * src/print-xml.c (print_grammar): Implement.
4148
4149 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4150
4151 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4152 2007-10-11 change, the child elements here are items not rules.
4153 (xsl:template match="item"): New.
4154 (xsl:template match="rule"): Update for new reduced itemset.
4155 (xsl:template match="point"): Remove.
4156 (xsl:template match="empty"): For consistency with --graph, don't
4157 output "/* empty */".
4158 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4159 line-wrap, don't pass a negative value as first-line-length since this
4160 won't work with the following changes.
4161 (xsl:template name="line-wrap"): Simplify slightly.
4162 (xsl:template name="ws-search"): Eliminate recursion.
4163 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4164 set next to an item whose dot is not at the end of the RHS even if it
4165 happens to be associated with the same rule.
4166
4167 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4168
4169 Add %define lr.keep_unreachable_states.
4170 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4171 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4172 * src/main.c (main): Implement it.
4173 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4174 Extend to test it, and fix a typo.
4175
4176 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4177
4178 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4179 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4180 the example .output text.
4181 * tests/regression.at (Extra lookahead sets in report): Improve wording
4182 of comments.
4183
4184 2007-10-17 Wojciech Polak <polak@gnu.org>
4185
4186 * src/print-xml.c (print_grammar): Renamed
4187 <terminal> and <nonterminal> attributes:
4188 "type" to "number" and "symbol" to "name".
4189 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4190 Use new attribute names.
4191 (xsl:template match="nonterminal"): Likewise.
4192 * data/xslt/xml2xhtml.xsl: Likewise.
4193
4194 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4195
4196 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4197 (Option Cross Key): Likewise.
4198
4199 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4200 next to an item whose dot is not at the end of the RHS even if it
4201 happens to be associated with the same rule.
4202 * src/print.c (print_core): Likewise.
4203 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4204 (Resolved SR Conflicts): Update output.
4205 * tests/regression.at (Extra lookahead sets in report): New test case.
4206
4207 2007-10-11 Wojciech Polak <polak@gnu.org>
4208
4209 * src/print-xml.c (print_core): Remove item set
4210 redundancy.
4211 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4212 Improve processing time. Suggested by Joel E. Denny.
4213 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4214 Write xsl:param "required" attribute as comment.
4215 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4216 (xsl:template match="rule"): Support new reduced itemset.
4217 (xsl:template match="point"): Remove.
4218 * data/xslt/xml2xhtml.xsl: Likewise.
4219
4220 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4221
4222 * src/getargs.c (version): Update copyright year.
4223
4224 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4225
4226 Make xml2dot.xsl and --graph produce the same output.
4227 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4228 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4229 escaped later.
4230 (xsl:template name="output-node"): Use the new escape template instead
4231 of the string-replace template directly.
4232 (xsl:template name="output-edge"): Likewise.
4233 (xsl:template name="escape"): New, escapes backslashes and newlines in
4234 addition to quotation marks.
4235 * src/graphviz.c (start_graph, output_node, output_edge): Add
4236 whitespace to output for legibility.
4237
4238 Make xml2text.xsl and --report produce the same output, and remove the
4239 XML "conflicts" element since a conflict summary is easily extracted
4240 from the automaton.
4241 * data/xslt/bison.xsl: New.
4242 (xsl:template match="state" mode="bison:count-conflicts): New.
4243 * data/xslt/xml2text.xsl: Import bison.xsl.
4244 (xsl:template match="bison-xml-report"): Instead of styling the
4245 "conflicts" element, style the "automaton" element with mode
4246 "conflicts". Unlike the former, the latter lists S/R and R/R
4247 conflicts for a state on the same line.
4248 (xsl:template match="conflicts"): Remove.
4249 (xsl:template match="conflict"): Remove.
4250 (xsl:template match="terminal"): Line-wrap the list of rules in which
4251 the terminal is used.
4252 (xsl:template match="nonterminal"): Likewise for nonterminals.
4253 (xsl:template match="automaton" mode="conflicts"): New.
4254 (xsl:template match="state" mode="conflicts"): New.
4255 (xsl:template name="line-wrap"): New.
4256 (xsl:template name="ws-search"): New.
4257 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4258 (xsl:template match="bison-xml-report"): Instead of styling the
4259 "conflicts" element, style the "automaton" element with mode
4260 "conflicts."
4261 (xsl:template match="conflicts"): Remove.
4262 (xsl:template match="conflict"): Remove.
4263 (xsl:template match="automaton" mode="conflicts"): New.
4264 (xsl:template match="state" mode="conflicts): New.
4265 * src/conflicts.c (conflicts_output_xml): Remove.
4266 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4267 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4268 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4269 the corresponding XSLT is easier. Also, never wrap between a word and
4270 the comma that follows it.
4271
4272 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4273
4274 Improve C++ namespace support. Discussed starting at
4275 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4276 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4277 b4_namespace_close): New macros that interpret the %define variable
4278 "namespace" so its value can contain "::" to indicate nested
4279 namespaces.
4280 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4281 the above macros.
4282 * data/lalr1.cc (b4_namespace): Likewise.
4283 * data/location.cc (b4_namespace): Likewise.
4284 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4285 inside a new table in the general %define entry. Document `%define
4286 namespace' there as well. Point the %name-prefix entry to it since it
4287 explains it more completely in the case of C++.
4288 (C++ Bison Interface): Mention `%define namespace' instead of
4289 %name-prefix.
4290 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4291 entry suffices.
4292 * tests/c++.at (Relative namespace references): New test case.
4293 (Absolute namespace references): New test case.
4294 (Syntactically invalid namespace references): New test case.
4295 * tests/input.at (C++ namespace reference errors): New test case.
4296
4297 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4298
4299 Add syncline support and location accessor to internal %define
4300 interfaces.
4301 * data/bison.m4 (b4_percent_define_get_loc): New.
4302 (b4_percent_define_get_syncline): New.
4303 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4304 (b4_percent_define_default): Record defining location as line 1 rather
4305 than 0 for the sake of synchronizing #line's, and define
4306 b4_percent_define_syncline(VARIABLE).
4307 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4308 * src/muscle_tab.c (muscle_syncline_grow): New.
4309 (muscle_code_grow): Use muscle_syncline_grow.
4310 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4311 define b4_percent_define_syncline(VARIABLE).
4312 (muscle_percent_define_get_loc): New.
4313 (muscle_percent_define_get_syncline): New.
4314 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4315 remove some unused variables.
4316 (muscle_percent_define_default): Record defining location as line 1
4317 rather than 0 for the sake of synchronizing #line's, and define
4318 b4_percent_define_syncline(VARIABLE).
4319 (muscle_percent_define_check_values): Use
4320 muscle_percent_define_get_loc.
4321 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4322 (muscle_percent_define_get_syncline): Prototype.
4323 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4324 defaults): Update output for location change.
4325 (Complaining during macro argument expansion): Extend to test
4326 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4327
4328 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4329
4330 Fix some error-reporting macro bugs.
4331 * data/bison.m4 (b4_cat): New.
4332 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4333 to stdout so they don't become arguments to other macros. Update
4334 comments and add examples.
4335 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4336 add examples.
4337 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4338 after printing the error directive so that M4 doesn't report subsequent
4339 problems that are induced by this problem.
4340 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4341 instead of just in them. Recognize @\n in both places. Both expand to
4342 the empty string. Needed by b4_cat.
4343 * tests/skeletons.at (Complaining during macro argument expansion):
4344 New test case.
4345 (Fatal errors make M4 exit immediately): New test case.
4346
4347 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4348
4349 Implement --print-datadir.
4350 * src/getargs.c (usage): Mention.
4351 (PRINT_DATADIR_OPTION): New anonymous enum member.
4352 (long_options): Add entry for it.
4353 (getargs): Add case for it calling compute_pkgdatadir.
4354 * src/output.c (output_skeleton): Encapsulate data directory
4355 computation from here...
4356 (prepare): ... and from here...
4357 (compute_pkgdatadir): ... into this new function.
4358 * src/output.h (compute_pkgdatadir): Prototype.
4359
4360 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4361
4362 * src/print-xml.c (escape_bufs): New static global variable
4363 replacing...
4364 (xml_escape_n): ... the static local variable buf here.
4365 (print_xml): Free memory for escape_bufs.
4366 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4367
4368 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4369
4370 Replace `%push-parser' and `%push-pull-parser' with
4371 `%define push_pull "push"' and `%define push_pull "both"'.
4372 `%define push_pull "pull"' is the default.
4373 * doc/bison.texinfo (Push Decl, Push Parser Function,
4374 Pull Parser Function, Parser Create Function, Parser Delete Function):
4375 Update declarations.
4376 (Decl Summary, Table of Symbols): Replace %push-parser and
4377 %push-pull-parser entries with a %define push_pull entry.
4378 * data/bison.m4 (b4_percent_define_check_values): New macro.
4379 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4380 definitions...
4381 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4382 definitions...
4383 * data/push.c: ... to here and compute them from the value of the
4384 %define variable push_pull.
4385 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4386 parsing requests here...
4387 * data/yacc.c: ... hack this to switch to push.c any time
4388 b4_use_push_pull_flag or the %define variable push_pull is set. This
4389 will go away when we mv push.c yacc.c.
4390 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4391 push parsing is not supported since unused %define variables are
4392 reported anyway.
4393 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4394 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4395 comments for consistency with b4_percent_define_check_values.
4396 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4397 muscles.
4398 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4399 Remove.
4400 (prologue_declaration): Remove %push-parser and %push-pull-parser
4401 rules.
4402 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4403 * tests/calc.at: Update declarations.
4404 * tests/input.at (%define enum variables): New test case.
4405 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4406 declaration.
4407 (Push Parsing: Multiple impure instances): Update declaration.
4408 (Push Parsing: Unsupported Skeletons): New test case.
4409 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4410 declaration.
4411 (Exploding the Stack Size with Malloc): Update declaration.
4412
4413 2007-09-24 Wojciech Polak <polak@gnu.org>
4414
4415 Add XSLT transformations.
4416
4417 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4418 * data/xslt/xml2text.xsl: Transform XML into plain text.
4419 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4420 * data/Makefile.am (xsltdir): New variable.
4421 (dist_xslt_DATA): Add xslt/*.xsl files.
4422
4423 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4424
4425 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4426 Problem reported by Wojciech Polak.
4427 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4428 (xml_printf): Undo change I made on 21 September; that is,
4429 indent 2 spaces, not 1.
4430
4431 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4432
4433 Pacify ./configure --enable-gcc-warnings.
4434 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4435 `char const *' instead of `char *'.
4436 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4437 local variable `sep'.
4438
4439 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4440
4441 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4442 elsewhere.
4443 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4444 (xml_printf): Indent just 1 space for level.
4445 (e_char, xlate_char): Remove.
4446 (xml_escape_string): Rewrite to avoid undefined behavior (used
4447 storage that was freed from the stack).
4448 (xml_escape_n): Don't bother checking for subscript error.
4449
4450 2007-09-21 Wojciech Polak <polak@gnu.org>
4451
4452 Add Bison XML Automaton Report.
4453
4454 Add support for an -x option to generate an XML report.
4455 It is not documented yet.
4456 * src/print-xml.c: New file.
4457 * src/print-xml.h: Likewise.
4458 * lib/timevar.def (TV_XML): New var.
4459 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4460 * src/conflicts.c: Include print-xml.h.
4461 (solved_conflicts_xml_obstack): New var.
4462 (log_resolution, conflicts_solve, conflicts_free):
4463 Add support for XML report.
4464 (conflicts_output_val): New function.
4465 * src/conflicts.h (conflicts_output_val): New decl.
4466 * src/files.c (spec_xml_file): New var.
4467 (compute_output_file_names, output_file_names_free): Add XML support.
4468 * src/files.h (spec_xml_file): New decl.
4469 * src/getargs.c (xml_flag): New var.
4470 (usage, short_options, long_options, getargs): Add XML support.
4471 * src/getargs.h (xml_flag): New decl.
4472 * src/gram.c: Include print-xml.h.
4473 (rule_lhs_print_xml, rule_rhs_print_xml):
4474 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4475 New functions.
4476 * src/gram.h: Declare external ones.
4477 * src/main.c: Include print-xml.h.
4478 (main): Add XML support.
4479 * src/reduce.c: Include print-xml.h.
4480 (reduce_xml): New function.
4481 * src/reduce.h: Declare it.
4482 * src/state.c: Include print-xml.h.
4483 (state_new): Add XML support.
4484 (state_rule_lookahead_tokens_print_xml): New function.
4485 * src/state.h: Declare it.
4486 (struct state): New member solved_conflicts_xml.
4487 * src/symtab.c (symbol_class_get_string): New function.
4488 * src/symtab.h: Declare it.
4489
4490 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4491
4492 * GNUmakefile: Switch to coreutils's version.
4493 * bootstrap: Likewise.
4494 * Makefile.cfg: Adjust to new GNUmakefile.
4495 * README-hacking: Likewise.
4496
4497 Import from gnulib:
4498
4499 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4500 Bruno Haible <bruno@clisp.org>
4501
4502 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4503 and is a script that invokes bison. Tighten the code. Add comments.
4504
4505 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4506
4507 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4508 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4509 * doc/bison.texinfo (Decl Summary): Fix.
4510 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4511 * tests/input.at (Boolean %define variables): Update output.
4512 * tests/skeletons.at (%define boolean variables: invalid skeleton
4513 defaults): Rename to...
4514 (%define Boolean variables: invalid skeleton defaults): ... this and
4515 update output.
4516
4517 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4518
4519 In impure push mode, don't allow more than one yypstate to be allocated
4520 since multiple impure parsers would corrupt yynerrs.
4521 * data/push.c (yypstate_allocated): New static global variable
4522 initialized to 0.
4523 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4524 exhaustion if yypstate_allocated is 1, but still return 2.
4525 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4526 already 1. Otherwise, set it to 1.
4527 (yypstate_delete): Set it to 0.
4528 * tests/push.at (Push Parsing: Multiple impure instances): New test
4529 case.
4530
4531 2007-08-17 Bob Rossi <bob@brasko.net>
4532
4533 * doc/bison.texinfo (Push Decl): Document the push parser.
4534 (Table of Symbols): Ditto.
4535 (Pure Decl): Ditto.
4536 (Decl Summary): Ditto.
4537 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4538 Parser Create Function, Parser Delete Function):
4539 Add new push parser symbols.
4540 (Table of Symbols): Document push-parser, push-pull-parser,
4541 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4542
4543 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4544
4545 Update to GPLv3.
4546 * doc/gpl-3.0.texi: New file.
4547 * doc/gpl.texi: Remove.
4548 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4549 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4550 * README-hacking, TODO, bootstrap, bootstrap.conf:
4551 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4552 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4553 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4554 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4555 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4556 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4557 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4558 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4559 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4560 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4561 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4562 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4563 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4564 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4565 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4566 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4567 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4568 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4569 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4570 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4571 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4572 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4573 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4574 * src/complain.c, src/complain.h, src/conflicts.c:
4575 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4576 * src/files.h, src/flex-scanner.h, src/getargs.c:
4577 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4578 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4579 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4580 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4581 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4582 * src/print.c, src/print.h, src/print_graph.c:
4583 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4584 * src/reduce.h, src/relation.c, src/relation.h:
4585 * src/revision.h, src/scan-code.h, src/scan-code.l:
4586 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4587 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4588 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4589 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4590 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4591 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4592 * tests/existing.at, tests/glr-regression.at:
4593 * tests/headers.at, tests/input.at, tests/java.at:
4594 * tests/local.at, tests/output.at, tests/push.at:
4595 * tests/reduce.at, tests/regression.at, tests/sets.at:
4596 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4597 * tests/torture.at:
4598 Update to GPLv3.
4599
4600 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4601
4602 Get rid of broken %no-parser, -n, and --no-parser implementation and
4603 documentation.
4604 * TODO: Don't mention them.
4605 * doc/bison.1: Likewise.
4606 * doc/bison.texinfo (Decl Summary): Likewise.
4607 (Bison Options): Likewise.
4608 (Option Cross Key): Likewise.
4609 * src/getargs.c (no_parser_flag): Remove global variable.
4610 (usage): Don't print description of -n and --no-parser.
4611 (long_options): Remove --no-parser entry here.
4612 (getargs): Remove -n case in the switch here.
4613 * src/getargs.h (no_parser_flag): Remove extern.
4614 * tests/regression.at (Web2c Actions): Remove comment that mentions
4615 --no-parser.
4616
4617 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4618
4619 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4620 name user variables starting with `yy'. Just pass NULL instead of a
4621 dummy local &yylval to yypush_parse.
4622 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4623 starting with `yy'.
4624
4625 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4626
4627 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4628 true since it's then always used regardless of whether yyoverflow is
4629 defined. Reported by Christian Burger at
4630 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4631 * THANKS: Add Christian Burger.
4632
4633 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4634 node names: say "Decl Summary" not "Bison Declaration Summary".
4635
4636 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4637
4638 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4639 determine whether this function has already complained about an invalid
4640 value for a %define boolean variable, don't check whether Bison has
4641 ever examined the value. As written, the check was a tautology.
4642 Instead, record and check for this complaint using a separate muscle.
4643
4644 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4645
4646 Fix push parsing memory leak reported by Brandon Lucia at
4647 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4648 * THANKS: Add Brandon Lucia.
4649 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4650 but the parse never completed and thus freed it.
4651 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4652 * tests/testsuite.at: Include push.at.
4653 * test/push.at: New.
4654 (Push Parsing: Memory Leak for Early Deletion): New test case.
4655
4656 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4657
4658 Improve handling of multiple S/R conflicts in the same state and of S/R
4659 conflicts involving multiple reductions.
4660 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4661 set for a state here or Bison will abort if it is reassigned on a
4662 later conflicted reduction in the same state.
4663 Similarly, don't finalize and assign the solved conflicts report here
4664 or it will be lost if it is reassigned on a later conflicted reduction
4665 in the same state.
4666 (set_conflicts): Instead, assign them both here after all S/R conflicts
4667 in the state have been fully examined.
4668 * src/print.c (shift_set): Rename to...
4669 (no_reduce_set): ... this.
4670 (print_reductions): Update for rename, and add %nonassoc error action
4671 tokens to no_reduce_set so that, when printing the first remaining
4672 reduction on an error action token, the reduction is enclosed in
4673 brackets.
4674 (print_results): Update for rename.
4675 * tests/conflicts.at (Solved conflicts report for multiple reductions
4676 in a state): New test case.
4677 (%nonassoc error actions for multiple reductions in a state): New test
4678 case.
4679
4680 * src/main.c (main): Don't depend on C99 features.
4681
4682 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4683
4684 * build-aux/.cvsignore: Add compile.
4685 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4686 uniwidth.
4687
4688 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4689
4690 * bootstrap (slurp): Create target directories that don't exist.
4691 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4692
4693 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4694
4695 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4696 than item number.
4697 * closure.c (closure): Likewise.
4698 * state.h (reductions): Comment sorting of rules.
4699 (state): Comment sorting of items.
4700
4701 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4702
4703 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4704 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4705 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4706 definition in order to avoid Gnulib headers since we don't use config.h
4707 here.
4708 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4709 rather than AT_DATA so that config.h is included.
4710
4711 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4712
4713 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4714 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4715 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4716 and so that YYFPRINTF is guaranteed to be defined here.
4717
4718 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4719
4720 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4721 with...
4722 (muscle_percent_define_check_values): ... this more helpful function.
4723 Again, it's not used yet, but it will be.
4724 * src/muscle_tab.h: Likewise.
4725
4726 Improve some comments in parser table construction.
4727 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4728 (generate_states): Don't mention ruleset, which is internal to closure.
4729 * src/closure.c (closure): Explain sorting of core and itemset, which
4730 is required for this function to behave correctly.
4731 * src/closure.h (closure): Mention sorting.
4732
4733 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4734
4735 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4736 move the check for disabled transitions to an aver since conflict
4737 resolution hasn't happened yet.
4738
4739 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4740 labels a state as inconsistent just because it has error transitions.
4741 The original form of this check appeared in revision 1.1 of lalr.c,
4742 which was committed on 1991-12-21. Now (at least), changing the
4743 consistency label on such a state appears to have no useful effect in
4744 any of the places it is examined, which I enumerate below. The key
4745 point to understanding each item in this enumeration is that a state
4746 with an error transition is labelled consistent in the first place only
4747 if it has no rules, so the check cannot matter for states that have
4748 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4749 to try to identify its conflicts, and a state must have *rules* to have
4750 conflicts. (2) Labelling a state as inconsistent will affect how
4751 action_row sets the default *rule* for the state. (3) Labelling a
4752 state as inconsistent will cause build_relations to add lookback edges
4753 to *rules* in that state.
4754 * src/state.h (struct state): Word the comment for member consistent
4755 more carefully.
4756
4757 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4758
4759 Don't depend on C99 features.
4760 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4761 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4762 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4763 * src/state.c (state_mark_reachable_states): Fix for-loop.
4764 (state_remove_unreachable_states): Fix for-loop.
4765
4766 Don't widen struct state with member reachable just to temporarily
4767 record reachability. Instead, use a local bitset.
4768 * src/state.h (struct state): Remove member.
4769 * src/state.c (state_new): Don't initialize it.
4770 (state_mark_reachable_states): Rename to...
4771 (state_record_reachable_states): ... this, and use bitset.
4772 (state_remove_unreachable_states): Use bitset.
4773
4774 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4775
4776 * src/Makefile.am (yacc): Quote target action commands properly so
4777 that the yacc script isn't corrupt. Reported by Hans Aberg at
4778 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4779
4780 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4781 the case of pure parsers. Reported by Frans Englich at
4782 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4783 * THANKS: Add Frans Englich.
4784
4785 * NEWS (2.3a+): In the %code entry, reference section `Bison
4786 Declaration Summary' from the manual now since the %code summary has
4787 moved there.
4788 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4789 in the rules section must be terminated by semicolons.
4790
4791 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4792
4793 Extend the front-end API for %define variables to more completely
4794 mirror the back-end. This will be useful in the future.
4795 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4796 Update comments to mention the new front-end counterparts of these
4797 macros.
4798 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4799 for muscle_string_decode and muscle_location_decode.
4800 (muscle_string_decode): New static function.
4801 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4802 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4803 functions.
4804 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4805 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4806 implementation more closely.
4807 (muscle_percent_define_invalid_value): New function.
4808 * src/muscle_tab.h (muscle_percent_define_get,
4809 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4810 Prototype.
4811
4812 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4813
4814 * NEWS (2.3a+): Mention yesterday's state-removal change.
4815 (2.3a): Remove the %language entry, which was added after 2.3a.
4816 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4817 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4818 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4819 tests/existing.at: Update copyright date.
4820
4821 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4822
4823 If conflict resolution makes states unreachable, remove those states,
4824 report rules that are then unused, and don't report conflicts in those
4825 states.
4826 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4827 New global function.
4828 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4829 function.
4830 * src/main.c (main): After conflict resolution, remove the unreachable
4831 states and update all data structures that reference states by number.
4832 * src/state.c (state_new): Initialize each state's reachable member to
4833 false.
4834 (state_mark_reachable_states): New static function.
4835 (state_remove_unreachable_states): New global function.
4836 * src/state.h (struct state): Add member bool reachable.
4837 (state_remove_unreachable_states): Prototype.
4838 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4839 New test case.
4840 * tests/existing.at (GNU pic Grammar): Update test case output now that
4841 an unused rule is discovered.
4842
4843 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4844
4845 Minor code cleanup in parser table construction.
4846 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4847 (new_itemsets, save_reductions): Update for rename to nitemset.
4848 * src/closure.c (nritemset): Rename to...
4849 (nitemset): ... this since the "r" appears to meaningless and isn't
4850 used in the comments.
4851 (closure): Update for rename.
4852 * src/closure.h (nritemset): Update extern to...
4853 (nitemset): ... this.
4854 * src/lalr.c (LA): Fix a typo in comments.
4855 * src/print.c (print_core): Update for rename to nitemset.
4856 * src/print_graph.c (print_graph): Likewise.
4857 * src/state.h: Fix some typos in header comments.
4858
4859 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4860
4861 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4862 still sticks to ASCII. Sorry!
4863
4864 * README-hacking: New file, taken mostly from coreutils, with changes
4865 for Bison. Contains much of the contents of:
4866 * README-cvs: Remove.
4867 * bootstrap: Sync from gnulib.
4868 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4869 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4870
4871 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4872
4873 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4874 Setzer.
4875 (Java Differences): Fix some typos.
4876 * THANKS: Add Sebastian Setzer.
4877
4878 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4879
4880 * data/java.m4 (b4_single_class_if): Remove.
4881 (b4_abstract_if): Look at "%define abstract".
4882 (b4_lexer_if): New.
4883 (b4_union_name): Rename...
4884 (b4_yystype): ... to this. Map to "%define stype".
4885 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4886 b4_maybe_throws): Fix quoting.
4887 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4888 * data/lalr1.java (Lexer interface): Always define.
4889 (Lexer interface within parser class): Remove.
4890 (YYLexer class): New, used when "%code lexer" is present.
4891 (constructor): When "%code lexer" is used, pass %lex-param
4892 to the lexer constructor.
4893 (yylex, yyparse): Remove %lex-param from method invocations
4894 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4895
4896 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4897 abstract". Rename "%define union_name" to "%define stype".
4898 Rename method names according to previous patch.
4899 (Java Scanner Interface): Describe "%code lexer" instead of
4900 "%pure-parser" and "%define single_class".
4901 (Java Differences): Mention "%code lexer".
4902
4903 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4904 Include scanner here, using macros from tests/local.at.
4905 (AT_DATA_CALC_Y): Remove final argument.
4906 (_AT_CHECK_JAVA_CALC): Likewise.
4907 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4908 of %locations and %error-verbose.
4909 (main): Test with and without %lex-param.
4910 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4911 (AT_BISON_OPTION_POPDEFS): Pop it.
4912
4913 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4914
4915 DJGPP spefic issue. Inhibit the use of disallowed characters for
4916 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4917 and concern testsuite case 46.
4918 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4919 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4920 * djgpp/config.bat: Inhibit the use of disallowed characters.
4921
4922 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4923
4924 Miscellaneous %define and %code cleanup.
4925 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4926 values are interpreted.
4927 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4928 documentation a little more.
4929 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4930 muscle_percent_define_insert, muscle_percent_code_grow): New
4931 functions/macros.
4932 * src/muscle_tab.h (muscle_percent_define_insert,
4933 muscle_percent_code_grow): Prototype.
4934 * src/parse-gram.y (prologue_declaration): Use
4935 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4936 %define and %code directives.
4937
4938 Make it easy to share %define boolean variables between the front-end
4939 and back-end. Though not used yet, this will be useful in the future.
4940 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4941 Bison uses of names rather than just skeleton uses of names.
4942 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4943 b4_percent_define_skeleton_variables(VARIABLE) to
4944 b4_percent_define_bison_variables(VARIABLE).
4945 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4946 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4947 b4_percent_code_bison_qualifiers(QUALIFIER).
4948 (b4_check_user_names_wrap): Update for renames.
4949 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4950 muscle_percent_define_default): New functions mimicking
4951 b4_percent_define_flag_if and b4_percent_define_default.
4952
4953 For %define variables, report locations for invalid values and
4954 redefinitions.
4955 * data/bison.m4 (b4_percent_define_flag_if): Read
4956 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4957 value for VARIABLE.
4958 (b4_percent_define_default): Save a special location in
4959 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4960 must later be reported as invalid.
4961 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4962 functions.
4963 (muscle_percent_define_insert): Record the location of VARIABLE in
4964 muscle percent_define_loc(VARIABLE), and use it to report the previous
4965 location for a redefinition.
4966 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4967 (muscle_percent_define_default): Update like b4_percent_define_default.
4968 (muscle_grow_user_name_list): Rename to...
4969 (muscle_user_name_list_grow): ... this for consistency and use
4970 muscle_location_grow.
4971 * src/muscle_tab.h (muscle_location_grow): Prototype.
4972 * tests/input.at (%define errors): Update expected output.
4973 * tests/skeletons.at (%define boolean variables: invalid skeleton
4974 defaults): New test case.
4975
4976 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4977
4978 * src/print.c (lookahead_set, state_default_rule): Remove.
4979 (print_reductions): Replace state_default_rule invocation with
4980 equivalent use of yydefact, which was computed in token_actions in
4981 tables.c.
4982 (print_results): Don't allocate lookahead_set.
4983
4984 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4985
4986 * data/lalr1.java: Prefix all private members with yy.
4987
4988 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4989
4990 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4991 Sebastien Fricker at
4992 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4993 * THANKS: Add Sebastien Fricker.
4994 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4995 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4996 accept a variable number of arguments.
4997
4998 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4999
5000 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5001
5002 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5003
5004 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5005 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5006 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5007
5008 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5009
5010 Undo my 2007-02-07 change, switching back to the c-strcase module
5011 introduced in the 2007-02-03 change. Bruno Haible reported that
5012 the 2007-02-07 change would be dangerous in Turkish if we add a
5013 language whose name contains "i", since "i" is not lowercase "I"
5014 in Turkish.
5015 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5016 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5017 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5018 * m4/.cvsignore: Remove strcase.m4.
5019 * src/getargs.c: Revert 2007-02-07 change, as follows.
5020 Include c-strcase.h.
5021 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5022
5023 2007-02-11 Bruno Haible <bruno@clisp.org>
5024
5025 Enable the Java related testsuite tests when the only Java compiler
5026 found is a gcj < 4.3. Discussed at
5027 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5028 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5029
5030 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5031
5032 * data/Makefile.am: Update copyright date.
5033 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5034 yypstate_new returns NULL.
5035 (yypstate_new): Return NULL if malloc does.
5036 * src/reader.c (packgram): Move translation of rule actions from the
5037 beginning of packgram to...
5038 (check_and_convert_grammar): ... here right before packgram is invoked
5039 so it's easier to write more complete comments, and remove redundant
5040 code.
5041
5042 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5043
5044 As in semantic actions, make @$ in %initial-action, %destructor, and
5045 %printer imply %locations.
5046 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5047 scanning @$.
5048 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5049 (@$ in %initial-action implies %locations,
5050 @$ in %destructor implies %locations,
5051 @$ in %printer implies %locations): ... these new test cases.
5052
5053 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5054
5055 Undo most of the 2007-02-03 change, switching to the strcase module
5056 now that gnulib strcase has been fixed.
5057 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5058 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5059 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5060 * m4/.cvsignore: Add strcase.m4.
5061 * src/getargs.c: Revert 2007-02-03 change, as follows.
5062 Don't include c-strcase.h.
5063 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5064 strcasecmp has "unspecified behavior" outside the POSIX locale,
5065 but it works fine in practice if at least one argument is ASCII,
5066 as is the case in Bison.
5067
5068 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5069
5070 * tests/java.at: Skip tests if only one of javac/java is present.
5071 Reported by Joel E. Denny.
5072 * tests/atlocal.in: Adjust copyright years.
5073
5074 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5075
5076 * data/lalr1.java (Stack): Work around old verifiers that disallow
5077 access to the private fields of an inner class, from the outer class.
5078 We can make Stack's fields public because user code doesn't have access
5079 to the instance of Stack used by parse(). Reported by Paul Eggert.
5080
5081 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5082
5083 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5084 the right spot for these files?
5085 * bootstrap.conf (gnulib_modules): Add c-strcase.
5086 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5087 c-strncasecmp.c.
5088 * src/getargs.c: Include c-strcase.h.
5089 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5090 to avoid unspecified behavior.
5091
5092 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5093
5094 * doc/bison.texinfo (Decl Summary): Correct typo.
5095
5096 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5097
5098 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5099 Complain if the value does not match empty, "true" or "false".
5100 * data/c++.m4: Adjust default definitions of %define variables.
5101 * data/java.m4: Adjust default definitions of %define variables.
5102 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5103 to above behavior.
5104 * tests/input.at (Boolean %define variables): Test new behavior.
5105
5106 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5107
5108 * NEWS: Mention java.
5109 * TODO: Remove things that are done.
5110 * bootstrap.conf: Add javacomp-script and javaexec-script.
5111 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5112
5113 * data/Makefile.am: Add new files.
5114 * data/java-skel.m4: New.
5115 * data/java.m4: New.
5116 * data/lalr1.java: New.
5117
5118 * doc/bison.texinfo: Put "A Complete C++ Example" under
5119 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5120 under Other Languages.
5121
5122 * src/getargs.c (valid_languages): Add Java.
5123 * src/getargs.h (struct bison_language): Update size of string fields.
5124
5125 * tests/Makefile.am: Add java.at.
5126 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5127 * tests/java.at: New.
5128 * tests/testsuite.at: Include it.
5129
5130 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5131
5132 Clean up.
5133 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5134 at_directive_argv arguments so these no longer have to be global
5135 variables. Also, update the implementation for the following changes.
5136 (fail_for_at_directive_too_many_args,
5137 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5138 (at_directive_name): Remove as at_directive_argv[0] will be used for
5139 this now.
5140 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5141 for the directive name.
5142 (at_directive_argc, at_directive_argv): Make these local within
5143 skel_lex instead of global.
5144 (INITIAL): Update directive start action for above changes.
5145 (SC_AT_DIRECTIVE_ARG): Rename to...
5146 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5147 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5148 (scan_skel): Move yylex_destroy to...
5149 (skel_scanner_free): ... here.
5150 * tests/skeletons.at (installed skeleton file name): Rename to...
5151 (installed skeleton file names): ... this.
5152
5153 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5154
5155 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5156 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5157 Summary" not "Directives".
5158 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5159 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5160 since the former is now the more complete one.
5161 (Prologue Alternatives): Likewise and do the same for %defines.
5162 (Table of Symbols): Add summary of %code, add summary of %define, and
5163 move full %code documentation to...
5164 (Decl Summary): ... here for consistency with other entries in these
5165 sections.
5166 Move %define entry in order to keep this list alphabetized.
5167 Reword %define entry a little to put less emphasis on the skeleton
5168 concept, which most users shouldn't have to think about.
5169
5170 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5171
5172 Adjust to recent gnulib changes.
5173 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5174 Add string.h, string_.h, unistd_.h, wchar_.h.
5175 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5176 * src/system.h: Don't include <stpcpy.h>; this is now done by
5177 <string.h>.
5178
5179 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5180
5181 Simplify implementation of unqualified %code, implement macros for
5182 uniform treatment of boolean %define flags. Document %define.
5183 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5184 b4_percent_code_ifdef): New.
5185 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5186 * data/c++.m4: Define default value for global_tokens_and_yystype.
5187 * data/glr.cc: Likewise.
5188 * data/location.cc: Use b4_percent_define_flag_if.
5189
5190 * doc/bison.texinfo (Decl Summary): Document %define.
5191
5192 * src/parse-gram.y (Unqualified %code): Change muscle name to
5193 b4_percent_code().
5194 (content.opt): Default to empty.
5195
5196 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5197
5198 Implement support for relative and absolute skeleton file names.
5199 Discussed starting at
5200 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5201 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5202 (Bison Options): Document in --skeleton entry.
5203 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5204 full_skeleton can't necessarily hold all of pkgdatadir.
5205 If the specified skeleton file name contains a `/', don't prepend
5206 pkgdatadir.
5207 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5208 file name contains a `/', prepend the grammar file directory.
5209 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5210 * skeletons.at: New file.
5211 (relative skeleton file names): New test case.
5212 (installed skeleton file names): New test case.
5213 * tests/testsuite.at: Include skeletons.at.
5214
5215 * bootstrap: Update copyright to 2007.
5216
5217 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5218
5219 * bootstrap: Remove occurrences of .#bootmp from the files.
5220
5221 2007-01-17 Akim Demaille <akim@epita.fr>
5222
5223 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5224 nonterminals.
5225 Use per-type %printer.
5226
5227 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5228
5229 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5230 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5231 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5232 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5233 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5234 tests/glr-regression.at, tests/input.at, tests/local.at,
5235 tests/output.at, tests/torture.at: Update copyright to 2007.
5236
5237 2007-01-16 Akim Demaille <akim@epita.fr>
5238
5239 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5240 error code.
5241 (Calc++ Scanner): Exit with failure if we can't open the input
5242 file.
5243 Accept "-" standing for stdin.
5244 (Calc++ Top Level): Print the result only if the parsing was
5245 successful.
5246
5247 2007-01-16 Akim Demaille <akim@epita.fr>
5248
5249 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5250
5251 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5252 and Joel E. Denny <jdenny@ces.clemson.edu>
5253
5254 Clean up %define and %code implementation in M4 some. Most
5255 importantly, rename all related macros to be in the b4_percent_define
5256 and b4_percent_code namespaces. Also, complete support for `.' in
5257 %define variable names and %code qualifiers.
5258 * data/bison.m4 (b4_check_user_names): Check for special
5259 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5260 m4_foreach loops.
5261 (b4_get_percent_define, b4_get_percent_code): Rename to...
5262 (b4_percent_define_get, b4_percent_code_get): ... these.
5263 Extend documentation with examples.
5264 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5265 b4_percent_define_skeleton_variables and
5266 b4_percent_code_skeleton_qualifiers.
5267 Expect any value for the %define variable `foo' to be stored in the
5268 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5269 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5270 expect any unqualified %code blocks to be stored in a macro named
5271 `b4_percent_code_unqualified'.
5272 Use m4_indir so that %define variable names and %code qualifiers can
5273 contain `.', which is allowed by the grammar parser.
5274 (b4_percent_define_default): New macro to set a default value for a
5275 %define variable.
5276 (m4_wrap): Update wrapped code, and fix some underquoting.
5277 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5278 Expect grammar uses of %define variables and %code qualifiers to be
5279 defined in b4_percent_define_user_variables and
5280 b4_percent_code_user_qualifiers.
5281 * data/c++.m4: Use b4_percent_define_default rather than
5282 m4_define_default. Fix some underquoting. Skeleton usage of %define
5283 variable define_location_comparison now implies skeleton usage of
5284 %define variable filename_type.
5285 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5286 data/push.c, data/yacc.c: Update macro names.
5287 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5288 muscle names.
5289
5290 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5291
5292 DJGPP specific issues.
5293
5294 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5295 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5296
5297 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5298
5299 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5300 run parsers in all tests so that Valgrind is invoked during
5301 maintainer-check-valgrind.
5302 (Duplicate representation of merged trees): Free all semantic values.
5303 (Duplicated user destructor for lookahead): Likewise.
5304
5305 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5306
5307 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5308 command-line prefix.
5309 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5310 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5311 miss Valgrind messages.
5312 (Exploding the Stack Size with Malloc): Likewise.
5313
5314 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5315
5316 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5317 locals. Reported by Juan Manuel Guerrero at
5318 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5319 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5320 Fix some indentation also.
5321 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5322 explaining this issue.
5323
5324 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5325 and Joel E. Denny <jdenny@ces.clemson.edu>
5326
5327 Simplify union and prologue handling, and escape union and lex/parse
5328 params with digraphs.
5329 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5330 values to the empty string since these are no longer guaranteed
5331 initialized by the front-end.
5332 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5333 braces around b4_user_stype since this is no longer done by the
5334 front-end.
5335 * src/files.c, src/files.h (pre_prologue_obstack,
5336 post_prologue_obstack): Remove.
5337 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5338 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5339 with digraphs. This fixes lex params and parse params.
5340 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5341 * src/output.c (prepare): Remove muscle insertion of the prologues.
5342 (output): Remove freeing of pre_prologue_obstack and
5343 post_prologue_obstack.
5344 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5345 than prologue_augment for prologue parsing so you don't need prologue
5346 obstacks.
5347 (grammar_declaration): For %union RHS, use `braceless' instead of
5348 "{...}" so that braces are already stripped and code is escaped with
5349 digraphs.
5350 * src/reader.c (prologue_augment): Remove.
5351 (reader): Remove initialization of pre_prologue_obstack and
5352 post_prologue_obstack.
5353 * src/reader.h (prologue_augment): Remove.
5354
5355 * data/c.m4: Remove stray parenthesis.
5356
5357 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5358
5359 Remove quotes from variables names in %define directives and from
5360 qualifiers in %code directives, and restrict the characters that are
5361 allowed in them to M4-friendly ones. For %define, continue to support
5362 the quoted form as a deprecated feature. Discussed starting at
5363 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5364 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5365 %code.
5366 * doc/bison.texinfo (Prologue Alternatives): Update.
5367 (Decl Summary): In %defines entry, update mention of `%code requires'
5368 and `%code provides'.
5369 (C++ Location Values): Update %define uses.
5370 (Calc++ Parser Interface): Likewise.
5371 (Calc++ Parser): Likewise, and update `%code requires' uses.
5372 (Table of Symbols): Update %code documentation.
5373 * src/parse-gram.y (prologue_declaration): For %define variables, use
5374 `variable' instead of `STRING'.
5375 (grammar_declaration): For %code qualifiers, use `ID' instead of
5376 `STRING'.
5377 (variable): New nonterminal that takes an `ID' or a `STRING'.
5378 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5379 and %define uses.
5380 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5381 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5382 (%define errors): Update %define uses.
5383
5384 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5385
5386 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5387 instead of muscle_insert for %define values so that M4-special
5388 characters are replaced with digraphs.
5389 * tests/input.at (%define errors): Extend to check weird values.
5390
5391 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5392
5393 Instead of having skeletons declare all valid %define variables and
5394 %code qualifiers, provide macros that retrieve the associated values
5395 and build these lists automatically. Thus Bison will now warn when a
5396 variable or qualifier is not used by the skeleton in the current
5397 invocation regardless of whether it might sometimes be used by that
5398 skeleton in other invocations. Also, move all %define value macros to
5399 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5400 form, which is replaced by %code.
5401 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5402 (b4_check_user_names): ... this, and change the series of valid name
5403 arguments to a single list argument for names used in the skeleton
5404 similar to the existing list argument for names used in the grammar.
5405 Warn instead of complaining.
5406 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5407 values and %code code, to format %code code properly, and to build
5408 lists of all %define variables and %code qualifiers used in the
5409 skeleton: b4_skeleton_percent_define_variables and
5410 b4_skeleton_percent_code_qualifiers.
5411 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5412 Remove, and...
5413 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5414 the skeleton names lists can finish building first. In place of
5415 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5416 expect the lists b4_user_percent_define_variables and
5417 b4_user_percent_code_qualifiers.
5418 * data/c++.m4: Where setting default values for b4_parser_class_name,
5419 b4_location_type, b4_filename_type, b4_namespace, and
5420 b4_define_location_comparison, update their names to the
5421 b4_percent_define_ namespace.
5422 * data/glr.c: Don't use b4_check_percent_define_variables and
5423 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5424 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5425 (b4_parser_class_name, b4_namespace): Define these using
5426 b4_get_percent_define for parser_class_name and namespace.
5427 * data/location.cc: Use b4_get_percent_define.
5428 * data/push.c: Don't use b4_check_percent_define_variables and
5429 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5430 * data/yacc.c: Likewise, and don't call m4_exit in
5431 b4_use_push_for_pull_if or m4_wrap code will never execute.
5432 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5433 Rename to...
5434 (muscle_grow_user_name_list): ... this for consistency with the
5435 terminology used in bison.m4.
5436 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5437 %define variable names, and rename muscle used_percent_define_variables
5438 to user_percent_define_variables.
5439 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5440 user_percent_code_qualifiers.
5441 (content): Remove.
5442 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5443 {CODE} form is no longer accepted.
5444 * tests/input.at (Reject bad %code qualifiers): Rename to...
5445 (Reject unused %code qualifiers): ... this, and update test output.
5446 (%define error): Update test output.
5447
5448 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5449
5450 Check for unrecognized %define variables similar to checking for
5451 unrecognized %code qualifiers. Check for redefined %define variables.
5452 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5453 generalizes...
5454 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5455 (b4_check_percent_define_variables): New, also wraps it.
5456 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5457 variables using b4_check_percent_define_variables.
5458 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5459 all those exercised in the test suite and all those listed in the
5460 `Default values' section of c++.m4. Are there others?
5461 * data/push.c, data/yacc.c: Declare no valid %define variables.
5462 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5463 similar to muscle_find, but it works even when the muscle stores a
5464 const value.
5465 (muscle_grow_used_name_list): New function for constructing the used
5466 name list muscles that b4_check_for_unrecognized_names requires.
5467 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5468 %define'd more than once. Define the b4_used_percent_define_variables
5469 muscle with muscle_grow_used_name_list.
5470 (grammar_declaration): Abbreviate %code code with
5471 muscle_grow_used_name_list.
5472 * tests/input.at (%define errors): New.
5473
5474 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5475
5476 Provide warn_at, complain_at, and fatal_at function callbacks to the
5477 skeletons, and use this for %code qualifier complaints.
5478 * data/bison.m4 (b4_error_at): New, invoked by...
5479 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5480 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5481 @fatal_at(...@) directives.
5482 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5483 qualifiers in b4_used_percent_code_qualifiers and to use
5484 b4_complain_at.
5485 * src/location.c, src/location.h (boundary_set_from_string): New global
5486 function.
5487 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5488 function.
5489 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5490 to b4_used_percent_code_qualifiers.
5491 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5492 function.
5493 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5494 (lineno): Rename to...
5495 (out_lineno): ... this so I don't misunderstand it again.
5496 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5497 here; these newlines are in the input but not the output file.
5498 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5499 (at_directive_perform): ... this new static function, and add handling
5500 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5501 directives.
5502 * tests/input.at (Reject bad %code qualifiers): Update test output with
5503 locations and extend.
5504
5505 * tests/output.at (Output file name: [, Output file name: ]): Remove
5506 bogus comment about these tests failing.
5507
5508 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5509
5510 Clean up b4_check_percent_code_qualifiers a little.
5511 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5512 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5513 documentation and add examples.
5514 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5515 qualifiers here.
5516
5517 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5518
5519 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5520 unreliable -- especially when they're hidden inside another macro.
5521 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5522 data/c.m4: Remove m4_divert(-1).
5523 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5524 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5525 m4_divert_push(0) and m4_divert_pop(0).
5526 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5527 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5528 pushed and popped by m4sugar, should be first on the stack.
5529
5530 Provide warn, complain, and fatal function callbacks to the skeletons.
5531 This provides more flexibility than m4_fatal, improves the error
5532 message format, and captures messages for translation. Discussed
5533 starting at
5534 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5535 * data/bison.m4 (b4_error): New, invoked by...
5536 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5537 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5538 directives. Because these M4 macros might be called when the current
5539 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5540 the previous removal of uses of m4_divert, which caused trouble.
5541 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5542 m4_fatal to report unrecognized %code qualifiers.
5543 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5544 push parser requests.
5545 * data/glr.c: Use b4_complain instead of m4_fatal to report
5546 non-deterministic push parser requests.
5547 Update @output usage to @output(...@) form.
5548 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5549 report missing %defines. Update @output usage to @output(...@) form.
5550 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5551 @output(...@) form.
5552 * src/main.c (main): Invoke skel_scanner_free.
5553 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5554 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5555 obstack_for_string from flex-scanner.h.
5556 (YY_DECL): Use to declare skel_lex static.
5557 (decode_at_digraphs): Remove; now handled in the new
5558 SC_AT_DIRECTIVE_ARG start condition.
5559 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5560 functions.
5561 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5562 at_directive_argv): New static globals.
5563 (INITIAL): Use fail_for_invalid_at.
5564 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5565 recognize the start of a generalized `@directive(...@)' form and
5566 start...
5567 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5568 directive args (using the new obstack_for_string), to decode the
5569 contained @ diagraphs, and to perform the directive. It recognizes
5570 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5571 @output(...@).
5572 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5573 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5574 `@,'.
5575 (scan_skel): Initialize obstack_for_string on the first call.
5576 (skel_scanner_free): New function to free obstack_for_string.
5577 * tests/input.at (Reject bad %code qualifiers): Update test output.
5578
5579 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5580
5581 Consolidate the 4 prologue alternative directives (%code, %requires,
5582 %provides, and %code-top) into a single %code directive with an
5583 optional qualifier field. Discussed at
5584 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5585 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5586 alternatives.
5587 * doc/bison.texinfo (Prologue Alternatives): Update.
5588 (Decl Summary): Update to %code "requires" and %code "provides".
5589 (Calc++ Parser): Update to %code "requires".
5590 (Table of Symbols): Remove entries for %requires, %provides, and
5591 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5592 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5593 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5594 which are skeleton-specific.
5595 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5596 declare what %code qualifiers it supports and to complain if any other
5597 qualifiers were used in the grammar.
5598 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5599 and b4_user_code([b4_percent_code_provides]) in place of
5600 b4_user_requires and b4_user_provides.
5601 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5602 Add b4_user_code([b4_percent_code_top]) and
5603 b4_user_code([b4_percent_code]).
5604 Invoke b4_check_percent_code_qualifiers.
5605 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5606 PERCENT_REQUIRES): Remove.
5607 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5608 %requires. Rewrite the %code RHS as the unqualified form defining the
5609 muscle b4_percent_code. Add another RHS for the qualified %code form,
5610 which defines muscles of the form b4_percent_code_QUALIFIER and the
5611 b4_used_percent_code_qualifiers muscle.
5612 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5613 PERCENT_REQUIRES): Remove.
5614 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5615 %code "requires" and %code "provides".
5616 * tests/input.at (Reject bad %code qualifiers): New.
5617
5618 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5619
5620 Use the new code_props interface for destructors and printers.
5621 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5622 printer_location members, and change the type of the destructor and
5623 printer members to code_props.
5624 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5625 symbol_printer_get, semantic_type_destructor_set,
5626 semantic_type_printer_set, default_tagged_destructor_set,
5627 default_tagless_destructor_set, default_tagged_printer_set,
5628 default_tagless_printer_set): Use code_props in arguments and return
5629 types in place of char const * and location.
5630 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5631 since the locations are now contained in the return of
5632 symbol_destructor_get and symbol_printer_get.
5633 * src/output.c (symbol_destructors_output, symbol_printers_output):
5634 Replace with...
5635 (symbol_code_props_output): ... this to eliminate duplicate code.
5636 (output_skeleton): Update to use symbol_code_props_output.
5637 * src/reader.c (symbol_should_be_used): Update use of
5638 symbol_destructor_get.
5639 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5640 Update uses of the various _destructor_set and _printer_set functions.
5641 * src/symtab.c: (default_tagged_destructor_location,
5642 default_tagless_destructor_location, default_tagged_printer_location,
5643 default_tagless_printer_location): Remove since we...
5644 (default_tagged_destructor, default_tagless_destructor,
5645 default_tagged_printer, default_tagless_printer): ... change the type
5646 of these to code_props.
5647 (symbol_new, semantic_type_new, symbol_destructor_set,
5648 semantic_type_destructor_set, symbol_destructor_get,
5649 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5650 symbol_check_alias_consistency, default_tagged_destructor_set,
5651 default_tagless_destructor_set, default_tagged_printer_set,
5652 default_tagless_printer_set): Update.
5653 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5654 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5655 code_props members.
5656 (symbol_print): Use SYMBOL_CODE_PRINT.
5657
5658 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5659
5660 Use the new code_props interface for rule actions.
5661 * src/symlist.h (symbol_list): Replace action, action_location, and
5662 used members with a code_props action_props member.
5663 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5664 grammar_midrule_action, grammar_current_rule_merge_set,
5665 grammar_current_rule_symbol_append, packgram): Update.
5666 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5667 * src/scan-code.l (handle_action_dollar): Update.
5668 (translate_rule_action): Remove, no longer used.
5669 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5670
5671 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5672
5673 Use the new code_props interface in parse-gram.y.
5674 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5675 Update all uses of translate_* functions to use the new code_props
5676 interface and to use gram_scanner_last_string_free and
5677 code_scanner_last_string_free where possible.
5678 (grammar_declaration): symbol_list_destructor_set and
5679 symbol_list_printer_set now perform the translation, so don't do it
5680 here. Use gram_scanner_last_string_free where possible.
5681 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5682 translate_code): Remove, no longer used.
5683 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5684 symbol_list_printer_set): Perform code translation here rather than
5685 depending on the caller to do so.
5686
5687 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5688 * src/scan-gram.h (gram_last_string): Remove declaration.
5689 * src/scan-gram.l (last_string): Declare it static.
5690
5691 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5692
5693 Encapsulate code properties and related functionality for the various
5694 destructors, printers, and actions into a code_props structure and
5695 interface. This patch merely implements code_props in scan-code.h and
5696 scan-code.l. Future patches will rewrite other modules to use it.
5697 Discussed starting at
5698 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5699 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5700 consistently initialize const structs that have an empty location
5701 field.
5702 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5703 to ensure consistency.
5704 * src/scan-code.h (code_props): New structure.
5705 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5706 function, macro, and const global variable for initializing a
5707 code_props with no code.
5708 (code_props_plain_init, code_props_symbol_action_init,
5709 code_props_rule_action_init, code_props_translate_code): The rest of
5710 the new code_props functional interface. Among other things, the init
5711 functions set the code_props kind field so that
5712 code_props_translate_code will know whether to behave like
5713 translate_symbol_action, translate_rule_action, or translate_code.
5714 These old translate functions must remain until all other modules are
5715 updated to use the new code_props interface.
5716 (code_scanner_last_string_free): New function similar to
5717 gram_scanner_last_string_free.
5718 (code_scanner_free): Add documentation.
5719 * src/scan-code.l: Implement the new interface.
5720 (code_lex): Make it static, add a code_props* argument, and remove the
5721 rule argument.
5722 (last_string): New static global similar to the one in scan-gram.l.
5723 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5724 instead of rule.
5725 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5726 code_props since Bison may one day use this information for destructors
5727 and printers.
5728 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5729 (handle_action_dollar): Use symbol_list_n_get and set used flag
5730 directly since symbol_list_n_used_set is removed.
5731 (translate_action): Add a code_props* argument and remove the rule,
5732 action, and location arguments. Pass the code_props* on to code_lex.
5733 (translate_rule_action, translate_symbol_action, translate_code):
5734 Rewrite as wrappers around the new code_props interface.
5735 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5736 it would eventually need to break the encapsulation of code_props.
5737
5738 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5739
5740 * etc/.cvsignore: New.
5741
5742 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5743
5744 Add maintainer-push-check to run maintainer-check using push parsing in
5745 place of pull parsing where available.
5746 * Makefile.am (maintainer-push-check): New.
5747 * data/bison.m4 (b4_use_push_for_pull_if): New.
5748 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5749 appropriately based on their existing values.
5750 (yypush_parse): Don't print push-parser-specific diagnostics if push
5751 parsing is being used in place of pull parsing.
5752 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5753 push.c.
5754 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5755 variable, and insert b4_use_push_for_pull_flag into muscles.
5756 * tests/Makefile.am (maintainer-push-check): New.
5757
5758 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5759
5760 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5761 (whether successful or failed) so that yypush_parse can be invoked
5762 again to start a new parse using the same yypstate.
5763 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5764 check multiple yypull_parse invocations on the same yypstate. For pull
5765 mode, extend to check multiple yyparse invocations.
5766 (Exploding the Stack Size with Alloca): Extend to try with
5767 %push-pull-parser.
5768 (Exploding the Stack Size with Malloc): Likewise.
5769
5770 * tests/calc.at (Simple LALR Calculator): Don't specify
5771 %skeleton "push.c" since %push-pull-parser implies that now.
5772 * tests/headers.at (export YYLTYPE): Don't check for the push
5773 declarations. Otherwise, this test case can't be used to see if push
5774 mode can truly emulate pull mode.
5775 * tests/input.at (Torturing the Scanner): Likewise.
5776 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5777 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5778 AT_YACC_IF, which now includes the case of push mode since %skeleton
5779 need not be used for push mode. This will be more intuitive once
5780 push.c is renamed to yacc.c.
5781
5782 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5783
5784 For push mode, convert yyparse from a macro to a function, invoke yylex
5785 instead of passing a yylexp argument to yypull_parse, and don't
5786 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5787 Discussed starting at
5788 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5789 * data/bison.m4 (b4_pull_if): New.
5790 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5791 * data/push.c: Improve M4 quoting a little.
5792 (b4_generate_macro_args, b4_parenthesize): Remove.
5793 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5794 any time a pull parser is requested.
5795 Don't #define this as a wrapper around yypull_parse. Instead, when
5796 both push and pull are requested, make it a function that does that
5797 same thing.
5798 (yypull_parse): If there's a b4_prefix, #define this to
5799 b4_prefix[pull_parse] when both push and pull are requested.
5800 Don't define this as a function unless both push and pull are
5801 requested.
5802 Remove the yylexp argument and hard-code yylex invocation instead.
5803 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5804 %push-parser.
5805 * src/getargs.c (pull_parser): New global initialized to true.
5806 * getargs.h (pull_parser): extern it.
5807 * src/output.c (prepare): Insert pull_flag muscle.
5808 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5809 (prologue_declaration): Set both push_parser and pull_parser = true for
5810 %push-pull-parser. Set push_parser = true and pull_parser = false for
5811 %push-parser.
5812 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5813 %push-parser since there's no backward-compatibility concern here.
5814 Scan %push-pull-parser.
5815 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5816 instead of %push-parser.
5817 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5818 prototype it in the module that calls yyparse.
5819 * tests/input.at (Torturing the Scanner): Likewise.
5820 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5821
5822 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5823
5824 Update etc/bench.pl. Optimize push mode a little (the yyn change
5825 deserves most of the credit).
5826 * Makefile.am (SUBDIRS): Add etc subdirectory.
5827 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5828 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5829 yytoken, yyval, and yyloc declarations to...
5830 (yyparse or yypush_parse): ... here to improve performance. For
5831 yypush_parse invocations after the first, be sure to assign yyn its old
5832 value again.
5833 (yypstate_new): Don't bother initializing the yyresult field since the
5834 initial value isn't used.
5835 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5836 remove the #define that, in push mode, set it to yyps->NAME.
5837 * etc/Makefile.am: New.
5838 * etc/bench.pl: Remove and build it instead from...
5839 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5840 "tests/bison" from the build directory by default rather than just
5841 invoking "bison" from $PATH.
5842 (calc_grammar): Update push parser code: don't declare yylval globally,
5843 don't define yyparse_wrapper, and don't #define yyparse.
5844 (bench_grammar): Update to check all working combinations of yacc.c,
5845 push.c, impure, pure, pull, and push.
5846
5847 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5848
5849 For push mode, add pull wrappers around yypush_parse.
5850 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5851 (yypull_parse): New function wrapping yypush_parse.
5852 (yyparse): New #define wrapping yypull_parse.
5853 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5854 is declared.
5855 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5856 prototype yylex in the module that calls yyparse, and don't prototype
5857 yyparse there. Otherwise, the yyparse expansion won't compile.
5858 * tests/input.at (Torturing the Scanner): Likewise.
5859
5860 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5861
5862 Enable push parsers to operate in impure mode. Thus, %push-parser no
5863 longer implies %pure-parser. The point of this change is to move
5864 towards being able to test the push parser code by running the entire
5865 test suite as if %push-parser had been declared.
5866 * data/push.c (yypush_parse): For impure mode, remove the
5867 yypushed_char, yypushed_val, and yypushed_loc arguments.
5868 Instead, declare these as local variables initialized to the global
5869 yychar, yylval, and yylloc.
5870 For the first yypush_parse invocation only, restore the initial values
5871 of these global variables when it's time to read a token since they
5872 have been overwritten.
5873 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5874 %push-parser.
5875 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5876 %pure-parser along with %push-parser since this test case was designed
5877 for pure push parsers.
5878 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5879 (AT_YACC_OR_PUSH_IF): New.
5880 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5881 add a note that it's still wrong for some cases (as it has been for a
5882 while).
5883 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5884 %push-parser no longer implies %pure-parser.
5885
5886 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5887
5888 Remove some unnecessary differences between the pull parser code and
5889 the push parser code. This patch enables yynerrs in push mode.
5890 * data/push.c: Reformat M4 a little.
5891 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5892 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5893 because push mode is on. Instead, if pure mode is on, move yynerrs
5894 to...
5895 (b4_declare_parser_state_variables): ... here.
5896 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5897 to yyps->NAME so it can be used in yypush_parse.
5898 (yypush_parse): Don't omit uses of yynerrs in push mode.
5899
5900 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5901
5902 Fix bug such that the first pushed token's value and location are
5903 sometimes overwritten (sometimes by %initial-action) before being used.
5904 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5905 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5906 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5907 more closely mimic the pull parser logic.
5908 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5909 time to read a token, which is after any initialization of yylval and
5910 yylloc.
5911 (gottoken): Rename label to...
5912 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5913 user namespace.
5914
5915 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5916
5917 Rearrange initialization of the parser state variables so that the
5918 skeleton doesn't have to have a copy for pull mode and another for push
5919 mode. This patch also fixes at least a bug such that yylloc was not
5920 initialized (with b4_location_initial_line and
5921 b4_location_initial_column) upon calling yypush_parse. However, that
5922 initialization now overwrites the first token's location;
5923 %initial-action assigning @$ already did the same thing, and both bugs
5924 will be fixed in a later patch.
5925 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5926 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5927 yyss, yyvs, yyls, and yystacksize.
5928 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5929 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5930 yylsp.
5931 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5932 yyps->NAME so it can be used in yypush_parse.
5933 (yyparse or yypush_parse): For yypush_parse, don't print the
5934 "Starting parse" diagnostic for invocations after the first.
5935 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5936 yypush_parse, only do it for the first invocation.
5937 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5938 initialization to occur in yypush_parse but only on the first
5939 invocation.
5940
5941 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5942
5943 * data/push.c: Add CPP guards around push parser declarations in both
5944 the header and the code file.
5945 In the code file, move the push parser declarations to the same place
5946 they appear in the header file.
5947 Clean up the M4 some, especially the inconsistent underquoting in
5948 some b4_c_function_def and b4_c_function_decl uses.
5949
5950 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5951
5952 Encapsulate the push parser state variables into an M4 macro so the
5953 push skeleton doesn't have to list them again for pull mode's yyparse.
5954 For push mode, remove yypush_parse's local equivalents of these
5955 variables to eliminate unnecessary copying between the two sets at
5956 run-time. This patch also fixes at least a bug related to multiple
5957 %initial-action invocations in push mode.
5958 * data/push.c (b4_declare_parser_variables): Rename to...
5959 (b4_declare_scanner_communication_variables): ... this for clarity and
5960 update both uses.
5961 (b4_declare_yyparse_variables): Remove and move its contents to the one
5962 spot where it was invoked.
5963 (b4_declare_parser_state_variables): New macro containing the parser
5964 state variables required by push mode.
5965 (struct yypstate): Replace all fields but yynew with
5966 b4_declare_parser_state_variables.
5967 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5968 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5969 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5970 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5971 parser state variable declarations with
5972 b4_declare_parser_state_variables.
5973 Don't initialize parser state variables when calling yypush_parse since
5974 yypstate_new already does that.
5975 Invoke the user's initial action only upon the first yypush_parse
5976 invocation.
5977 Remove all code that copies between the local parser state variables
5978 and the yypstate.
5979
5980 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5981
5982 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5983 prevent a name collision in a future patch where these names will
5984 sometimes be #define'd.
5985 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5986 since it no longer has the same name as the existing argument.
5987 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5988
5989 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5990 and Joel E. Denny <jdenny@ces.clemson.edu>
5991
5992 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5993 that the argument is case-insensitive, and there's no `=' here.
5994 For the %skeleton entry, mention that %language is better.
5995 (Bison Options): Likewise for --language and --skeleton. Move the
5996 --skeleton entry so that the `Tuning the parser' section is sorted
5997 alphabetically on long options.
5998 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5999 %language directive in detail here; cross-reference the %language
6000 documentation instead.
6001 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6002 `%require "2.3b"' so that the example is always up-to-date.
6003 (Table of Symbols): Add entries for %language and %skeleton.
6004 * examples/extexi (normalize): Instead of replacing every %require
6005 argument with the current Bison version, just substitute for
6006 `@value{VERSION}'. This guarantees that we're testing what actually
6007 appears in the documentation.
6008 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6009 rather than `@VERSION@'.
6010
6011 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6012
6013 * NEWS: Reword the %language news a bit, and put it earlier.
6014
6015 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6016 Rewrite to simplify the logic.
6017 (language_argmatch): Likewise.
6018 (program_name): We now own this var.
6019 * src/getargs.h (struct bison_language): Use char[] rather than
6020 const char *.
6021
6022 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6023 Java is supported.
6024 * src/complain.c (program_name): Remove decl; no longer needed.
6025 * src/main.c (program_name): Remove; now belongs to getargs.
6026
6027 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6028
6029 * NEWS: Document %language.
6030
6031 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6032
6033 * data/c-skel.m4, data/c++-skel.m4: New files.
6034 * data/glr.c: Complain on push parsers.
6035
6036 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6037 over %skeleton.
6038 (Decl Summary): Document %language and %skeleton.
6039 (Command line): Document -L.
6040
6041 * examples/extexi: Rewrite %require directive.
6042 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6043
6044 * src/files.c (compute_exts_from_gc): Look in language structure
6045 for .y extension.
6046 (compute_file_name_parts): Check whether .tab should be added.
6047 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6048 (language, skeleton_arg, language_argmatch): New.
6049 (long_options): Add --language.
6050 (getargs): Use skeleton_arg, add -L/--language.
6051 * src/getargs.h: Include location.h.
6052 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6053 * src/output.c (prepare): Pick default skeleton from struct language.
6054 Don't dispatch C skeletons here.
6055 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6056 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6057 * src/scan-gram.l ("%language"): New rule.
6058
6059 * tests/calc.at: Test %skeleton and %language.
6060 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6061 (AT_GLR_IF): Look for %skeleton "glr.cc".
6062 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6063 (AT_YACC_IF): Reject %language.
6064
6065 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6066
6067 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6068 since it wasn't used; only the typedef name 'semantic_type' is needed.
6069 Also, omit trailing white space.
6070
6071 * bootstrap: Sync from coreutils.
6072 (gnulib_extra_files): Add build-aux/announce.gen.
6073 (slurp): Adjust .gitignore files like .cvsignore files.
6074 * build-aux/announce-gen: Remove from CVS, since bootstrap
6075 now creates this.
6076
6077 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6078
6079 Make %push-parser imply %pure-parser. This fixes several bugs; see
6080 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6081 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6082 pure_parser = true.
6083 * data/push.c: Don't bother testing b4_push_if when deciding whether
6084 to expand b4_declare_parser_variables globally.
6085 (yypush_parse): Likewise in here.
6086
6087 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6088 (yy_reduce_print): Reformat M4 for readability.
6089
6090 2006-12-15 Bob Rossi <bob@brasko.net>
6091 and Joel Denny <jdenny@ces.clemson.edu>
6092
6093 * data/push.c (yypstate): Add typedef, and update all uses of
6094 struct yypstate to just yypstate.
6095 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6096
6097 2006-12-14 Bob Rossi <bob@brasko.net>
6098
6099 * data/push.c (yypush_parse): Declare prototype regardless of
6100 %locations option.
6101
6102 2006-12-14 Bob Rossi <bob@brasko.net>
6103
6104 * data/push.c (yyparse): Remove the prototype and the #define when in
6105 push-parser mode.
6106
6107 2006-12-13 Bob Rossi <bob@brasko.net>
6108
6109 * data/push.c (yypstate_init): Rename to...
6110 (yypstate_new): ... this and use b4_c_function_def.
6111 (yypstate_delete): New.
6112 (yypush_parse): Change parameters yynval and yynlloc to be const.
6113 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6114 yypstate_delete functions.
6115
6116 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6117
6118 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6119 strange test case titles. Reported by Bob Rossi.
6120
6121 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6122
6123 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6124 of potential ambiguities in GLR grammers.
6125
6126 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6127
6128 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6129 `bison ', use m4_index instead of m4_substr since chopping up a string
6130 containing M4-special characters causes problems here.
6131
6132 Fix a couple of bugs related to special characters in user-specified
6133 file names, and make it easier for skeletons to compute output file
6134 names with the same file name prefix as Bison-computed output file
6135 names.
6136 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6137 b4_parser_file_name and b4_spec_defines_file instead of
6138 @output_parser_name@ and @output_header_name@, which are now redundant.
6139 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6140 b4_parser_file_name, b4_spec_defines_file, and the new
6141 @basename(FILENAME@) instead of @output_parser_name@ and
6142 @output_header_name@, which inappropriately escaped the file names as
6143 C string literals.
6144 * src/files.c (all_but_ext): Remove static qualifier.
6145 (compute_output_file_names): Move `free (all_but_ext)' to...
6146 (output_file_names_free): ... here since all_but_ext is needed later.
6147 * src/files.h (all_but_ext): Extern.
6148 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6149 exactly what MUSCLE_INSERT_STRING used to do.
6150 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6151 characters are escaped properly.
6152 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6153 all_but_ext.
6154 For pkgdatadir muscle, maintain previous functionality by using
6155 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6156 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6157 digraphs would never be expanded. Hopefully no one has M4-special
6158 characters in his Bison installation path.
6159 * src/scan-skel.l: Don't parse @output_header_name@ and
6160 @output_parser_name@ anymore since they're now redundant.
6161 In @output, use decode_at_digraphs.
6162 Parse a new @basename command that invokes last_component.
6163 (decode_at_digraphs): New.
6164 (BASE_QPUTS): Remove unused.
6165 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6166 (Output file name): New tests.
6167
6168 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6169
6170 Warn about output files that are generated by the skeletons and that
6171 conflict with other output files.
6172 * data/glr.c: Don't generate the header file here when glr.cc does.
6173 * src/files.c (file_names, file_names_count): New static globals.
6174 (compute_output_file_names): Invoke output_file_name_check for files
6175 not generated by the skeletons and remove existing checks.
6176 (output_file_name_check): New function that warns about conflicting
6177 output file names.
6178 (output_file_names_free): Free file_names.
6179 * src/files.h (output_file_name_check): Declare.
6180 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6181 the skeletons.
6182 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6183 (Conflicting output files): New tests.
6184
6185 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6186
6187 * doc/bison.texinfo: Fix a couple of typos.
6188
6189 2006-12-08 Bob Rossi <bob@brasko.net>
6190
6191 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6192 Rename to...
6193 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6194 update all uses.
6195 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6196 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6197 local pv.
6198 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6199 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6200
6201 2006-12-07 Bob Rossi <bob@brasko.net>
6202 and Joel Denny <jdenny@ces.clemson.edu>
6203
6204 * data/push.c (yypvarsinit): Change return type from void* to struct
6205 yypvars*. No longer cast to void* on return.
6206 (struct yypvars): Remove yylen since it need not be remembered between
6207 yypushparse invocations.
6208 (yypushparse): Don't copy between yylen and pv->yylen.
6209
6210 2006-12-05 Bob Rossi <bob@brasko.net>
6211
6212 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6213 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6214 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6215 (struct yypvars): Remove b4_declare_parser_variables.
6216 (yypvarsinit): Remove init code for removed variables.
6217 (global scope): Do not declare b4_declare_parser_variables if
6218 push or pure mode.
6219 (yypushparse): Add b4_declare_parser_variables.
6220 Init new local variables, and remove init code for removed
6221 yypvars variables.
6222 (yyparse): Delete.
6223 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6224 and yyparse for other modes.
6225 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6226 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6227 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6228 (AT_PURE_LEX_IF): True if pure or push parser.
6229
6230 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6231
6232 Document Yacc prologue alternatives and default %destructor's and
6233 %printer's as experimental. Don't mention Java yet. Discussed at
6234 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6235 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6236 (2.3a): Annotate this entry to say the old forms of these features were
6237 also experimental.
6238 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6239 Table of Symbols): Say they're experimental. Comment out any mention
6240 of Java (we'll want this back eventually).
6241
6242 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6243
6244 Support a file name argument to %defines. Deprecate `=' in
6245 %file-prefix, %name-prefix, and %output. Discussed at
6246 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6247 * NEWS (2.3a+): Mention.
6248 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6249 form of %defines, and remove `=' from entries for %file-prefix,
6250 %name-prefix, and %output.
6251 * src/parse-gram.y (prologue_declaration): Implement.
6252 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6253 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6254 all but one occurrence of %name-prefix.
6255 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6256 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6257 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6258 occurrence of each of %file-prefix and %output. Add check for %defines
6259 with argument.
6260 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6261 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6262 Remove the `=' from %output.
6263
6264 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6265
6266 Don't escape $ in test case titles since Autoconf 2.61 now does that
6267 correctly.
6268 * tests/actions.at (Default %printer and %destructor are not for error
6269 or $undefined): Here.
6270 (Default %printer and %destructor are not for $accept): Here.
6271 * tests/input.at (Invalid $n and @n): Here.
6272
6273 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6274
6275 Rename <!> to <>. Discussed starting at
6276 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6277 * NEWS (2.3a+): Update.
6278 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6279 Update.
6280 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6281 * src/scan-gram.l (INITIAL): Implement.
6282 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6283 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6284 comment.
6285 * tests/actions.at (Default tagless %printer and %destructor,
6286 Default tagged and per-type %printer and %destructor,
6287 Default %printer and %destructor are not for error or $undefined,
6288 Default %printer and %destructor are not for $accept,
6289 Default %printer and %destructor for mid-rule values): Update.
6290 * tests/input.at (Default %printer and %destructor redeclared,
6291 Unused values with default %destructor): Update.
6292
6293 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6294
6295 Don't let %prec take a nonterminal.
6296 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6297 token.
6298 * tests/input.at (%prec takes a token): New test checking that %prec
6299 won't take a nonterminal.
6300
6301 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6302
6303 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6304 it was double-quoted.
6305 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6306 grammar is maintained with Bison's highest standards.
6307 * src/getargs.c: Fix some typos in Doxygen comments.
6308
6309 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6310
6311 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6312 later. Reported by Paul Eggert in
6313 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6314 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6315 * src/scan-code.l (translate_action): Don't bother invoking
6316 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6317 (code_scanner_free): Instead of invoking
6318 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6319 which frees more.
6320 * src/scan-gram.l (gram_scanner_free): Likewise.
6321 * src/scan-skel.l (scan_skel): Likewise.
6322
6323 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6324
6325 * src/files.c (tr): Change return type to void.
6326 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6327 has been called previously for the same key.
6328 (muscle_find): Return storage instead of value so that
6329 --enable-gcc-warnings doesn't produce warnings that the return discards
6330 const. aver that the value and storage are the same since storage
6331 could potentially be NULL when value is not.
6332 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6333 same as 0.
6334
6335 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6336
6337 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6338 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6339 us a slightly cleaner distribution, and also works.
6340 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6341 gnulib changes.
6342
6343 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6344 and Paul Eggert <eggert@cs.ucla.edu>
6345
6346 Don't let Bison leak memory except when it complains.
6347 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6348 (spec_defines_file, dir_prefix): Now char *, not const char *,
6349 since they are freed.
6350 * src/files.c: Likewise.
6351 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6352 Likewise.
6353 (tr): Now operates in-place. All uses changed.
6354 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6355 values.
6356 (compute_file_name_parts, compute_output_file_names): Don't store
6357 read-only data in variables that will be freed.
6358 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6359 src_extension, and header_extension.
6360 (output_file_names_free): New public function to free
6361 spec_verbose_file, spec_graph_file, spec_defines_file,
6362 parser_file_name, and dir_prefix.
6363 * src/getargs.c (getargs): Don't store read-only data in variables that
6364 will be freed.
6365 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6366 (which previously existed but was unused), and quotearg_free.
6367 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6368 * src/muscle_tab.c: Likewise.
6369 (muscle_entry): Make the value char const *,
6370 and add a new storage member that is char * and can be freed.
6371 (muscle_entry_free): New private function.
6372 (muscle_init): Use it instead of free.
6373 (muscle_insert, muscle_grow): Update and use new storage member.
6374 (muscle_code_grow): Free the string passed to muscle_grow
6375 since it's not needed anymore.
6376 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6377 add a new `char *code' member.
6378 ("{...}"): Declare semantic type as code.
6379 * src/scan-code.h (translate_rule_action):
6380 (translate_symbol_action, translate_code, translate_action): Return
6381 `char const *' rather than `char *' since external code should not free
6382 these strings.
6383 * src/scan-code.l: Likewise.
6384 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6385 which is "{...}" in the parser.
6386 * tests/Makefile.am (maintainer-check-valgrind): Set
6387 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6388 Valgrind.
6389 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6390 complain.
6391 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6392 expecting a non-zero exit status sets --leak-check=summary and
6393 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6394 this case, and we don't want to hear about it.
6395
6396 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6397
6398 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6399 instead of from the template, to simplify configuration a bit.
6400 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6401 and m4/wint_t.m4, as they are needed with the latest gnulib.
6402
6403 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6404
6405 Disable unset/unused mid-rule value warnings by default, and recognize
6406 --warnings=midrule-values to enable them. Discussed starting at
6407 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6408 * NEWS (2.3a+): Mention.
6409 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6410 warnings): Add entry for midrule-values subargument.
6411 * src/reader.c (symbol_should_be_used): Don't return true just because
6412 the value is a set/used mid-rule value unless
6413 --warnings=midrule-values was specified.
6414 * tests/input.at (Unused values, Unused values before symbol
6415 declarations): Run tests with and without --warnings=midrule-values.
6416
6417 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6418 than LIST_FREE directly.
6419
6420 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6421
6422 Finish implementing --warnings=error, which should not be implied by
6423 --warnings=all (or by its synonyms -W and --warnings without
6424 subarguments).
6425 * src/complain.c (set_warning_issued): New function to report that
6426 warnings are being treated as errors and to record an error if so.
6427 Invoke...
6428 (warn_at, warn): ... here.
6429 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6430 "error - warnings are errors" does not appear above "all - all of the
6431 above".
6432 (getargs): For -W and --warnings without subarguments, don't let
6433 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6434 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6435
6436 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6437
6438 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6439 empty subargument list. For example: `bison --warnings= parser.y'.
6440
6441 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6442
6443 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6444 the parser header file so that gcc doesn't warn.
6445
6446 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6447
6448 Split the default %destructor/%printer into two kinds: <*> and <!>.
6449 Discussed starting at
6450 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6451 * NEWS (2.3a+): Mention.
6452 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6453 previous change today related to mid-rules.
6454 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6455 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6456 (TYPE_TAG_ANY): Add as <*>.
6457 (TYPE_TAG_NONE): Add as <!>.
6458 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6459 for <*> and <!>.
6460 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6461 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6462 * src/symlist.c (symbol_list_default_new): Split into tagged and
6463 tagless versions.
6464 (symbol_list_destructor_set, symbol_list_printer_set): Split
6465 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6466 SYMLIST_DEFAULT_TAGLESS.
6467 * src/symlist.h: Update symbol_list_default*_new prototypes.
6468 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6469 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6470 * src/symtab.c (default_destructor, default_destructor_location,
6471 default_printer, default_printer_location): Split each into tagged and
6472 tagless versions.
6473 (symbol_destructor_get, symbol_destructor_location_get,
6474 symbol_printer_get, symbol_printer_location_get): Implement tagged
6475 default and tagless default cases.
6476 (default_destructor_set, default_printer_set): Split each into tagged
6477 and tagless versions.
6478 * src/symtab.h: Update prototypes.
6479 * tests/actions.at (Default %printer and %destructor): Rename to...
6480 (Default tagless %printer and %destructor): ... this, and extend.
6481 (Per-type %printer and %destructor): Rename to...
6482 (Default tagged and per-type %printer and %destructor): ... this, and
6483 extend.
6484 (Default %printer and %destructor for user-defined end token): Extend.
6485 (Default %printer and %destructor are not for error or $undefined):
6486 Update.
6487 (Default %printer and %destructor are not for $accept): Update.
6488 (Default %printer and %destructor for mid-rule values): Extend.
6489 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6490 (Unused values with default %destructor): Extend.
6491
6492 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6493
6494 Don't apply the default %destructor/%printer to an unreferenced midrule
6495 value. Mentioned at
6496 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6497 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6498 like $@n instead of just @n so that the default %destructor/%printer
6499 logic doesn't see them as user-defined symbols.
6500 (symbol_is_dummy): Check for both forms of the name.
6501 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6502 name for which the midrule value is referenced in any action.
6503 * tests/actions.at (Default %printer and %destructor for mid-rule
6504 values): New test.
6505 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6506 for change to dummy symbol names.
6507
6508 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6509
6510 Warn about unset midrule $$ if the corresponding $n is used.
6511 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6512 $n usage.
6513 (packgram): Before invoking grammar_rule_check on any rule, make sure
6514 all actions have already been scanned in order to set `used' flags.
6515 Otherwise, checking that a midrule's $$ is set will not always work
6516 properly because the midrule check must forward-reference the midrule's
6517 parent rule.
6518 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6519 warning.
6520
6521 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6522
6523 More improvements to the documentation of the prologue alternatives:
6524 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6525 Bison manual.
6526 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6527 some text to clarify the relative importance of the new directives and
6528 to show how these directives may be viewed as code labels.
6529
6530 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6531
6532 Similar to the recently removed %before-header, add %code-top as the
6533 alternative to the pre-prologue. Mentioned at
6534 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6535 Also, let the prologue alternatives appear in the grammar section.
6536 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6537 (prologue_declaration): Move the existing prologue alternatives to...
6538 (grammar_declaration): ... here and add %code-top.
6539 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6540
6541 Clean up and extend documentation for the prologue alternatives.
6542 * NEWS (2.3a+): Describe prologue alternatives.
6543 * doc/bison.texinfo (Prologue): Move discussion of prologue
6544 alternatives to...
6545 (Prologue Alternatives): ... this new section, and extend it to discuss
6546 all 4 directives in detail.
6547 (Table of Symbols): Clean up discussion of prologue alternatives and
6548 add %code-top.
6549
6550 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6551
6552 DJGPP specific issues.
6553
6554 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6555 config.bat accordingly.
6556 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6557 * djgpp/config.site: Likewise.
6558
6559 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6560
6561 Replace %*-header with %provides, %requires, %code. See discussion at
6562 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6563
6564 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6565 (b4_user_start_header): Remove.
6566 * data/glr.c: Use new macros instead of b4_*start_header
6567 and b4_*end_header.
6568 * data/glr.cc: Likewise.
6569 * data/lalr1.cc: Likewise.
6570 * data/push.c: Likewise.
6571 * data/yacc.c: Likewise.
6572
6573 * doc/bison.texinfo: Remove %before-header, rename
6574 %{start,end,after}-header to %requires, %provides, %code.
6575
6576 * src/parse-gram.y: Likewise (also rename token names accordingly).
6577 * src/scan-gram.l: Likewise.
6578 * tests/actions.at: Likewise.
6579
6580 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6581
6582 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6583 Problem reported by Joel E. Denny.
6584
6585 2006-10-14 Jim Meyering <jim@meyering.net>
6586
6587 (Sync from coreutils.)
6588 Work also when the working directory (with e.g. coreutils sources)
6589 is version controlled with git, rather than CVS.
6590 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6591 rather than CVS.
6592 In messages and comments, say e.g., "checked-out sources",
6593 rather than "CVS sources".
6594 (version_controlled_file): New function. Work for git as well as
6595 for CVS. Don't use grep's -q option.
6596 (slurp): Call it here, in place of CVS-specific code.
6597
6598 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6599
6600 Fix testsuite for ./configure --enable-gcc-warnings:
6601 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6602 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6603 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6604 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6605 * test/regression.at (Diagnostic that expects two alternatives):
6606 Likewise.
6607
6608 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6609
6610 * bootstrap.conf (gnulib_modules): Add config-h.
6611 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6612 worry about HAVE_CONFIG_H.
6613 * lib/abitset.c: Likewise.
6614 * lib/bitset.c: Likewise.
6615 * lib/bitset_stats.c: Likewise.
6616 * lib/bitsetv-print.c: Likewise.
6617 * lib/bitsetv.c: Likewise.
6618 * lib/ebitset.c: Likewise.
6619 * lib/get-errno.c: Likewise.
6620 * lib/lbitset.c: Likewise.
6621 * lib/subpipe.c: Likewise.
6622 * lib/timevar.c: Likewise.
6623 * lib/vbitset.c: Likewise.
6624 * lib/bitset.c: Include "bitset.h" first, to test interface.
6625 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6626 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6627 * lib/bitsetv.c: Include "bitsetv.h" first.
6628 * lib/get-errno.c: Include "get-errno.h" first.
6629 * m4/.cvsignore: Add config-h.m4.
6630 * tests/actions.at (Default %printer and %destructor for ...):
6631 Adjust expected line numbers in output to reflect removal of #if
6632 HAVE_CONFIG_H lines.
6633 * tests/glr-regression.at (Missed %merge type warnings when ...):
6634 Likewise.
6635 * tests/regression.at (Braced code in declaration in rules section):
6636 Likewise.
6637 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6638 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6639 Include <config.h> unconditionally.
6640
6641 * bootstrap: Sync from coreutils, as follows:
6642
6643 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6644
6645 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6646 variable was sometimes used without being initialized. This
6647 messed up the installation of the INSTALL file in some cases.
6648
6649 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6650
6651 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6652 --copy. Inspired by a suggestion from Bruno Haible.
6653
6654 2006-10-03 Jim Meyering <jim@meyering.net>
6655
6656 * bootstrap: Undo last change to this file, since now gnulib-tool
6657 sticks with the automake default in generating dependencies.
6658
6659 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6660
6661 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6662 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6663
6664 * doc/bison.1: Add copyright notice.
6665
6666 * data/glr.c: Don't include <stdarg.h>; not used.
6667
6668 * NEWS: The -g and --graph options now output graphs in Graphviz
6669 DOT format, not VCG format.
6670 * doc/bison.1: Likewise.
6671 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6672 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6673 of this change in
6674 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6675 * TODO: Remove Graphviz entry.
6676 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6677 remove vcg.c, vcg.h, vcg_defaults.h.
6678 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6679 * src/graphviz.c, src/graphviz.h: New files.
6680 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6681 * src/files.h: Make comment more generic.
6682 * src/main.c (main): Likewise.
6683 * src/print_graph.h: Likewise.
6684 * src/getargs.c (usage): Make usage description more generic.
6685 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6686 (static_graph, fgraph): Remove. All uses changed to pass
6687 arguments instead of sharing a static var.
6688 (print_core, print_actions, print_state, print_graph):
6689 Output graphviz format rather than VCG format.
6690 * tests/.cvsignore: Remove *.vcg; add *.dot.
6691 * tests/output.at: Expect *.dot files, not *.vcg files.
6692
6693 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6694 accommodates the 2006-10-08 change.
6695
6696 2006-10-11 Bob Rossi <bob@brasko.net>
6697
6698 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6699 (b4_yyssa, b4_yyerror_range): New macros.
6700 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6701 (yypvarsinit): Remove init of removed fields.
6702 (yypushparse): Remove use of removed fields; use new macros instead.
6703
6704 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6705
6706 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6707 in a push parser. Reindent slightly to match yacc.c better.
6708
6709 2006-10-11 Bob Rossi <bob@brasko.net>
6710
6711 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6712 yymsg_alloc fields.
6713 (yypvarsinit, yypushparse): Remove init of removed fields.
6714 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6715
6716 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6717
6718 * THANKS: Add Paolo Bonzini and Bob Rossi.
6719
6720 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6721
6722 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6723 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6724 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6725 b4_define_user_cde and uses): Remove.
6726 (b4_comment, b4_prefix, b4_sync_start): New.
6727 * data/bison.m4: New file, with most of the content removed from c.m4.
6728 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6729 * src/output.c (output_skeleton): Pass bison.m4.
6730 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6731 only if specified.
6732
6733 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6734
6735 Fix test failure reported by Tom Lane in
6736 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6737 and try to make such failures easier to catch in the future.
6738 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6739 that's now the caller's responsibility.
6740 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6741 Set yychar = YYEOF if it's negative.
6742 * tests/actions.at (yylex): Abort if asked to read past EOF.
6743 * tests/conflicts.at (yylex): Likewise.
6744 * tests/cxx-type.at (yylex): Likewise.
6745 * tests/glr-regression.at (yylex): Likewise.
6746 * tests/input.at (yylex): Likewise.
6747 * tests/regression.at (yylex): Likewise.
6748 * tests/torture.at (yylex): Likewise.
6749
6750 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6751
6752 Fix problems with translating English-language diagnostics.
6753 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6754 respect to bison-runtime pot generation. The YY_ stuff
6755 wasn't being captured.
6756 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6757 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6758 * runtime-po/POTFILES.in: Add data/push.c.
6759
6760 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6761
6762 Merge bootstrap changes from coreutils.
6763
6764 2006-09-28 Jim Meyering <jim@meyering.net>
6765
6766 Automatically generated dependencies are important even
6767 when all of the sources in a directory come from gnulib.
6768 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6769 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6770
6771 2006-09-23 Jim Meyering <jim@meyering.net>
6772
6773 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6774
6775 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6776
6777 * bootstrap: Add support for --force.
6778 (usage): New function. Describe usage less tersely.
6779 (CVS_only_file): New var.
6780
6781 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6782
6783 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6784 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6785 Adjust white space and comments to match GNU style better.
6786
6787 2006-09-20 Bob Rossi <bob@brasko.net>
6788
6789 * data/push.c (yyresult_get): Remove function.
6790 (YYPUSH_MORE): Add #define.
6791 (yypushparse): Modify return value.
6792
6793 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6794
6795 * stamp-h.in: Remove; no longer needed.
6796 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6797 Remove config.h, config.hin, intl (no longer created).
6798 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6799 stamp-h1.
6800
6801 Sync bootstrap from coreutils, as follows:
6802
6803 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6804
6805 * bootstrap (symlink_to_gnulib): New function.
6806 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6807 to copies-of-gnulib.
6808 (cp_mark_as_generated, slurp, gnulib_files):
6809 Avoid making a copy if it's the same as the old version.
6810 (gnulib_files): Add support for this variable (used by Bison).
6811
6812 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6813
6814 * src/getargs.c (usage): Rework to use conventions similar to
6815 coreutils, to make translation a bit easier and the code a bit
6816 smaller. Problem reported by Tim Van Holder.
6817
6818 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6819
6820 Use some of gnulib's new modules, taken from coreutils.
6821
6822 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6823 * bootstrap.conf: New file.
6824 (gnulib_modules): Add configmake, inttypes, unistd.
6825 (XGETTEXT_OPTIONS): Add complain, complain_at,
6826 fatal, fatal_at, warn, warn_at, unexpected_end.
6827 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6828 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6829 (gl_EARLY): Add.
6830 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6831 (gl_INIT): Add
6832 (GNULIB_AUTOCONF_SNIPPET): Remove.
6833 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6834 the pickiest.
6835 * lib/.cvsignore: Add inttypes_.h.
6836 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6837 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6838 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6839 no-longer-necessary initializations.
6840 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6841 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6842 use the unistd module.
6843 * src/system.h: Likewise.
6844 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6845 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6846 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6847 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6848 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6849 * src/system.h: Include inttypes.h unconditionally, now that we
6850 use the inttypes module. Don't bother to include stdint.h, since
6851 inttypes.h now does that for us.
6852 (LOCALEDIR): Remove, now that we use the configmake module.
6853 * src/getargs.c: Include configmake.h.
6854 * src/main.c: Likewise.
6855 * src/output.c: Likewise.
6856 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6857 not from $abs_top_builddir, since config.h moved.
6858
6859
6860 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6861 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6862
6863 * src/parse-gram.y (symbol_declaration): Don't put statements
6864 before declarations; it's not portable to C89.
6865 * src/scan-code.l (handle_action_at): Likewise.
6866
6867 * src/scan-code.l: Always initialize braces_level; the old code
6868 left it uninitialized and therefore had undefined behavior.
6869
6870 Don't attempt to redefine 'assert', since it runs afoul of
6871 systems where standard headers (mistakenly) include <assert.h>.
6872 Instead, define and use our own alternative, called 'aver'.
6873 * src/reader.c: Don't include assert.h, since we no longer
6874 use assert.
6875 * src/scan-code.l: Likewise.
6876 * src/system.h (assert): Remove, replacing with....
6877 (aver): New function, taking a bool arg. All uses changed.
6878 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6879 not merely an integer.
6880
6881 2006-09-15 Bob Rossi <bob@brasko.net>
6882
6883 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6884 * data/c.m4 (YYPUSH): New.
6885 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6886 * src/getargs.c (push_parser): New var.
6887 * src/getargs.h (push_parser): New declaration.
6888 * src/output.c (prepare): Add macro insertion of `push_flag'.
6889 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6890 (prologue_declaration): Parse %push-parser.
6891 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6892 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6893 list of removed lines from the traces observed.
6894 (AT_CHECK_CALC_LALR): Added push parser tests.
6895
6896 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6897
6898 * NEWS: Version 2.3a.
6899 * configure.ac (AC_INIT): Likewise.
6900
6901 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6902 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6903 due to header ordering dependencies. I don't know why the #define
6904 was there.
6905
6906 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6907 runtime cost when YYDEBUG is not defined, and so that some tests
6908 that used to fail now work. Problem and initial suggestion by
6909 Paolo Bonzini.
6910 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6911 * data/glr.cc (b4_parser_class_name):
6912 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6913 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6914 (yydebug_) [YYDEBUG]: New member.
6915 (yycdebug_): Now defined only if YYDEBUG.
6916 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6917 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6918 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6919 if YYYDEBUG.
6920 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6921 Define only if YYDEBUG.
6922 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6923 set_debug_level.
6924 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6925 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6926 AT_CHECK_CALC_GLR_CC that are working now.
6927
6928 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6929
6930 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6931 We don't need them in glr.cc, and glr.c defines them.
6932 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6933 assumes that defining it to anything is the same as defining
6934 it to 1. Problem reported by Paolo Bonzini.
6935
6936 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6937
6938 * data/c.m4 (b4_null, b4_case): Define.
6939 * src/output.c (prepare_symbols): Use b4_null.
6940 (user_actions_output): Use b4_case.
6941
6942 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6943
6944 * data/glr.c (b4_shared_declarations): Put start-header first,
6945 before any #includes that we generate, so that feature-test
6946 macros work. Problem reported by Michael Deutschmann in
6947 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6948 * data/lalr1.cc: Likewise.
6949 * doc/bison.texinfo (Prologue): Document that feature-test macros
6950 should be defined before any Bison declarations.
6951 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6952 that depend on location.hh after, not before, Bison decls, since
6953 we now include location.hh after the first user prologue.
6954
6955 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6956 Sander Brandenburg in
6957 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6958 Also, fix minor white space and comment issues.
6959 (Prologue): Mention that it's better to define feature-test macros
6960 before Bison declarations. Problem reported by Michael Deutschmann.
6961
6962 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6963 by Jim Meyering.
6964 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6965 This adjusts to recent gnulib changes.
6966
6967 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6968
6969 Finish implementation of per-type %destructor/%printer. Discussed
6970 starting at
6971 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6972 and
6973 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6974 * NEWS (2.3+): Add a description of this feature to the default
6975 %destructor/%printer description.
6976 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6977 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6978 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6979 list node contains a semantic type.
6980 * src/symtab.c, src/symtab.h: Extend with a table that associates
6981 semantic types with their %destructor's and %printer's.
6982 (semantic_type_from_uniqstr, semantic_type_get,
6983 semantic_type_destructor_set, semantic_type_printer_set): New functions
6984 composing the public interface of that table.
6985 (symbol_destructor_get, symbol_destructor_location_get,
6986 symbol_printer_get, symbol_printer_location_get): If there's no
6987 per-symbol %destructor/%printer, look up the per-type before trying
6988 the default.
6989 * tests/actions.at (Per-type %printer and %destructor): New test case.
6990 * tests/input.at (Default %printer and %destructor redeclared):
6991 Extend to check that multiple occurrences of %symbol-default in a
6992 single %destructor/%printer declaration is an error.
6993 (Per-type %printer and %destructor redeclared, Unused values with
6994 per-type %destructor): New test cases.
6995
6996 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6997
6998 Require default %destructor/%printer to be declared using
6999 %symbol-default instead of an empty symbol list, and start working on
7000 new per-type %destructor/%printer. Discussed at
7001 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7002 * NEWS (2.3+): Add %symbol-default to example.
7003 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7004 (Table of Symbols): Add entry for %symbol-default.
7005 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7006 (generic_symlist, generic_symlist_item): New nonterminals for creating
7007 a list in which each item is a symbol, semantic type, or
7008 %symbol-default.
7009 (grammar_declaration): Use generic_symlist in %destructor and %printer
7010 declarations instead of symbols.1 or an empty list.
7011 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7012 for changes to symbol_list.
7013 * src/reader.c: Update for changes to symbol_list.
7014 * src/scan-code.l: Likewise.
7015 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7016 * src/symlist.c, src/symlist.h: Extend such that a list node may
7017 represent a semantic type or a %symbol-default in addition to just an
7018 ordinary symbol. Add switched functions for setting %destructor's and
7019 %printer's.
7020 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7021 %destructor/%printer declarations.
7022
7023 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7024
7025 Whether the default %destructor/%printer applies to a particular symbol
7026 isn't a question of whether the user *declares* that symbol (in %token,
7027 for example). It's a question of whether the user by any means
7028 *defines* the symbol at all (by simply using a char token, for
7029 example). $end is defined by Bison whereas any other token with token
7030 number 0 is defined by the user. The error token is always defined by
7031 Bison regardless of whether the user declares it with %token, but we
7032 may one day let the user define error as a nonterminal instead.
7033 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7034 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7035 the meaning of "user-defined".
7036 * tests/actions.at (Default %printer and %destructor for user-declared
7037 end token): Rename to...
7038 (Default %printer and %destructor for user-defined end token): ...
7039 this.
7040
7041 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7042 computation of whether to apply the default, don't maintain a list of
7043 every Bison-defined symbol. Instead, just check for a first character
7044 of '$', which a user symbol cannot have, and check for the error token.
7045
7046 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7047
7048 Don't apply the default %destructor or %printer to the error token,
7049 $undefined, or $accept. This change fits the general rule that the
7050 default %destructor and %printer are only for user-declared symbols,
7051 and it solves several difficulties that are described in the new test
7052 cases listed below.
7053 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7054 * tests/actions.at (Default %printer and %destructor are not for error
7055 or $undefined, Default %printer and %destructor are not for $accept):
7056 New test cases.
7057
7058 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7059
7060 Allow %start after the first rule.
7061 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7062 when parsing the first rule.
7063 (check_and_convert_grammar): Search for it here after all grammar
7064 declarations have been parsed. Skip midrules, which have dummy LHS
7065 nonterminals.
7066 * src/symtab.c (symbol_is_dummy): New function.
7067 * src/symtab.h (symbol_is_dummy): Declare it.
7068 * tests/input.at (%start after first rule): New test.
7069
7070 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7071
7072 Redo some of the previous commit: add back the ability to use
7073 non-aliased/undeclared string literals since it might be useful to
7074 those declaring %token-table.
7075 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7076 commit: don't worry about complaints from symbols_pack.
7077 * src/symtab.c (symbol_new, symbol_class_set,
7078 symbol_check_alias_consistency): Undo changes in previous commit: count
7079 each string literal as a new symbol and token, assign it a symbol
7080 number, and don't complain about non-aliased string literals.
7081 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7082 and token counts but does still set aliased tokens to the same number,
7083 symbol_pack_processor now leaves empty slots in the symbols array.
7084 Remove those slots.
7085 * tests/regression.at (Undeclared string literal): Remove test case
7086 added in previous commit since non-aliased string literals are allowed
7087 again.
7088 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7089 remove unnecessary string literal declarations.
7090 * tests/sets.at (Firsts): Likewise.
7091
7092 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7093
7094 Don't allow an undeclared string literal, but allow a string literal to
7095 be used before its declaration.
7096 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7097 symbols_pack complained.
7098 * src/symtab.c (symbol_new): Don't count a string literal as a new
7099 symbol.
7100 (symbol_class_set): Don't count a string literal as a new token, and
7101 don't assign it a symbol number since symbol_make_alias does that.
7102 (symbol_make_alias): It's not necessary to decrement the symbol and
7103 token counts anymore. Don't assume that an alias declaration occurs
7104 before any uses of the identifier or string, and thus don't assert that
7105 one of them has the highest symbol number so far.
7106 (symbol_check_alias_consistency): Complain if there's a string literal
7107 that wasn't declared as an alias.
7108 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7109 symbol_pack asserts that every token has been assigned a symbol number
7110 although undeclared string literals have not.
7111 * tests/regression.at (String alias declared after use, Undeclared
7112 string literal): New test cases.
7113 (Characters Escapes, Web2c Actions): Declare string literals as
7114 aliases.
7115 * tests/sets.at (Firsts): Likewise.
7116
7117 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7118
7119 In the grammar scanner, STRING_FINISH unclosed constructs and return
7120 them to the parser in order to improve error messages.
7121 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7122 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7123 * tests/input.at (Unclosed constructs): New test case.
7124 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7125 seen.
7126
7127 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7128 unused global.
7129
7130 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7131
7132 Handle string aliases for character tokens correctly.
7133 * src/symtab.c (symbol_user_token_number_set): If the token has an
7134 alias, check and set its alias's user token number instead of its own,
7135 which is set to indicate the alias. Previously, every occurrence of
7136 the character token in the grammar overwrote that alias indicator with
7137 the character code.
7138 * tests/input.at (String aliases for character tokens): New test.
7139
7140 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7141
7142 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7143
7144 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7145
7146 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7147 to prevent failures when building on older platforms.
7148 Check for autopoint failure.
7149 Set XGETTEXT_OPTIONS to values that check for C format strings,
7150 so that translators are warned about them (this also helps
7151 prevent core dumps).
7152
7153 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7154 function, since it simplifies our code a bit.
7155
7156 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7157 rather than -W, so we don't get bogus warnings about sign comparisons.
7158 Add -Wpointer-arith, since that warning is useful (it reports code
7159 that does not conform to C89 and that some compilers reject).
7160 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7161 since it's no longer needed.
7162
7163 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7164
7165 Clean up scanners a bit.
7166 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7167 definitions so gcc won't warn when obstack_for_string is unused.
7168 * src/scan-code.l: config.h and system.h are already #include'd by
7169 scan-code-c.c, so get rid of them here.
7170 * src/scan-gram.l: Likewise.
7171 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7172 definitions rather than duplicating the rest of it.
7173 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7174
7175 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7176
7177 Suppress signed/unsigned comparison warnings for yycheck.
7178 * data/c.m4 (b4_safest_int_type): New macro.
7179 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7180 a signed int type, cast it to b4_safest_int_type first.
7181 * data/yacc.c: Likewise.
7182 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7183 also overwritten.
7184
7185 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7186
7187 * doc/bison.texinfo: Fix some typos.
7188
7189 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7190
7191 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7192 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7193
7194 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7195 the latest gnulib does this a different way.
7196 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7197 translation was patched, so stop omitting it.
7198
7199 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7200
7201 Enable declaration of default %printer/%destructor. Make the parser
7202 use these for all user-declared grammar symbols for which the user does
7203 not declare a specific %printer/%destructor. Thus, the parser uses it
7204 for token 0 if the user declares it but not if Bison generates it as
7205 $end. Discussed starting at
7206 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7207 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7208 and
7209 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7210 * NEWS (2.3+): Mention.
7211 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7212 declare a %destructor for a mid-rule's semantic value. It's just
7213 impossible to declare one specific to it.
7214 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7215 code. Describe default %destructor form.
7216 * src/parse-gram.y (grammar_declaration): Parse default
7217 %printer/%destructor declarations.
7218 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7219 and symbol_destructor_location_get rather than accessing the destructor
7220 and destructor_location members of struct symbol.
7221 (symbol_printers_output): Likewise but for %printer's.
7222 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7223 again.
7224 * src/symtab.c (default_destructor, default_destructor_location,
7225 default_printer, default_printer_location): New static global
7226 variables to record the default %destructor and %printer.
7227 (symbol_destructor_get, symbol_destructor_location_get,
7228 symbol_printer_get, symbol_printer_location_get): New functions to
7229 compute the appropriate %destructor and %printer for a symbol.
7230 (default_destructor_set, default_printer_set): New functions to set the
7231 default %destructor and %printer.
7232 * src/symtab.h: Prototype all those new functions.
7233 * tests/actions.at (Default %printer and %destructor): New test to
7234 check that the right %printer and %destructor are called, that they're
7235 not called for $end, and that $$ and @$ work correctly.
7236 (Default %printer and %destructor for user-declared end token): New
7237 test to check that the default %printer and %destructor are called for
7238 a user-declared end token.
7239 * tests/input.at (Default %printer and %destructor redeclared, Unused
7240 values with default %destructor): New tests to check related grammar
7241 warnings and errors.
7242
7243 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7244
7245 Clean up handling of %destructor for the end token (token 0).
7246 Discussed starting at
7247 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7248 and
7249 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7250
7251 Make the skeletons consistent in how they pop the end token and invoke
7252 its %destructor.
7253 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7254 state, which has token number 0, since this would invoke the
7255 %destructor for the end token.
7256 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7257 until after shifting the end token, or else it won't be popped.
7258 * data/yacc.c (yyparse): Likewise.
7259
7260 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7261 it's the end token. Upon termination, destroy an unshifted lookahead
7262 even when it's the end token.
7263 * data/lalr1.cc (yy::parser::parse): Likewise.
7264 * data/yacc.c (yyparse): Likewise.
7265
7266 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7267 value warnings for the end token when the user gives the end token a
7268 %destructor.
7269
7270 * tests/actions.at (Printers and Destructors): Test all the above.
7271
7272 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7273
7274 Update to latest gnulib and gettext versions.
7275 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7276 Add fopen-safer.
7277 (gnulib_files): Add m4/warning.m4. Don't worry about files
7278 overwritten by autopoint.
7279 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7280 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7281 rejects them.
7282 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7283 so that we can remove the intl files at a better time.
7284 (intl_files_to_remove): Remove aclocal.m4, since it gets
7285 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7286 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7287 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7288 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7289 Remove datarootdir hack; no longer needed.
7290 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7291 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7292 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7293 strdup.h.
7294 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7295 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7296
7297 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7298
7299 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7300 it with --assume-autoconf='latest-stable'.
7301
7302 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7303
7304 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7305 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7306 YYSTYPE' and `{'.
7307 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7308 those from muscle_tab.c since the old ones are misleading.
7309
7310 2006-07-13 Akim Demaille <akim@epita.fr>
7311
7312 Support %define "KEY" {VALUE}.
7313 * src/scan-code.h, src/scan-code.l (translate_action)
7314 (translate_rule_action, translate_symbol_action, translate_code):
7315 Return char *, not const char *.
7316 * src/parse-gram.y (declaration): Rename as...
7317 (prologue_declaration): this.
7318 (string_content): Remove this nonterminal, use STRING.
7319 (braceless, content, content.opt): New nonterminal.
7320 Use them.
7321 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7322 as value.
7323 * src/scan-gram.l (getargs.h): Don't include it.
7324
7325 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7326
7327 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7328 rather than a for-loop that declares a local bool variable. This
7329 should work around a compatibility problem with a Cray x1e C++
7330 compiler reported by Hung Nguyen in
7331 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7332 The for-loop was introduced in the 2004-11-17 change but I don't
7333 know why it was needed.
7334
7335 2006-07-12 Akim Demaille <akim@epita.fr>
7336
7337 * data/c.m4: Comment changes.
7338
7339 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7340
7341 * src/complain.c (error_message, ERROR_MESSAGE): New.
7342 To factor...
7343 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7344 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7345
7346 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7347
7348 * NEWS: Instead of %union, you can define and use your own union type
7349 YYSTYPE if your grammar contains at least one <type> tag.
7350 Your YYSTYPE need not be a macro; it can be a typedef.
7351 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7352 (Union Decl, Decl Summary): Document this.
7353 * data/glr.c (YYSTYPE): Implement this.
7354 * data/glr.cc (YYSTYPE): Likewise.
7355 * data/lalr1.cc (YYSTYPE): Likewise.
7356 * data/yacc.c (YYSTYPE): Likewise.
7357 * src/output.c (prepare): Output tag_seen_flag.
7358 * src/parse-gram.y (declaration, grammar_declaration):
7359 Use 'union_seen' rather than 'typed' to determine whether
7360 %union has been seen, since grammars can now be typed without
7361 %union.
7362 (symbol_declaration, type.opt, symbol_def):
7363 Keep track of whether a tag has been seen.
7364 * src/reader.c (union_seen, tag_seen): New vars.
7365 (typed): remove.
7366 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7367 * src/scan-code.l (untyped_var_seen): New variable.
7368 (handle_action_dollar): Adjust to above changes.
7369 (handle_action_dollar, handle_action_at):
7370 Improve overflow checking for outlandish numbers.
7371 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7372 avoid new diagnostics generated by above changes.
7373 * tests/regression.at (YYSTYPE typedef): Add test to check
7374 for type tags without %union.
7375
7376 * src/symlist.c (symbol_list_length): Return int, not unsigned
7377 int, since callers expect int. This may need to get revisited
7378 once we have proper integer overflow checking.
7379
7380 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7381 object is now static.
7382
7383 * src/getargs.c (flags_argmatch): Return void, not int,
7384 to pacify ./configure --enable-gcc-warnings.
7385
7386 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7387 since last_string is already defined to FLEX_PREFIX (last_string).
7388
7389 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7390
7391 Implement --warnings/-W.
7392 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7393 replaced by...
7394 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7395 Adjust callers.
7396 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7397 (warnings_args, warnings_types): New.
7398 (getargs, short_options, long_options): Accept -W/--warnings.
7399 Sort the options by alphabetical order, upper case letter right
7400 before its lower case.
7401
7402 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7403
7404 Change %merge result type clash warnings to errors. Discussed at
7405 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7406 * src/reader.c (record_merge_function_type): Use complain_at.
7407 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7408 declared later): Update test case results.
7409
7410 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7411
7412 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7413 to be in alphabetical order.
7414 (trace_args): Spelling fixes.
7415
7416 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7417
7418 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7419 so they don't collide with user-defined macros.
7420 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7421 this was never guaranteed, and now that we're using gnulib stdint,
7422 which defines int_fast16_t to long int, the problem is exposed.
7423
7424 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7425
7426 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7427 need the full POSIX semantics (and weren't implementing them
7428 anyway).
7429
7430 Adjust to Autoconf 2.60 and today's gnulib.
7431 * bootstrap (gnulib_modules): Add stdint.
7432 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7433 no longer copies it.
7434 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7435 since stdint needs the former and wcwidth (which is now required
7436 by mbswidth) needs the latter.
7437 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7438 work around a compatibility glitch between gettext 0.14.6 and
7439 Autoconf 2.60.
7440 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7441 Do not check for uintptr_t, since new stdint module does the right
7442 thing.
7443 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7444 Add stdint.h, stdint_.h, wcwidth.h.
7445 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7446 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7447 stdint.m4, wchar_t.m4, wcwidth.m4.
7448 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7449 usual order for ../lib/*.h files.
7450 (file_name_split): Use last_component, not base_name, to adjust
7451 to gnulib changes.
7452 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7453 for ../lib/*.h files.
7454 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7455 Define unconditionally, since we now assume the stdint module.
7456 * src/scan-skel.l: Include <dirname.h>.
7457 (BASE_QPUTS): Use last_component, not base_name.
7458 * src/system.h: Include <unlocked-io.h> in the usual order
7459 for ../lib/*.h files. Include <stdint.h> unconditionally,
7460 since we now use the stdint module.
7461 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7462 HAVE_UINTPTR_T, since we now use the stdint module.
7463 (base_name): Remove decl, since files now include <dirname.h>
7464 to get the decl.
7465
7466 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7467
7468 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7469 New, default to 1.
7470 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7471 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7472 default.
7473 * tests/calc.at: Adjust.
7474
7475 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7476
7477 * data/c.m4 (b4_basename): New.
7478 (b4_syncline): Also output the location of its invocation (from
7479 the skeleton).
7480 (b4_user_action, b4_define_user_action, b4_user_actions)
7481 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7482 (b4_user_stype): New.
7483 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7484
7485 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7486
7487 In the grammar file, the first column is 1 not 0 on the first line as
7488 on every other line.
7489 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7490 * tests/input.at (Torturing the Scanner): Update output.
7491
7492 * src/scan-gram.l (scanner_cursor): Declare it static.
7493
7494 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7495
7496 In warnings, say "previous declaration" rather than "first
7497 declaration".
7498 * src/symtab.c (redeclaration): Do that here.
7499 * src/reader.c (record_merge_function_type): In the case of a result
7500 type clash, report the previous declaration rather than the very first
7501 one in the grammar file.
7502 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7503 declared later): Add a third declaration to check this behavior.
7504 * tests/input.at (Incompatible Aliases): Update output.
7505
7506 2006-06-27 Akim Demaille <akim@epita.fr>
7507
7508 * doc/Doxyfile.in: New.
7509 * doc/Makefile.am: Use it.
7510 * src/lalr.h, src/symtab.h: Initial doxygenation.
7511
7512 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7513
7514 Don't miss %merge result type warnings just because the LHS types are
7515 declared after the %merge. This continues the effort of the previous
7516 patch.
7517 * src/reader.c (get_merge_function): Don't set the merger type yet.
7518 (record_merge_function_type): New function for setting the merger type
7519 and checking for clashes.
7520 (grammar_current_rule_merge_set): Set the location of the %merge for
7521 the current rule.
7522 (packgram): Invoke record_merge_function_type for each rule now that
7523 all symbol type declarations have been parsed.
7524 * src/reader.h (merger_list.type_declaration_location): New member
7525 storing the location of the first %merge from which the type for this
7526 merging function was derived.
7527 * src/symlist.h (symbol_list.merger_declaration_location): New member
7528 storing the location of a rule's %merge, if any.
7529 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7530 declared later): New test to catch the error fixed by the above patch.
7531
7532 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7533
7534 Get action warnings (grammar_rule_check) right even when symbol
7535 declarations appear after the rules. Discussed at
7536 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7537 and
7538 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7539 Don't mistake the type of $$ in a midrule to be that of its parent
7540 rule's $$.
7541 * src/reader.c (grammar_current_rule_end): Don't invoke
7542 grammar_rule_check yet since not all symbol declarations may have been
7543 parsed yet.
7544 (grammar_midrule_action): Likewise.
7545 Don't record whether the midrule's $$ has been used yet since actions
7546 haven't been translated yet.
7547 Record the midrule's parent rule and its RHS index within the parent
7548 rule.
7549 (grammar_current_rule_action_append): Don't translate the action yet
7550 since not all symbol declarations may have been parsed yet and, thus,
7551 warnings about types for $$, $n, @$, and @n can't be reported yet.
7552 (packgram): Translate the action and invoke grammar_rule_check now that
7553 all symbol declarations have been parsed.
7554 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7555 after parsing the entire grammar file, the symbol list here in the case
7556 of a midrule is actually the midrule's empty RHS, so reference its
7557 parent rule's RHS where necessary.
7558 On the other hand, now that you can already know it's a midrule, you
7559 aren't forced to think $$ has the same type as its parent rule's $$.
7560 (handle_action_at): In the case of a midrule, reference the parent rule
7561 where necessary.
7562 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7563 members.
7564 (symbol_list_length): Now that this is invoked after all rules have
7565 been parsed, a NULL symbol (rather than a NULL symbol list node)
7566 terminates a rule. symbol_list_print already does this correctly.
7567 * src/symlist.h (symbol_list.midrule_parent_rule,
7568 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7569 remember their relationships with their parents.
7570 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7571 fixed by the above patch.
7572 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7573 implementing...
7574 (Unused values): ... this old test case and...
7575 (Unused values before symbol declarations): ... this new test case.
7576 This one is the same as `Unused values' except that all symbol
7577 declarations appear after the rules in order to catch the rest of the
7578 errors fixed by the above patch.
7579
7580 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7581
7582 More cleanup.
7583 * src/reader.c (current_rule): Declare it static since it's no longer
7584 used outside this file.
7585 (grammar_current_rule_action_append): Remove redundant arguments from
7586 translate_rule_action invocation.
7587 * src/reader.h (current_rule): Remove this unused extern.
7588 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7589 * src/scan-code.l (translate_rule_action): Likewise.
7590
7591 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7592
7593 Clean up yesterday's patch.
7594 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7595 to...
7596 * src/reader.c (grammar_current_rule_action_append): ... here for
7597 consistency with grammar_current_rule_symbol_append.
7598 * tests/regression.at (Braced code in declaration in rules section):
7599 Make yyerror and yylex static as usual.
7600
7601 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7602
7603 Fix bug that mistakes braced code in a declaration in the rules section
7604 to be a rule action. Mentioned at
7605 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7606 * src/scan-gram.l: Move midrule action detection from the start of the
7607 scanning of any braced code to...
7608 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7609 action. For readability, use $2 and @2 rather than the equivalent
7610 global variables.
7611 * tests/regression.at (Braced code in declaration in rules section):
7612 New test to catch the error fixed by the above patch.
7613
7614 Work on code readability some.
7615 * src/scan-code.l (current_rule): Get rid of this misleading and
7616 redundant declaration: it's actually extern'ed in reader.h.
7617 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7618 translate_action): Add a rule argument and use it instead of the global
7619 current_rule.
7620 (translate_rule_action): This already receives current_rule through an
7621 argument, so pass it on to translate_action instead of assigning
7622 current_rule to current_rule.
7623 (translate_symbol_action, translate_code): Pass rule = NULL to
7624 translate_action.
7625
7626 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7627
7628 Rename %before-definitions to %start-header and %after-definitions to
7629 %end-header. Don't use these declarations to separate pre-prologue
7630 blocks from post-prologue blocks. Add new order-independent
7631 declarations %before-header and %after-header as alternatives to the
7632 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7633 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7634 * NEWS (2.3+): Update for these changes.
7635 * data/glr.c (b4_before_definitions): Update to...
7636 (b4_start_header): ... this.
7637 (b4_after_definitions): Update to...
7638 (b4_end_header): ... this.
7639 * data/glr.cc: Likewise.
7640 * data/lalr1.cc: Likewise.
7641 * data/yacc.c: Likewise.
7642 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7643 prologue blocks with %*-header declarations.
7644 (Calc++ Parser): Likewise.
7645 (Decl Summary): Update names.
7646 (Table of Symbols): Update description.
7647 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7648 (PERCENT_END_HEADER): ... this.
7649 (PERCENT_BEFORE_DEFINITIONS): Update to...
7650 (PERCENT_START_HEADER): ... this.
7651 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7652 (declaration): Update token names and m4 macro names.
7653 When parsing %end-header and %start-header, invoke translate_code
7654 before muscle_code_grow, and no longer set global booleans to remember
7655 whether these declarations have been seen.
7656 Parse new %after-header and %before-header.
7657 * src/reader.c (before_definitions, after_definitions): Remove.
7658 (prologue_augment): Accept a new bool argument to specify whether to
7659 augment the pre-prologue or post-prologue.
7660 * src/reader.h (before_definitions, after_definitions): Remove these
7661 extern's.
7662 (prologue_augment): Add new bool argument.
7663 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7664 (PERCENT_END_HEADER): ... this.
7665 (PERCENT_BEFORE_DEFINITIONS): Update to...
7666 (PERCENT_START_HEADER): ... this.
7667 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7668 * tests/actions.at (Printers and Destructors): Update names.
7669
7670 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7671
7672 Add comparison operators for C++ location classes. Discussed at
7673 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7674 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7675 declaration indicating whether filename_type has an operator==. If
7676 filename_type is `std::string', it defaults to `1', `0' otherwise.
7677 * data/location.cc: Iff b4_define_location_comparison is `1', add
7678 operator== and operator!= for class position and for class location.
7679
7680 Some minor fixes.
7681 * src/scan-action.l: Remove unused file.
7682 * src/symtab.c (symbol_printer_set): Use printer_location not
7683 destructor_location.
7684 * src/symtab.h (struct symbol): Replace incorrect source comment for
7685 printer members.
7686 * tests/input.at (Incompatible Aliases): Update output with correct
7687 printer location.
7688
7689 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7690
7691 Don't put the pre-prologue in the header file. For the yacc.c code
7692 file and the glr.c header and code files, move the pre-prologue before
7693 the token definitions. Add new %before-definitions and
7694 %after-definitions to declare code that will go in both the header file
7695 and code file. Discussed at
7696 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7697 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7698 and
7699 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7700 * NEWS (2.3+): Describe these changes.
7701 * data/glr.c (b4_pre_prologue): Move from within to before...
7702 (b4_shared_declarations): ... this.
7703 Add new b4_before_definitions before b4_token_enums.
7704 Add new b4_after_definitions at the end.
7705 * data/glr.cc (b4_pre_prologue): Replace with...
7706 (b4_before_definitions): ... this in the header file.
7707 (b4_after_definitions): New near the end of the header file.
7708 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7709 code file right before including the header file.
7710 (b4_before_definitions): New in the previous position of
7711 b4_pre_prologue in the header file.
7712 (b4_after_definitions): New near the end of the header file.
7713 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7714 (b4_token_enums_defines): In the code file, move to right before
7715 YYSTYPE for consistency with the header file.
7716 (b4_before_definitions): New right before b4_token_enums_defines in
7717 both the header and code file.
7718 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7719 header and code file.
7720 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7721 of prologues for %union dependencies.
7722 (Decl Summary): In %defines description, mention the effect of
7723 %before-definitions and %after-definitions on the header file.
7724 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7725 than in the pre-prologue so that make check succeeds.
7726 (Table of Symbols): Add entries for %before-definitions and
7727 %after-definitions.
7728 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7729 %before-definitions.
7730 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7731 (declaration): Parse those declarations and append to
7732 b4_before_definitions and b4_after_definitions, respectively.
7733 * src/reader.c (before_definitions, after_definitions): New bools to
7734 track whether those declarations have been seen.
7735 (prologue_augment): Add to the post-prologue if %union,
7736 %before-definitions, or %after-definitions has been seen.
7737 * src/reader.h (before_definitions, after_definitions): New extern's.
7738 * src/scan-gram.l: Scan the new declarations.
7739 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7740 prologue block in a %before-definitions or a %after-definitions based
7741 on whether the %union is declared.
7742 * tests/regression.at (Early token definitions with --yacc, Early token
7743 definitions without --yacc): Move tests for token definitions into the
7744 post-prologue since token names are no longer defined in the
7745 pre-prologue.
7746
7747 2006-06-20 Akim Demaille <akim@epita.fr>
7748
7749 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7750 (symbol_get): Use it.
7751 * src/parse-gram.y: Use it.
7752
7753 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7754
7755 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7756 build succeeds when configured with --enable-gcc-warnings.
7757
7758 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7759
7760 * src/parse-gram.y (char_name): New function.
7761 (CHAR, STRING, string_content): For %printer, properly escape.
7762 (ID): Prefer fputs to fprintf.
7763 (id): Reindent to be consistent with other rules.
7764 Properly quote char.
7765
7766 The Translation Project changed its way of publishing translations
7767 to maintainers. I haven't received any responses to my request
7768 for supporting the old way, or for documenting the new way. I
7769 have modified 'bootstrap' to use screen scraping
7770 (in this case, HTML scraping). This is unreliable and inelegant,
7771 but I don't see any better way. Yuck.
7772 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7773 (get_translations): New function, which uses HTML scraping to
7774 deduce locations of latest translations.
7775 Use this function to grab both bison and bison-runtime .po files.
7776 Don't bother priming the pump for the runtime-po domain any more,
7777 as it's now translated better than bison is.
7778
7779 2006-06-19 Akim Demaille <akim@epita.fr>
7780
7781 * src/scan-gram.l: No longer "parse" things after `%union' until
7782 `{'. Rather, return a single "%union" token.
7783 No longer make symbols: return strings, and leave the conversion
7784 to symbols to the parser.
7785 (SC_PRE_CODE, token_type): Remove.
7786 * src/parse-gram.y (%union): New field `character'.
7787 Sort tokens.
7788 (CHAR): New token.
7789 (ID, ID_COLON): Now that the scanner no longer makes them
7790 identifiers, adjust all uses to invoke symbol_get.
7791 (id_colon): New, wraps the conversion from string to symbol.
7792 (%union): Accept a possible union_name.
7793 (symbol): Now can be a char.
7794 * data/c.m4 (b4_union_name): Leave a default value.
7795 * data/glr.c, data/yacc.c: Use it.
7796
7797 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7798
7799 For associating token numbers with token names for "yacc.c", don't use
7800 #define statements unless `--yacc' is specified; always use enum
7801 yytokentype. Most important discussions start at:
7802 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7803 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7804 and
7805 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7806 * NEWS (2.3+): Mention.
7807 * data/c.m4 (b4_yacc_if): New.
7808 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7809 token #define's.
7810 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7811 on token name definitions.
7812 * src/getargs.c (usage): Capitalize `Yacc' in English.
7813 * src/output.c (prepare): Define b4_yacc_flag.
7814 * tests/regression.at (Early token definitions): Test that tokens names
7815 are defined before the pre-prologue not just before the post-prologue.
7816 Remove this test case and copy to...
7817 (Early token definitions with --yacc): ... this to test #define's.
7818 (Early token definitions without --yacc): ... and this to test enums.
7819
7820 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7821
7822 * NEWS: Reword the post-2.3 change to not be so optimistic about
7823 removing the old "look-ahead" spelling.
7824 Update previous look-ahead/lookahead change reports.
7825 * REFERENCES: look-ahead -> lookahead (since that's
7826 what he actually wrote).
7827 * doc/refcard.tex: look ahead -> lookahead,
7828 look-ahead -> lookahead
7829
7830 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7831
7832 For consistency, use `lookahead' instead of `look-ahead' or
7833 `look_ahead'. Discussed starting at
7834 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7835 and then at
7836 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7837 * NEWS: For the next release, note the change to `--report'.
7838 * TODO, doc/bison.1: Update English.
7839 * doc/bison.texinfo: Update English.
7840 (Understanding Your Parser, Bison Options): Document as
7841 `--report=lookahead' rather than `--report=look-ahead'.
7842 * src/conflicts.c: Update English in comments.
7843 (lookahead_set): Rename from look_ahead_set.
7844 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7845 (resolve_sr_conflict): Rename local look_ahead_tokens to
7846 lookahead_tokens, and update other uses.
7847 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7848 count_rr_conflicts, conflicts_free): Update uses.
7849 * src/getargs.c (report_args): Move "lookahead" before alternate
7850 spellings.
7851 (report_types): Update uses.
7852 (usage): For `--report' usage description, state `lookahead' spelling
7853 rather than `look-ahead'.
7854 * src/getargs.h (report.report_lookahead_tokens): Rename from
7855 report_look_ahead_tokens.
7856 * src/lalr.c: Update English in comments.
7857 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7858 (state_lookahead_tokens_count): Rename from
7859 state_look_ahead_tokens_count.
7860 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7861 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7862 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7863 Update other uses.
7864 Update English in output.
7865 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7866 * src/print.c: Update English in comments.
7867 (lookahead_set): Rename from look_ahead_set.
7868 (print_reduction): Rename argument lookahead_token from
7869 look_ahead_token.
7870 (print_core, state_default_rule, print_reductions, print_results):
7871 Update uses.
7872 * src/print_graph.c: Update English in comments.
7873 (print_core): Update uses.
7874 * src/state.c: Update English in comments.
7875 (reductions_new): Update uses.
7876 (state_rule_lookahead_tokens_print): Rename from
7877 state_rule_look_ahead_tokens_print, and update other uses.
7878 * src/state.h: Update English in comments.
7879 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7880 (state_rule_lookahead_tokens_print): Rename from
7881 state_rule_look_ahead_tokens_print.
7882 * src/tables.c: Update English in comments.
7883 (conflict_row, action_row): Update uses.
7884 * tests/glr-regression.at
7885 (Incorrect lookahead during deterministic GLR,
7886 Incorrect lookahead during nondeterministic GLR): Rename
7887 print_look_ahead to print_lookahead.
7888 * tests/torture.at: Update English in comments.
7889 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7890 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7891 (Many lookahead tokens): Update uses.
7892 * data/glr.c: Update English in comments.
7893 * lalr1.cc: Likewise.
7894 * yacc.c: Likewise.
7895 * src/conflicts.h: Likewise.
7896 * src/lalr.h: Likewise.
7897 * src/main.c: Likewise.
7898 * src/output.c: Likewise.
7899 * src/parse-gram.c: Likewise.
7900 * src/tables.h: Likewise.
7901 * tests/calc.at: Likewise.
7902
7903 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7904
7905 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7906
7907 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7908
7909 * TODO: Add request from Nelson H. F. Beebe to be able to install
7910 Bison without installing the yacc script.
7911
7912 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7913
7914 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7915 and yytext if they're already #define'd.
7916 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7917 * src/scan-code-c.c: ... here.
7918 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7919 <config.h>.
7920
7921 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7922
7923 Get Bison to build again when configured with --enable-gcc-warnings.
7924 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7925 missing #include's.
7926 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7927 loc argument as it shadows a global.
7928 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7929 invocation.
7930
7931 * src/.cvsignore: Add scan-code.c.
7932
7933 2006-06-07 Akim Demaille <akim@epita.fr>
7934
7935 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7936 to...
7937 * src/scan-code.l: here.
7938 * tests/input.at (Torturing the Scanner): Fix another location
7939 error.
7940
7941 2006-06-07 Akim Demaille <akim@epita.fr>
7942
7943 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7944
7945 2006-06-06 Akim Demaille <akim@epita.fr>
7946
7947 Extract the parsing of user actions from the grammar scanner.
7948 As a consequence, the relation between the grammar scanner and
7949 parser is much simpler. We can also split "composite tokens" back
7950 into simple tokens.
7951 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7952 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7953 rename as...
7954 * src/location.h, src/location.c (add_column_width)
7955 (location_compute): these.
7956 Fix the column count: the initial column is 0.
7957 (location_print): Be robust to ending column being 0.
7958 * src/location.h (boundary_set): New.
7959 * src/main.c: Adjust to scanner_free being renamed as
7960 gram_scanner_free.
7961 * src/output.c: Include scan-code.h.
7962 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7963 Use boundary_set.
7964 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7965 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7966 which is now, again, a separate token.
7967 Adjust all dependencies.
7968 Whereever actions with $ and @ are used, use translate_code.
7969 (action): Remove this nonterminal which is now useless.
7970 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7971 (grammar_current_rule_action_append): Use translate_code.
7972 (packgram): Bound check ruleno, itemno, and rule_length.
7973 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7974 (last_string, last_braced_code_loc, max_left_semantic_context)
7975 (scanner_initialize, scanner_free, scanner_last_string_free)
7976 (gram_out, gram_lineno, YY_DECL_): Move to...
7977 * src/scan-gram.h: this new file.
7978 (YY_DECL): Rename as...
7979 (GRAM_DECL): this.
7980 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7981 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7982 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7983 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7984 Move these declarations, and...
7985 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7986 these to...
7987 * src/flex-scanner.h: this new file.
7988 * src/scan-gram.l (rule_length, rule_length_overflow)
7989 (increment_rule_length): Remove.
7990 (last_braced_code_loc): Rename as...
7991 (gram_last_braced_code_loc): this.
7992 Adjust to the changes of the parser.
7993 Move all the handling of $ and @ into...
7994 * src/scan-code.l: here.
7995 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7996 (handle_action_dollar, handle_action_at): Move to...
7997 * src/scan-code.l: here.
7998 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7999 scan-code.h, scan-code-c.c, scan-gram.h.
8000 (EXTRA_bison_SOURCES): Add scan-code.l.
8001 (BUILT_SOURCES): Add scan-code.c.
8002 (yacc): Be robust to white spaces.
8003
8004 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8005 * tests/regression.at: Adjust the column numbers.
8006 * tests/regression.at: Adjust the error message.
8007
8008 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8009
8010 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8011 Use Akim's wording from
8012 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8013
8014 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8015
8016 Between Bison releases, manually append `+' to the previous Bison
8017 release number, and use that as a signal to automatically print the
8018 ChangeLog's CVS Id keyword from --version. Discussed starting at
8019 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8020 * ChangeLog: Add Id header.
8021 * configure.ac (AC_INIT): Append `+' to `2.3'.
8022 * src/.cvsignore: Add revision.c.
8023 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8024 (BUILT_SOURCES): Add revision.c.
8025 (revision.c): New target rule. This file defines a new global variable
8026 named revision. It initializes it with either the Id from ChangeLog
8027 or, if VERSION doesn't contain `+', with the empty string.
8028 * src/getargs.c (version): Print the value of revision.
8029 * src/revision.h: Extern revision.
8030
8031 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8032
8033 * NEWS: Version 2.3.
8034 * configure.ac (AC_INIT): Likewise.
8035
8036 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8037
8038 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8039 with no arguments, not as an object-like macro. This is for
8040 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8041 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8042 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8043 Document this.
8044
8045 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8046
8047 * src/getargs.c (usage): Back out yesterday's modification of the
8048 --help output so that we don't have to wait for translation before
8049 releasing 2.3.
8050
8051 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8052
8053 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8054 Problem reported by Akim Demaille.
8055
8056 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8057
8058 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8059
8060 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8061
8062 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8063 generated source code. Problem reported by Frans Englich in
8064 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8065
8066 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8067
8068 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8069 shell, not within 'make', so that 'make' by an ordinary builder
8070 (using GNU make) does not worry about configuring gzip. This also
8071 works around a bug reported independently by Keith Thompson and by
8072 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8073 stderr rather than stdout, messing up the build logs.
8074
8075 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8076
8077 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8078 to make sure that YYID will never be unused. This fixes a 'make
8079 maintainer-check' failure caused by the recent changes to the 'Trivial
8080 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8081 not used.
8082 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8083
8084 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8085
8086 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8087 state before an empty RHS is always resolved here. Only the location
8088 of that state is guaranteed to be resolved, and that's enough. This
8089 fixes the remaining bug reported by Derek M. Jones in
8090 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8091 * tests/glr-regression.at (Uninitialized location when reporting
8092 ambiguity): Test the above case.
8093 Also, the embedded comments in this test case claim it checks the case
8094 of an empty RHS that has inherited the initial location. However, the
8095 corresponding LHS was already resolved, so yyresolveLocations didn't
8096 actually have reason to modify it. Fix this by forcing
8097 nondeterministic operation at the beginning of the parse.
8098
8099 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8100
8101 * data/c.m4 (b4_yy_symbol_print_generate):
8102 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8103 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8104 of the bugs reported today by Derek M Jones in
8105 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8106 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8107 defined to be a type name without parens or brackets.
8108 (Location Type): Similarly for YYLTYPE.
8109 * tests/regression.at (Trivial grammars): Put in a test for this
8110 bug that will be caught by 'make maintainer-check' (though not,
8111 alas, by 'make check' unless your compiler is picky).
8112
8113 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8114
8115 * NEWS: Version 2.2.
8116 * configure.ac (AC_INIT): Likewise.
8117
8118 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8119
8120 * data/glr.c (yyreportTree): Make room in yystates for the state
8121 preceding the RHS. This fixes the segmentation fault reported by Derek
8122 M. Jones in
8123 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8124 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8125 to the user. Reported for yyreportTree by Derek M. Jones later in the
8126 same thread.
8127 * THANKS: Add Derek M. Jones.
8128 Update my email address.
8129 Fix typo in Steve Murphy's name.
8130
8131 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8132
8133 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8134 checking against YYLAST that caused the parser to miss a potential
8135 alternative in its diagnostic.
8136 Problem reported by Maria Jose Moron Fernandez in
8137 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8138 * data/lalr1.cc (yysyntax_error_): Likewise.
8139 * data/yacc.c (yysyntax_error): Likewise.
8140 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8141 tokens, in case we run into an older C compiler.
8142 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8143 Use them to check for the off-by-one error fixed above.
8144
8145 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8146 YYSIZE_T, not size_t.
8147 * tests/regression.at (Trivial grammars): New test, to catch
8148 the error fixed by the above patch.
8149
8150 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8151
8152 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8153 scheme.
8154 Reported by Steve Murphy.
8155
8156 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8157
8158 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8159 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8160
8161 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8162
8163 Implement --trace=m4.
8164 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8165 * src/output.c (output_skeleton): When set, pass -dV to m4.
8166
8167 Factor the handling of flags in m4.
8168 * src/output.c (prepare): Rename the muscle names debug, defines,
8169 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8170 * data/c.m4: Adjust.
8171 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8172 Use b4_define_flag_if to define other b4_FLAG_if macros.
8173 (b4_location_if): As a consequence, rename as...
8174 (b4_locations_if): this, for consistency.
8175 Adjust all the skeletons.
8176
8177 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8178
8179 * etc/bench.pm: Shorten bench names.
8180
8181 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8182
8183 * src/output.h, src/output.c (error_verbose): Move to...
8184 * src/getargs.h, src/getargs.c: here.
8185 Sort the flags.
8186 Adjust dependencies.
8187
8188 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8189
8190 * data/c.m4 (b4_copyright): Put the special exception for Bison
8191 skeletons here, so we don't have to put it in each skeleton. All
8192 uses changed. Suggested by Akim Demaille. Also, wrap the
8193 copyright notice, in case it is longer than 80 columns. Replace
8194 comma by newline after title.
8195
8196 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8197
8198 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8199 incompatibility, not a bug. Mention that it wasn't fixed as of
8200 flex 2.5.33.
8201
8202 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8203
8204 * examples/extexi: Enforce the precedence of concatenation over
8205 >>.
8206 Reported by Tommy Nordgren.
8207
8208 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8209
8210 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8211 with the member "token".
8212 Reported by Martin Nylin.
8213
8214 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8215
8216 * data/glr.c: Switch to Bison 2.2 special-exception language in
8217 the copyright notice. Use more-regular format for titles and
8218 copyright notices.
8219 * data/glr.cc: Likewise.
8220 * data/location.cc: Likewise.
8221 * data/yacc.cc: Likewise.
8222 * doc/bison.texinfo (Conditions): Document this.
8223 * NEWS: likewise. Upgrade version to 2.2.
8224
8225 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8226
8227 * data/glr.cc: Remove dead code.
8228
8229 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8230
8231 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8232 that variable and the line breaks the bootstrap. Problem reported
8233 by Juan M. Guerrero.
8234
8235 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8236
8237 * doc/bison.texinfo (Multiple start-symbols): New.
8238
8239 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8240
8241 * etc/README, etc/bench.pl: New.
8242
8243 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8244
8245 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8246 rule.
8247 Reported by Mickael Labau.
8248 * tests/input.at (Torturing the Scanner): Test it.
8249
8250 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8251
8252 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8253 Problem reported by Bob Rossi.
8254
8255 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8256
8257 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8258 and didn't really work.
8259 For the index, use @ifnotinfo, not @iftex.
8260 Minor cleanups of spacing and terminology.
8261
8262 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8263
8264 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8265 of AT_NAME_PREFIX when %name-prefix is not used.
8266
8267 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8268
8269 Apply --prefix to C++ skeletons too: they change the namespace.
8270 The test suite already exercize these cases.
8271 * data/c++.m4 (b4_namespace): New.
8272 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8273 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8274 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8275 * doc/bison.texinfo: Document it.
8276 (Option Cross Key): Use @multitable in all formats. It looks
8277 nicer, even in TeX outputs.
8278 (Rules): Use the same code whatever the output type is.
8279 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8280 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8281 * tests/calc.at: Use it, instead of hard coding `yy'.
8282
8283 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8284
8285 * TODO: Remove dead items.
8286
8287 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8288
8289 * doc/FAQ: Remove, merged into...
8290 * doc/bison.texinfo (FAQ): this.
8291 * doc/Makefile.am (EXTRA_DIST): Adjust.
8292
8293 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8294
8295 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8296 even if empty.
8297 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8298 * doc/bison.texinfo (Calc++ Scanner): Use it.
8299
8300 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8301
8302 Fix two nits reported by twlevo, plus one more that I discovered.
8303
8304 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8305 this is the usual Bison style.
8306 * src/location.h (location_print): Likewise.
8307
8308 * src/reader.h (token_name): Likewise.
8309
8310 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8311
8312 Fix some nits reported by twlevo.
8313 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8314 and "POSIX". Use more-modern syntax for URLs. Mention C++
8315 and ask for Java. Don't hardwire OS version numbers. Add
8316 copyright notice.
8317 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8318 * src/conflicts.c (solved_conflicts_obstack): Now static.
8319
8320 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8321
8322 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8323 page. Say "you can use it" not "you may use it" as on the web page;
8324 we're describing capabilities not granting permission.
8325
8326 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8327
8328 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8329 shadowing warnings. Use usual patter for iterating through RHS.
8330 * tests/glr-regression.at
8331 (Uninitialized location when reporting ambiguity):
8332 Modify yylex so that it uses its argument, rather than trying
8333 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8334 const char -> char const.
8335
8336 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8337 Don't use tabs inside commands; it messes up 'ps'.
8338 Problem reported by twlevo.
8339
8340 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8341
8342 * tests/glr-regression.at (Uninitialized location when reporting
8343 ambiguity): New test case.
8344 * data/glr.c (yyresolveLocations): New function, which uses
8345 YYLLOC_DEFAULT.
8346 (yyresolveValue): Invoke yyresolveLocations before reporting an
8347 ambiguity.
8348 * doc/bison.texinfo (Default Action for Locations): Note
8349 YYLLOC_DEFAULT's usage for ambiguity locations.
8350 (GLR Semantic Actions): Cross-reference those notes.
8351
8352 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8353
8354 * tests/glr-regression.at (Leaked semantic values when reporting
8355 ambiguity): Remove unnecessary union and type declarations.
8356 (Leaked lookahead after nondeterministic parse syntax error): New test
8357 case.
8358 * data/glr.c (yyparse): Check for zero stacks remaining before
8359 attempting to shift the lookahead so that you don't lose it.
8360
8361 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8362
8363 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8364 * tests/glr-regression.at (Leaked semantic values when reporting
8365 ambiguity): New test case.
8366 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8367 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8368 now unnecessary yystackp parameter.
8369 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8370 destructors can be called.
8371
8372 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8373 in existing testcases.
8374
8375 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8376
8377 Don't leak semantic values for parent RHS when a user action cuts the
8378 parser, and clean up related code a bit.
8379 * tests/glr-regression.at (Leaked merged semantic value if user action
8380 cuts parse): Rename to...
8381 (Leaked semantic values if user action cuts parse): ... this. Add check
8382 for leaked parent RHS values.
8383 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8384 between an unresolved state (non-empty chain of semantic options) and
8385 an incomplete one (signaled by an empty chain).
8386 (yyresolveStates): Document the interface. Move all manipulation of a
8387 successfully or unsuccessfully resolved yyGLRState to...
8388 (yyresolveValue): ... here so that yyresolveValue always leaves a
8389 yyGLRState with consistent data and thus is easier to understand.
8390 Remove the yyvalp and yylocp parameters since they are always just
8391 taken from the yys parameter. When reporting a discarded merged value
8392 in debugging output, note that it is incompletely merged. Document the
8393 interface.
8394 (yyresolveAction): If resolving any of the RHS states fails, destroy
8395 them all rather than leaking them. Thus, as long as user actions are
8396 written to clean up the RHS correctly, yyresolveAction always cleans up
8397 the RHS of a semantic option. Document the interface.
8398
8399 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8400
8401 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8402 led to a segmentation fault in GNU Pascal. Problem reported
8403 by Waldek Hebisch.
8404
8405 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8406
8407 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8408 mid-rule action inside a nonterminal symbol in order to declare a
8409 destructor for its semantic value.
8410
8411 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8412
8413 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8414 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8415 __cplusplus && ! defined _STDLIB_H && !
8416 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8417 defined free))]: Include <stdlib.h> rather than rolling our own
8418 declarations of malloc and free, to avoid problems with
8419 incompatible declarations (using 'throw') C++'s stdlib.h. This
8420 should fix Debian bug 340012
8421 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8422 reported by Guillaume Melquiond.
8423
8424 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8425
8426 * NEWS: Clarify symbols versus types in unused-value warnings.
8427
8428 * configure.ac (AC_INIT): Bump version number.
8429
8430 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8431
8432 * NEWS: Version 2.1a.
8433 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8434 since C99 requires this.
8435
8436 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8437
8438 * m4/c-working.m4: New file.
8439 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8440
8441 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8442
8443 * Makefile.maint: Merge from coreutils.
8444
8445 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8446
8447 More portability fixes for problems summarized by Nelson H. F. Beebe.
8448
8449 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8450 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8451 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8452 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8453 messes up because C++ code is compiled in 32-bit mode but linked
8454 in 64-bit mode.
8455
8456 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8457
8458 More portability fixes for problems summarized by Nelson H. F. Beebe.
8459
8460 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8461 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8462
8463 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8464 nodist_PROGRAMS, since we don't need to actually compile the
8465 example if we're just doing a plain 'make'. This avoids bothering
8466 the installer unnecessarily about problems due to weird C++
8467 compilers.
8468
8469 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8470
8471 More portability fixes for problems summarized by Nelson H. F. Beebe.
8472
8473 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8474 than #include "...", and compile with -I'.'. The old method was
8475 not portable, according to Posix and the C standard, and it does
8476 not work with Sun C 5.7, where previous #line directives affect
8477 the working directory used in later #include "..." directives.
8478
8479 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8480
8481 Various DJGGP specific issues in /djgpp
8482
8483 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8484
8485 More portability fixes for problems summarized by Nelson H. F. Beebe.
8486
8487 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8488 '#include <map>' works and that you can apply ++ to iterators.
8489
8490 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8491
8492 Work around portability problems summarized by Nelson H. F. Beebe in
8493 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8494
8495 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8496 that '#include <string>' works.
8497
8498 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8499 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8500 "warning: sorry: semantics of inline function static data `const
8501 unsigned char translate_table[262]' are wrong (you'll wind up with
8502 multiple copies)".
8503
8504 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8505 or, xor to not_, and_, or_, and xor_, respectively. This works
8506 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8507 random system header somewhere that includes the equivalent of
8508 <iso646.h>.
8509
8510 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8511 -E" works; it apparently doesn't work with PathScale EKO Compiler
8512 Suite Version 2.0.
8513
8514 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8515
8516 During deterministic GLR operation, user actions should be able to
8517 influence the parse by changing yychar. To make this easier to fix and
8518 to make glr.c easier to evolve in general, don't maintain yytoken in
8519 parallel with yychar; just compute yytoken when needed.
8520 * tests/glr-regression.at (Incorrect lookahead during deterministic
8521 GLR): Check that setting yychar in a user action has the intended
8522 effect.
8523 * data/glr.c (yyGLRStack): Remove yytokenp member.
8524 (yyclearin): Don't set *yytokenp.
8525 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8526 yychar rather than *yytokenp to determine the current lookahead.
8527 Compute yytoken locally when needed.
8528 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8529 point to.
8530
8531 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8532 after `--report' documentation.
8533
8534 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8535
8536 * src/parse-gram.y (grammar_declaration): Location of printer
8537 symbol is @1, not list->location. Bug reported by twlevo.
8538 * tests/input.at (Incompatible Aliases): Adjust to above change.
8539
8540 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8541
8542 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8543 all the test at once. This makes the output easier to read in the
8544 normal case.
8545
8546 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8547 got from <http://bro-ids.org/download.html>. The bug is that
8548 when two actions appeared in succession, the second one was
8549 scanned before the first one was added to the grammar rule
8550 as a midrule action. Bison then output the incorrect warning
8551 "parse.y:905.17-906.36: warning: unused value: $3".
8552 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8553 associated with a value.
8554 (rhs): Don't invoke grammar_current_rule_action_append.
8555 (action): Invoke it here instead.
8556 * src/reader.c (grammar_midrule_action): Now extern.
8557 (grammar_current_rule_action_append): Don't invoke
8558 grammar_midrule_action; that is now the scanner's job.
8559 * src/reader.h (last_string, last_braced_code_loc):
8560 (grammar_midrule_action): New decls.
8561 * src/scan-gram.l (last_string): Now extern, sigh.
8562 (last_braced_code_loc): New extern variable.
8563 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8564 rule already has an action.
8565 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8566 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8567 Add some tests to check that the above changes fixed the bug.
8568
8569 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8570
8571 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8572 All used changed. Check whether the symbol has a destructor,
8573 not whether it is typed.
8574 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8575 that the values are still reported as unused. All line numbers
8576 adjusted.
8577
8578 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8579
8580 Work around a bug in bro 0.8, which underparenthesizes its
8581 definition of YYLLOC_DEFAULT.
8582 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8583 their arguments.
8584 * data/lalr1.cc: Likewise.
8585 * data/yacc.cc: Likewise.
8586
8587 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8588
8589 Work around a bug in Pike 7.0, and give the Pike folks a
8590 better way to override the usual int widths.
8591 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8592 user can override the types.
8593 (short): #undef, to work around a bug in Pike 7.0.
8594 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8595 (union yyalloc.yyss): Use yytype_int16 rather than short.
8596 All uses changed.
8597 (yysigned_char): Remove.
8598 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8599 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8600 * tests/regression.at (Web2c Actions): Adjust to above changes.
8601
8602 * src/reader.c (check_and_convert_grammar): New function.
8603 (reader): Close the input file even if something went wrong during
8604 parsing. Minor file descriptor leak reported by twlevo.
8605
8606 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8607 to pacify gcc -Wswitch-default.
8608 * src/scan-gram.l (adjust_location): Use a default: break; case
8609 to pacify gcc -Wswitch-default.
8610 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8611 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8612 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8613 Move these decls to scan-skel.l, since they don't need to be
8614 visible elsewhere.
8615 * src/scan-skel.l: Accept the above decls.
8616 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8617 is used.
8618
8619 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8620
8621 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8622 since we don't want to insist on a version number at the start
8623 of the changelog every time.
8624 * Makefile.maint: Sync from coreutils a bit better.
8625 (sc_trailing_blank): Renamed from sc_trailing_space.
8626 All uses changed.
8627 (sc_no_if_have_config_h, sc_require_config_h):
8628 (sc_prohibit_assert_without_use): New rules.
8629 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8630 (sc_dd_max_sym_length): Fix leading spaces in rule.
8631 (sc_system_h_headers): Prefix with @.
8632 (sc_useless_cpp_parens, m4-check): Output line numbers.
8633 (changelog-check): Allow version only in head.
8634 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8635 satisfy new Makefile.maint rule.
8636 * data/glr.c: Likewise.
8637 * data/glr.cc: Likewise.
8638 * data/lalr1.cc: Likewise.
8639 * data/yacc.c: Likewise.
8640 * lib/ebitsetv.c: Likewise.
8641 * lib/lbitset.c: Likewise.
8642 * lib/subpipe.c: Likewise.
8643 * lib/timevar.c: Likewise.
8644 * src/system.h: Likewise.
8645 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8646 * djgpp/Makefile.maint: Add copyright notice.
8647 * djgpp/README.in: Likewise.
8648 * djgpp/config.bat: Likewise.
8649 * djgpp/config.site: Likewise.
8650 * djgpp/config_h.sed: Likewise.
8651 * djgpp/djunpack.bat: Likewise.
8652 * djgpp/config.sed: Fix copyright notice to match standard format.
8653 * djgpp/subpipe.h: Likewise.
8654 * lib/bitsetv-print.c: Likewise.
8655 * lib/bitsetv.c: Likewise.
8656 * lib/subpipe.h: Likewise.
8657 * lib/timevar.c: Likewise.
8658 * lib/timevar.h: Likewise.
8659 * djgpp/subpipe.c: Use standard recipe for config.h.
8660 * lib/abitset.c: Likewise.
8661 * lib/bitset.c: Likewise.
8662 * lib/bitset_stats.c: Likewise.
8663 * lib/bitsetv-print.c: Likewise.
8664 * lib/bitsetv.c: Likewise.
8665 * lib/ebitsetv.c: Likewise.
8666 * lib/get-errno.c: Likewise.
8667 * lib/lbitset.c: Likewise.
8668 * lib/subpipe.c: Likewise.
8669 * lib/timevar.c: Likewise.
8670 * lib/vbitset.c: Likewise.
8671 * tests/local.at: Likewise.
8672 * src/scan-gram.l: Don't include verify.h, since system.h does
8673 that for us.
8674 * .x-sc_require_config_h: New file.
8675 * .x-sc_unmarked_diagnostics: New file.
8676
8677 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8678
8679 Be a bit more systematic about using 'abort'.
8680 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8681 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8682 Put 'default: abort ();' before some other case, to satisfy older
8683 pedantic compilers.
8684 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8685 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8686 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8687 * src/conflicts.c (resolve_sr_conflict): Likewise.
8688 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8689 (get_decision_str, get_orientation_str, get_node_alignment_str):
8690 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8691 (get_linestyle_str, get_arrowstyle_str): Likewise.
8692 * src/conflicts.c (resolve_sr_conflict):
8693 Use a default case rather than one for the one remaining enum
8694 value, to catch invalid enum values as well.
8695 * src/lalr.c (set_goto_map, map_goto):
8696 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8697 * src/nullable.c (nullable_compute, token_definitions_output):
8698 Likewise.
8699 * src/reader.c (packgram, reader): Likewise.
8700 * src/state.c (transitions_to, state_new, state_reduction_find):
8701 Likewise.
8702 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8703 (symbol_pack): Likewise.
8704 * src/tables.c (conflict_row, pack_vector): Likewise.
8705 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8706 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8707 * src/system.h: Don't include <assert.h>.
8708 (assert): New macro.
8709
8710 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8711 (Destructor Decl, Parser Function, Pure Calling):
8712 Describe rules for braces inside C code more carefully.
8713
8714 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8715
8716 Fix some porting glitches found by Nelson H. F. Beebe.
8717 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8718 compilers that don't understand that abort () does not return.
8719 * src/state.c (transitions_to): Likewise.
8720 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8721 that '#include <cstdlib>' works.
8722 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8723 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8724 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8725 for the benefit of some pre-C99 compilers.
8726
8727 * bootstrap: Undo changes to gnulib files that autoreconf made.
8728
8729 Minor fixups to get 'make maintainer-check' to work.
8730 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8731 with the new verify.h implementation.
8732 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8733 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8734 * data/yacc.c (YYUSE): Likewise.
8735 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8736 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8737 * src/parse-gram.y (declaration): Don't pass a string constant
8738 to a function that expects char *, since GCC might complain
8739 about the constant value.
8740 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8741 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8742 before #defining them.
8743 * tests/glr-regression.at
8744 (Incorrectly initialized location for empty right-hand side in GLR):
8745 In yyerror, use the msg arg.
8746 (Corrupted semantic options if user action cuts parse):
8747 (Incorrect lookahead during deterministic GLR):
8748 (Incorrect lookahead during nondeterministic GLR):
8749 Don't name a local var 'index'; it shadows string.h's 'index'.
8750
8751 2006-01-19 Akim Demaille <akim@epita.fr>
8752
8753 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8754 location, not just parts of it.
8755
8756 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8757
8758 * NEWS: Document the fact that multiple %unions are now allowed.
8759 * doc/bison.texinfo (Union Decl): Likewise.
8760 * TODO: This feature is now implemented, so remove it from
8761 the wishlist.
8762
8763 * Makefile.maint: Merge with coreutils Makefile.maint.
8764 (CVS_LIST): Use build-aux version if available.
8765 (VERSION_REGEXP): New macro.
8766 (syntax-check-rules): Add sc_no_if_have_config_h,
8767 sc_prohibit_assert_without_use, sc_require_config_h,
8768 sc_useless_cpp_parens.
8769 (sc_obsolete_symbols): Check for O_NDELAY.
8770 (sc_dd_max_sym_length): Track coreutils.
8771 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8772 (sc_useless_cpp_parens): New rule.
8773 (news-date-check): Look for version or today's date.
8774 (changelog-check): Don't require version number near head.
8775 (copyright-check): Use current year instead of hardwiring 2005.
8776 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8777 (announcement): Add --gpg-key-ID.
8778
8779 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8780 with "file system".
8781
8782 Avoid undefined behavior that addressed just before the start of an
8783 array. Problem reported by twlevo.
8784 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8785 * src/lalr.c (build_relations): Rely on new sentinel.
8786 * src/gram.c (gram_free): Adjust to new sentinel.
8787
8788 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8789
8790 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8791 yylookaheadNeeds. All uses updated.
8792 (yysplitStack): Rename local yynewLookaheadStatuses to
8793 yynewLookaheadNeeds.
8794 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8795 GLR): In comments, change `lookahead status' to `lookahead need'.
8796
8797 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8798
8799 * data/glr.c (yysplitStack): A little stylistic rewrite.
8800
8801 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8802
8803 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8804
8805 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8806
8807 * doc/bison.texinfo: Fix some typos.
8808 (GLR Semantic Actions): New subsection discussing special
8809 considerations because GLR semantic actions might be deferred.
8810 (Actions): Mention look-ahead usage of yylval.
8811 (Actions and Locations): Mention look-ahead usage of yylloc.
8812 (Special Features for Use in Actions): Add YYEOF entry and mention it
8813 in the yychar entry.
8814 In the yychar entry, remove mention of the local yychar case (pure
8815 parser) since this is irrelevant information when writing semantic
8816 actions and since it's already discussed in `Table of Symbols' where
8817 yychar is otherwise described as an external variable.
8818 In the yychar entry, don't call it the `current' look-ahead since it
8819 isn't when semantic actions are deferred.
8820 In the yychar and yyclearin entries, add note about deferred semantic
8821 actions.
8822 Add yylloc and yylval entries discussing look-ahead usage.
8823 (Look-Ahead Tokens): When discussing yychar, don't call it the
8824 `current' look-ahead, and do mention yylval and yylloc.
8825 (Error Recovery): Cross-reference `Action Features' when mentioning
8826 yyclearin.
8827 (Table of Symbols): In the yychar entry, don't call it the `current'
8828 look-ahead.
8829 In the yylloc and yylval entries, mention look-ahead usage.
8830
8831 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8832
8833 * tests/glr-regression.at: Update copyright year to 2006.
8834
8835 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8836
8837 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8838 use during nondeterministic operation to track which stacks have
8839 actually needed the current lookahead.
8840 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8841 Allocate, deallocate, resize, and otherwise shuffle space for
8842 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8843 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8844 appropriately during nondeterministic operation.
8845 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8846 members to store the current lookahead to be used by the deferred
8847 user action.
8848 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8849 from which the RHS is taken. Set the lookahead members of the new
8850 yySemanticOption according to the lookahead status for stack yyk.
8851 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8852 yyaddDeferredAction.
8853 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8854 members of yySemanticOption before invoking yyuserAction, and then set
8855 them back to their current values afterward.
8856 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8857 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8858 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8859 titles for consistency.
8860 (Leaked merged semantic value if user action cuts parse): In order to
8861 suppress lint warnings, use arguments in merge function, and assign
8862 char value < 128 in main.
8863 (Incorrect lookahead during deterministic GLR): New test case.
8864 (Incorrect lookahead during nondeterministic GLR): New test case.
8865
8866 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8867
8868 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8869 !yyvaluep as signal that no semantic value is available to print.
8870 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8871 to print a semantic value.
8872
8873 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8874
8875 * tests/glr-regression.at: For consistency with my newer test cases,
8876 don't thank myself.
8877
8878 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8879
8880 * data/glr.c (yyresolveValue): When merging semantic options, if at
8881 least one user action succeeds but a later one cuts the parse, then
8882 destroy the semantic value before returning rather than leaking it.
8883 (yyresolveStates): If a user action cuts the parse and thus
8884 yyresolveValue fails, ignore the (unset) semantic value rather than
8885 corrupting the yyGLRState, and empty the semantic options list since
8886 the user actions should have called all necessary destructors.
8887 Simplify code with YYCHK.
8888 * tests/glr-regression.at (Corrupted semantic options if user action
8889 cuts parse): New test case.
8890 (Undesirable destructors if user action cuts parse): New test case.
8891 Before applying any of this patch, this test case never actually failed
8892 for me... but only because the corrupted semantic options usually
8893 masked this bug.
8894 (Leaked merged semantic value if user action cuts parse): New test
8895 case.
8896
8897 2006-01-05 Akim Demaille <akim@epita.fr>
8898
8899 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8900
8901 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8902
8903 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8904 _MSC_VER. Problem reported by Cenzato Marco.
8905 (b4_c_function_def): Use it.
8906 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8907 b4_c_modern.
8908 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8909 than rolling our own.
8910
8911 2006-01-04 Akim Demaille <akim@epita.fr>
8912
8913 Also warn about non-used mid-rule values.
8914 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8915 member.
8916 (symbol_list_new): Adjust.
8917 * src/reader.c (symbol_typed_p): New.
8918 (grammar_rule_check): Use it.
8919 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8920 Check its rule.
8921 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8922 Use it.
8923 * tests/actions.at (Exotic Dollars): Adjust.
8924
8925 2006-01-04 Akim Demaille <akim@epita.fr>
8926
8927 * src/reader.c (grammar_midrule_action): If $$ is set in a
8928 mid-rule, move the `used' bit to its lhs.
8929 * tests/input.at (Unused values): New.
8930 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8931
8932 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8933
8934 * doc/bison.texinfo (Bison Options): Say more accurately what
8935 --yacc does.
8936 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8937 about declarations in the grammar when in Yacc mode, as POSIX does
8938 not require a diagnostic when the grammar uses extensions.
8939
8940 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8941
8942 Warn about dubious constructions like "%token T T".
8943 Reported by twlevo.
8944 * src/symtab.h (struct symbol.declared): New member.
8945 * src/symtab.c (symbol_new): Initialize it to false.
8946 (symbol_class_set): New arg DECLARING, specifying whether
8947 this is a declaration that we want to warn about, if there
8948 is more than one of them. All uses changed.
8949
8950 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8951 Allow multiple %union directives, whose contents concatenate.
8952 * src/parse-gram.y (grammar_declaration): Likewise.
8953 Use muscle_code_grow, so that we don't need stype_line any more.
8954 All uses changed.
8955
8956 * src/muscle_tab.c (muscle_grow): Fix comment.
8957
8958 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8959 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8960 Update copyright year to 2006.
8961
8962 2006-01-03 Akim Demaille <akim@epita.fr>
8963
8964 Have glr.cc pass (some of) the calc.at tests.
8965 * data/glr.cc (b4_parse_param_orig): New.
8966 (b4_parse_param): Improve its definition, and bound it more
8967 clearly in the skeleton.
8968 (b4_epilogue): Append, instead of prepending, in order to keep
8969 #line consistency.
8970 Simplify the generation of auxiliary functions: locations and
8971 purity are mandated.
8972 (b4_global_tokens_and_yystype): Honor it.
8973 * data/location.cc (c++.m4): Don't include it.
8974 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8975 and AT_SKEL_CC_IF.
8976 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8977 AT_LALR1_CC_IF.
8978 Be sure to initialize the first position's filename.
8979 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8980 mandated anyway.
8981 (AT_CHECK_CALC_GLR_CC): New.
8982 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8983
8984 2006-01-02 Akim Demaille <akim@epita.fr>
8985
8986 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8987 c.m4.
8988 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8989 * data/glr.cc: Do not include stack.hh.
8990
8991 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8992
8993 * data/glr.c: Reformat whitespace with tabs.
8994 (b4_lpure_formals): Remove this unused m4 macro.
8995 * tests/cxx-type.at: Reformat whitespace with tabs.
8996 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8997 since it's a member. Rename type to isNterm for clarity.
8998
8999 2005-12-29 Akim <akim@sulaco.local>
9000
9001 Let glr.cc catch up with symbol_value_print.
9002 * data/glr.cc (b4_yysymprint_generate): Replace by...
9003 (b4_yy_symbol_print_generate): this.
9004 (yy_symbol_print, yy_symbol_value_print): Declare them.
9005
9006 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9007
9008 * src/location.h (boundary): Note that a line or column equal
9009 to INT_MAX indicates an overflow.
9010 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9011 (rule_length_overflow, increment_rule_length, add_column_width):
9012 New functions.
9013 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9014 (<SC_BRACED_CODE>"}"):
9015 Use increment_rule_length rather than incrementing it by hand.
9016 (adjust_location, handle_syncline): Diagnose overflow.
9017 (handle_action_dollar, handle_action_at):
9018 Fix bug with monstrosities like $-2147483648.
9019 Remove now-unnecessary checks.
9020 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9021 (convert_ucn_to_byte): Verify assumptions.
9022 (handle_syncline): New arg LOC. All callers changed.
9023 Don't store through a value derived from char const * pointer.
9024
9025 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9026 GCC warnings.
9027
9028 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9029
9030 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9031 Remove unnecessary forward static decls.
9032
9033 2005-12-27 Akim Demaille <akim@epita.fr>
9034
9035 * src/reader.c (grammar_current_rule_check): Also check that $$
9036 is used.
9037 Take the rule to check as argument, hence rename as...
9038 (grammar_rule_check): this.
9039 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9040 Rename as...
9041 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9042 (grammar_midrule_action, grammar_symbol_append): Now static.
9043 * tests/torture.at (input): Don't rely on the default action
9044 being always performed.
9045 * tests/calc.at: "Set" $$ even when the action is "cut" with
9046 YYERROR or other.
9047 * tests/actions.at (Exotic Dollars): Instead of using unused
9048 values, check that the warning is issued.
9049
9050 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9051
9052 * NEWS: Improve wording for unused-value warnings.
9053
9054 2005-12-22 Akim Demaille <akim@epita.fr>
9055
9056 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9057 (b4_yysymprint_generate): Rename as...
9058 (b4_yy_symbol_print_generate): this.
9059 Generate yy_symbol_print instead of yysymprint.
9060 Generate also yy_symbol_value_print, and use it.
9061
9062 2005-12-22 Akim Demaille <akim@epita.fr>
9063
9064 * NEWS: Warn about unused values.
9065 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9066 a `used' member.
9067 (symbol_list_n_get, symbol_list_n_used_set): New.
9068 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9069 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9070 * src/reader.c (grammar_current_rule_check): Check that values are
9071 used.
9072 * src/symtab.c (symbol_print): Accept 0.
9073 * tests/existing.at: Remove the type information.
9074 Empty the actions.
9075 Remove useless actions (beware of mid-rule actions: perl -000
9076 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9077 * tests/actions.at (Exotic Dollars): Use unused values.
9078 * tests/calc.at: Likewise.
9079 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9080 Likewise.
9081
9082 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9083 rule_useful_p.
9084
9085 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9086
9087 Undo 2005-12-01 tentative license wording change. The wording is
9088 still being reviewed by the lawyers, and we don't want to wait for
9089 them before publishing a test release. For now, revert to the
9090 previous wording.
9091 * NEWS: Undo 2005-12-01 change.
9092 * data/glr.c: Revert to previous license wording.
9093 * data/glr.cc: Likewise.
9094 * data/lalr1.cc: Likewise.
9095 * data/location.cc: Likewise.
9096 * data/yacc.c: Likewise.
9097
9098 * NEWS: Reword %destructor vs YYABORT etc.
9099 * data/glr.c: Use American spacing, for consistency.
9100 * data/glr.cc: Likewise.
9101 * data/lalr1.cc: Likewise.
9102 * data/yacc.c: Likewise.
9103 * data/yacc.c: Reformat comments slightly.
9104 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9105 for consistency. Fix some spelling errors and reword recently-included
9106 text slightly.
9107 * tests/cxx-type.at: Cast results of malloc, for C++.
9108
9109 2005-12-21 Joel E. Denny <address@hidden>
9110
9111 * tests/cxx-type.at: Construct a tree, count the parents of shared
9112 nodes, and free each node once and only once. Previously, the memory
9113 for semantic values was leaked instead.
9114
9115 2005-12-21 Joel E. Denny <address@hidden>
9116
9117 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9118 (yylval, yylloc): If pure, #define to yystackp->yyval and
9119 yystackp->yyloc similar to yychar and yynerrs.
9120 (yyparse): If pure, remove local yylval and yylloc. Add local
9121 yystackp to accommodate pure definitions of yylval and yylloc.
9122 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9123 yylvalp and yyllocp to &yylval and &yylloc.
9124 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9125 namespace. Previously, nerrs and char were missing, but lval and lloc
9126 weren't necessary.
9127 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9128 yylvalp and yyllocp parameters since, if pure, these are now always
9129 accessible through yystackp. If not pure, they are still accessible
9130 globally.
9131 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9132 `if (YYID (N))' to pacify lint.
9133
9134 2005-12-21 Akim Demaille <akim@epita.fr>
9135
9136 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9137 destroy the RHS symbols of a rule.
9138 * data/yacc.c (yylen): Initialize to 0.
9139 Keep its value to the number of items to possibly shift.
9140 In particular, a regular successful parse that ends on YYFINAL by
9141 a (internal) YYACCEPT must not have yylen != 0.
9142 (yyerrorlab, yyreturn): Pop the RHS.
9143 Reorder a bit to emphasize the `shifting' bits of code.
9144 (YYPOPSTACK): Now accept a number of items to pop.
9145 * data/lalr1.cc: Likewise.
9146 * data/glr.c: Formatting changes.
9147 Use goto instead of fall through.
9148 * doc/bison.texinfo (Destructor Decl): Complete.
9149
9150 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9151
9152 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9153 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9154 * djgpp/config.bat: Replace every occurence of the file name
9155 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9156 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9157 * djgpp/config.sed: Replace every occurence of the file name
9158 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9159 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9160 * djgpp/djunpack.bat: DJGPP specific file.
9161 * djgpp/fnchange.lst: DJGPP specific file.
9162 * djgpp/README.in: Add new information about how to unpack the bison
9163 source on MSDOS and other systems which have 8.3 file name restrictions
9164 using djunpack.bat and fnchange.lst.
9165
9166 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9167
9168 * bootstrap (build_cvs_prefix): Remove; unused.
9169 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9170 when getting gnulib.
9171
9172 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9173
9174 * data/glr.c: Reorder typedef declarations for structs to match order
9175 of struct declarations.
9176 Rename yystack everywhere to yystackp except in yyparse where it's not
9177 a pointer.
9178 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9179 consistency.
9180 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9181 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9182 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9183 lint.
9184
9185 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9186
9187 * tests/sets.at (Accept): Fix typos in regular expression used to
9188 sed out the final state number.
9189
9190 Work around portability problem on Solaris 10: flex-generated
9191 files include <stdio.h> before <config.h>, which messes up
9192 because the latter defines __EXTENSIONS__. Address the problem
9193 by creating two new little files that include <config.h> first,
9194 then include the flex-generated files. Rewrite everyone else
9195 to include <config.h> first, as well.
9196 * lib/timevar.c: Always include "config.h".
9197 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9198 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9199 (EXTRA_bison_SOURCES): New macro.
9200 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9201 * src/system.h: Don't include config.h.
9202 * src/LR0.c: Include <config.h> first.
9203 * src/assoc.c: Likewise.
9204 * src/closure.c: Likewise.
9205 * src/complain.c: Likewise.
9206 * src/conflicts.c: Likewise.
9207 * src/derives.c: Likewise.
9208 * src/files.c: Likewise.
9209 * src/getargs.c: Likewise.
9210 * src/gram.c: Likewise.
9211 * src/lalr.c: Likewise.
9212 * src/location.c: Likewise.
9213 * src/main.c: Likewise.
9214 * src/muscle_tab.c: Likewise.
9215 * src/nullable.c: Likewise.
9216 * src/output.c: Likewise.
9217 * src/parse-gram.y: Likewise.
9218 * src/print.c: Likewise.
9219 * src/print_graph.c: Likewise.
9220 * src/reader.c: Likewise.
9221 * src/reduce.c: Likewise.
9222 * src/relation.c: Likewise.
9223 * src/state.c: Likewise.
9224 * src/symlist.c: Likewise.
9225 * src/symtab.c: Likewise.
9226 * src/tables.c: Likewise.
9227 * src/uniqstr.c: Likewise.
9228 * src/vcg.c: Likewise.
9229
9230 * src/parse-gram.y: Fix minor problems uncovered by lint.
9231 (current_lhs, current_lhs_location): Now static.
9232 (current_assoc): Remove unused variable.
9233
9234 Cleanups so that Bison-generated parsers have less lint.
9235 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9236 Prepend /*ARGSUSED*/, for lint's sake.
9237 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9238 definition if 'lint' is defined.
9239 (YYID): New macro (or function, if lint).
9240 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9241 * data/yacc.c: Likewise.
9242 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9243 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9244 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9245 is C++ only.
9246 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9247 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9248 Use YYID(0) rather than 0, for lint.
9249 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9250 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9251
9252 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9253
9254 * tests/glr-regression.at
9255 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9256 Close memory leak reported by twlevo.
9257
9258 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9259
9260 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9261 all stacks.
9262 (yyparse): Iterate another stack in order to call user destructors.
9263 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9264 New test case.
9265 (Duplicated user destructor for lookahead): This test now is expected
9266 to succeed.
9267
9268 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9269
9270 * NEWS: Document the following change.
9271 * data/yacc.c: Say "parser skeleton" rather than "file", since
9272 it's no longer just a file.
9273 * data/glr.c: Grant a special exception for C GLR parsers, that
9274 reads like the already-existing exception for C LALR(1) parsers.
9275 * data/glr.cc: Likewise.
9276 * data/lalr1.cc: Likewise.
9277 * data/location.cc: Likewise.
9278 * data/yacc.c: Reword the "written by" statement to clarify that
9279 it was the parser skeleton, not the entire output file.
9280 * data/glr.c: Written by Paul Hilfinger.
9281 * data/glr.cc: Written by Akim Demaille.
9282 * data/lalr1.cc: Likewise.
9283
9284 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9285
9286 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9287 Fix typos in previous change that broke 'make check'.
9288 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9289 supported in C.
9290 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9291 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9292 We can revert this once things settle down.
9293
9294 * src/conflicts.c (conflicts_print): Don't print file name twice
9295 when %expect fails because there were no conflicts.
9296 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9297 change.
9298 * tests/conflicts.at (%expect not enough, %expect too much):
9299 (%expect with reduce conflicts): Adjust to new behavior.
9300
9301 2005-11-18 Akim Demaille <akim@epita.fr>
9302
9303 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9304 errors.
9305 * NEWS: Document this.
9306 * doc/bison.texinfo (Expect Decl): Likewise.
9307
9308 2005-11-16 Akim Demaille <akim@epita.fr>
9309
9310 Generalize the display of semantic values and locations in traces.
9311 * data/glr.c (yy_reduce_print): Fix indices (again).
9312 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9313 literal integers.
9314 * data/lalr1.cc (yyreduce_print): Rename as...
9315 (yy_reduce_print): this.
9316 Display values and locations.
9317 * data/yacc.c (yy_reduce_print): Likewise.
9318 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9319 (yysymprint): Move higher to be visible from yy_reduce_print).
9320 (yyparse): Adjust.
9321 * tests/calc.at: Adjust the expected length of the traces.
9322
9323 2005-11-14 Akim Demaille <akim@epita.fr>
9324
9325 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9326 from 1 to N, while values and location start at 0.
9327 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9328
9329 2005-11-14 Akim Demaille <akim@epita.fr>
9330
9331 * data/glr.c (yy_reduce_print): Fix the $ number.
9332
9333 2005-11-14 Akim Demaille <akim@epita.fr>
9334
9335 "Use" parse parameters.
9336 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9337 * data/glr.c, data/glr.cc: Use them.
9338 * data/glr.c (YYUSE): Have a C++ definition that supports
9339 non-pointer types.
9340
9341 2005-11-14 Akim Demaille <akim@epita.fr>
9342
9343 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9344
9345 2005-11-14 Akim Demaille <akim@epita.fr>
9346
9347 * data/glr.cc: New.
9348 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9349
9350 2005-11-12 Akim Demaille <akim@epita.fr>
9351
9352 Let position and location be PODs.
9353 * data/location.cc (position::initialize, location::initialize): New.
9354 (position::position, location::location): Define only if
9355 b4_location_constructors is defined.
9356 * data/lalr1.cc (b4_location_constructors): Define it for backward
9357 compatibility.
9358 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9359
9360 2005-11-12 Akim Demaille <akim@epita.fr>
9361
9362 * data/lalr1.cc: Move the body of the ctor and dtor into the
9363 parser file (instead of the header).
9364 Wrap the implementations in a "namespace yy".
9365
9366 2005-11-12 Akim Demaille <akim@epita.fr>
9367
9368 Have glr.c include its header file when created.
9369 * data/glr.c (b4_shared_declarations): New.
9370 Output them verbatim in the parser if !%defines, otherwise
9371 output then in the header file, and include it instead.
9372
9373 2005-11-11 Akim Demaille <akim@epita.fr>
9374
9375 * data/glr.c: Comment changes.
9376
9377 2005-11-11 Akim Demaille <akim@epita.fr>
9378
9379 When yydebug, report semantic and location values for reductions.
9380 * data/glr.c (yy_reduce_print): Report the semantic values and the
9381 locations.
9382 (YY_REDUCE_PRINT): Adjust.
9383 (yyglrReduce): Use them.
9384 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9385 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9386 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9387 traces.
9388
9389 2005-11-10 Akim Demaille <akim@epita.fr>
9390
9391 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9392 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9393 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9394
9395 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9396
9397 * m4/cxx.m4, examples/Makefile.am: Don't build
9398 examples/calc++ if no C++ compiler is available. (trivial change)
9399
9400 2005-11-09 Akim Demaille <akim@epita.fr>
9401
9402 * src/scan-skel.l: Use a couple of asserts.
9403
9404 2005-11-03 Akim Demaille <akim@epita.fr>
9405
9406 In some (weird) cases, the final state number is incorrect.
9407 Reported by Alexandre Duret-Lutz.
9408 * src/LR0.c (state_list_append): Remove the computation of
9409 final_state.
9410 (save_reductions): Do it here.
9411 (get_state): Alpha conversion.
9412 (generate_states): Use a for loop.
9413 * src/gram.h (item_number_is_rule_number)
9414 (item_number_is_symbol_number): New.
9415 * src/state.c: Use assert.
9416 * src/system.h: Include assert.h.
9417 * tests/sets.at (Accept): New.
9418
9419 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9420
9421 * data/glr.c (yyfill): Adjust comment.
9422 (yyresolveAction): Initialize default location properly
9423 for empty right-hand sides.
9424 (yydoAction): Ditto.
9425 Add comment explaining apparently dead code.
9426 * tests/glr-regression.at
9427 (Incorrectly initialized location for empty right-hand side in GLR):
9428 New test.
9429
9430 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9431
9432 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9433 gnulib when interrupted. This fixes some race conditions and
9434 works around some portability problems (one noted by Paul
9435 Hilfinger).
9436
9437 2005-10-22 Akim <akim@epita.fr>
9438
9439 * Makefile.cfg: Adjust to config -> build-aux.
9440 Reported by twledo.
9441
9442 2005-10-21 Akim Demaille <akim@epita.fr>
9443
9444 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9445 the %parse-params.
9446 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9447 * data/yacc.c (b4_Pure_if): Rename as...
9448 (b4_yacc_pure_if): this.
9449 (YY_SYMBOL_PRINT, yyparse): Adjust.
9450 * doc/bison.texinfo: Formatting changes.
9451
9452 2005-10-21 Akim Demaille <akim@epita.fr>
9453
9454 Finish the transition config -> build-aux.
9455 * configure.ac, Makefile.am: Use build-aux.
9456 * config/prev-version, config/announce-gen, config/Makefile.am:
9457 Move to...
9458 * build-aux/prev-version, build-aux/announce-gen,
9459 * build-aux/Makefile.am: here.
9460
9461 2005-10-14 Akim Demaille <akim@epita.fr>
9462
9463 * examples/calc++/test: Use set -x only when VERBOSE.
9464
9465 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9466
9467 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9468 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9469
9470 2005-10-13 Akim Demaille <akim@epita.fr>
9471
9472 * src/scan-skel.l: Output the base name parts of the parser and
9473 header file names.
9474 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9475 additional checks.
9476 Use this to exercise C++ outputs in subdirs.
9477 Reported by Oleg Smolsky.
9478
9479 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9480
9481 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9482 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9483 Problem reported by John P. Hartmann.
9484 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9485 already defined it.
9486
9487 2005-10-12 Akim Demaille <akim@epita.fr>
9488
9489 * src/parse-gram.y (version_check): Exit 63 to please missing
9490 (stands for "version mismatch).
9491 * tests/input.at, doc/bison.texinfo: Adjust.
9492
9493 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9494
9495 Work around portability problems with Visual Age C compiler
9496 (xlc and xlC_r) reported by John P. Hartmann.
9497 * data/location.cc (initial_column, initial_line): Remove.
9498 All uses replaced by 0 and 1.
9499 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9500 that xlc complains about.
9501 * src/scan-skel.l (skel_wrap): Likewise.
9502 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9503 as __STDC__.
9504 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9505 __STDC_VERSION__. Use it everywhere instead of looking at
9506 __STDC__ and __cplusplus.
9507
9508 2005-10-10 Akim Demaille <akim@epita.fr>
9509
9510 * examples/calc++/test: Be quiet unless VERBOSE.
9511
9512 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9513
9514 * data/c.m4 (yydestruct, yysymprint):
9515 Use YYUSE instead of casting to void.
9516 * data/glr.c (YYUSE): New macro.
9517 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9518 Use it instead of rolling our own.
9519 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9520 (YYCHK1):
9521 Use /*CONSTCOND*/ to suppress lint warnings.
9522 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9523 (YY_STACK_PRINT): Use 'false' not '0'.
9524 (YYUSE): New macro.
9525 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9526 * data/yacc.c (YYUSE): New macro.
9527 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9528 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9529 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9530
9531
9532 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9533 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9534
9535 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9536
9537 Undo the parts of the unlocked-I/O change that substituted
9538 putc or puts for printf. This might hurt performance a bit,
9539 but some people prefer the printf style.
9540 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9541 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9542 All uses replaced by YYFPRINTF and YYDPRINTF.
9543 * data/yacc.c: Likewise.
9544 * lib/bitset.c (bitset_print): Likewise.
9545 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9546 putc and puts.
9547 * lib/lbitset.c (debug_lbitset): Likewise.
9548 * src/closure.c (print_firsts, print_fderives): Likewise.
9549 * src/gram.c (grammar_dump): Likewise.
9550 * src/lalr.c (look_ahead_tokens_print): Likewise.
9551 * src/output.c (escaped_output): Likewise.
9552 (user_actions_output): Break apart two printfs.
9553 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9554 * src/reduce.c (reduce_print): Likewise.
9555 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9556 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9557
9558 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9559 Use assignments rather than casts-to-void to suppress
9560 unused-variable warnings. This pacifies 'lint'.
9561 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9562 unused-variable warnings.
9563
9564 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9565
9566 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9567
9568 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9569
9570 Use unlocked I/O for a minor performance improvement on hosts like
9571 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9572 is to use the gnlib unlocked-io module, and to prefer putc and
9573 puts to printf when either will work (since the latter doesn't
9574 come in an unlocked flavor).
9575 * bootstrap (gnulib_modules): Add unlocked-io.
9576 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9577 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9578 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9579 and similarly for puts and putc and printf.
9580 * data/yacc.c: Likewise.
9581 * lib/bitset.c (bitset_print): Likewise.
9582 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9583 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9584 to printf.
9585 * lib/lbitset.c (debug_lbitset): Likewise.
9586 * src/closure.c (print_firsts, print_fderives): Likewise.
9587 * src/gram.c (grammar_dump): Likewise.
9588 * src/lalr.c (look_ahead_tokens_print): Likewise.
9589 * src/output.c (escaped_output): Likewise.
9590 (user_actions_output): Coalesce two printfs.
9591 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9592 * src/reduce.c (reduce_print): Likewise.
9593 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9594 * src/system.h: Include unlocked-io.h rather than stdio.h.
9595
9596 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9597 this confuses xgettext.
9598
9599 2005-10-02 Akim Demaille <akim@epita.fr>
9600
9601 * bootstrap (gnulib_modules): Add strverscmp.
9602 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9603 * m4/.cvsignore: Add strverscmp.m4.
9604 * src/parse-gram.y (%require): New token, new rule.
9605 (version_check): New.
9606 * src/scan-gram.l (%require): Adjust.
9607 * tests/input.at (AT_REQUIRE): New.
9608 Use it.
9609 * doc/bison.texinfo (Require Decl): New.
9610 (Calc++ Parser): Use %require.
9611
9612 2005-10-02 Akim Demaille <akim@epita.fr>
9613
9614 * data/location.cc: New.
9615
9616 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9617 Akim Demaille <akim@epita.fr>
9618
9619 Make sure -odir/foo.cc creates dir/location.hh etc.
9620 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9621 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9622 (spec_defines_file): Now const.
9623 (dir_prefix): New.
9624 (short_base_name): Remove.
9625 * src/files.c: Adjust.
9626 (dirname.h): Include.
9627 (base_name): Don't prototype it.
9628 (finput): Remove, duplicates gram_in.
9629 (full_base_name, short_base_name): Replace by...
9630 (all_but_ext, all_but_tab_ext): these.
9631 (compute_base_names): Rename as...
9632 (compute_file_name_parts): this.
9633 Update to compute the new variables, including dir_prefix.
9634 Adjust dependencies.
9635 * src/output.c (prepare): Output them.
9636 * src/reader.c: Adjust to use gram_in, not finput.
9637 * src/scan-skel.l (@dir_prefix@): New.
9638
9639 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9640
9641 * lib/subpipe.c: New function end_of_output_subpipe() added
9642 to allow support for non-posix systems. This is a no-op function
9643 for posix systems.
9644
9645 * lib/subpipe.h: New function end_of_output_subpipe() added
9646 to allow support for non-posix systems. This is a no-op function
9647 for posix systems.
9648
9649 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9650 handle the lack of pipe/fork functionality on non-posix systems.
9651
9652 * djgpp/Makefile.maint: DJGPP specific file.
9653
9654 * djgpp/README.in: DJGPP specific file.
9655
9656 * djgpp/config.bat: DJGPP specific configuration file.
9657
9658 * djgpp/config.sed: DJGPP specific configuration file.
9659
9660 * djgpp/config.site: DJGPP specific configuration file.
9661
9662 * djgpp/config_h.sed: DJGPP specific configuration file.
9663
9664 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9665
9666 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9667
9668 2005-10-02 Akim Demaille <akim@epita.fr>
9669
9670 * data/location.cc: New, extract from...
9671 * data/lalr1.cc: here.
9672 (location.hh): Include it after the user prologue, in case the
9673 filename type is defined by the user.
9674 Forward declation location and position before the pre-prologue.
9675 (yyresult_): Rename as...
9676 (yyresult): this, it's a local variable, not an attribute.
9677 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9678
9679 2005-10-01 Akim Demaille <akim@epita.fr>
9680
9681 * examples/extexi: Restore the #line generation.
9682
9683 2005-09-30 Akim Demaille <akim@epita.fr>,
9684 Alexandre Duret-Lutz <adl@gnu.org>
9685
9686 Move the token type and YYSTYPE in the parser class.
9687 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9688 (parser::token): New, from the moved free definition of tokens.
9689 (parser::semantic_value): Now a full definition instead of an
9690 indirection to YYSTYPE.
9691 (b4_post_prologue): No longer included in the header file, but
9692 in the implementation file.
9693 * doc/bison.texi (C+ Language Interface): Update.
9694 * src/parse-gram.y: Support unary %define.
9695 * tests/actions.at: Define global_tokens_and_yystype for backward
9696 compatibility until we update the tests.
9697 * tests/calc.at: Idem.
9698 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9699 to simplify the code.
9700
9701 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9702
9703 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9704 Ah, the good old days! Problem reported by Peter Klein.
9705 * bootstrap (gnulib_modules): Add strerror, strtoul.
9706 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9707 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9708
9709 2005-09-29 Akim Demaille <akim@epita.fr>
9710
9711 * data/c.m4 (b4_error_verbose_if): New.
9712 * data/lalr1.cc: Use it.
9713 (YYERROR_VERBOSE_IF): Remove.
9714 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9715 parser members, replaced by...
9716 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9717 local variables.
9718 (yysyntax_error_): Takes the state number as argument.
9719 (yyreduce_print_): Use the argument yyrule, not the former
9720 attribute yyn_.
9721
9722 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9723
9724 * bootstrap (gnulib_modules): Add verify.
9725 * lib/.cvsignore: Add verify.h.
9726 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9727 * src/system.h (verify): Remove.
9728 Include verify.h instead.
9729 * src/tables.c (tables_generate): Use new API for 'verify'.
9730
9731 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9732
9733 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9734 local variables whose names begin with 'yy'.
9735 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9736 Trivial changes from Joel E. Denny.
9737
9738 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9739 it itself.
9740 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9741 don't use alloca any more.
9742
9743 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9744 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9745 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9746 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9747 to match yacc.c, to test more hosts.
9748
9749 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9750
9751 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9752 doesn't affect behavior.
9753 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9754 Solaris, AIX, MSC.
9755 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9756 This works a bit better with glibc, if user code has already included
9757 stdlib.h.
9758 * doc/bison.texinfo (Bison Parser): Document that users can't
9759 arbitrarily use malloc and free for other purposes. Document
9760 that <alloca.h> and <malloc.h> might be included.
9761 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9762 user must declare alloca.
9763
9764 * HACKING (release): Forwarn the Translation Project about
9765 stable releses.
9766
9767 2005-09-20 Akim Demaille <akim@epita.fr>
9768
9769 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9770
9771 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9772
9773 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9774 (YYSTACK_ALLOC_MAXIMUM): Use it.
9775 (yysyntax_error): New function.
9776 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9777 multiple syntax errors are reported, and alloca is being used.
9778 Instead, reallocate buffers twice as big each time, so that
9779 we waste at most half the allocated memory. Start with a small
9780 (128-byte) buffer that will suffice in most cases anyway.
9781 Use yysyntax_error to do most of the work.
9782
9783 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9784 yynerrs is the number of errors reported, not the number of
9785 errors encountered.
9786
9787 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9788 Mark it as expected to fail.
9789 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9790 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9791 Don't start user-code symbols with "yy", to avoid name space problems.
9792
9793 2005-09-19 Akim Demaille <akim@epita.fr>
9794
9795 Remove the traits, failed experiment.
9796 It never proved useful, and anyway because of the current
9797 definition, it was not possible to have several specialization of
9798 this traits, making it useless.
9799 * data/lalr1.cc (yy:traits): Remove.
9800 Inline its definitions in the parser class.
9801
9802 2005-09-19 Akim Demaille <akim@epita.fr>
9803
9804 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9805 least Mac OSX with a /usr/local install of gettext.
9806
9807 2005-09-19 Akim Demaille <akim@epita.fr>
9808
9809 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9810 and yytoken for similarity with the other skeletons.
9811
9812 2005-09-19 Akim Demaille <akim@epita.fr>
9813
9814 * NEWS, configure.ac: update version number to 2.1a.
9815
9816 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9817
9818 * NEWS: Version 2.1.
9819
9820 * NEWS: Remove notice of yytname change, since it was never in an
9821 official release.
9822 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9823 diagnostic.
9824 * src/output.c (prepare): Likewise.
9825 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9826 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9827 is not defined. This is an awful hack, but it's enough for now.
9828 All callers changed.
9829 * tests/glr-regression-at (make_value): Args are const pointers now,
9830 to avoid GCC warning.
9831 (Duplicated user destructor for lookahead): New test. Currently
9832 skipped. It fails on my host but I'm not sure it'll always fail.
9833
9834 2005-09-16 Akim Demaille <akim@epita.fr>
9835
9836 * src/symtab.h (struct symbol): Declare the printer and destructor
9837 as const, to avoid accidental calls to free.
9838 (symbol_destructor_set, symbol_printer_set): Adjust.
9839 * src/symtab.c: Adjust.
9840
9841 2005-09-16 Akim Demaille <akim@epita.fr>
9842
9843 * data/c.m4 (b4_token_enums): New.
9844 (b4_token_defines): Rename as...
9845 (b4_token_enums_defines): this.
9846 (b4_token_defines): New, output only the #defines.
9847 * data/yacc.c, data/glr.c: Adjust.
9848 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9849 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9850 as default values.
9851
9852 2005-09-16 Akim Demaille <akim@epita.fr>
9853
9854 * data/lalr1.cc (yylex_): Remove, inline its code.
9855 (yyreport_syntax_error_): Remove, replaced by...
9856 (yysyntax_error_): this which returns a string and leaves to the
9857 caller the call to the users' error function.
9858 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9859 Move from members of the parser object...
9860 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9861 to local variables of the parse function.
9862
9863 2005-09-16 Akim Demaille <akim@epita.fr>
9864
9865 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9866 since it's in Bison's name space.
9867
9868 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9869
9870 * data/glr.c (yyresolveValue): Add default case to pacify
9871 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9872
9873 * NEWS: Document when yyparse started to return 2.
9874 * doc/bison.texinfo (Parser Function): Document when yyparse
9875 returns 2.
9876
9877 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9878 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9879 changed.
9880 (class position): file_name -> filename (reverting). All uses changed.
9881
9882 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9883
9884 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9885 do anything if $@ exists. This reverts part of the 2005-07-07
9886 patch.
9887
9888 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9889
9890 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9891 contains obsolete information and isn't worth distributing as a
9892 separate file anyway.
9893 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9894 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9895 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9896 (yyparse): Abort if user code uses longjmp to throw an unexpected
9897 value.
9898
9899 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9900
9901 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9902 Suggested by twlevo@xs4all.nl.
9903
9904 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9905 This avoids a diagnostic from gcc -Wswitch-enum.
9906 Problem reported by twlevo@xs4all.nl.
9907
9908 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9909 standards. Use "file name" or "file" or "name", depending on
9910 the context.
9911 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9912 not to hack/foo.tab.c.
9913 (Calc++ Top Level): 2nd arg of main is not const.
9914 * data/glr.c: b4_filename -> b4_file_name.
9915 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9916 All uses changed.
9917 (class position): filename -> file_name. All uses changed.
9918 * data/yacc.c: b4_filename -> b4_file_name.
9919 * lib/bitset.h: filename -> file_name in local vars.
9920 * lib/bitset_stats.c: Likewise.
9921 * src/files.c: Likewise.
9922 * src/scan-skel.l ("@output ".*\n): Likewise.
9923 * src/files.c (file_name_split): Renamed from filename_split.
9924 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9925
9926 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9927
9928 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9929 to accommodate latest gnulib.
9930
9931 * tests/glr-regression.at (Duplicate representation of merged trees):
9932 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9933
9934 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9935 needed.
9936
9937 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9938
9939 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9940 All uses changed. Invoke user destructor after an error during a
9941 split parse (trivial change from Joel E. Denny).
9942
9943 * tests/glr-regression.at
9944 (User destructor after an error during a split parse): New test case.
9945 Problem reported by Joel E. Denny in:
9946 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9947
9948 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9949
9950 * README-cvs: Give URLs for recommended tools.
9951 Mention Gzip version problem, and bootstrapping issues.
9952 Remove troubleshooting section, as it's somewhat obsolete.
9953
9954 * bootstrap (no_cache): New var, to accommodate different wget
9955 variants. Use it instead of '-C off'. Problem reported by
9956 twlevo@xs4all.nl.
9957
9958 * data/glr.c (yydestroyStackItem): New function.
9959 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9960 debugging information. Problem reported by Joel E. Denny.
9961
9962 2005-08-25 Akim Demaille <akim@epita.fr>
9963
9964 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9965
9966 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9967
9968 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9969 Don't invoke destructor on unresolved entries.
9970 * tests/glr-regression.at
9971 (User destructor for unresolved GLR semantic value): New test case.
9972 Problem reported by Joel E. Denny in:
9973 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9974
9975 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9976
9977 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9978 Add strnlen.c.
9979 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9980 lib-prefix.m4, po.m4.
9981
9982 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9983 in yydestruct diagnostic, since it might not be an error.
9984 Problem reported by Joel Denny near end of
9985 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9986 * data/lalr1.cc (yyerturn): Likewise.
9987 * data/yacc.c (yyreturn): Likewise.
9988 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9989
9990 * src/files.c: Remove obsolete FIXME comment.
9991
9992 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9993 with the other templates, and to fix bogus run-on messages such
9994 as the one reported at the end of
9995 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9996 All callers changed to avoid the newline.
9997 (yyprocessOneStack): Output two lines rather than one, to accommodate
9998 the above change. This changes the debug output format slightly.
9999
10000 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10001 reported by Joel E. Denny in
10002 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10003 (trivial change).
10004 * tests/glr-regression.at (Duplicate representation of merged trees):
10005 New test, from Joel E. Denny in:
10006 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10007 * THANKS: Add Joel E. Denny.
10008
10009 * configure.ac (AC_INIT): Bump to 2.0c.
10010
10011 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10012
10013 * NEWS: Version 2.0b.
10014
10015 * Makefile.am (SUBDIRS): Put examples before tests, so that
10016 "make check" doesn't finish with "All 1 tests passed".
10017
10018 * tests/regression.at (Token definitions): Don't rely on
10019 AT_PARSER_CHECK for data that contains backslashes. It currently
10020 uses 'echo', and 'echo' isn't portable if its argument contains
10021 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10022 that the byte '\0xff' is not printable in the C locale; it is,
10023 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10024 not printable, so use '\0x81' to test.
10025
10026 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10027 version of GCC, since the macro is used with non-GCC compilers.
10028
10029 Fix core dump reported by Pablo De Napoli in
10030 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10031 * tests/regression.at (Invalid inputs with {}): New test.
10032 * src/parse-gram.y (token_name): Translate type before using
10033 it as an index.
10034
10035 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10036 the user's name space. All uses changed to __attribute__
10037 ((__unused__)).
10038 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10039 Add __attribute__ ((__noreturn__)).
10040
10041 * etc/clcommit: Remove. We weren't using it, and it failed
10042 "make maintainer-distcheck".
10043 * Makefile.maint: Merge from coreutils.
10044 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10045 (syntax-check-rules): Change list of rules as described below.
10046 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10047 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10048 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10049 (sc_trailing_space): New rules.
10050 (sc_xalloc_h_in_src): Remove.
10051 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10052 (sc_space_tab, sc_error_exit_success, sc_changelog):
10053 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10054 (makefile-check, po-check, author_mark_check):
10055 (makefile_path_separator_check, copyright-check):
10056 Use grep -n, to make it easier to find violations.
10057 Use CVS_LIST and CVS_LIST_EXCEPT.
10058 (header_regexp, h_re): Remove.
10059 (dd_c): New macro.
10060 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10061 (my-distcheck): Use more-modern GCC flags.
10062 (signatures, %.asc): Remove.
10063 (rel-files, announcement): Remove signatures.
10064 Restore old updating code, even though we don't use it, so
10065 that we're the same as coreutils.
10066 (alpha, beta, major): Depend on news-date-check.
10067 Make the upload commands.
10068
10069 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10070 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10071 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10072 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10073 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10074 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10075 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10076 * tests/sets.at: Likewise.
10077
10078 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10079 we comment out the Autoconf version number.
10080 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10081 it's error-prone and "make maintainer-distcheck" rejects it.
10082
10083 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10084 Indent calls to "error" to pacify "make maintainer-distcheck",
10085 when the calls are not intended to be translated.
10086 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10087
10088 * src/Makefile.am (DEFS): Use +=, to pacify
10089 "make maintainer-distcheck".
10090 (bison_SOURCES): Add scan-skel.h.
10091 (sc_tight_scope): New rule, from coreutils.
10092
10093 * src/files.c (src_extension, header_extension):
10094 Now static, not extern.
10095 * src/getargs.c (short_options): Likewise.
10096 * src/muscle_tab.c (muscle_table): Likewise.
10097 * src/parse-gram.y (current_class, current_type, current_prec):
10098 Likewise.
10099 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10100 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10101 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10102 void, to avoid warning when NLS is disabled.
10103 * src/output.c: Include scan-skel.h.
10104 (scan_skel): Remove decl, since scan-skel.h does this.
10105 (output_skeleton):
10106 Indent calls to "error" to pacify "make maintainer-distcheck".
10107 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10108 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10109 "make maintainer-distcheck".
10110 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10111 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10112 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10113 (skel_lex_destroy, scan_skel): Move these decls to...
10114 * src/scan-skel.h: New file.
10115 * src/uniqstr.c (uniqstr_assert):
10116 Indent calls to "error" to pacify "make maintainer-distcheck".
10117
10118 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10119 not @VAR@.
10120
10121 * tests/torture.at: Revamp to avoid misuse of atoi that
10122 "make maintainer-distcheck" complained about.
10123
10124 * examples/extexi (message): Don't print a message more than once,
10125 and omit line-number decoration that makes Emacs compile think
10126 that informative messages are worth worrying about.
10127
10128 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10129
10130 * configure.ac: Update version number.
10131
10132 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10133 accidentally.
10134 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10135 autogenerated by the maintainer.
10136 * examples/calc++/.cvsignore: Add *.yy.
10137
10138 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10139 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10140 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10141
10142 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10143
10144 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10145 from maintainer-distcheck about casting the argument of 'free'.
10146
10147 * NEWS: Mention recent yytname changes.
10148 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10149
10150 * bootstrap: For translations that have not yet been upgraded to
10151 the new runtime-po domain, prime the pump by extracting the
10152 relevant strings from the obsolete translations. This code can be
10153 removed once the bison-runtime domain has been translated by each
10154 team.
10155
10156 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10157 now that token names are already quoted.
10158
10159 Fix problem reported by Anthony Heading.
10160 * data/glr.c (YYTOKEN_TABLE): New macro.
10161 (yytname): Define if YYTOKEN_TABLE.
10162 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10163 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10164 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10165 * src/output.c (prepare_symbols): Output token_table_flag.
10166
10167 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10168
10169 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10170 again if the first call fails.
10171
10172 * data/glr.c (yytnamerr): New function.
10173 (yyreportSyntaxError): Use it to dequote most string literals.
10174 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10175 with other skeletons. All uses changed.
10176 (yytnameerr_): New function.
10177 (yyreport_syntax_error): Use it to dequote most string literals.
10178 * data/yacc.c (yytnamerr): New function.
10179 (yyerrlab): Use it to decode most string literals.
10180 * doc/bison.texinfo (Decl Summary, Calling Convention):
10181 Clarify quoting convention of yytname.
10182 * src/output.c (prepare_symbols): Quote all names. This undoes
10183 the 2005-04-17 change, which is now accomplished (mostly) via
10184 changes in the parsers as described above.
10185 * tests/regression.at (Token definitions, Web2c Actions):
10186 Undo most 2005-04-17 change here, too.
10187
10188 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10189
10190 Fix more problems reported by twlevo@xs4all.nl.
10191 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10192 remove trailing spaces. This loses the exit status of ./types,
10193 and isn't needed since ./types shouldn't be emitting trailing
10194 spaces.
10195 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10196 as the stack isn't valid in that case.
10197
10198 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10199 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10200 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10201 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10202 is used.
10203 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10204 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10205 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10206 Likewise.
10207
10208 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10209 overly-picky compilers that reject 'char *foo = "bar";'.
10210
10211 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10212 to FILE * parameter, not to stderr. This fixes a typo introduced
10213 in the 2005-07-12 change.
10214
10215 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10216 warnings from GCC 4.
10217
10218 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10219 (yyglrShiftDefer, yysplitStack):
10220 Remove unused parameters b4_pure_formals. All uses changed.
10221 (yyglrShift): Remove unused parameters b4_user_formals.
10222 All uses changed.
10223 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10224
10225 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10226
10227 Destructor cleanups and regularization among the three skeletons.
10228 * NEWS: Document the behavior changes.
10229 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10230 stack before failing, as the cleanup code will do it for us now.
10231 * data/lalr1.cc (yyerrlab): Likewise.
10232 * data/glr.c (yyparse): Pop everything off the stack before
10233 freeing it, so that destructors get called properly.
10234 * data/lalr1.cc (yyreturn): Likewise.
10235 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10236 This is more consistent.
10237 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10238 why destructors might be called. 1.875 -> 2.1.
10239 (Destructor Decl, Decl Summary, Table of Symbols):
10240 Some English-language cleanups for %destructor.
10241 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10242 Add output line for destructor of start symbol.
10243 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10244 because of that same extra output line.
10245
10246 * NEWS: Document minor wording changes in diagnostics of
10247 Bison-generated parsers.
10248 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10249 Remove unused formals. All uses changed.
10250 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10251 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10252 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10253 Rename yyoverflowab to yyexhaustedlab.
10254 When memory exhaustion occurs during syntax-error reporting,
10255 report it separately rather than in a single diagnostic; this
10256 eases translation.
10257 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10258 (Memory Exhausted): Renamed from Parser Stack Overflow.
10259 Revamp wording slightly to prefer "memory exhaustion".
10260 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10261
10262 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10263
10264 Add i18n support to the GLR skeleton. Partially fix the C++
10265 skeleton; a C++ expert needs to finish this. Remove debugging
10266 msgids; there's little point to having them translated, since they
10267 can be understood only by someone who can read the
10268 (English-language) source code.
10269
10270 Generate runtime-po/bison-runtime.pot automatically, so that we
10271 don't have to worry about garbage getting in that file. We'll
10272 make sure after the next official release that old msgids don't
10273 get lost. See
10274 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10275
10276 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10277 Now auto-generated.
10278 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10279 Fix typos in explanations of the runtime file.
10280 * bootstrap: Change gettext keyword from YYI18N to YY_.
10281 Use standard Makefile.in.in in runtime-po, since we'll arrange
10282 for backward-compatible bison-runtime.po files in a different way.
10283 * data/glr.c (YY_): New macro, from yacc.c.
10284 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10285 Translate messages intended for users.
10286 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10287 the wording in the other skeletons. We don't know that the memory
10288 is virtual.
10289 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10290 Use same method that yacc.c uses.
10291 Don't translate debugging messages.
10292 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10293 it doesn't work (yet), and requires C++ expertise to fix.
10294 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10295 Move defn to a more logical place, to be consistent with other
10296 skeletons.
10297 Don't translate debugging messages.
10298 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10299 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10300 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10301 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10302
10303 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10304 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10305 void, not int.
10306 * tests/glr-regression.at (Badly Collapsed GLR States):
10307 Likewise.
10308 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10309 yylex should return 0 at EOF rather than aborting.
10310
10311 Improve tests for stack overflow in GLR parser.
10312 Problem reported by twlevo@xs4all.nl.
10313 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10314 All uses removed.
10315 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10316 can handle the problem.
10317 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10318 (yyparse): New local variable yyresult to record the result.
10319 Use result of setjmp to set it, rather than storing itinto
10320 struct.
10321 (yyDone): Remove label.
10322 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10323 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10324 if YYABORT is used).
10325 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10326 yyparse status; put status > 1 into diagnostic.
10327 Check that status==2 works.
10328 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10329 Use exit status 3 for failure to open (which shouldn't happen).
10330
10331 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10332
10333 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10334 1 on syntax error; just let yyparse do its thing.
10335 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10336 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10337 (Exploding the Stack Size with Alloca):
10338 (Exploding the Stack Size with Malloc):
10339 Expect exit status 2, not 1, since the parser is supposed to blow
10340 its stack. Problem reported by twlevo@xs4all.nl.
10341
10342 * data/glr.c (yyparse): Don't assume that the initial calls
10343 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10344 Print a stack-overflow message and fail instead.
10345 Initialize the line-number information before creating the stack,
10346 so that the stack-overflow message can report line zero safely.
10347
10348 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10349
10350 Fix problems reported by twlevo@xs4all.nl.
10351 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10352 (yyuserMerge): Provide a default case if b4_mergers is empty.
10353 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10354 * tests/glr-regression.at
10355 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10356 Add casts to pacify C++ compilers.
10357 * tests/glr-regression.at (Improper merging of GLR delayed action
10358 sets): Declare yylex before using it.
10359 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10360 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10361 test for valgrind; valgrind is independent of g++.
10362 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10363 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10364 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10365 Use a destructor, so that we can expand the stack. Change
10366 YYSTYPE to char * so that we can free it. Cast result of malloc.
10367
10368 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10369
10370 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10371 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10372
10373 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10374
10375 * PACKAGING: New file, suggested by Bruno Haible and taken from
10376 similar wording in gettext's PACKAGING file.
10377 * NEWS: Mention PACKAGING.
10378 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10379
10380 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10381
10382 * NEWS: Document recent i18n improvements.
10383 * bootstrap: Get runtime translations into runtime-po.
10384 Create runtime-po files automatically, if possible.
10385 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10386 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10387 does not infringe on the user's name space.
10388 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10389 * doc/bison.texinfo (Internationalization): Revamp the English
10390 and Texinfo syntax a bit, to try to make it clearer.
10391 (Bison Options, Option Cross Key): Mention --print-localedir.
10392 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10393 YYENABLE_NLS. Quote a bit more.
10394 * runtime-po/.cvsignore: New file.
10395 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10396 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10397 * runtime-po/quot.sed: Likewise.
10398 * runtime-po/boldquot.sed: Likewise.
10399 * runtime-po/en@quot.header: Likewise.
10400 * runtime-po/en@boldquot.header: Likewise.
10401 * runtime-po/insert-header.sin: Likewise.
10402 * runtime-po/remove-potcdate.sin: Likewise.
10403 * runtime-po/Makevars: Likewise.
10404 * runtime-po/LINGUAS: Likewise.
10405 * runtime-po/de.po: Likewise; we will rely on the translation project
10406 to maintain this, so "bootstrap" should get it.
10407 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10408 its value.
10409 * src/main.c (main): Bind the bison-runtime domain, too.
10410
10411 2005-07-12 Bruno Haible <bruno@clisp.org>
10412
10413 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10414 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10415 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10416 * runtime-po: New directory.
10417 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10418 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10419 * runtime-po/Rules-quot: New file, copied from po/.
10420 * runtime-po/quot.sed: Likewise.
10421 * runtime-po/boldquot.sed: Likewise.
10422 * runtime-po/en@quot.header: Likewise.
10423 * runtime-po/en@boldquot.header: Likewise.
10424 * runtime-po/insert-header.sin: Likewise.
10425 * runtime-po/remove-potcdate.sin: Likewise.
10426 * runtime-po/Makevars: New file.
10427 * runtime-po/POTFILES.in: New file.
10428 * runtime-po/LINGUAS: New file.
10429 * runtime-po/bison-runtime.pot: New file.
10430 * runtime-po/de.po: New file.
10431 * m4/bison.m4: New file.
10432 * Makefile.am (SUBDIRS): Add runtime-po.
10433 (aclocaldir, aclocal_DATA): New variables.
10434 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10435 Define aclocaldir.
10436 * src/getargs.c (usage): Document --print-localedir option.
10437 (PRINT_LOCALEDIR_OPTION): New enum item.
10438 (long_options): Add --print-localedir option.
10439 (getargs): Handle --print-localedir option.
10440 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10441 (Internationalization): New section.
10442
10443 2005-07-12 Akim Demaille <akim@epita.fr>
10444
10445 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10446 for consistency with the rest of the code.
10447 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10448 Add separators.
10449
10450 2005-07-12 Akim Demaille <akim@epita.fr>
10451
10452 * src/parse-gram.y: Use %printer instead of YYPRINT.
10453
10454 2005-07-12 Akim Demaille <akim@epita.fr>
10455
10456 * src/symtab.h, src/symtab.c (symbol_print): New.
10457 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10458 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10459
10460 2005-07-12 Akim Demaille <akim@epita.fr>
10461
10462 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10463 b4_at_dollar and b4_dollar_dollar.
10464
10465 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10466
10467 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10468 and Pennello's paper.
10469
10470 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10471
10472 * data/yacc.c (yyparse): Undo previous patch. Instead,
10473 set yylsp[0] and yyvsp[0] only if the initial action
10474 sets yylloc and yylval, respectively.
10475
10476 * data/yacc.c (yyparse): In the initial action, set
10477 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10478 This avoids the use of undefined variables if the initial
10479 action does not set yylloc and/or yylval.
10480
10481 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10482
10483 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10484 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10485 Remove from CVS. These files are automatically generated.
10486 * examples/extexi: Clarify that this file is now part of Bison,
10487 not GNU M4, and that it works with any POSIX-compatible Awk.
10488 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10489 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10490 so that we also get calc++-parser.yy. Geneate it.
10491 Use $(AWK), not gawk, since any conforming Awk will do.
10492 Put comment before action, since older 'make' can't handle comment
10493 in action.
10494 $(BUILT_SOURCES): List all built sources, not just some of them.
10495 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10496 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10497 $($(calc_sources_generated)): Remove unnecessary test for existence
10498 of target. (This had a shell syntax error anyway; a stray "x".)
10499 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10500 calc++-parser.yy.
10501 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10502
10503 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10504 implied by the other modules.
10505
10506 2005-07-06 Akim Demaille <akim@epita.fr>
10507
10508 Bind examples/calc++ to the package.
10509 * examples/calc++/Makefile: Remove, replaced by...
10510 * examples/calc++/Makefile.am: ... this new file.
10511 * examples/calc++/test: Remove input.
10512 * examples/calc++/compile: Remove.
10513 * examples/Makefile.am: New.
10514 * configure.ac, Makefile.am: Adjust.
10515 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10516
10517 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10518
10519 * data/glr.c (yyFail): Drastically simplify; since the format argument
10520 never had any % directives, we can simply pass it to yyerror.
10521 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10522 be modified later, as that is the usual style in glr.c.
10523 Problems reported by Paul Hilfinger.
10524
10525 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10526 and size overflow errors.
10527 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10528 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10529 (YYSIZEMAX): New macro.
10530 (yystpcpy): New function, taken from yacc.c.
10531 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10532 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10533 so that we don't have to maintain their signatures.
10534 (yyFail): Check for buffer overflow, by using vsnprintf rather
10535 than vsprintf. Allocate a bigger buffer if possible.
10536 Report an error if buffer allocation fails.
10537 (yyStackOverflow): New function.
10538 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10539 the initialization was successful. It might fail if storage was
10540 exhausted.
10541 (yyexpandGLRStack): Add more checks for storage allocation failure.
10542 Use yyStackOverflow to report failures.
10543 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10544 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10545 Don't assume stack number fits in int.
10546 (yysplitStack): Check for storage allocation failure.
10547 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10548 can print diagnostics on storage allocation failure. All callers
10549 changed.
10550 (yyresolveValue): Use yybool for boolean.
10551 (yyreportSyntaxError): Check for size-calculation overflow.
10552 This code is taken from yacc.c.
10553 (yyparse): Check for storage allocation errors when allocating
10554 the initial stack.
10555
10556 2005-07-05 Akim Demaille <akim@epita.fr>
10557
10558 Extract calc++ from the documentation.
10559 * doc/bison.texinfo (Calc++): Add the extraction marks.
10560 * examples/extexi: New, from the aborted GNU Programming 2E.
10561 Separate the different paragraph of a file with empty lines.
10562 * examples/Makefile: Use it to extract the whole calc++ example.
10563
10564 2005-06-24 Akim Demaille <akim@epita.fr>
10565
10566 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10567 class typedefs.
10568
10569 2005-06-22 Akim Demaille <akim@epita.fr>
10570
10571 * doc/bison.texinfo (C++ Language Interface): First stab.
10572 (C++ Parsers): Remove.
10573
10574 2005-06-22 Akim Demaille <akim@epita.fr>
10575
10576 * data/lalr1.cc (yylex_): Honor %lex-param.
10577
10578 2005-06-22 Akim Demaille <akim@epita.fr>
10579
10580 Start a set of simple examples.
10581 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10582 * examples/calc++/calc++-driver.hh,
10583 * examples/calc++/calc++-parser.yy,
10584 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10585 * examples/calc++/compile, examples/calc++/test: New.
10586
10587 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10588
10589 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10590 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10591 which stems from the 2005-05-27 patch.
10592
10593 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10594
10595 * data/glr.c: Modify treatment of unused parameters to permit use
10596 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10597
10598 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10599
10600 Fix infringement on user name space reported by Janos Zoltan Szabo.
10601 * data/yacc.c (yyparse): strlen -> yystrlen.
10602
10603 2005-05-30 Akim Demaille <akim@epita.fr>
10604
10605 * data/lalr1.cc (_): New.
10606 Translate the various messages.
10607
10608 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10609
10610 Fix infringement on user name space reported by Bruno Haible.
10611 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10612 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10613 the user's name space.
10614 (alloca): Include <stdlib.h> to get it, if it's not built in.
10615 (YYMALLOC, YYFREE): Define only if needed.
10616 (malloc, free): Declare, but only if needed, as this infringes on
10617 the user name space.
10618
10619 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10620
10621 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10622 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10623 with %d format.
10624 * lib/ebitset.c (min, max): Undef before defining.
10625 * lib/vbitset.c (min, max): Likewise.
10626 * lib/subpipe.c (create_subpipe): Save local variables in case
10627 vfork clobbers them.
10628
10629 2005-05-24 Bruno Haible <bruno@clisp.org>
10630
10631 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10632 error message syntax used by gcc-4.0.
10633
10634 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10635
10636 * README: Mention m4 1.4.3. Remove obsolete advice about
10637 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10638
10639 * bootstrap: Remove workaround for problem I encountered with
10640 gettext 0.14.1; it seems to be fixed now.
10641
10642 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10643
10644 * NEWS: Version 2.0a.
10645
10646 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10647 the previous change.
10648
10649 Various maintainer cleanups.
10650 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10651 conftest*, for benefit of CVS commands run at the same time as
10652 "configure". Add build-aux, since "bootstrap" now creates it and
10653 its subfiles.
10654 * Makefile.cfg (move_if_change): Remove.
10655 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10656 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10657 (po_repo, do-po-update, po-update, wget_files, get-targets):
10658 (config.guess-url_prefix, config.sub-url_prefix):
10659 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10660 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10661 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10662 Remove.
10663 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10664 this is now the recommended name.
10665 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10666 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10667 ylwrap. These files now go into build-aux.
10668 * config/move-if-change: Remove.
10669 * config/prev-version.txt: Bump from 1.75 to 2.0.
10670
10671 * bootstrap: Add stdio-safer, unistd-safer modules.
10672 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10673 we don't need it).
10674 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10675 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10676 * lib/subpipe.c: Include "unistd-safer.h".
10677 (create_subpipe): Make sure all the newly-created
10678 file descriptors are > 2, so that diagnostics don't
10679 get sent down them (which might cause Bison to hang, in theory).
10680 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10681 * src/files.c (xfopen): Use fopen_safer, not fopen.
10682
10683 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10684 yesterday's yacc.c fix.
10685
10686 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10687
10688 * data/glr.c, data/lalr1.cc: Update copyright date.
10689
10690 Fix a destructor bug reported by Wolfgang Spraul in
10691 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10692 * data/yacc.c (yyabortlab): Don't call destructor, and
10693 don't set yychar to EMPTY.
10694 (yyoverflowlab): Don't call destructor.
10695 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10696 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10697 since we no longer output the message "discarding lookahead token
10698 end of input ()".
10699
10700 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10701
10702 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10703 fix a small glitch in debugging output.
10704 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10705 after YY_SYMBOL_PRINT where needed.
10706
10707 (struct yyGLRState): Add some comments.
10708 (struct yySemanticOption): Add some comments.
10709 (union yyGLRStackItem): Add comment.
10710
10711 (yymergeOptionSets): Correct this to properly perform the union,
10712 avoiding infinite reported by Michael Rosien.
10713 Update comment.
10714
10715 * tests/glr-regression.at: Add test for GLR merging error reported
10716 by M. Rosien.
10717
10718 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10719
10720 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10721 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10722 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10723 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10724 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10725 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10726 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10727 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10728 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10729 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10730 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10731 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10732 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10733 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10734 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10735 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10736 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10737 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10738 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10739 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10740 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10741 src/output.h, src/parse-gram.c, src/parse-gram.h,
10742 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10743 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10744 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10745 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10746 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10747 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10748 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10749 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10750 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10751 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10752 tests/reduce.at, tests/regression.at, tests/sets.at,
10753 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10754 Update FSF postal mail address.
10755
10756 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10757
10758 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10759 Problem reported by Ralf Menzel.
10760
10761 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10762
10763 * tests/actions.at: Test that stack overflow invokes destructors.
10764 From Marcus Holland-Moritz.
10765 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10766 from here....
10767 (yyreturn): to here. That way, destructors are called properly
10768 even if the stack overflows, or the user calls YYACCEPT or
10769 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10770 (yyoverflowlab): Destroy the lookahead.
10771
10772 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10773
10774 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10775
10776 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10777
10778 * NEWS: Bison-generated C parsers no longer quote literal strings
10779 associated with tokens.
10780 * src/output.c (prepare_symbols): Don't escape strings,
10781 since users don't want to see C escapes.
10782 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10783 in diagnostics.
10784 * tests/input.at (Torturing the Scanner): Likewise.
10785 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10786
10787 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10788
10789 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10790 the data size is known to be too small and we can't increase it.
10791 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10792
10793 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10794
10795 * src/parse-gram.y: Include quotearg.h.
10796 (string_as_id): Quote $1 before using it as a key, since the
10797 lexer no longer quotes it for us.
10798 (string_content): Don't strip quotes, since lexer no longer
10799 quotes it for us.
10800 * src/scan-gram.l: Include quotearg.h.
10801 ("\""): Omit quote.
10802 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10803 a key, since the rest of the lexer doesn't quote it.
10804 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10805 * tests/regression.at (Token definitions): Check for backslashes
10806 in token strings.
10807
10808 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10809 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10810 (yyparse): Revamp code to generate long syntax error message, to
10811 make it easier to translate, and to avoid problems with arithmetic
10812 overflow. Change "virtual memory" to "memory" in diagnostic, since
10813 we don't know whether the memory is virtual.
10814
10815 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10816
10817 * NEWS: Bison-generated C parsers now use the _ macro to
10818 translate strings.
10819 * data/yacc.c (_) [!defined _]: New macro.
10820 All English strings wrapped inside this macro.
10821 * doc/bison.texinfo (Bison Parser): Document _.
10822 * po/POTFILES.in: Include src/parse-gram.c, since it now
10823 includes translateable strings that parse-gram.y doesn't.
10824
10825 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10826
10827 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10828 reverting the 2004-10-11 change to this function.
10829 (symbol_check_alias_consistency): Don't call symbol_type_set
10830 if the type name is already correct.
10831 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10832
10833 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10834
10835 * tests/regression.at (Token definitions): Don't use a token named
10836 c, as that generates a "#define c ..." that runs afoul of buggy
10837 stdlib.h that uses the identifier c as a member of struct
10838 drand48_data. Problem reported by Horst Wente.
10839
10840 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10841
10842 * bootstrap: Change translation URL from
10843 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10844 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10845 redirection glitches. Problem reported by twlevo@xs4all.nl.
10846
10847 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10848
10849 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10850 after operands; POSIX says this isn't portable for the c99 command.
10851
10852 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10853
10854 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10855 immediately if a data overrun has occurred; this may help us track
10856 down what may be a spurious failure on MacOS.
10857
10858 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10859
10860 Respond to problems reported by twlevo@xs4all.nl.
10861
10862 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10863
10864 * src/vcg.h: Comment fix.
10865 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10866 (G_CMAX): Change to -1 instead of INT_MAX.
10867
10868 * data/yacc.c (yyparse): Omit spaces before #line.
10869
10870 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10871
10872 * src/tables.c (state_number_to_vector_number): Put it inside an
10873 "#if 0", since it's not currently used. Problem reported by
10874 Roland McGrath.
10875
10876 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10877
10878 * src/output.c (escaped_output): Renamed from
10879 escaped_file_name_output, since we now use it for symbol tags as
10880 well. All uses changed.
10881 (symbol_destructors_output, symbol_printers_output):
10882 Escape symbol tags too.
10883 Problem reported by Matyas Forstner in
10884 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10885
10886 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10887 not needed.
10888 * src/output.c (user_actions_output, token_definitions_output,
10889 symbol_destructors_output, symbol_printers_output): Likewise.
10890 * src/reader.c (prologue_augment): Likewise.
10891 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10892
10893 * src/vcg.c (output_edge): Don't quote linestyle arg.
10894 Problem reported by twlevo@xs4all.nl.
10895
10896 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10897
10898 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10899 example, reported by Derek M Jones. Also, make the example even
10900 more outrageous, to better illustrate how bad the problem is.
10901
10902 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10903
10904 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10905 putsym. Typo reported by Sebastian Piping.
10906
10907 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10908
10909 * doc/bison.texinfo (Language and Grammar): some -> same
10910 (Epilogue): int he -> in the
10911 Typos reported by Sebastian Piping via Justin Pence.
10912
10913 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10914
10915 * tests/glr-regression.at (Improper handling of embedded actions
10916 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10917 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10918 with dollar signs in test names.
10919 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10920 for a similar reason.
10921
10922 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10923
10924 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10925 wants to redefine G_VIEW.
10926
10927 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10928
10929 * src/vcg.c (get_view_str): Remove case for normal_view.
10930 Problem reported by twlevo@xs4all.nl.
10931
10932 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10933
10934 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10935 Problem reported by twlevo@xs4all.nl.
10936
10937 * doc/bison.texinfo: Change @dircategory from "GNU programming
10938 tools" to "Software development". Requested by Richard Stallman
10939 via Karl Berry.
10940
10941 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10942
10943 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10944 Problem reported by twlevo@xs4all.nl.
10945
10946 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10947
10948 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10949 keyword; it's not needed with modern compilers, and it doesn't
10950 affect correctness with older compilers. Suggested by
10951 twlevo@xs4all.nl.
10952
10953 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10954
10955 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10956 gcc -Wswitch-default.
10957 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10958 * data/yacc.c (yyparse): Likewise.
10959
10960 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10961
10962 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10963 already. Let config.h define any nonstandard values.
10964
10965 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10966
10967 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10968 for the benefit of slower hosts. Problem reported by
10969 Nelson H. F. Beebe.
10970
10971 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10972
10973 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10974 being defined and not used.
10975 * data/lalr1.cc (yyparse): Likewise.
10976 Use "if (false)" rather than "if (0)".
10977
10978 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10979
10980 * TODO: Mention that we should allow NUL bytes in tokens.
10981
10982 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10983
10984 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10985 Problem reported by Hans Aberg.
10986
10987 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10988
10989 * src/getargs.c (version): Happy new year; update overall
10990 program copyright date from 2004 to 2005.
10991
10992 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10993 Problem reported by Hans Aberg.
10994 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10995 (Output file names.): Add a test for the case when standard output
10996 is closed.
10997
10998 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10999
11000 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11001 to fix an oversight in the Bison 2.0 manual.
11002
11003 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11004
11005 * NEWS: Version 2.0. Reformat the existing news items since
11006 1.875, so that related items are grouped together.
11007 * configure.ac (AC_INIT): Bump version to 2.0.
11008 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11009
11010 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11011 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11012 otherwise, we're not testing alloca. Unfortunately there's no
11013 simple way to consult HAVE_ALLOCA here.
11014
11015 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11016 for yymsg, too.
11017
11018 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11019 hand. This avoids a warning about comparing int to size_t when
11020 GCC warnings are enabled.
11021
11022 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11023
11024 * NEWS: Bison-generated parsers no longer default to using the
11025 alloca function (when available) to extend the parser stack, due
11026 to widespread problems in unchecked stack-overflow detection.
11027 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11028 responsibility to set it to a positive value. This lets the user
11029 specify a value that is not a preprocessor constant.
11030 * data/yacc.c (YYMAXDEPTH): Likewise.
11031 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11032 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11033 to be a compile-time constant. However, explain the constraints on it.
11034 Also, explain the constraints on YYINITDEPTH.
11035 (Table of Symbols): Explain that alloca is no longer the default.
11036 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11037 to 1.
11038
11039 * doc/bison.texinfo (Location Default Action): Mention that n must
11040 be zero when k is zero. Suggested by Frank Heckenbach.
11041
11042 2004-12-22 Akim Demaille <akim@epita.fr>
11043
11044 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11045 (parser::state_type, parser::semantic_type, parser::location_type):
11046 Private, not public.
11047 (parser::parse): Return ints, not bool.
11048 Returning a bool introduces a problem: 0 corresponds to false, and
11049 it seems weird to return false on success. Returning true changes
11050 the conventions for yyparse.
11051 Alternatively we could return void and send an exception.
11052 There is no clear consensus (yet?).
11053 (state_stack, semantic_stack, location_stack): Rename as...
11054 (state_stack_type, semantic_stack_type, location_stack_type): these.
11055 Private, not public.
11056 * tests/c++.at: New.
11057 * tests/testsuite.at, tests/Makefile.am: Adjust.
11058
11059 2004-12-21 Akim Demaille <akim@epita.fr>
11060
11061 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11062
11063 2004-12-21 Akim Demaille <akim@epita.fr>
11064
11065 Don't impose std::string for filenames.
11066
11067 * data/lalr1.cc (b4_filename_type): New.
11068 (position::filename): Use it.
11069 (parser.hh): Move the inclusion of stack.hh and location.hh below
11070 the user code, so that needed headers for the filename type can be
11071 included first.
11072 Forward declare them before the user code.
11073 * tests/Makefile.am (check-local, installcheck-local): Pass
11074 TESTSUITEFLAGS to the TESTSUITE.
11075
11076 2004-12-20 Akim Demaille <akim@epita.fr>
11077
11078 Use more STL like names: my_class instead of MyClass.
11079
11080 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11081 (SemanticStack, SemanticType, StateStack, StateType)
11082 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11083 (Parser::value): Rename as...
11084 (location_stack, location_type, rhs_number_type, semantic_stack)
11085 (semantic_type, state_stack, state_type, token_number_type, stack)
11086 (slice, traits, parser::yylloc, parser::yylval): these.
11087
11088 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11089
11090 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11091
11092 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11093 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11094
11095 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11096
11097 Remove uses of 'short int' and 'unsigned short int'. This raises
11098 some arbitrary limits. It uses more memory but nowadays that's
11099 not much of an issue.
11100
11101 This change does not affect the generated parsers; that's a different
11102 task, as some users will want to conserve memory there.
11103
11104 Ideally we should use size_t to represent all object counts, and
11105 something like ptrdiff_t to represent signed differences of object
11106 counts; but that will require more code-cleanup than I have the
11107 time to do right now.
11108
11109 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11110 Use size_t, not int or short int, to count objects.
11111 * src/closure.c (nritemset, closure): Likewise.
11112 * src/closure.h (nritemset, closure): Likewise.
11113 * src/nullable.c (nullable_compute): Likewise.
11114 * src/print.c (print_core): Likewise.
11115 * src/print_graph.c (print_core): Likewise.
11116 * src/state.c (state_compare, state_hash): Likewise.
11117 * src/state.h (struct state): Likewise.
11118 * src/tables.c (default_goto, goto_actions): Likewise.
11119
11120 * src/gram.h (rule_number, rule): Use int, not short int.
11121 * src/output.c (prepare_rules): Likewise.
11122 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11123 errs, reductions): Likewise.
11124 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11125 Likewise.
11126 * src/tables.c (vector_number, tally, action_number,
11127 ACTION_NUMBER_MINIMUM): Likewise.
11128 * src/output.c (muscle_insert_short_int_table): Remove.
11129
11130 2004-12-17 Akim Demaille <akim@epita.fr>
11131
11132 * data/lalr1.cc: Extensive Doxygenation.
11133 (error_): Rename as...
11134 (error): this, since it is visible to the user.
11135 Adjust callers.
11136 (Parser::message): Now an automatic variable from...
11137 (Parser::yyreport_syntax_error_): here.
11138 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11139 Parser::error.
11140 * tests/input.at: Escape $.
11141
11142 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11143
11144 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11145 Parenthesize rhs to avoid obscure problems with mistakes like
11146 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11147 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11148 b4_rhs_location): Likewise.
11149 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11150 b4_rhs_location): Likewise.
11151
11152 2004-12-16 Akim Demaille <akim@epita.fr>
11153
11154 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11155 yacc.c: be sure to stay within yycheck_.
11156 * tests/actions.at: Re-enable C++ tests.
11157
11158 2004-12-16 Akim Demaille <akim@epita.fr>
11159
11160 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11161 real.
11162
11163 2004-12-16 Akim Demaille <akim@epita.fr>
11164
11165 Use #define to handle the %name-prefix.
11166
11167 * data/glr.c, data/yacc.c: Comment changes.
11168 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11169 so that one can refer to yylex in the parser file, and have it
11170 renamed, as is the case with other skeletons.
11171
11172 2004-12-16 Akim Demaille <akim@epita.fr>
11173
11174 Move lalr1.cc internals into yy*.
11175
11176 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11177 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11178 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11179 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11180 (empty_, final_, terror_, errcode_, ntokens_)
11181 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11182 (looka_, ilooka_, error_range_, nerrs_):
11183 Rename as...
11184 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11185 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11186 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11187 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11188 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11189 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11190 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11191 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11192 these.
11193
11194 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11195
11196 Fix some problems reported by twlevo at xs4all.
11197 * src/symtab.c (symbol_new): Report an error if the input grammar
11198 contains too many symbols. This is better than calling abort() later.
11199 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11200 (struct node, struct graph):
11201 Rename member expand to stretch. All uses changed.
11202 (struct graph): Remove member layoutalgorithm. All uses removed.
11203 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11204 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11205 All uses changed.
11206 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11207
11208 2004-12-15 Akim Demaille <akim@epita.fr>
11209
11210 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11211 Add more Doxygen comments.
11212 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11213 (report_syntax_error_, translate_): Rename as...
11214 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11215 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11216
11217 2004-12-15 Akim Demaille <akim@epita.fr>
11218
11219 * data/lalr1.cc (lex_): Rename as...
11220 (yylex_): this.
11221 Move the trace here.
11222 Take the %name-prefix into account.
11223 Reported by Alexandre Duret-Lutz.
11224
11225 2004-12-15 Akim Demaille <akim@epita.fr>
11226
11227 Simplify the C++ parser constructor.
11228
11229 * data/lalr1.cc (debug_): Rename as...
11230 (yydebug_): so that the parser's internals are always in the yy*
11231 pseudo namespace.
11232 Adjust uses.
11233 (b4_parse_param_decl): Remove the leading comma as it is now only
11234 called as unique argument list.
11235 (Parser::Parser): Remove the constructor accepting a location and
11236 an initial debugging level.
11237 Remove from the other ctor the argument for the debugging level.
11238 (debug_level_type, debug_level, set_debug_level): New.
11239
11240 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11241 constructor calls.
11242
11243 2004-12-15 Akim Demaille <akim@epita.fr>
11244
11245 Remove b4_root related material: failure experiment
11246 (which goal was to allow to derive from a class).
11247
11248 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11249 definitions and uses.
11250
11251 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11252
11253 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11254 not 2, since it's not portable to subtract 1 from the start of an
11255 array. The new item 0 is never set or used. All uses changed.
11256
11257 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11258 the default definition of YYLLOC_DEFAULT. Problem reported
11259 by Frank Heckenbach.
11260
11261 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11262
11263 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11264 the normal case and one for the error case. Just use the
11265 first one uniformly. Problem reported by Frank Heckenbach.
11266 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11267 use exactly the same macro in both places.
11268 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11269 so that the normal-case YYRHSLOC works for the error case too.
11270 All uses changed.
11271 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11272 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11273 * doc/bison.texinfo (Location Default Action): Don't claim that
11274 we have an array of locations. Use the same macro for both glr
11275 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11276 the index is 0.
11277
11278 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11279
11280 * HACKING: Update email addresses to send announcements to.
11281
11282 * configure.ac (AC_INIT): Bump version to 1.875f.
11283
11284 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11285
11286 * NEWS: Version 1.875e.
11287 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11288
11289 * src/scan-skel.l: Include "complain.h", for "fatal".
11290
11291 * src/relation.h (relation_print, relation_digraph):
11292 Relation sizes are of type relation_node, not size_t (this is
11293 merely a doc fix, since the two types are equivalent).
11294 (relation_transpose): Relation sizes are of type relation_node,
11295 not int.
11296 * src/relation.c: Likewise.
11297 (top, infinity): Now of type relation_node, not int.
11298 (traverse, relation_transpose): Use relation_node, not int.
11299
11300 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11301 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11302 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11303
11304 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11305 specifying whether the test should be skipped. Use it tp
11306 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11307 fail on some hosts, and should be skipped.
11308
11309 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11310
11311 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11312 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11313 unless otherwise specified below.
11314
11315 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11316 to allocate kernel_base, kernel_items, kernel_size, since
11317 they needn't be initialized to 0.
11318 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11319 * src/closure.c (new_closure): Likewise, for itemset.
11320 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11321 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11322 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11323 (build_relations): Likewise for edge, states1, includes.
11324 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11325 * src/reader.c (packgram): Likewise, for ritem, rules.
11326 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11327 * src/relation.c (relation_digraph): Likewise for VERTICES.
11328 (relation_transpose): Likewise for new_R, end_R.
11329 * src/symtab.c (symbols_token_translations_init): Likewise for
11330 token_translations.
11331 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11332 (token_actions): Likewise for yydefact, actrow, conflrow,
11333 conflict_list.
11334 (save_column): Likewise for froms[symno], tos[symno].
11335 (goto_actions): Likewise for state_count.
11336 (pack_table): Likewise for base, pos, check.
11337 (tables_generate): Likewise for width.
11338
11339 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11340 for initial core. Just have a separate core, so we needn't worry
11341 about whether kernel_size and kernel_base are initialized.
11342
11343 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11344 kernel_size, kernel_items): Remove unnecessary initialization.
11345 * src/conflicts.c (conflicts): Likewise.
11346 * src/derives.c (derives): Likewise.
11347 * src/muscle_tablc (muscle_insert): Likewise.
11348 * src/relation.c (relation_digraph): Likewise.
11349 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11350 conflrow, conflict_table, conflict_list, table, check):
11351 Likewise.
11352
11353 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11354 This is because all callers pass unsigned int.
11355 * src/closure.h (new_closure): Likewise.
11356
11357 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11358 (build_relations): Initialize includes[i] in all cases.
11359 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11360 and rules[ruleno].precsym. Initialize members in order.
11361 * src/relation.c (relation_transpose): Always initialize new_R[i]
11362 and end_R[i].
11363 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11364
11365 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11366 conflict_list[0] was always 0, but now it isn't initialized.
11367
11368 * src/table.c (table_grow): When conflict_table grew, the grown
11369 area wasn't cleared. Fix this.
11370
11371 * lib/.cvsignore: Add strdup.c, strdup.h.
11372 * m4/.cvsignore: Add strdup.m4.
11373
11374 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11375
11376 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11377 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11378 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11379 ngotos + 1 without checking for overflow.
11380 (build_relations): Use END_NODE, not -1, to denote end of edges.
11381 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11382 build_relations): Use goto_number, not int, for goto numbers.
11383 * src/tables.c (save_column, default_goto): Likewise.
11384
11385 2004-11-23 Akim Demaille <akim@epita.fr>
11386
11387 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11388 of #defining from yystype.
11389 Don't typedef yystype, C++ does not need it.
11390 This lets it possible to forward declare it as union.
11391
11392 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11393
11394 * bootstrap (gnulib_modules): Add extensions.
11395 Problem reported by Jim Meyering.
11396
11397 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11398
11399 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11400 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11401 src/system.h, src/tables.c: XFREE -> free, to accommodate
11402 recent change to gnulib xalloc.h.
11403 Problem reported by Jim Meyering.
11404
11405 2004-11-17 Akim Demaille <akim@epita.fr>
11406
11407 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11408
11409 2004-11-17 Akim Demaille <akim@epita.fr>,
11410 Alexandre Duret-Lutz <adl@gnu.org>
11411
11412 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11413 changes.
11414 (YYCDEBUG): Adjust.
11415 Use it instead of cdebug_.
11416 (Parser::debug_stream, Parser::set_debug_stream): New.
11417 (Parser::symprint_): Define cdebug_ for temporary backward
11418 compatibility.
11419 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11420 debug_stream ().
11421
11422 2004-11-17 Akim Demaille <akim@epita.fr>
11423
11424 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11425 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11426 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11427 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11428
11429 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11430
11431 * data/glr.c (yyloc_default): Remove; not used.
11432 Problem reported by Frank Heckenbach.
11433
11434 2004-10-25 Akim Demaille <akim@epita.fr>
11435
11436 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11437 Introduce another definition to address simple location arrays.
11438 (yyGLRStack): New member: yyerror_range.
11439 (yyrecoverSyntaxError, yyparse): Update it.
11440 (yyrecoverSyntaxError): Use it when shifting the error token to
11441 have an accurate range, equivalent to the one computed by both
11442 yacc.c and lalr1.cc.
11443 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11444 that column numbers start at column 0, as per GNU Coding
11445 Standards, the others tests, and the doc.
11446 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11447 Adjust to the above change (first column is 0).
11448 And adjust the location of the "<error>", now covering the whole
11449 line.
11450
11451 2004-10-22 Akim Demaille <akim@epita.fr>
11452 and Paul Eggert <eggert@cs.ucla.edu>
11453
11454 Remove some arbitrary limits on goto numbers and relations.
11455 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11456 initial values, since they're never used.
11457 (set_goto_map): ngotos is now unsigned, so test for overflow
11458 by seeing whether it wraps around to zero.
11459 * src/lalr.h (goto_number): Now size_t, not short int.
11460 (GOTO_NUMBER_MAXIMUM): Remove.
11461 * src/relation.c (relation_print, traverse, relation_transpose):
11462 Check for END_NODE rather than looking at sign.
11463 * src/relation.h (END_NODE): New macro.
11464 (relation_node): Now size_t, not short int.
11465
11466 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11467
11468 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11469 keyword, not an identifier. Problem reported by Baron Schwartz in
11470 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11471
11472 2004-10-11 Akim Demaille <akim@epita.fr>
11473
11474 * src/symtab.c (symbol_check_alias_consistency): Also check
11475 type names, destructors, and printers.
11476 Reported by Alexandre Duret-Lutz.
11477 Recode the handling of associativity and precedence in terms
11478 of symbol_precedence_set.
11479 Accept no redeclaration at all, not even equal to the previous
11480 value.
11481 (redeclaration): New.
11482 Use it to factor redeclaration complaints.
11483 (symbol_make_alias): Don't set the type of the alias, let
11484 symbol_check_alias_consistency do it as for other features.
11485 * src/symtab.h (symbol): Add new member prec_location, and
11486 type_location.
11487 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11488 * tests/input.at (Incompatible Aliases): New.
11489
11490 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11491
11492 .cvsignore fixes to accommodate gnulib changes,
11493 and the practice of naming build directories "_build".
11494 * .cvsignore: Add "_*". Sort.
11495 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11496 * m4/.cvsignore: Add "*_gl.m4".
11497
11498 2004-10-06 Akim Demaille <akim@epita.fr>
11499
11500 * src/parse-gram.y (add_param): Fix the truncation of trailing
11501 spaces.
11502
11503 2004-10-05 Akim Demaille <akim@epita.fr>
11504
11505 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11506 whether the reducion was empty or not. This leaves room to
11507 improve the use of YYLLOC_DEFAULT in such a case.
11508 lalr1.cc is still experimental, so changing this is acceptable.
11509 And finally, there are probably not many users who changed the
11510 handling of locations in GLR, so changing is admissible too.
11511
11512 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11513 empty reduction, set @$ to an empty location ending the previously
11514 stacked symbol.
11515 Adjust uses to make sure the code is triggered on empty
11516 reductions.
11517 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11518 expected output: empty reductions have empty locations.
11519
11520 2004-09-29 Akim Demaille <akim@epita.fr>
11521
11522 * data/lalr1.cc: Move towards a more standard C++ coding style
11523 for templates: Class < T > -> Class<T>.
11524
11525 2004-09-29 Akim Demaille <akim@epita.fr>
11526
11527 * data/lalr1.cc: Reinstall the former ctor, for sake of
11528 compatibility, but warn it will be removed.
11529 Move towards a more standard C++ coding style (i.e., type *var ->
11530 type* var).
11531
11532 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11533
11534 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11535 since it's less likely to work if NULs are involved in the future.
11536
11537 2004-09-27 Akim Demaille <akim@epita.fr>
11538
11539 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11540
11541 2004-09-27 Akim Demaille <akim@epita.fr>
11542
11543 * data/lalr1.cc (b4_parse_param_decl_1): New.
11544 (b4_parse_param_decl): Use it to have different names between attribute
11545 and argument names.
11546 (b4_cc_constructor_call): Likewise.
11547
11548 2004-09-24 Akim Demaille <akim@epita.fr>
11549
11550 * src/parse-gram.y (add_param): Strip the leading and trailing
11551 blanks from a formal argument declaration.
11552 (YY_LOCATION_PRINT): New.
11553
11554 2004-09-24 Akim Demaille <akim@epita.fr>
11555
11556 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11557 after the location.
11558
11559 2004-09-24 Akim Demaille <akim@epita.fr>
11560
11561 * doc/bison.texinfo (Table of Symbols): Sort.
11562
11563 2004-09-21 Akim Demaille <akim@epita.fr>
11564
11565 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11566 the useless parentheses.
11567 Suggested by Paul Eggert.
11568
11569 2004-09-20 Akim Demaille <akim@epita.fr>
11570
11571 Let the initial-action act on the look-ahead, and use it for the
11572 "initial push" (corresponding to an hypothetical beginning-of-file).
11573 And let lalr1.cc honor %initial-action.
11574
11575 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11576 example.
11577 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11578 (Parser::Parser): Remove the ctor that used to initialize it.
11579 (Parser::parse): Like in the other skeletons, issue the "starting
11580 parse" message before any action.
11581 Honor %initial-action.
11582 Initialize the stacks with the lookahead.
11583 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11584 look-ahead.
11585 Push them in the stacks.
11586 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11587
11588 2004-09-20 Akim Demaille <akim@epita.fr>
11589
11590 * doc/bison.texinfo (Initial Action Decl): New.
11591
11592 2004-09-20 Akim Demaille <akim@epita.fr>
11593
11594 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11595 clearer criterion to define it.
11596 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11597 When reducing on an empty RHS, use the latest stacked location as
11598 location.
11599 yylloc is not always available.
11600 * data/glr.c: Likewise.
11601 Also, honor initial-actions.
11602
11603 2004-09-20 Akim Demaille <akim@epita.fr>
11604
11605 * data/yacc.c (YY_LOCATION_PRINT): New.
11606 Define when we know YYLTYPE's structure, i.e., when the default
11607 YYLLOC_DEFAULT is used.
11608 * data/c.m4 (b4_yysymprint_generate): Use it.
11609 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11610 value of the result.
11611 (error_start_): Replace with...
11612 (error_range_): this location array.
11613 This allows to replace code relying on the implementation of
11614 locations by portable code.
11615 * data/yacc.c (yylerrsp): Replace with...
11616 (yyerror_range): this.
11617 Every time a token is popped, update yyerror_range[0], to have an
11618 accurate location for the error token.
11619 * data/glr.c (YY_LOCATION_PRINT): New.
11620 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11621 deference a pointer.
11622 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11623 report the location in %printers.
11624
11625 * src/scan-skel.l: Instead of abort, report error messages to ease
11626 understanding skeleton scanning failures.
11627
11628 2004-09-16 Akim Demaille <akim@epita.fr>
11629
11630 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11631 (iterator, const_iterator): these, to be more in the C++ spirit.
11632 Also, return reverse iterators so that when displaying the stack
11633 we display its bottom first.
11634 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11635 from yacc.c.
11636 We should probably use vector here though.
11637
11638 2004-09-16 Akim Demaille <akim@epita.fr>
11639
11640 Have more complete shift traces.
11641
11642 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11643 to report Shifts instead of ad hoc YYDPRINTF invocations,
11644 including for the error token.
11645 * data/lalr1.cc (symprint_): Output the location.
11646 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11647 output the location within the %printer.
11648 Activate GLR tests, at least to make sure they compile properly.
11649 They still don't pass though.
11650 * tests/calc.at: Adjust expect verbose output, since now "Entering
11651 state..." is on a different line than the "Shifting" message.
11652
11653 2004-09-08 Akim Demaille <akim@epita.fr>
11654
11655 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11656 Bison directive from the Bison file to the invocation of this
11657 macro, so that these directives are passed to
11658 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11659 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11660 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11661 the extra Bison directives instead of the whole series.
11662 Change the grammar so that there are recoverable errors, and
11663 unrecoverable errors. Now we can have the parser give up before
11664 consuming the whole input. As a result we now can observe that
11665 the lookahead is freed when needed.
11666 Change the parser source to parse argv[1] instead of a hard coded
11667 string.
11668 Simplify yylex, and give a value and location to EOF.
11669 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11670 passed directives already coded in the file.
11671 Add some tests to check the location of "error".
11672 For some tests, the C++ parser is correct, and not yacc.c.
11673 For other tests, they provide different, but unsatisfying, values,
11674 so keep the C++ value so that at least one parser is "correct"
11675 according to the test suite.
11676 (Actions after errors): Remove, this is subsumed by the
11677 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11678
11679 2004-09-06 Akim Demaille <akim@epita.fr>
11680
11681 * data/lalr1.cc: Adjust the indentation of the labels.
11682 (Parser::pop): New.
11683 Use it.
11684
11685 2004-09-06 Akim Demaille <akim@epita.fr>
11686
11687 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11688 argument, an informative message.
11689 Call YY_SYMBOL_PRINT.
11690 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11691 * data/lalr1.cc (destruct_): Likewise.
11692 In addition, no longer depend on b4_yysymprint_generate and
11693 b4_yydestruct_generate to generate these functions, do it "by
11694 hand".
11695
11696 2004-09-03 Akim Demaille <akim@epita.fr>
11697
11698 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11699 invoked, yydestruct the lookahead.
11700 * tests/calc.at (Calculator $1): Update the expected lengths of
11701 traces: there is an added line for the discarded lookahead.
11702 * doc/bison.texinfo (Destructor Decl): Some rewording.
11703 Define "discarded" symbols.
11704
11705 2004-09-02 Akim Demaille <akim@epita.fr>
11706
11707 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11708
11709 2004-09-02 Akim Demaille <akim@epita.fr>
11710
11711 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11712 (YYDSYMPRINTF): Rename as...
11713 (YY_SYMBOL_PRINT): this.
11714 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11715 two.
11716 Use it instead of direct symprint_ calls.
11717 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11718 one.
11719
11720 2004-09-02 Akim Demaille <akim@epita.fr>
11721
11722 * data/lalr1.cc (b4_yysymprint_generate): New.
11723 (symprint_): New member function, defined when YYDEBUG.
11724 Use it consistently instead of token/nterm debugging output by
11725 hand.
11726 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11727 %printer calls to use cdebug_ when using lalr1.cc.
11728
11729 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11730
11731 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11732 with #ifdef YYDEBUG.
11733
11734 2004-08-26 Akim Demaille <akim@epita.fr>
11735
11736 * doc/bison.texinfo (Implementing Loops): Rename as...
11737 (Implementing Gotos/Loops): this.
11738
11739 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11740
11741 Adjust to latest gnulib.
11742 * bootstrap (gnulib_modules): Add xalloc-die.
11743 Set LC_ALL=C so that file names sort consistently.
11744 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11745 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11746 uintmax_t.m4, ulonglong.m4.
11747 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11748 po.m4 since we are now using _gl.m4 instead.
11749
11750 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11751
11752 * src/scan-action.l: Remove. Scanning of semantic actions is
11753 handled in scan-gram.l.
11754
11755 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11756
11757 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11758
11759 * src/location.h (struct): The file member is a uniqstr.
11760 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11761
11762 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11763
11764 Fix bug with non-%union parsers that have printers or destructors,
11765 which led to a Bison core dump. Reported by Peter Fales in
11766 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11767
11768 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11769 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11770 not to our own type.
11771 * src/output.c (symbol_destructors_output, symbol_printers_output):
11772 Don't assume %union.
11773 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11774 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11775 UNION-FLAG. All callers changed.
11776 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11777 Use type char, not unsigned int, when declaring an array of char;
11778 this lets us remove a cast.
11779 (Printers and Destructors): Add non-%union test cases.
11780
11781 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11782
11783 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11784 GLR writeups. E.g., avoid frenchspacing and the future tense,
11785 change "lookahead" to "look-ahead", and change "wrt" to "with
11786 respect to".
11787
11788 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11789
11790 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11791 New sections, split off from the GLR Parsers section. Put the new
11792 Simple GLR Parser near the start of the GLR section, for clarity.
11793 Rewrite connective text.
11794
11795 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11796
11797 * doc/bison.texinfo (Simple GLR Parsers): New section.
11798
11799 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11800
11801 * NEWS, TODO, doc/bison.texinfo:
11802 Use "look-ahead" instead of "lookahead", to be consistent.
11803 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11804 while we're fixing "look-ahead".
11805 * src/conflicts.c (shift_set): Renamed from shiftset.
11806 (look_ahead_set): Renamed from lookaheadset.
11807 * src/print.c: Likewise.
11808 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11809 name for "lookahead".
11810 (report_types, usage): Likewise.
11811 * src/getargs.h (report_look_ahead_tokens): Renamed from
11812 report_lookaheads.
11813 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11814 compute_lookaheads.
11815 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11816 (look_ahead_tokens_print): Renamed from lookaheads_print.
11817 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11818 state_rule_lookaheads_print.
11819 * src/state.h: Likewise.
11820 (reductions.look_ahead_tokens): Renamed from lookaheads.
11821 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11822 AT_DATA_LOOKAHEADS_GRAMMAR.
11823
11824 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11825
11826 * README: Update location of patched M4 distribution.
11827
11828 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11829
11830 Don't assume the C++ compiler takes the same arguments as the C compiler
11831 (trivial change).
11832 * configure.ac (O0CXXFLAGS): New var.
11833 * tests/atlocal.in (CXXFLAGS): Use it.
11834
11835 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11836
11837 Fix some "make check" problems with C++ reported by
11838 Albert Chin-A-Young for Tru64 C++ in this thread:
11839 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11840
11841 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11842 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11843 Output to a .cc file for C++, not to a .c file.
11844 * tests/calc.at (AT_CHECK_CALC): Likewise.
11845 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11846 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11847
11848 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11849
11850 * tests/calc.at, tests/actions.at: Workaround for SGI
11851 C++ compiler. (trivial change)
11852
11853 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11854
11855 Spent a few hours checking out which prerequisite versions the
11856 current sources actually require. I went all the way back to
11857 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11858 a seemingly endless set of combinations of versions more recent
11859 than that. The bottom line is that the current sources require
11860 fairly recent versions of the build tools, and it'll be some work
11861 to change this.
11862 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11863 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11864 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11865 Add comments explaining why those particular versions are
11866 currently needed.
11867
11868 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11869 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11870 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11871
11872 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11873 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11874
11875 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11876
11877 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11878 0.11.5. Suggested by Bruno Haible.
11879 * bootstrap: Remove gettext version checking.
11880
11881 * doc/bison.texinfo (Decl Summary): Also mention that %union
11882 can depend on prerequisite types. Problem reported by Tim
11883 Van Holder.
11884
11885 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11886
11887 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11888 * README-alpha: Don't tell people not to package this.
11889
11890 * bootstrap: Don't assume $(...) works; use `...` instead.
11891 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11892 gettext better.
11893
11894 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11895 put into the -d output file, and mention what to do if YYSTYPE is
11896 defined as a macro.
11897
11898 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11899
11900 Undo change made earlier today: it caused autopoint to not bring
11901 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11902 autopoint's.
11903
11904 * bootstrap: Check that gettext version matches what's in
11905 configure.ac. Warn users to ignore robots.txt ERROR 404.
11906 * bootstrap: Undo today's earlier change (logged below).
11907 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11908
11909 The gettext version checking is causing more trouble than it's
11910 curing; remove it. Problem reported by Paul Hilfinger.
11911
11912 * bootstrap: Issue a warning that one can expect a message
11913 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11914 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11915
11916 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11917
11918 Ensure that the C++ compiler used for testing actually works on a
11919 simple test program; if not, skip the C++-related tests. Problem
11920 reported by Vin Shelton in:
11921 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11922
11923 * m4/cxx.m4: New file.
11924 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11925 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11926 * tests/local.at (AT_COMPILE_CXX): Use it.
11927
11928 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11929
11930 * data/glr.c (yylloc): Output this macro even if locations are not
11931 being generated, as the GLR parser needs it even in that case.
11932 Problem reported by Troy A. Johnson
11933 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11934
11935 * configure.ac (AC_INIT): Update to 1.875e.
11936
11937 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11938
11939 * NEWS: Version 1.875d.
11940 * configure.ac (AC_INIT): Likewise.
11941 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11942
11943 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11944 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11945 lalr1.cc runs afoul of the first, and the last two are no longer
11946 supported by GCC 3.4.0.
11947 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11948 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11949
11950 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11951
11952 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11953 unsigned int, for compatibility with latest gnulib hash module.
11954 * src/state.c (state_hash, state_hasher): Likewise.
11955 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11956 * src/uniqstr.c (hash_uniqstr): Likewise.
11957
11958 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11959
11960 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11961
11962 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11963 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11964 character and string literals.
11965 (unexpected_end): New function.
11966 (unexpected_eof): Use it.
11967 (unexpected_newline): New function.
11968 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11969 actions.
11970
11971 * NEWS: Document %expect-rr.
11972
11973 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11974 Fix typo by replacing $1 with $option.
11975 Remove more 'intl'-related files.
11976 Don't DEFUN AM_INTL_SUBDIR twice.
11977
11978 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11979 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11980 strtoul.c.
11981 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11982 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11983 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11984 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11985 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11986 * src/.cvsignore: Add *.output.
11987
11988 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11989 gets copied to the output file.
11990
11991 2004-04-28 Paul Eggert <eggert@twinsun.com>
11992
11993 Get files from the gnulib and po repositories, instead of relying
11994 on them being in our CVS. Upgrade to latest versions of gnulib
11995 and Automake.
11996
11997 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11998 * bootstrap: Bootstrap from gnulib and po repositories.
11999 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12000 * README-cvs: Document these changes. Remove version numbers from
12001 mentions of build tools, since they change so often. Mention Flex.
12002
12003 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12004 (gl_USE_SYSTEM_EXTENSIONS): Add.
12005 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12006 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12007 does this for us.
12008 (AC_ISC_POSIX): Remove; we no longer support this
12009 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12010 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12011 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12012 Do not check for C89 headers, except for locale.h which is used
12013 by the Yacc library and must port to K&R hosts.
12014 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12015 Do not check for C89 functions, except for setlocale which is
12016 used by the Yacc library.
12017 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12018 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12019 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12020 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12021 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12022 AM_GNU_GETTEXT): Remove; now done by:
12023 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12024 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12025 for us.
12026
12027 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12028 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12029 Define to empty, as gnulib.mk will do the rest for us.
12030 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12031 for us.
12032 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12033 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12034
12035 * src/files.c: Include gnulib's xstrndup.h.
12036
12037 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12038 (REALLOC): Use xnrealloc, for likewise.
12039 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12040 (strnlen, memrchr): Remove decls; functions no longer used.
12041 Include <stpcpy.h>.
12042
12043 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12044 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12045 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12046 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12047 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12048 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12049 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12050 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12051 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12052 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12053 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12054 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12055 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12056 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12057 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12058 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12059 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12060 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12061 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12062 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12063 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12064 Remove, as these files are now generated automatically
12065 by bootstrap or automake.
12066
12067 * po/ChangeLog: Remove: all but one entry was a duplicate
12068 of this file, and I moved that 2000-11-02 entry here.
12069
12070 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12071 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12072 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12073 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12074 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12075 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12076 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12077 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12078 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12079 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12080 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12081 xstrndup.h.
12082 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12083 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12084 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12085 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12086 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12087 * src/.cvsignore: Remove *_.c.
12088
12089
12090 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12091 support it. (The latest stable gzip doesn't.)
12092
12093 2004-04-27 Paul Eggert <eggert@twinsun.com>
12094
12095 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12096 case, as stos_ is now used by destructors due to the 2004-02-09
12097 change.
12098
12099 Remove more K&R C support.
12100 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12101 * lib/subpipe.c (errno): Remove decl.
12102 Include <stdlib.h> unconditionally.
12103 (EXIT_FAILURE): Remove macro.
12104 * src/complain.c (vfprintf, strerror): Remove.
12105 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12106 unconditionally.
12107 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12108 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12109 (strchr, strspn, memchr): Remove decls.
12110 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12111 unconditionally. Do not declare perror.
12112 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12113 unconditionally.
12114
12115 * src/complain.c (_): Remove useless defn, as system.h defines this.
12116
12117 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12118 with latest obstack.h.
12119 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12120 to procedure types, as obstack.h now does that for us.
12121 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12122
12123 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12124 so that this include file can stand alone.
12125 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12126 does this now. Include subpipe.h first after config.h, to
12127 test whether it can stand alone.
12128
12129 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12130 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12131 unused declaration.
12132
12133 * tests/synclines.at (%union synch line): Put a dummy member in
12134 the union, because empty unions aren't allowed in C. Caught
12135 by GCC 3.4.0.
12136
12137 2004-04-13 Jim Meyering <jim@meyering.net>
12138
12139 * src/conflicts.c (conflicts_print): Correct format string typo:
12140 use `%%' to produce literal `%'. (trivial change)
12141
12142 2004-03-30 Paul Eggert <eggert@twinsun.com>
12143
12144 * src/getargs.c (version): Update copyright year to 2004.
12145
12146 * data/c.m4 (b4_int_type): Use 'short int' rather than
12147 'short', and similarly for 'long', 'unsigned', etc.
12148 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12149 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12150 yy_yypstack, yydumpstack): Likewise.
12151 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12152 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12153 Likewise.
12154 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12155 yy_stack_print, yyparse): Likewise.
12156 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12157 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12158 * lib/bitset.c (bitset_print): Likewise.
12159 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12160 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12161 * lib/bitsetv.c (bitsetv_dump): Likewise.
12162 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12163 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12164 Likewise.
12165 * src/LR0.c (allocate_itemsets): Likewise.
12166 * src/gram.h (rule_number, rule): Likewise.
12167 * src/lalr.h (goto_number): Likewise.
12168 * src/nullable.c (nullable_compute): Likewise.
12169 * src/output.c (prepare_rules): Likewise.
12170 * src/relation.c (relation_print, relation_digraph): Likewise.
12171 * src/relation.h (relation_node): Likewise.
12172 * src/state.h (state_number, transitions, errs, reductions,
12173 struct state): Likewise.
12174 * src/symtab.h (symbol_number, struct symbol): Likewise.
12175 * src/tables.c (vector_number, tally, action_number,
12176 default_goto, goto_actions): Likewise.
12177 * tests/existing.at (GNU Cim Grammar): Likewise.
12178 * tests/regression.at (Web2c Actions): Likewise.
12179
12180 * src/output.c (muscle_insert_short_int_table): Renamed from
12181 muscle_insert_short_table. All uses changed.
12182
12183 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12184
12185 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12186 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12187 Add %expect-rr rule.
12188
12189 * src/scan-gram.l: Recognize %expect-rr.
12190
12191 * src/conflicts.h (expected_sr_conflicts): Rename from
12192 expected_conflicts.
12193 (expected_rr_conflicts): Declare.
12194
12195 * src/conflicts.c (expected_sr_conflicts): Rename from
12196 expected_conflicts.
12197 (expected_rr_conflicts): Define.
12198 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12199 for GLR parsers.
12200 Use expected_sr_conflicts in place of expected_conflicts.
12201 Warn if expected_rr_conflicts used in non-GLR parser.
12202
12203 * doc/bison.texinfo: Add documentation for %expect-rr.
12204
12205 2004-03-08 Paul Eggert <eggert@gnu.org>
12206
12207 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12208 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12209
12210 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12211 in lalr1.cc.
12212 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12213 * src/scan-gram.l (scan_integer): New function.
12214 ({int}): Use it.
12215 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12216 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12217 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12218 Say "long int", not "long", for uniformity with GNU style.
12219
12220 2004-02-25 Paul Eggert <eggert@twinsun.com>
12221
12222 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12223 compilers. This fixes a problem with Intel's C++ compiler being
12224 chatty, reported by Guido Trentalancia in
12225 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12226
12227 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12228
12229 Support %destructor and merge error locations in lalr1.cc.
12230
12231 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12232 (Parser::stos_): Define unconditionally.
12233 (Parser::destruct_): New method. Generate its body with
12234 b4_yydestruct_generate.
12235 (Parser::error_start_): New attribute.
12236 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12237 token which are discarded.
12238 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12239 error_start_ when erroneous token are discarded.
12240 (Parser::parse) <yyerrlab1>: Compute the location of the error
12241 token so that it covers all the discarded tokens.
12242 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12243 it can be called with `%skeleton "lalr1.cc"', and do that.
12244
12245 2004-02-02 Paul Eggert <eggert@twinsun.com>
12246
12247 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12248 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12249 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12250 There's no need to mention top_builddir since Automake does that
12251 for us.
12252 (INCLUDES): Remove, as Automake says it's obsolescent.
12253 Contents migrated into AM_CPPFLAGS as described above.
12254 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12255
12256 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12257
12258 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12259 (yyreportSyntaxError): Handle case where lookahead token is
12260 YYEMPTY.
12261
12262 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12263
12264 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12265 resulting parsers are compilable with C++.
12266
12267 2003-12-23 Paul Eggert <eggert@twinsun.com>
12268
12269 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12270 * src/output.c (output_skeleton): Rename local var.
12271 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12272 Bison tokens, as this runs afoul of the 2003-10-07 change that
12273 disallowed NUL bytes in character constants or string literals.
12274
12275 * tests/local.at: Require Autoconf 2.59's Autotest.
12276 * tests/testsuite.at: Don't include local.at, since we now assume
12277 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12278 including it.
12279 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12280 multiple inclusion warnings.
12281
12282 2003-12-02 Akim Demaille <akim@epita.fr>
12283
12284 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12285 conditions.
12286 From Bruno Haible.
12287
12288 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12289
12290 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12291
12292 2003-10-07 Paul Eggert <eggert@twinsun.com>
12293
12294 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12295 if testsuite doesn't exist.
12296
12297 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12298 literals, unfortunately.
12299 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12300 Complain about NUL bytes in character constants or string literals.
12301
12302 2003-10-05 Paul Eggert <eggert@twinsun.com>
12303
12304 * NEWS: Don't document %no-default-prec, as it's still
12305 too experimental.
12306 * doc/bison.texinfo: Document %no-default-prec only if
12307 the defaultprec flag is set. Normally it's not.
12308
12309 2003-10-04 Paul Eggert <eggert@twinsun.com>
12310
12311 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12312 non-modifiable lvalue, instead of a modifiable one.
12313 * doc/bison.texinfo (Actions): Document that $$ can
12314 be assigned to. Do not claim that $$ and $N are
12315 array element references: user code should not rely on this.
12316
12317 2003-10-01 Paul Eggert <eggert@twinsun.com>
12318
12319 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12320 (grammar_declaration): Use it.
12321 * src/scan-gram.l: New token %no-default-prec.
12322 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12323 * NEWS, doc/bison.texinfo: Document the above.
12324
12325 2003-10-01 Akim Demaille <akim@epita.fr>
12326
12327 VCG no longer supports long_straight_phase.
12328
12329 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12330 * src/print_graph.c (print_graph): Adjust.
12331
12332 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12333 and Paul Eggert <eggert@twinsun.com>
12334
12335 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12336 Table of Symbols): Document %default-prec.
12337 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12338 (grammar_declaration): Set default_prec on %default-prec.
12339 * src/scan-gram.l (%default-prec): New token.
12340 * src/reader.h (default_prec): New flag.
12341 * src/reader.c: Likewise.
12342 (packgram): Handle it.
12343 * tests/conflicts.at (%default-prec without %prec,
12344 %default-prec with %prec, %default-prec 1): New tests.
12345
12346 2003-09-30 Paul Eggert <eggert@twinsun.com>
12347
12348 * tests/testsuite.at: Include local.at, not input.at, fixing
12349 a typo in the 2003-08-25 patch.
12350
12351 2003-08-27 Akim Demaille <akim@epita.fr>
12352
12353 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12354 GCC warnings.
12355
12356 2003-08-26 Akim Demaille <akim@epita.fr>
12357
12358 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12359 "<\#" to avoid magic from Gnus when posting parts of this script.
12360
12361 2003-08-26 Akim Demaille <akim@epita.fr>
12362
12363 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12364 (Parser::parse): here.
12365 Adjust: nerrs and errstatus is now replaced by...
12366 (Parser::nerrs_, Parser::errstatus_): New.
12367
12368 2003-08-25 Akim Demaille <akim@epita.fr>
12369
12370 * config/announce-gen, Makefile.cfg: New.
12371 * Makefile.am: Adjust.
12372 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12373 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12374
12375 2003-08-25 Akim Demaille <akim@epita.fr>
12376
12377 When reducing initial empty rules, Bison parser read an initial
12378 location that is not defined. This results in garbage, and that
12379 affects Bison's own parser. Therefore we need (i) to extend Bison
12380 to support a means to initialize this location, and (ii) to use
12381 this CVS Bison to fix CVS Bison's parser.
12382
12383 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12384 with...
12385 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12386 * src/parse-gram.y: Adjust.
12387 (%initial-action): New.
12388 (%error-verbose): Since we require CVS Bison, there is no reason
12389 not to use it.
12390 * src/scan-gram.l: Adjust.
12391 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12392 * data/yacc.c (yyparse): Use b4_initial_action.
12393
12394 2003-08-25 Akim Demaille <akim@epita.fr>
12395
12396 * doc/bison.texinfo: Don't promote stdout for error messages.
12397
12398 2003-08-25 Akim Demaille <akim@epita.fr>
12399
12400 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12401 From Alexandre Duret-Lutz.
12402
12403 2003-08-25 Akim Demaille <akim@epita.fr>
12404
12405 Version 1.875c.
12406
12407 2003-08-25 Akim Demaille <akim@epita.fr>
12408
12409 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12410 Use them.
12411
12412 2003-08-25 Akim Demaille <akim@epita.fr>
12413
12414 * data/lalr1.cc (Parser::reduce_print_): New.
12415 Use it.
12416
12417 2003-08-25 Akim Demaille <akim@epita.fr>
12418
12419 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12420 error recovery loops. This patch is based on
12421 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12422 Also, augment the similarity between lalr1.cc and yacc.c.
12423 Note: the locations of error recovery rules are not correct yet.
12424
12425 * data/lalr1.cc: Comment changes to augment the similarity between
12426 lalr1.cc and yacc.c.
12427 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12428 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12429 yyerrlab), when hitting EOF, pop the whole stack here instead of
12430 merely falling thru the default error handling mechanism.
12431 (yyerrorlab): New label, with the old contents of YYERROR,
12432 plus the following change: pop the stack of rhs corresponding
12433 to the production that invoked YYERROR. That is how Yacc
12434 behaves (required by POSIX).
12435 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12436 fail.
12437
12438 2003-08-25 Akim Demaille <akim@epita.fr>
12439
12440 Tune local.at so that people can "autom4te -l autotest calc.at -o
12441 calc" for instance, to extract a sub test suite.
12442
12443 * tests/testsuite.at: Move the initialization, Autotest version
12444 requirement, and AT_TESTED invocation into...
12445 * tests/local.at: here.
12446 * tests/testsuite.at: Include it for compatibility with Autoconf
12447 2.57.
12448 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12449 be ignore.
12450
12451 2003-08-04 Paul Eggert <eggert@twinsun.com>
12452
12453 Rework code slightly to avoid gcc -Wtraditional warnings.
12454 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12455 The returned value is now stored in *YY0. All callers changed.
12456 * src/output.c (merge_output): Adjust to the above change.
12457
12458 2003-07-26 Paul Eggert <eggert@twinsun.com>
12459
12460 * data/glr.c (YYASSERT): New macro.
12461 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12462 yyresolveStates, yyprocessOneStack):
12463 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12464 Derived from a suggestion by Frank Heckenbach.
12465
12466 2003-07-25 Paul Eggert <eggert@twinsun.com>
12467
12468 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12469 for portability to K&R C (after ansi2knr, presumably). See
12470 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12471 by Frank Heckenbach, though I have omitted the structure-initialization
12472 part of his glr-knr.diff patch since I recall that the Portable
12473 C Compiler didn't require that change.
12474
12475 Let the user specify how to allocate and free memory.
12476 Derived from a suggestion by Frank Heckenbach in
12477 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12478 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12479 All uses of free, malloc, realloc changed to use these macros,
12480 and unnecessary casts removed.
12481 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12482
12483 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12484
12485 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12486 use s.empty() rather than s == "" to test for empty string; see
12487 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12488 (trivial change)
12489
12490 2003-06-25 Akim Demaille <akim@epita.fr>
12491
12492 * config/depcomp, config/install-sh: Update from masters.
12493
12494 2003-06-20 Paul Eggert <eggert@twinsun.com>
12495
12496 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12497 and return properly parenthesized result.
12498 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12499 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12500 Remove unnecessary parentheses from uses.
12501 * doc/bison.texinfo (Location Default Action): Describe the
12502 conventions for parentheses.
12503
12504 2003-06-19 Paul Eggert <eggert@twinsun.com>
12505
12506 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12507 yyreportTree): Do not assume that size_t is the same width as int,
12508 when printing sizes. Print sizes using an unsigned format.
12509 Problem reported by Frank Heckenbach in
12510 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12511
12512 Port to Forte Developer 7 C compiler.
12513 * data/glr.c (struct YYLTYPE): If locations are not being used,
12514 declare a single dummy member, as empty structs do not conform
12515 to the C standard.
12516 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12517 the Forte Developer 7 C compiler complains that end-of-loop
12518 code is not reached.
12519
12520 2003-06-17 Paul Eggert <eggert@twinsun.com>
12521
12522 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12523 avoid warnings from picky compilers about redefinition of PARAMS.
12524
12525 2003-06-17 Paul Eggert <eggert@twinsun.com>
12526
12527 Version 1.875b.
12528
12529 * NEWS: Document 1.875b.
12530
12531 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12532 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12533 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12534 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12535 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12536 per recent gettext manual's suggestion.
12537 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12538 Use prototypes, not old-style definitions.
12539 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12540 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12541 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12542 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12543 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12544 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12545 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12546 vbitset_or_and_cmp, vbitset_copy): Likewise.
12547
12548 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12549 Do not include <stdlib.h>.
12550 (PARAMS): Define unconditionally for C89.
12551 (ATTRIBUTE_NORETURN): Remove.
12552 (ATTRIBUTE_UNUSED): Define unconditionally.
12553
12554 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12555 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12556 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12557 * lib/vbitset.c, lib/vbitset.h: New files.
12558 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12559 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12560 from libbitset.
12561
12562 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12563 `How Can I Reset @code{yyparse}', since texinfo does not allow
12564 arbitrary @ in node names.
12565
12566 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12567 shouldn't be needed according to the gettext 0.12.1 documentation
12568 but which seem to be needed anyway: codeset.m4 glibc21.m4
12569 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12570 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12571 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12572
12573 * lib/.cvsignore: Add stdbool.h.
12574 * m4/.cvsignore: Add nls.m4, po.m4.
12575
12576 Upgrade to CVS gnulib.
12577 * stdbool_.h: File renamed from stdbool.h.in.
12578 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12579 AC_HEADER_STDBOOL.
12580 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12581 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12582 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12583 (MOSTLYCLEANFILES): New var.
12584 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12585 (stdbool.h): New rule.
12586 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12587 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12588 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12589 m4/quote.m4: Upgrade to today's gnulib.
12590
12591 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12592 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12593 the tests right now.
12594 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12595 yyerror are declared before use; C99 requires this.
12596
12597 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12598
12599 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12600 first.
12601 (yyrecoverSyntaxError): Correct the logic for setting and testing
12602 yyerrState.
12603 Correct comment on handling EOF.
12604 Allow states with only a default reduction, rather than failing
12605 (I can't quite reconstruct why these were not allowed before).
12606
12607 Fixes to avoid problem that $-N rules in GLR parsers can cause
12608 buffer overruns, corrupting state.
12609
12610 * src/output.c (prepare_rules): Output max_left_semantic_context
12611 definition.
12612 * src/reader.h (max_left_semantic_context): New variable declaration.
12613 * src/scan-gram.l (max_left_semantic_context): Define.
12614 (handle_action_dollar): Update max_left_semantic_context.
12615 * data/glr.c (YYMAXLEFT): New definition.
12616 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12617 (yyresolveAction): Ditto.
12618
12619 Fixes to problems with location handling in GLR parsers reported by
12620 Frank Heckenbach (2003/06/05).
12621
12622 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12623 (YYRHSLOC): Add parentheses, and define only if locations used.
12624 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12625 locations not used.
12626 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12627 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12628
12629 * tests/cxx-type.at: Exercise location information; update tests
12630 to differentiate output with and without locations.
12631 Remove forward declarations of yylex and yyerror---caused errors
12632 because default YYLTYPE not yet defined.
12633 Change semantic actions to compute strings, rather than printing
12634 them directly (to test proper passing of semantics values). Change
12635 output to prefix notation and update test data and expected results.
12636 (yylex): Track locations.
12637 (stmtMerge): Return value rather than printing, and include arguments
12638 in value.
12639
12640 2003-06-03 Paul Eggert <eggert@twinsun.com>
12641
12642 Avoid warnings generated by GCC 2.95.4 when Bison is
12643 configured with --enable-gcc-warnings.
12644 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12645 yy::]b4_parser_class_name[::translate_,
12646 yy::Stack::operator[] (unsigned),
12647 yy::Stack::operator[] (unsigned) const,
12648 yy::Slice::operator[] (unsigned),
12649 yy::Slice::operator[] (unsigned) const):
12650 Rename local vars to avoid warnings.
12651 * tests/glr-regression.at (Improper handling of embedded actions
12652 and $-N in GLR parsers): Remove unused local variable from yylex.
12653 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12654 (void) as arg when not pure, since we now assume C89 when building
12655 Bison. Pacify GCC by using parameter.
12656
12657 2003-06-02 Paul Eggert <eggert@twinsun.com>
12658
12659 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12660 yy::Location::lines, yy::Location::columns): Rename arguments
12661 to avoid shadowing; this removes a warning generated by GCC 3.3.
12662
12663 2003-06-01 Paul Eggert <eggert@twinsun.com>
12664
12665 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12666 to g++, as GCC 3.3 complains if you do it.
12667 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12668 everything that WARNING_CFLAGS has, except omit warnings
12669 not suitable for C++.
12670 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12671 * tests/atlocal.in (CXXFLAGS): New var.
12672 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12673
12674 Fix a GLR parser bug I reported in February; see
12675 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12676 The problem was that GLR parsers did not conform to the C standard,
12677 because actions like { $1 = $2 + $3; } expanded to expressions
12678 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12679 to a local variable. The C standard says that expressions
12680 like (var = f ()) + (var = f ()) have undefined behavior.
12681 Another problem was that GCC sometimes issues warnings that
12682 yyfill and its parameters are unused.
12683
12684 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12685 as possibly unused.
12686 (yyfill): New function.
12687 (YYFILL): Use it.
12688 (yyuserAction): Change type of yynormal to bool, so that it matches
12689 the new yyfill signature. Mark it as possibly unused.
12690
12691
12692 Follow up on a bug I reported in February, where a Bison-generated
12693 parser can loop. Provide a test case and a fix for yacc.c. I
12694 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12695 The original bug report is in:
12696 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12697
12698 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12699 macro's size was becoming unwieldy.
12700 (yyerrlab): Do not discard an empty lookahead symbol, as this
12701 might destroy garbage.
12702 (yyerrorlab): New label, with the old contents of YYERROR,
12703 plus the following change: pop the stack of rhs corresponding
12704 to the production that invoked YYERROR. That is how Yacc
12705 behaves, and POSIX requires this behavior.
12706 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12707 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12708 Define 'alarm' to do nothing if unistd.h is not available.
12709 Add a new rule "exp: '-' error;" to test the above change to
12710 data/yacc.c. Use 'alarm' to abort any test taking longer than
12711 10 seconds, as it's probably looping.
12712 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12713 Also, the new yacc.c generates two fewer diagnostics for an
12714 existing test.
12715
12716 2003-05-24 Paul Eggert <eggert@twinsun.com>
12717
12718 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12719 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12720 This fixes a problem reported by John Bowman when the Compaq/HP
12721 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12722 -ansi -Wall -gall).
12723 * data/yacc.c (union yyalloc): Likewise.
12724 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12725
12726 Switch from 'int' to 'bool' where that makes sense.
12727
12728 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12729 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12730 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12731 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12732 Return or accept bool, not int. All callers changed.
12733 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12734 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12735 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12736 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12737 bitset_or_and_cmp_): Likewise.
12738 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12739 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12740 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12741 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12742 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12743 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12744 bitset_stats_or_and_cmp): Likewise.
12745 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12746 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12747 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12748 ebitset_xor_cmp): Likewise.
12749 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12750 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12751 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12752 lbitset_xor_cmp): Likewise.
12753 * lib/bbitset.h: Include <stdbool.h>.
12754 (struct bitset_vtable): The following members now return bool, not
12755 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12756 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12757 or_and_cmp).
12758 * src/conflicts.c (count_rr_conflicts): Likewise.
12759 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12760 All uses changed.
12761 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12762 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12763 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12764 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12765 graph_flag): Likewise.
12766 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12767 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12768 graph_flag): Likewise.
12769 * src/output.c (error_verbose): Likewise.
12770 * src/output.h (error_verbose): Likewise.
12771 * src/reader.c (start_flag, typed): Likewise.
12772 * src/reader.h (typed): Likewise.
12773 * src/getargs.c (LOCATIONS_OPTION): New constant.
12774 (long_options, getargs): Use it.
12775 * src/lalr.c (build_relations): Use bool, not int.
12776 * src/nullable.c (nullable_compute): Likewise.
12777 * src/print.c (print_reductions): Likewise.
12778 * src/tables.c (action_row, pack_vector): Likewise.
12779 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12780 * src/output.c (prepare): Use it.
12781 * src/output.c (token_definitions_output,
12782 symbol_destructors_output, symbol_destructors_output): Use string,
12783 not boolean integer, to keep track of whether to output separator.
12784 * src/print_graph.c (print_core): Likewise.
12785 * src/state.c (state_rule_lookaheads_print): Likewise.
12786
12787 * config/install-sh: Sync from automake 1.7.5.
12788
12789 2003-05-14 Paul Eggert <eggert@twinsun.com>
12790
12791 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12792 semicolon after a grammar declaration, in the interest of possible
12793 future changes to the Bison input language.
12794 Do not allow a stray semicolon at the start of the grammar.
12795 (rhses.1): Allow one or more semicolons after any rule, including
12796 just before "|" as required by POSIX.
12797 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12798 grammar.
12799
12800 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12801
12802 %parse-param support for lalr1.cc.
12803
12804 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12805 b4_cc_constructor_calls, b4_cc_constructor_call,
12806 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12807 definitions.
12808 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12809 parse-param arguments.
12810 (yy::b4_parser_class_name): Declare instance variables to
12811 hold parse-param arguments.
12812 * tests/calc.at: s/value/semantic_value/ because value clashes
12813 with a member of yy::b4_parser_class_name. Adjust C++ code
12814 to handle %parse-param. Enable %parse-param test in C++.
12815
12816 2003-05-12 Paul Eggert <eggert@twinsun.com>
12817
12818 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12819 English a bit. Fix fclose typo. Change "const char" to "char
12820 const", and use ANSI C rather than K&R for "main". Suggest
12821 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12822 and suggest yy_switch_to_buffer.
12823
12824 2003-05-05 Paul Eggert <eggert@twinsun.com>
12825
12826 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12827 C89. This avoids a diagnostic on compilers that define __STDC__
12828 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12829 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12830
12831 2003-05-03 Paul Eggert <eggert@twinsun.com>
12832
12833 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12834 Do not overrun array bounds.
12835 This should fix a bug reported today by Olatunji Oluwabukunmi in
12836 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12837
12838 2003-04-29 Akim Demaille <akim@epita.fr>
12839
12840 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12841 * src/getargs.c, src/getargs.h: here, as bool, not int.
12842 (nondeterministic_parser): New.
12843 * src/parse-gram.y, src/scan-gram.l: Support
12844 %nondeterministic-parser.
12845 * src/output.c (prepare): Use nondeterministic_parser instead
12846 of glr_parser where appropriate.
12847 * src/tables.c (conflict_row, action_row, save_row)
12848 (token_actions, token_actions, pack_vector): Ditto.
12849
12850 2003-04-29 Akim Demaille <akim@epita.fr>
12851
12852 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12853
12854 2003-04-29 Akim Demaille <akim@epita.fr>
12855
12856 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12857 with %pure-parser and %locations to exercise the patch from Yakov
12858 Markovitch below.
12859
12860 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12861
12862 * data/yacc.c: (b4_lex_param): Corrected for the case where
12863 %lex-param is provided and %pure-parser isn't.
12864
12865 2003-04-27 Paul Eggert <eggert@twinsun.com>
12866
12867 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12868 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12869 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12870 if it is not defined.
12871 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12872
12873 2003-04-26 Paul Eggert <eggert@twinsun.com>
12874
12875 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12876 Declare to be of type suitable for the ninf value itself, not of
12877 type suitable for the corresponding table, since the latter might
12878 be unsigned but the ninf value might be negative. This fixes a
12879 bug reported by Alexandre Duret-Lutz in
12880 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12881
12882 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12883 invokes it. We shouldn't invoke it twice because it will attempt
12884 to put error.o in the archive twice. This fixes a glitch reported
12885 by Martin Mokrejs in
12886 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12887
12888 2003-04-21 Paul Eggert <eggert@twinsun.com>
12889
12890 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12891 to gnulib.
12892
12893 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12894
12895 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12896 Fix obvious typo that results in uncompilable GLR parsers
12897 when both %pure-parser and %locations are used. (trivial change)
12898
12899 2003-04-17 Paul Eggert <eggert@twinsun.com>
12900
12901 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12902 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12903 Do not insert the expected token via unput, as this runs afoul
12904 of a POSIX-compatibility bug in flex 2.5.31.
12905 All uses changed to BEGIN the parent state,
12906 since we no longer insert the expected token via unput.
12907 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12908 that is no longer emitted after the above change.
12909
12910 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12911 the first one. This change is from Paul Hilfinger, and it fixes
12912 regression reported by Werner Lemberg in
12913 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12914
12915 (resolve_sr_conflict): Don't invoke state_errs_set
12916 unless one or more tokens have been explicitly made errors.
12917 Otherwise, the above change causes Bison to abort.
12918
12919 * tests/existing.at (GNU pic Grammar): New test case, taken from
12920 Lemberg's email.
12921
12922 2003-03-31 Akim Demaille <akim@epita.fr>
12923
12924 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12925
12926 2003-03-31 Akim Demaille <akim@epita.fr>
12927
12928 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12929 output.
12930
12931 2003-03-31 Akim Demaille <akim@epita.fr>
12932
12933 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12934 From Paul Hilfinger.
12935
12936 2003-03-29 Akim Demaille <akim@epita.fr>
12937
12938 * m4/error.m4: Do not put under dynamic conditions some code which
12939 expansion is under static control.
12940
12941 2003-03-29 Akim Demaille <akim@epita.fr>
12942
12943 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12944
12945 2003-03-29 Akim Demaille <akim@epita.fr>
12946
12947 * doc/bison.texinfo (Strings are Destroyed): New.
12948
12949 2003-03-13 Paul Eggert <eggert@twinsun.com>
12950
12951 * .cvsignore: Add configure.lineno.
12952 * src/.cvsignore: Add yacc.
12953 * tests/.cvsignore: Add testsuite.log.
12954 * doc/fdl.texi: Sync with latest FSF version.
12955
12956 2003-03-12 Paul Eggert <eggert@twinsun.com>
12957
12958 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12959 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12960 cursor, instead of leaving it undefined. This fixes a bug
12961 reported by Tim Van Holder in
12962 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12963 * tests/input.at (Torturing the Scanner): Test the scanner on
12964 an empty input file, which was Tim Van Holder's test case.
12965
12966 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12967 <sys/resource.h> can be included, include sys/time.h and
12968 sys/times.h first, if available. This works around the SunOS
12969 4.1.4 porting bug reported by Bruce Becker in
12970 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12971
12972 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12973 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12974 AC_HEADER_SYS_WAIT.
12975
12976 Merge changes from gnulib. This was prompted because the CVS
12977 snapshot didn't build on Solaris 7 due to strnlen problems.
12978
12979 These changes need to be merged back into gnulib:
12980 * lib/hash.c: Include <stdbool.h> unconditionally.
12981 * m4/onceonly.m4 (m4_quote): New macro.
12982 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12983 Quote AC_FOREACH variable-expansions properly.
12984 The 2003-01-03 obstack.h change also needs merging.
12985 {end of changes requiring merging}
12986
12987 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12988 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12989 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12990 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12991 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12992 New files, imported from gnulib.
12993 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12994 above.
12995
12996 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12997 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12998 gnulib sources.
12999
13000 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13001 Add.
13002 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13003 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13004 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13005 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13006 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13007 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13008 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13009 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13010 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13011 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13012 (jm_PREREQ_ARGMATCH): Remove.
13013 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13014 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13015
13016 * src/system.h: Include <stdbool.h> unconditionally.
13017
13018 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13019 assuming at least C89 in the bitset code for some time now.
13020
13021 2003-03-03 Akim Demaille <akim@epita.fr>
13022
13023 * ro.po: New.
13024
13025 2003-03-02 Akim Demaille <akim@epita.fr>
13026
13027 * doc/bison.texinfo (Table of Symbols): Reactivate the
13028 documentation for %lex-param, and %parse-param.
13029
13030 2003-03-02 Akim Demaille <akim@epita.fr>
13031
13032 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13033 generate verbose error messages.
13034 Use the number of tokens as an upper bound in yytname, as it
13035 cannot be a non terminal.
13036
13037 2003-03-02 Akim Demaille <akim@epita.fr>
13038
13039 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13040 message.
13041
13042 2003-03-02 Akim Demaille <akim@epita.fr>
13043
13044 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13045 Use them to exercise yycheck overrun.
13046 Based on Andrew Suffield's grammar.
13047
13048 2003-03-02 Akim Demaille <akim@epita.fr>
13049
13050 Create tests/local.at for Bison generic testing macros.
13051
13052 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13053 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13054 This new file.
13055 * tests/calc.at (AT_CHECK_CALC): Adjust.
13056 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13057 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13058 * tests/local.at: here.
13059 (AT_COMPILE_CXX): Tags the tests using it as c++.
13060 Ignore the test if CXX is not functional.
13061
13062 2003-03-01 Paul Eggert <eggert@twinsun.com>
13063
13064 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13065 not loc->end, since loc->end might contain garbage and this leads
13066 to undefined behavior on some platforms.
13067 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13068 depend on *loc, so that the reader doesn't give the the false
13069 impression that *loc is initialized.
13070 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13071 does not survive the return.
13072
13073 2003-03-01 Akim Demaille <akim@epita.fr>
13074
13075 * src/scan-gram.l (code_start): Always initialize it when entering
13076 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13077 yylex invocation. An alternative would be making it static, but
13078 then it starts with the second %%'s beginning, instead of its end.
13079
13080 2003-02-28 Paul Eggert <eggert@twinsun.com>
13081
13082 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13083 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13084 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13085
13086 2003-02-26 Paul Eggert <eggert@twinsun.com>
13087
13088 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13089 Remove Sequent/Pyramid discussion (nobody uses them any more).
13090 Merge VMS and MS-DOS discussion; these ports may well be dead
13091 but let's keep mentioning them for now. Put <> around email
13092 addresses. Add copyright notice.
13093
13094 2003-02-24 Paul Eggert <eggert@twinsun.com>
13095
13096 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13097 to avoid collision with flex use of yylineno.
13098 Problem reported by Bruce Lilly in
13099 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13100 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13101 * data/yacc.c (yy_reduce_print): Likewise.
13102
13103 * config/depcomp: Sync with Automake 1.7.3.
13104
13105 2003-02-21 Akim Demaille <akim@epita.fr>
13106
13107 * data/lalr1.cc: Use temporary variables instead of casts to
13108 change integer types.
13109 Suggested by Paul Eggert.
13110
13111 2003-02-21 Akim Demaille <akim@epita.fr>
13112
13113 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13114 to avoid confusions with lalr1.cc's notion of Position.
13115 Suggested by Paul Eggert.
13116
13117 2003-02-20 Akim Demaille <akim@epita.fr>
13118
13119 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13120 before initial_columns.
13121 (location.hh): Use consistent variable names when defining the
13122 operator<<.
13123 Use "last" so that we subtract from Positions, not from unsigned.
13124
13125 2003-02-20 Akim Demaille <akim@epita.fr>
13126
13127 * data/lalr1.cc (position.hh): New subfile, including the extended
13128 and Doxygen'ed documentation of class Position.
13129 (location.hh): Use it.
13130 Document a` la Doxygen.
13131 With the help of Benoit Perrot.
13132
13133 2003-02-20 Akim Demaille <akim@epita.fr>
13134
13135 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13136 AT_YACC_IF.
13137 Redefine AT_YYERROR_SEES_LOC_IF using it.
13138 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13139 not defined.
13140 Don't use the location in yy::Parser::error_ and
13141 yy::Parser::print_ when not %locations.
13142 Activate more lalr1.cc tests.
13143
13144 2003-02-19 Akim Demaille <akim@epita.fr>
13145
13146 * data/lalr1.cc: When displaying a line number, be sure to make it
13147 an int.
13148
13149 2003-02-19 Akim Demaille <akim@epita.fr>
13150
13151 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13152 Remove, useless.
13153 (YYABORT, YYACCEPT, YYERROR): New.
13154 * tests/calc.at: Renable the lalr1.cc test.
13155
13156 2003-02-19 Akim Demaille <akim@epita.fr>
13157
13158 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13159 error recovery, mixing with/without pops and discarding of the
13160 lookahead.
13161 Exercise YYERROR.
13162 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13163
13164 2003-02-17 Paul Eggert <eggert@twinsun.com>
13165
13166 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13167 * tests/testsuite.at (AT_COMPILE): Use them.
13168 This fixes the testsuite problem reported by Robert Lentz in
13169 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13170
13171 2003-02-12 Paul Eggert <eggert@twinsun.com>
13172
13173 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13174 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13175 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13176 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13177 Check for malloc failure, for consistency with yacc.c.
13178 (yytname_size): Remove, for consistency with yacc.c.
13179
13180 The bug still remains in data/lalr1.cc, as I didn't have time
13181 to fix it there.
13182
13183 2003-02-06 Akim Demaille <akim@epita.fr>
13184
13185 * configure.ac (GXX): Rename as...
13186 (CXX): this, to keep the original Autoconf semantics.
13187 Require 2.57.
13188 * data/lalr1.cc: Fix b4_copyright invocations.
13189 If YYDEBUG is not defined, don't depend upon name_ being defined.
13190 (location.hh): Include string and iostream.
13191 (Position::filename): New member.
13192 (Position::Position ()): New.
13193 (operator<< (Position)): New.
13194 (operator- (Position, int)): New.
13195 (Location::first, Location::last): Rename as...
13196 (Location::begin, Location::end): these, to mock the conventional
13197 iterator names.
13198 (operator<< (Location)): New.
13199 * tests/atlocal.in (CXX): New.
13200 * tests/testsuite.at (AT_COMPILE_CXX): New.
13201 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13202 locations in a more synthetic way.
13203 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13204 lalr1.cc is used.
13205 Adjust the C locations to match those from Emacs: first column is
13206 column 0.
13207 Change all the expected results.
13208 Conform to the GCS: simplify the locations when applicable.
13209 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13210 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13211 these CPP macros with the m4 macros new defined by...
13212 (AT_CHECK_PUSHDEFS): this, i.e.:
13213 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13214 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13215 New macros.
13216 (AT_CHECK_POPDEFS): Undefine them.
13217 (AT_CHECK_CALC_LALR1_CC): New.
13218 Use it for the first lalr1.cc test.
13219
13220 2003-02-04 Akim Demaille <akim@epita.fr>
13221
13222 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13223 Location as is defined.
13224
13225 2003-02-04 Akim Demaille <akim@epita.fr>
13226
13227 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13228 name_ being defined.
13229
13230 2003-02-03 Paul Eggert <eggert@twinsun.com>
13231
13232 * src/gram.h (start_symbol): Remove unused decl.
13233
13234 Use more-consistent naming conventions for local vars.
13235
13236 * src/derives.c (derives_compute): Change type of local var from
13237 int to rule_number.
13238 * src/gram.c (grammar_rules_partial_print): Likewise.
13239 * src/print.c (print_core): Likewise.
13240 * src/reduce.c (reduce_grammar_tables): Likewise.
13241
13242 * src/gram.c (grammar_dump): Change name of item_number *
13243 local var from r to rp.
13244 * src/nullable.c (nullable_compute): Likewise.
13245
13246 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13247
13248 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13249 for symbol or symbol_number var.
13250 * src/reader.c (grammar_start_symbol_set): Likewise.
13251 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13252 Likewise.
13253 * src/state.c (transitions_to): Likewise.
13254 * src/state.h: Likewise.
13255 * src/tables.c (symbol_number_to_vector_number): Likewise.
13256
13257 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13258 char * var.
13259
13260 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13261 var.
13262
13263 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13264 var.
13265
13266 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13267 Use str, not s, for char * var. Use ch, not c, for character var.
13268 Use size for size var.
13269
13270 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13271 char * var.
13272 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13273 uniqstr var.
13274 * src/uniqstr.h: Likewise.
13275
13276 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13277 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13278 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13279 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13280 param to have same name as that of enum, so that we don't use
13281 "s" to stand for a non-state.
13282
13283 2003-02-02 Akim Demaille <akim@epita.fr>
13284
13285 * src/scan-skel.l: Scan more than one inert character per yylex
13286 invocation.
13287
13288 2003-02-01 Paul Eggert <eggert@twinsun.com>
13289
13290 Version 1.875a.
13291
13292 * po/LINGUAS: Add ms.
13293
13294 2003-01-30 Akim Demaille <akim@epita.fr>
13295
13296 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13297
13298 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13299
13300 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13301 of $1.
13302
13303 Changes in response to error report by S. Eken: GLR mode does not
13304 handle negative $ indices or $ indices in embedded rules correctly.
13305 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13306
13307 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13308 (b4_rhs_location): Ditto.
13309 (yyfill): New function to copy from stack tree into array
13310 incrementally.
13311 (yyuserAction): Modify to allow incremental move of semantic values
13312 to rhs array when in GLR mode.
13313 Define YYFILL to use in user-defined actions to fill semantic array
13314 as needed.
13315 Remove dummy use of yystack, as there is now a guaranteed use.
13316 (yydoAction): Modify to allow incremental move of semantic values
13317 to rhs array when in GLR mode.
13318 (yyresolveAction): Ditto.
13319 (yyglrShiftDefer): Update comment.
13320 (yyresolveStates): Use X == NULL for pointers, not !X.
13321 (yyglrReduce): Ditto.
13322 (yydoAction): Ditto
13323
13324 * tests/glr-regr1.at: Rename to ...
13325 * tests/glr-regression.at: Add new regression test for the problems
13326 described above (adapted from S. Eken).
13327 Update copyright notice.
13328 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13329 * tests/Makefile.am: Ditto.
13330
13331 2003-01-28 Paul Eggert <eggert@twinsun.com>
13332
13333 * data/lalr1.cc: Do not use @output_header_name@ unless
13334 b4_defines_flag is set. This fixes two bugs reported by
13335 Tim Van Holder in
13336 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13337 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13338
13339 2003-01-21 Paul Eggert <eggert@twinsun.com>
13340
13341 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13342 we don't need to worry about yyerrlab1 being reported as an
13343 "unused label" by non-GCC C compilers. The downside is that if
13344 locations are used then a couple of statements are duplicated each
13345 time YYERROR is invoked, but the upside is that the warnings
13346 should vanish.
13347 (yyerrlab1): Move code to YERROR.
13348 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13349 This reverts some of the 2002-12-27 change.
13350
13351 2003-01-17 Paul Eggert <eggert@twinsun.com>
13352
13353 * src/output.c (symbol_printers_output): Fix typo that led
13354 to core dump. Problem reported by Antonio Rus in
13355 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13356
13357 2003-01-13 Akim Demaille <akim@epita.fr>,
13358 Quoc Peyrot <chojin@lrde.epita.fr>,
13359 Robert Anisko <anisko_r@lrde.epita.fr>
13360
13361 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13362 when the stacks contain one element, as the loop would otherwise
13363 free the last state, and then use the top state (the one we just
13364 popped). This means that the initial elements will not be freed
13365 explicitly, as is the case in yacc.c; it is not a problem, as
13366 these elements have fake values.
13367
13368 2003-01-11 Paul Eggert <eggert@twinsun.com>
13369
13370 * NEWS: %expect-violations are now just warnings, reverting
13371 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13372 bootstrapping problem reported by Matthias Klose; see
13373 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13374 * src/conflicts.c (conflicts_print): Likewise.
13375 * tests/conflicts.at (%expect not enough, %expect too much,
13376 %expect with reduce conflicts): Likewise.
13377 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13378 that the warning is enabled if the number of conflicts changes
13379 (not necessarily increases).
13380
13381 * src/getargs.c (version): Update copyright year.
13382
13383 2003-01-09 Akim Demaille <akim@epita.fr>
13384
13385 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13386
13387 2003-01-08 Paul Eggert <eggert@twinsun.com>
13388
13389 * Makefile.maint (WGETFLAGS):
13390 New macro, containing "-C off" to disable proxy caches.
13391 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13392 (rel-check): Use $(WGET) instead of wget.
13393
13394 2003-01-06 Paul Eggert <eggert@twinsun.com>
13395
13396 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13397 the GLR paper of Scott, Johnstone and Hussain.
13398
13399 2003-01-04 Paul Eggert <eggert@twinsun.com>
13400
13401 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13402 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13403 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13404 (EXTRA_LIBRARIES): New var, for liby.a.
13405 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13406 (EXTRA_SCRIPTS): New var, for yacc.
13407
13408 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13409 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13410 Problem reported by Nelson H. F. Beebe.
13411
13412 2003-01-03 Paul Eggert <eggert@twinsun.com>
13413
13414 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13415 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13416 when compiling Bison 1.875's `bitset bset = obstack_alloc
13417 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13418
13419 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13420 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13421 grow to a huge size with typical invocation.
13422
13423 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13424 Use the pattern recommended by Autoconf 2.57, except also protect
13425 against double-definition.
13426 * src/system.h: Likewise.
13427 Portability issues reported by Nelson H. F. Beebe.
13428
13429 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13430 All uses changed. Provide a definition in both C and C++.
13431 (yytrue, yyfalse): Define even if defined (__cplusplus).
13432
13433 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13434 Reported by Nelson H. F. Beebe.
13435
13436 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13437
13438 2003-01-02 Paul Eggert <eggert@twinsun.com>
13439
13440 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13441 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13442 Bug reported by Nelson H. F. Beebe.
13443
13444 2003-01-01 Paul Eggert <eggert@twinsun.com>
13445
13446 * Version 1.875.
13447
13448 2002-12-30 Paul Eggert <eggert@twinsun.com>
13449
13450 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13451 Moved here from...
13452 (<INITIAL>","): Here. This causes stray "," to be treated
13453 more uniformly.
13454
13455 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13456 last brace in braced code when not in Yacc mode, for compatibility
13457 with Bison 1.35. This resurrects the 2001-12-15 patch to
13458 src/reader.c.
13459
13460 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13461 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13462
13463 2002-12-28 Paul Eggert <eggert@twinsun.com>
13464
13465 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13466 that of SYM's type. This fixes Debian bug 168069, reported by
13467 Thomas Olsson.
13468
13469 2002-12-28 Paul Eggert <eggert@twinsun.com>
13470
13471 Version 1.75f.
13472
13473 Switch back to the Yacc style of conflict reports, undoing some
13474 of the 2002-07-30 change.
13475 * doc/bison.texinfo (Understanding): Use Yacc style for
13476 conflict reports. Also, use new way of locating rules.
13477 * src/conflicts.c (conflict_report):
13478 Renamed from conflict_report_yacc, removing the old
13479 'conflict_report'. Translate the entire conflict report at once,
13480 so that we don't assume that "," has the same interpretation in
13481 all languages.
13482 (conflicts_output): Use Yacc-style conflict report for each state,
13483 instead of our more-complicated style.
13484 (conflicts_print): Use Yacc-style conflict report, except print
13485 the input file name when not emulating Yacc.
13486 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13487 Conflicted Reduction, %expect not enough, %expect too much,
13488 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13489 * tests/existing.at (GNU Cim Grammar): Likewise.
13490 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13491
13492 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13493 fatal): Don't invoke fflush; it's not needed and it might even be
13494 harmful for stdout, as stdout might not be open.
13495 * src/reduce.c (reduce_print): Likewise.
13496
13497 2002-12-27 Paul Eggert <eggert@twinsun.com>
13498
13499 Fix a bug where error locations were not being recorded correctly.
13500 This problem was originally reported by Paul Hilfinger in
13501 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13502
13503 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13504 top of the location stack's error locations.
13505 (yyerrlab): Set it. When discarding a token, push its location
13506 onto yylerrsp so that we don't lose track of the error's end.
13507 (yyerrlab1): Now is only the target of YYERROR, so that we can
13508 properly record the location of the action that failed. For GCC
13509 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13510 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13511 (yyerrlab2): New label, which yyerrlab now falls through to.
13512 Compute the error's location by applying YYLLOC_DEFAULT to
13513 the locations of all the symbols that went into the error.
13514 * doc/bison.texinfo (Location Default Action): Mention that
13515 YYLLOC_DEFAULT is also invoked for syntax errors.
13516 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13517 Error locations include the locations of all the tokens that were
13518 discarded, not just the last token.
13519
13520 2002-12-26 Paul Eggert <eggert@twinsun.com>
13521
13522 * src/files.c: Include quote.h.
13523 (compute_output_file_names): Warn if we detect conflicting
13524 outputs to the same file. This should catch the misunderstanding
13525 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13526
13527 * src/conflicts.c (conflicts_print): If the user specifies
13528 "%expect N", report an error if there are any reduce/reduce
13529 conflicts. This is what the manual says should happen.
13530 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13531 * tests/conflicts.at (%expect with reduce conflicts): New test.
13532
13533 Don't use m4_include on relative file names, as it doesn't work as
13534 desired if there happens to be a file with that name under ".".
13535
13536 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13537 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13538 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13539 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13540 * src/output.c (output_skeleton): Use full path names when
13541 specifying a file to include; don't rely on include path, as
13542 it's unreliable when the working file contains a file with
13543 that name.
13544
13545 2002-12-25 Paul Eggert <eggert@twinsun.com>
13546
13547 Remove obsolete references to bison.simple and bison.hairy.
13548 Problem mentioned by Aubin Mahe in
13549 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13550 * data/glr.c: Comment fix.
13551 * doc/bison.1: Remove references. Also, mention "yacc".
13552
13553 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13554 with -g option.
13555
13556 * src/parse-gram.y (declaration): Use enum "report_states" rather
13557 than its numeric value 1.
13558
13559 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13560 opening a new one. This fixes Debian bug 165349, reported by
13561 Bruce Stephens.
13562
13563 2002-12-24 Paul Eggert <eggert@twinsun.com>
13564
13565 Version 1.75e.
13566
13567 * Makefile.maint (cvs-update): Don't assume that the shell
13568 supports $(...), as Solaris sh doesn't.
13569
13570 * src/parse-gram.y (lloc_default): Remove test for empty
13571 nonterminals at the end, since it didn't change the result.
13572
13573 2002-12-24 Paul Eggert <eggert@twinsun.com>
13574
13575 If the user does not define YYSTYPE as a macro, Bison now declares it
13576 using typedef instead of defining it as a macro. POSIX requires this.
13577 For consistency, YYLTYPE is also declared instead of defined.
13578
13579 %union directives can now have a tag before the `{', e.g., the
13580 directive `%union foo {...}' now generates the C code
13581 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13582 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13583 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13584 instead of `yyltype'.
13585
13586 `yystype' and `yyltype' are now obsolescent macros instead of being
13587 typedefs or tags; they are no longer documented and will be
13588 withdrawn in a future release.
13589
13590 * data/glr.c (b4_location_type): Remove.
13591 (YYSTYPE): Renamed from yystype.
13592 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13593 (struct YYLTYPE): Renamed from struct yyltype.
13594 (YYLTYPE): Renamed from yyltype.
13595 (yyltype, yystype): New (and obsolescent) macros,
13596 for backward compatibility.
13597 * data/yacc.c: Likewise.
13598
13599 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13600 does not specify a union tag. This is for compatibility with
13601 Solaris 9 yacc.
13602
13603 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13604 const *, since it is now modified by stripping surrounding { }.
13605 (current_braced_code): Remove.
13606 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13607 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13608 trailing " {...}". Now of type <chars>.
13609 (grammar_declaration): Adjust to bundled tokens.
13610 (code_content): Remove; stripping is now done by add_param.
13611 (print_token_value): Print contents of bundled tokens.
13612 (token_name): New function.
13613
13614 * src/reader.h (braced_code, current_braced_code): Remove.
13615 (token_name): New decl.
13616
13617 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13618 token_type, not braced_code code_kind. All uses changed.
13619 (SC_PRE_CODE): New state, for scanning after a keyword that
13620 has (or usually has) an immediately-following braced code.
13621 (token_type): New local var, to keep track of which token type
13622 to return when scanning braced code.
13623 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13624 <INITIAL>"%parse-param", <INITIAL>"%printer",
13625 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13626 instead of returning a token type immediately.
13627 (<INITIAL>"{"): Set token type.
13628 (<SC_BRACED_CODE>"}"): Use it.
13629 (handle_action_dollar, handle_action_at): Now returns bool
13630 indicating success. Fail if ! current_rule; this prevents a core dump.
13631 (handle_symbol_code_dollar, handle_symbol_code_at):
13632 Remove; merge body into caller.
13633 (handle_dollar, handle_at): Complain in invalid contexts.
13634
13635 * NEWS, doc/bison.texinfo: Document the above.
13636 * NEWS: Fix years and program names in copyright notice.
13637
13638 2002-12-17 Paul Eggert <eggert@twinsun.com>
13639
13640 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13641 Reporting, Table of Symbols): Omit mentions of %lex-param and
13642 %parse-param from the documentation for now.
13643
13644 2002-12-15 Paul Eggert <eggert@twinsun.com>
13645
13646 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13647 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13648 lookahead symbol, and which sets yychar in parser actions) and it
13649 disagreed with the Bison documentation. Bug
13650 reported by Andrew Walrond.
13651
13652 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13653 as the caller now does that.
13654 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13655 (YYEMPTY): Parenthesize right hand side, since others use it.
13656 (yyparse): Don't assume that our generated code is the only code
13657 that sets yychar.
13658
13659 2002-12-13 Paul Eggert <eggert@twinsun.com>
13660
13661 Version 1.75d.
13662
13663 POSIX requires a "yacc" command.
13664 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13665 (MOSTLYCLEANFILES): Add yacc.
13666 (yacc): New rule.
13667 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13668 as an alias for bison y.
13669
13670 * po/LINGUAS: Add da.
13671
13672 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13673 problem with latest <getopt.h>.
13674 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13675
13676 * doc/fdl.texi: Upgrade to 1.2.
13677 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13678 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13679 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13680 gnulib.
13681 * config/install-sh: Sync with autotools.
13682
13683 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13684 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13685 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13686 locations are requested.
13687 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13688 locations are requested.
13689
13690 2002-12-12 Paul Eggert <eggert@twinsun.com>
13691
13692 Remove unportable casts and storage allocation tricks.
13693 While we're at it, remove almost all casts, since they
13694 usually aren't needed and are a sign of trouble.
13695
13696 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13697
13698 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13699 the pointer DSET returned by malloc; this isn't portable.
13700 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13701 Similarly for DERIVES.
13702 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13703 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13704 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13705
13706 * src/derives.c (derives_compute): Do not bother invoking
13707 int_of_rule_number, since rule numbers are integers.
13708
13709 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13710 rather than XMALLOC (char, N).
13711
13712 * src/files.c (filename_split): Rewrite to avoid cast.
13713
13714 * src/gram.h (symbol_number_as_item_number,
13715 item_number_as_symbol_number, rule_number_as_item_number,
13716 item_number_as_rule_number):
13717 Now inline functions rather than macros, to avoid casts.
13718 * src/state.h (state_number_as_int): Likewise.
13719 * src/tables.c (state_number_to_vector_number,
13720 symbol_number_to_vector_number): Likewise.
13721
13722 * src/gram.h (int_of_rule_number): Remove; no longer used.
13723
13724 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13725 since the resulting storage is always stored into.
13726
13727 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13728 where it's needed.
13729
13730 * src/muscle_tab.c (muscle_m4_output):
13731 Now inline. Return bool, not int.
13732 * src/state.c (state_compare): Likewise.
13733 * src/symtab.c (symbol_check_defined,
13734 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13735 hash_compare_symbol, hash_symbol):
13736 Likewise.
13737 * src/uniqstr.c (uniqstr_print): Likewise.
13738 * src/muscle_tab.c (muscle_m4_output_processor):
13739 New function, to avoid casts.
13740 * src/state.c (state_comparator, stage_hasher): Likewise.
13741 * src/symtab.c (symbol_check_defined_processor,
13742 symbol_check_alias_consistency_processor, symbol_pack_processor,
13743 symbol_translation_processor, hash_symbol_comparator,
13744 hash_symbol_hasher): Likewise.
13745 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13746 * src/muscle_tab.c (muscles_m4_output):
13747 Use new functions instead of casting old functions unportably.
13748 * src/state.c (state_hash_new): Likewise.
13749 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13750 symbols_token_translations_init):
13751 Likewise.
13752 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13753
13754 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13755 var instead of casting to long, to avoid casts.
13756 (prepare_states): Use MALLOC rather than alloca, so that we don't
13757 have to worry about alloca.
13758 * src/state.c (state_hash_lookup): Likewise.
13759
13760 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13761 local var instead of casting to unsigned char, to avoid casts.
13762
13763 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13764 STATE_ALLOC): Remove.
13765 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13766 rather than calloc, and use offsetof to avoid allocating slightly
13767 too much storage.
13768 (state_new): Initialize all members.
13769
13770 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13771
13772 * src/symtab.c (symbol_free): Remove; unused.
13773 (symbol_get): Remove cast in lhs of assignment.
13774 (symbols_do): Now static. Accept generic arguments, not
13775 hashing-related ones.
13776
13777 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13778 (symbol_processor): Remove.
13779 (symbols_do): Remove decl; now static.
13780
13781 * src/system.h (alloca): Remove; decl no longer needed.
13782 (<stddef.h>): Include, for offsetof.
13783 (<inttypes.>, <stdint.h>): Include if available.
13784 (uintptr_t): New type, if system lacks it.
13785 (CALLOC, MALLOC, REALLOC): New macros.
13786 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13787 new macros.
13788
13789 * src/tables.c (table_size): Now int, to pacify GCC.
13790 (table_grow, table_ninf_remap): Use signed table size.
13791 (save_row): Don't bother initializing locals when not needed.
13792 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13793 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13794
13795 * src/vcg.h: Correct misspellings.
13796
13797 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13798
13799
13800 * src/getargs.c (getargs): Don't assume EOF == -1.
13801
13802 2002-12-09 Paul Eggert <eggert@twinsun.com>
13803
13804 Change identifier spellings to avoid collisions with names
13805 that are reserved by POSIX.
13806
13807 Don't use names ending in _t, since POSIX reserves them.
13808 For consistency, remove _e and _s endings -- they're weren't
13809 needed to remove ambiguity. All uses changed.
13810 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13811 turn was just renamed from struniq_t.
13812 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13813 which in turn was just renamed from struniq_processor_t.
13814 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13815 in turn was renamed from hash_compare_struniq_t.
13816 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13817 (state_list): Renamed from state_list_t.
13818 * src/assoc.h (assoc): Renamed from assoc_t.
13819 * src/conflicts.c (enum conflict_resolution): Renamed from
13820 enum conflict_resolution_e.
13821 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13822 (rule_list): Renamed from rule_list_t.
13823 * src/getargs.h (enum trace): Renamed from enum trace_e.
13824 (enum report): Renamed from enum report_e.
13825 * src/gram.h (item_number): Renamed from item_number_t.
13826 (rule_number): Renamed from rule_number_t.
13827 (struct rule_s): Remove the "rule_s" part; not used.
13828 (rule): Renamed from rule_t.
13829 (rule_filter): Renamed from rule_filter_t.
13830 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13831 (goto_list): Renamed from goto_list_t.
13832 * src/lalr.h (goto_number): Renamed from goto_number_t.
13833 * src/location.h (location): Renamed from location_t.
13834 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13835 and moved here from:
13836 * src/muscle_tab.h (muscle_entry_t): here.
13837 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13838 (rule_list): Renamed from rule_list_t.
13839 * src/print_graph.c (static_graph): Renamed from graph.
13840 * src/reader.h (braced_code): Renamed from braced_code_t.
13841 Remove brace_code_e tag.
13842 * src/relation.h (relation_node): Renamed from relation_node_t.
13843 (relation_nodes): Renamed from relation_nodes_t.
13844 (relation): Renamed from relation_t.
13845 * src/state.h (state_number): Renamed from state_number_t.
13846 (struct state): Renamed from struct state_s.
13847 (state): Renamed from state_t.
13848 (transitions): Renamed from transitions_t. Unused (and
13849 misspelled) transtion_s tag removed.
13850 (errs): Renamed from errs_t. Unused errs_s tag removed.
13851 (reductions): Renamed from reductions_t. Unused tag
13852 reductions_s removed.
13853 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13854 (struct symbol_list): Renamed from struct symbol_list_s.
13855 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13856 (struct symbol): Renamed from struct symbol_s.
13857 (symbol): Renamed from symbol_t.
13858 * src/tables.c (vector_number): Renamed from vector_number_t.
13859 (action_number): Renamed from action_t.
13860 * src/tables.h (base_number): Renamed from base_t.
13861 * src/vcg.h (enum color): Renamed from enum color_e.
13862 (enum textmode): Renamed from enum textmode_e.
13863 (enum shape): Renamed from enum shape_e.
13864 (struct colorentry): Renamed from struct colorentry_s.
13865 (struct classname): Renamed from struct classname_s.
13866 (struct infoname): Renamed from struct infoname_s.
13867 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13868 (enum decision): Renamed from enum decision_e.
13869 (enum orientation): Renamed from enum orientation_e.
13870 (enum alignment): Renamed from enum alignment_e.
13871 (enum arrow_mode): Renamed from enum arrow_mode_e.
13872 (enum crossing_type): Renamed from enum crossing_type_e.
13873 (enum view): Renamed from enum view_e.
13874 (struct node): Renamed from struct node_s.
13875 (node): Renamed from node_t.
13876 (enum linestyle): Renamed from enum linestyle_e.
13877 (enum arrowstyle): Renamed from enum arrowstyle_e.
13878 (struct edge): Renamed from struct edge.
13879 (edge): Renamed from edge_t.
13880 (struct graph): Renamed from struct graph_s.
13881 (graph): Renamed from graph_t.
13882 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13883 Rename value_t -> value.
13884 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13885 value_t_as_yystype -> value_as_yystype.
13886
13887 Don't include <errno.h> in the mainstream code, since it
13888 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13889 * lib/get-errno.c, lib/get-errno.h: New files.
13890 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13891 get-errno.c.
13892 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13893 * src/output.c (output_skeleton): Likewise.
13894 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13895 instead of errno.
13896 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13897 Likewise.
13898 (handle_action_dollar, handle_action_at): Likewise.
13899 * src/system.h: Do not include <errno.h>.
13900 (TAB_EXT): Renamed from EXT_TAB.
13901 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13902
13903 Avoid str[a-z]*, since <string.h> reserves that name space.
13904 Change all instances of "struniq" in names to "uniqstr", and
13905 likewise for "STRUNIQ" and "UNIQSTR".
13906 * src/uniqstr.c: Renamed from src/struniq.c.
13907 * src/uniqstr.h: Renamed from src/struniq.h.
13908 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13909 * src/files.c (strsuffix): Remove; unused.
13910 (concat2): Renamed from stringappend. Now static.
13911 * src/files.h (strsuffix, stringappend): Remove; unused.
13912 * src/parse-gram.y (<chars>): Renamed from <string>.
13913 (<uniqstr>): Renamed from <struniq>.
13914 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13915 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13916 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13917 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13918 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13919 (N_EXPAND): Renamed from N_STRETCH.
13920
13921 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13922 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13923 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13924 Remove; unused.
13925 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13926 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13927 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13928 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13929 (BASE_MAXIMUM): Renamed from BASE_MAX.
13930 (BASE_MINIMUM): Renamed from BASE_MIN.
13931 (ACTION_MAX): Remove; unused.
13932 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13933 Unnecessary casts removed from above defines.
13934
13935
13936 Fix misspelling in names.
13937 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13938 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13939 G_NODE_ALIGNEMENT.
13940
13941
13942 * lib/timevar.c (timevar_report): Renamed from time_report,
13943 for consistency with other names.
13944 * lib/timevar.h (timevar_report): New decl.
13945 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13946
13947
13948 Sort include-file uses.
13949
13950 Reorder all include files under src to be in the order "system.h".
13951 then the ../lib include files in angle brackets (alphabetized),
13952 then the . include files in double-quotes (alphabetized). Fix
13953 dependency breakages encountered in this process, as follows:
13954 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13955 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13956 * src/state.h: Include "symtab.h".
13957
13958 2002-12-08 Paul Eggert <eggert@twinsun.com>
13959
13960 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13961 since this causes problems when __file__ contains character
13962 sequences like "@" that are treated specially by src/scan-skel.l.
13963 Instead, just use the file's basename. This fixes the bug
13964 reported by Martin Mokrejs in
13965 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13966
13967 2002-12-06 Paul Eggert <eggert@twinsun.com>
13968
13969 Add support for rules that do not have trailing semicolons, as
13970 POSIX requires. Improve the quality of locations in Bison
13971 diagnostics.
13972
13973 * src/location.c: Include <quotearg.h>.
13974 (empty_location): Now const.
13975 (location_print): New function. Follow the recommendation of the
13976 GNU Coding Standards for locations that span file boundaries.
13977 * src/location.h: Do not include <quotearg.h>; no longer needed.
13978 (boundary): New type.
13979 (location_t): Use it. This allows locations to span file boundaries.
13980 All member uses changed: file -> start.file or end.file (as needed),
13981 first_line -> start.line, first_column -> start.column,
13982 last_line -> end.line, last_column -> end.column.
13983 (equal_boundaries): New function.
13984 (LOCATION_RESET, LOCATION_STEP): Remove.
13985 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13986 (empty_location): Now const.
13987 (location_print): New decl.
13988 * src/parse-gram.y (lloc_default): New function, which handles
13989 empty locations more accurately.
13990 (YYLLOC_DEFAULT): Use it.
13991 (%token COLON): Remove.
13992 (%token ID_COLON): New token.
13993 (rules): Use it.
13994 (declarations, rules): Remove trailing semicolon.
13995 (declaration, rules_or_grammar_declaration):
13996 Allow empty (";") declaration.
13997 (symbol_def): Remove empty actions; no longer needed.
13998 (rules_or_grammar_declaration): Remove trailing semicolon.
13999 (semi_colon.opt): Remove.
14000 * src/reader.h: Include location.h.
14001 (scanner_cursor): New decl.
14002 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14003 rolling our own.
14004 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14005 of *loc.
14006 (STEP): Remove. No longer needed, now that adjust_location does
14007 the work. All uses removed.
14008 (scanner_cursor): New var.
14009 (adjust_location): Renamed from extend_location. It now sets
14010 *loc and adjusts the scanner cursor. All uses changed.
14011 Don't bother testing for CR.
14012 (handle_syncline): Remove location arg; now updates scanner cursor.
14013 All callers changed.
14014 (unexpected_end_of_file): Now accepts start boundary of token or
14015 comment, not location. All callers changed. Update scanner cursor,
14016 not the location.
14017 (SC_AFTER_IDENTIFIER): New state.
14018 (context_state): Renamed from c_context. All uses changed.
14019 (id_loc, code_start, token_start): New local vars.
14020 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14021 processing of Yacc white space and equivalents here.
14022 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14023 instead of returning ID immediately, since we need to search for
14024 a subsequent colon.
14025 (<INITIAL>"'", "\""): Save token_start.
14026 (<INITIAL>"%{", "{", "%%"): Save code_start.
14027 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14028 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14029 BEGIN context_state at end, not INITIAL.
14030 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14031 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14032 Return correct token start.
14033 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14034 the start of a character, string or multiline comment is found.
14035 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14036 Reduction): Adjust reported locations to match the more-precise
14037 results now expected.
14038 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14039 * tests/reduce.at (Useless Rules, Reduced Automaton,
14040 Underivable Rules): Likewise.
14041 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14042 or "|"' now that so many other tokens are allowed by the new grammar.
14043
14044 * src/complain.h (current_file): Remove duplicate decl;
14045 current_file is now owned by files.h.
14046 * src/complain.c, src/scan-gram.l: Include files.h.
14047
14048 2002-12-06 Paul Eggert <eggert@twinsun.com>
14049
14050 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14051 promotes to int; it might be unsigned int.
14052 * data/yacc.c (yy_reduce_print): Likewise.
14053
14054 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14055 be #defined in the prologue, not in the Bison declarations.
14056 This fixes Debian Bug 102878, reported by Shaul Karl.
14057
14058 2002-12-02 Paul Eggert <eggert@twinsun.com>
14059
14060 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14061 * lib/strtoul.c: New file, from gnulib.
14062 This fixes a porting bug reported by Peter Klein in
14063 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14064
14065 2002-11-30 Paul Eggert <eggert@twinsun.com>
14066
14067 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14068 and put only a forward declaration in the prologue. This is for
14069 consistency with the other scanner helper functions.
14070
14071 Type clashes now generate warnings, not errors, since it
14072 appears that POSIX may allow some grammars with type clashes.
14073 * src/reader.c (grammar_current_rule_check): Warn about
14074 type clashes instead of complaining.
14075 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14076
14077 Add Yacc library, since POSIX requires it.
14078 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14079 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14080 * lib/main.c, lib/yyerror.c: New files.
14081
14082 gram_error can be static; it need not be extern.
14083 * src/reader.h (gram_error): Remove decl.
14084 * src/parse-gram.y (gram_error): Now static. Add static decl.
14085 (print_token_value): Omit parameter names from forward decl,
14086 for consistency.
14087
14088 2002-11-29 Paul Eggert <eggert@twinsun.com>
14089
14090 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14091 be declared before being used. E.g., one should typically
14092 declare them in the prologue. Use GNU coding style in examples.
14093 Put "const" consistently after the type it modifies. Mention
14094 that C99 supports "inline". Mention that yyerror traditionally
14095 returns "int".
14096
14097 %parse-param and %lex-param now take just one argument, the
14098 declaration; the argument name is deduced from the declaration.
14099
14100 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14101 Reporting, Table of Symbols): Document this.
14102 * src/parse-gram.y (add_param): New function.
14103 (COMMA): Remove.
14104 (declaration): Implement new rule for %parse-param and %lex-param.
14105 * src/scan-gram.l: "," now elicits a warning, rather than being
14106 a token; this is more compatible with byacc.
14107 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14108
14109 2002-11-27 Paul Eggert <eggert@twinsun.com>
14110
14111 Rename identifiers to avoid real and potential collisions.
14112
14113 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14114 to avoid collision with lex macro described by Bruce Lilly in
14115 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14116 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14117 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14118 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14119 All uses changed.
14120 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14121 The name "yycontrol" violates the name space rules, and this stuff
14122 wasn't being used anyway.
14123 (input): Remove action; this stuff wasn't being used.
14124 (gram_error): Rename local variable yylloc -> loc.
14125 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14126 (YY_DECL): Don't use "yy" at start of local variables.
14127 All uses changed, e.g., yylloc -> loc.
14128 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14129 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14130 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14131 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14132
14133 * src/parse-gram.y (gram_error): loc is now const *.
14134 * src/reader.h (gram_error): Likewise.
14135
14136 2002-11-24 Paul Eggert <eggert@twinsun.com>
14137
14138 Version 1.75c.
14139
14140 * tests/actions.at (Actions after errors): Use an output format
14141 more similar to that of the Printers and Destructors test.
14142 Test the position of the ';' token too.
14143 (Printers and Destructors): Likewise.
14144 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14145 unnecessarily alarming people when the test fails.
14146
14147 * data/yacc.c (yyerrlab1): Move this label down, so that the
14148 parser does not discard the lookahead token if the user code
14149 invokes YYERROR. This change is required for POSIX conformance.
14150
14151 * lib/error.c: Sync with gnulib.
14152
14153 2002-11-22 Paul Eggert <eggert@twinsun.com>
14154
14155 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14156 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14157 * lib/xmalloc.c: Likewise.
14158
14159 2002-11-20 Paul Eggert <eggert@twinsun.com>
14160
14161 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14162
14163 2002-11-20 Paul Eggert <eggert@twinsun.com>
14164
14165 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14166 should use `if (! x) abort ();' rather than `assert (x);', and
14167 anyway it's one less thing to worry about configuring.
14168
14169 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14170 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14171 and replace all instances of assert with abort.
14172 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14173 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14174
14175 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14176 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14177 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14178 hash_find_entry, hash_rehash, hash_insert): Likewise.
14179 * src/conflicts.c (resolve_sr_conflict): Likewise.
14180 * src/lalr.c (set_goto_map, map_goto): Likewise.
14181 * src/nullable.c (nullable_compute): Likewise.
14182 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14183 * src/reader.c (packgram, reader): Likewise.
14184 * src/state.c (state_new, state_free, state_transitions_set,
14185 state_reduction_find): Likewise.
14186 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14187 symbol_pack): Likewise.
14188 * src/tables.c (conflict_row, pack_vector): Likewise.
14189 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14190 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14191 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14192 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14193
14194 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14195 (ARGMATCH_CONSTRAINT): New macro.
14196 (ARGMATCH_ASSERT): Use it.
14197
14198 * src/system.h (verify): New macro.
14199 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14200 rather than assert.
14201 * src/tables.c (tables_generate): Likewise.
14202
14203 * src/struniq.c (struniq_assert): Now returns void, and aborts
14204 if the assertion is false.
14205 (struniq_assert_p): Remove.
14206 * src/struniq.h: Likewise.
14207
14208 2002-11-18 Paul Eggert <eggert@twinsun.com>
14209
14210 * data/glr.c (yygetLRActions): Replace `yyindex' with
14211 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14212 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14213 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14214
14215 2002-11-18 Akim Demaille <akim@epita.fr>
14216
14217 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14218 space.
14219 From Tim Van Holder.
14220
14221 2002-11-17 Paul Eggert <eggert@twinsun.com>
14222
14223 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14224 to "SyntaxError" for consistency with my 2002-11-15 change.
14225
14226 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14227 not define to {}, since this breaks the common use of `YYDPRINTF
14228 ((...));' if a single statement is desired (e.g. before `else').
14229 Work around GCC warnings by surrounding corresponding calls with
14230 {} if needed.
14231 (yyhasResolvedValue): Remove unused function.
14232 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14233 loop body.
14234 (yyreportSyntaxError): Renamed from yyreportParseError.
14235 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14236 All uses changed.
14237 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14238 extern when possible. Remove unused initializations.
14239
14240 2002-11-16 Akim Demaille <akim@epita.fr>
14241
14242 Augment the similarity between GLR and LALR traces.
14243
14244 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14245 (YY_REDUCE_PRINT): New.
14246 (yyparse): Use them.
14247 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14248 YYDPRINT here.
14249 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14250 state reached after the reduction/recovery, since...
14251 (yyparse, yyprocessOneStack): Report the state we are entering in.
14252
14253 2002-11-16 Akim Demaille <akim@epita.fr>
14254
14255 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14256 Add support for --trace=skeleton.
14257 * src/scan-skel.l: %option debug.
14258 Scan strings of non-@ or \n instead of character by character.
14259 (scan_skel): Handle trace_skeleton.
14260 (QPUTS): New.
14261 (@output_parser_name@, @output_header_name@): ``Restore'' their
14262 support (used to be M4 macros).
14263 * data/yacc.c: Quote larger chunks, a la glr.c.
14264 * data/lalr1.cc: Likewise.
14265 The header guards are no longer available, so use some other
14266 string than `YYLSP_NEEDED'.
14267
14268 2002-11-16 Akim Demaille <akim@epita.fr>
14269
14270 Make the ``Printers and Destructors'' test more verbose, taking
14271 `yacc.c''s behavior as (possibly wrong) reference.
14272
14273 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14274 instead of fprint on stdout.
14275 Set and report the last_line of the symbols.
14276 Consistently display values and locations.
14277
14278 2002-11-16 Paul Eggert <eggert@twinsun.com>
14279
14280 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14281
14282 2002-11-15 Paul Eggert <eggert@twinsun.com>
14283
14284 * tests/actions.at (Actions after errors): New test case.
14285
14286 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14287 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14288 tests/action.at, tests/calc.at, tests/conflicts.at,
14289 tests/cxx-type.at, tests/regression.at:
14290 "parse error" -> "syntax error" for POSIX compatibility.
14291 "parsing stack overflow..." -> "parser stack overflow" so
14292 that code matches Bison documentation.
14293
14294 2002-11-15 Akim Demaille <akim@epita.fr>
14295
14296 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14297 take two BRACED_CODE, not two string_content.
14298 Free the scanner's obstack when we are done.
14299 (code_content): New.
14300 * tests/calc.at: Adjust.
14301 * doc/bison.texinfo: Adjust.
14302 Also, make sure to include the `,' for these declarations.
14303
14304 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14305
14306 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14307 definition; avoids potential autoreconf problems.
14308
14309 2002-11-15 Akim Demaille <akim@epita.fr>
14310
14311 Always check the value returned by yyparse.
14312
14313 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14314 returned by yyparse.
14315 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14316 Adjust calls.
14317 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14318 returned by yyparse.
14319
14320 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14321
14322 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14323 on input.at test.
14324
14325 2002-11-14 Paul Eggert <eggert@twinsun.com>
14326
14327 * src/output.c (output_skeleton): Call xfopen instead of
14328 duplicating xfopen's body.
14329
14330 Fix bugs reported by Nelson H. F. Beebe in
14331 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14332
14333 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14334 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14335 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14336 file twice in the grammar, as an extra check.
14337
14338 * tests/input.at (Torturing the Scanner): Surround the
14339 backslash-newline tests with "#if 0", to make it less likely that
14340 we'll run into compiler bugs. Bring back solitary \ inside
14341 comment, but add a closing comment to work around HP C bug. Don't
14342 test backslash-newline in C character constant.
14343
14344 2002-11-14 Akim Demaille <akim@epita.fr>
14345
14346 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14347 status of the compiler.
14348 Calling `exit 1' is no longer needed.
14349 Reported by Nelson H. F. Beebe.
14350
14351 2002-11-14 Akim Demaille <akim@epita.fr>
14352
14353 * tests/atlocal.in (CPPFLAGS): We have config.h.
14354 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14355 New.
14356 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14357 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14358 * tests/regression.at, tests/torture.at: Use them for all the
14359 grammars that are to be compiled.
14360 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14361 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14362 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14363
14364 2002-11-14 Akim Demaille <akim@epita.fr>
14365
14366 * doc/bison.texinfo: Various formatting changes (alignments in
14367 samples, additional @group/@end group, GCS in samples.
14368 Use @deffn instead of simple @table to define the directives,
14369 macros, variables etc.
14370
14371 2002-11-13 Paul Eggert <eggert@twinsun.com>
14372
14373 Fix some bugs reported by Albert Chin-A-Young in
14374 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14375
14376 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14377 -o c"; the HP C compiler chatters during compilation.
14378 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14379 * tests/headers.at (export YYLTYPE): Likewise.
14380
14381 * tests/input.at (Torturing the Scanner): Remove lines containing
14382 solitary backslashes, as they tickle a bug in the HP C compiler.
14383
14384 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14385 comments, since they're not portable. Use GNU coding style.
14386
14387 2002-11-13 Akim Demaille <akim@epita.fr>
14388
14389 * data/yacc.c: Leave bigger chunks of quoted text.
14390 (YYDSYMPRINTF): New.
14391 Use it to report symbol activities.
14392 * data/glr.c (YYDSYMPRINTF): New.
14393 Use it.
14394
14395 2002-11-12 Paul Eggert <eggert@twinsun.com>
14396
14397 Version 1.75b.
14398
14399 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14400 (yyglrReduce): Return yyok, not 0.
14401 This should avoid the enumerated-type warnings reported
14402 by Nelson H. F. Beebe in
14403 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14404
14405 * lib/bbitset.h (BITSET_INLINE): Remove.
14406 * lib/bitset.h [! BITSET_INLINE]: Remove.
14407 (bitset_set, bitset_reset, bitset_test): Rename local vars
14408 to avoid shadowing warnings by GCC.
14409
14410 * data/glr.c (inline): Remove #define. It's the user's
14411 responsibility to #define it away, just like 'const'.
14412 This fixes one of the bugs reported by Nelson H. F. Beebe in
14413 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14414
14415 * Makefile.maint (po-check): Scan .l and .y files instead of the
14416 .c and the .h files that they generate. This fixes the bug
14417 reported by Tim Van Holder in:
14418 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14419 Look for N_ as well as for _. Try to avoid matching #define for
14420 N_ and _.
14421 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14422 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14423 * src/scan-gram.l: Revamp regular expressions so that " and '
14424 do not confuse xgettext.
14425
14426 * src/struniq.h (struniq_new): Do not declare the return type
14427 to be 'const'; this violates the C standard.
14428 * src/struniq.c (struniq_new): Likewise.
14429
14430 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14431
14432 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14433 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14434 linker.
14435
14436 2002-11-12 Akim Demaille <akim@epita.fr>
14437
14438 * Makefile.maint: Sync with Autoconf:
14439 (local_updates): New.
14440
14441 2002-11-12 Akim Demaille <akim@epita.fr>
14442
14443 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14444
14445 2002-11-12 Akim Demaille <akim@epita.fr>
14446
14447 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14448 locations.
14449
14450 2002-11-12 Akim Demaille <akim@epita.fr>
14451
14452 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14453 not yyvalue.
14454
14455 2002-11-12 Akim Demaille <akim@epita.fr>
14456
14457 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14458 Use it to test the GLR parser.
14459
14460 2002-11-12 Akim Demaille <akim@epita.fr>
14461
14462 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14463 defines it.
14464 * data/glr.c (yystos): New.
14465 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14466 (YYDSYMPRINT): New.
14467 (yyval): Don't define it, it is handled via M4.
14468 (yyrecoverParseError): Free verbosely the discarded symbols.
14469 * data/yacc.c (yysymprint): Remove, rather...
14470 (b4_yysymprint_generate): invoke.
14471 * data/c.m4 (b4_yysymprint_generate): New.
14472 Accept pointers as arguments, as opposed to the version from
14473 yacc.c.
14474 (b4_yydestruct_generate): Likewise.
14475 * tests/cations.at (Printers and Destructors): Use Bison directives
14476 instead of CPP macros.
14477 Don't rely on internal details.
14478
14479 2002-11-12 Akim Demaille <akim@epita.fr>
14480
14481 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14482 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14483 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14484 it against YYEMPTY and so forth), work on yytoken (i.e., set
14485 it to YYEMPTY etc.).
14486 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14487 (b4_symbol_actions): Remove.
14488 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14489 for 0, end-of-input.
14490
14491 2002-11-12 Akim Demaille <akim@epita.fr>
14492
14493 * doc/bison.texinfo (Destructor Decl): New.
14494
14495 2002-11-12 Akim Demaille <akim@epita.fr>
14496
14497 * src/tables.c (tables_generate): Use free for pointers that
14498 cannot be NULL, not XFREE.
14499 (pack_vector): Use assert, not fatal, for bound violations.
14500 * src/state.c (state_new): Likewise.
14501 * src/reader.c (reader): Likewise.
14502 * src/lalr.c (set_goto_map): Likewise.
14503 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14504 the file name.
14505
14506 2002-11-12 Akim Demaille <akim@epita.fr>
14507
14508 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14509 Restore.
14510 * src/scan-gram.l (last_string): Is global to the file, not to
14511 yylex.
14512 * src/parse-gram.y (input): Don't append the epilogue here,
14513 (epilogue.opt): do it here, and free the scanner's obstack.
14514 * src/reader.c (epilogue_set): Rename as...
14515 (epilogue_augment): this.
14516 * data/c.m4 (b4_epilogue): Defaults to empty.
14517
14518 2002-11-12 Akim Demaille <akim@epita.fr>
14519
14520 * src/getargs.c (long_options): Remove duplicates.
14521 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14522 Remove.
14523 * doc/bison.rnh: Remove.
14524 * doc/bison.texinfo (VMS Invocation): Remove.
14525
14526 2002-11-12 Akim Demaille <akim@epita.fr>
14527
14528 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14529 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14530
14531 Use struniq for symbols.
14532
14533 * src/symtab.h (symbol_t): The tag member is a struniq.
14534 (symbol_type_set): Adjust.
14535 * src/symtab.c (symbol_new): Takes a struniq.
14536 (symbol_free): Don't free the tag member.
14537 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14538 (hash_compare_symbol, hash_symbol): these.
14539 Use the fact that tags as struniqs.
14540 (symbol_get): Use struniq_new.
14541 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14542 Returns a strniq.
14543 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14544 and type members are struniqs.
14545 * src/reader.c (get_merge_function)
14546 (grammar_current_rule_merge_set): Adjust.
14547 (TYPE, current_type): Are struniq.
14548
14549 Use struniq for file names.
14550
14551 * src/files.h, src/files.c (infile): Split into...
14552 (grammar_file, current_file): these.
14553 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14554 * src/reduce.c (reduce_print): Likewise.
14555 * src/getargs.c (getargs): Likewise.
14556 * src/complain.h, src/complain.c: Likewise.
14557 * src/main.c (main): Call struniqs_new early enough to use it for
14558 file names.
14559 Don't free the input file name.
14560
14561 2002-11-12 Akim Demaille <akim@epita.fr>
14562
14563 * src/symtab.c (symbol_free): Remove dead deactivated code:
14564 type_name are properly removed.
14565 Don't use XFREE to free items that cannot be NULL.
14566 * src/struniq.h, src/struniq.c: New.
14567 * src/main.c (main): Initialize/free struniqs.
14568 * src/parse-gram.y (%union): Add astruniq member.
14569 (yyprint): Adjust.
14570 * src/scan-gram.l (<{tag}>): Return a struniq.
14571 Free the obstack bit that used to store it.
14572 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14573
14574 2002-11-11 Paul Eggert <eggert@twinsun.com>
14575
14576 Revamp to fix many (but not all) of the C- and M4-related quoting
14577 problems. Among other things, this fixes the Bison bug reported
14578 by Jan Hubicka when processing the Bash grammar; see:
14579 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14580
14581 Use new @ escapes consistently. Represent brackets with @{ and @}
14582 rather than @<:@ and @:>@, since this works a bit better with dumb
14583 editors like vi. Represent @ with @@, since @ is now consistently
14584 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14585 __ofile__, to avoid unexpected expansions. Similarly, use @output
14586 rather than #output.
14587
14588 * data/c.m4 (b4_copyright): Omit file name from comment, since
14589 the file name could contain "*/".
14590 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14591 be quoted. All uses changed.
14592
14593 * data/glr.c: Use new @ escapes consistently.
14594 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14595 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14596 Remove, since they couldn't handle arbitrary characters in file
14597 names.
14598 * data/lalr1.cc: Likewise.
14599 * data/yacc.c: Likewise.
14600
14601 * src/files.c (output_infix): Remove; all uses removed.
14602 * src/files.h: Likewise.
14603
14604 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14605 mishandled funny characters in file names, and anyway it isn't
14606 needed any more.
14607 * data/yacc.c: Likewise.
14608 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14609
14610 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14611 * data/yacc.c: Likewise.
14612
14613 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14614 strings now.
14615 (muscle_init): Quote filename as a C string.
14616 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14617 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14618 * src/output.c (escaped_file_name_output): New function.
14619 (prepare_symbols): Quote tokens for M4.
14620 (prepare): Don't insert output_infix, output_prefix,
14621 output_parser_name, output_header_name; this is now down by scan-skel.
14622 Insert skeleton as a C string.
14623
14624 * src/output.c (user_actions_output, symbol_destructors_output,
14625 symbol_printers_output): Quote filenames for C and M4.
14626 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14627
14628 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14629 escapes other than \\ and \'; this simplifies the code.
14630 (<SC_STRING>): Likewise, for \\ and \".
14631 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14632 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14633 Use new escapes @{ and @} for [ and ].
14634
14635 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14636 them with auto vars.
14637 Switch to new escape scheme, where @ is the escape character uniformly.
14638 Abort if a stray escape character is found. Avoid unbounded input
14639 buffer when parsing non-escaped text.
14640
14641 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14642 __oline__, #output, $@, and @{ do not have unintended meanings.
14643
14644 2002-11-09 Paul Eggert <eggert@twinsun.com>
14645
14646 Fix the test failure due to GCC warnings described in
14647 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14648 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14649 evaluate to 0 if it's impossible for NINF to be in the respective
14650 table.
14651 (yygetLRActions, yyrecoverParseError): Use them.
14652
14653 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14654 counted in the token inserted at end of file. Now takes
14655 location_t *, not location_t, so that the location can be
14656 adjusted. All uses changed.
14657
14658 * tests/regression.at (Invalid inputs): Adjust wording in
14659 diagnostic to match the new behavior.
14660
14661 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14662 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14663 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14664 abort ();'. This reduces the runtime of the "Many lookaheads"
14665 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14666 GCC 3.2.
14667
14668 2002-11-07 Paul Eggert <eggert@twinsun.com>
14669
14670 * src/parse-gram.y (CHARACTER): Remove unused token.
14671 All uses removed.
14672
14673 * src/scan-gram.l: Remove stack option. We no longer use the
14674 stack, since the stack was never deeper than 1; instead, use the
14675 new auto var c_context to record the stacked value.
14676
14677 Remove nounput option. At an unexpected end of file, we now unput
14678 the minimal input necessary to end cleanly; this simplifies the
14679 code.
14680
14681 Avoid unbounded token sizes where this is easy.
14682
14683 (unexpected_end_of_file): New function.
14684 Use it to systematize the error message on unexpected EOF.
14685 (last-string): Now auto, not static.
14686 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14687 (scanner_last_string_free): Remove; not used.
14688 (percent_percent_count): Move decl to just before use.
14689 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14690 not the (never otherwised-used) CHARACTER.
14691
14692 2002-11-07 Akim Demaille <akim@epita.fr>
14693
14694 Let yyerror always receive the msg as last argument, so that
14695 yyerror can be variadic.
14696
14697 * data/yacc.c (b4_yyerror_args): New.
14698 Use it when calling yyerror.
14699 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14700 Use it when calling yyerror.
14701 * doc/bison.texinfo (Error Reporting): Adjust.
14702 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14703 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14704
14705 2002-11-06 Akim Demaille <akim@epita.fr>
14706
14707 #line should have quoted strings.
14708 Ideally, this should be done by m4_quotearg.
14709
14710 * src/scan-skel.l: Include quotearg.h.
14711 Quote __ofile__.
14712 * src/output.c (symbol_printers_output)
14713 (symbol_destructors_output): Quote the file name.
14714
14715 2002-11-06 Akim Demaille <akim@epita.fr>
14716
14717 * tests/regression.at (Invalid inputs): Adjust to the recent
14718 messages.
14719
14720 2002-11-06 Akim Demaille <akim@epita.fr>
14721
14722 Restore --no-lines.
14723 Reported by Jim Kent.
14724
14725 * data/c.m4 (b4_syncline): New.
14726 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14727 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14728 * src/output.c (user_actions_output): Likewise.
14729 (prepare): Define 'b4_synclines_flag'.
14730 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14731
14732 2002-11-06 Akim Demaille <akim@epita.fr>
14733
14734 * src/main.c (main): Free `infile'.
14735 * src/scan-gram.l (handle_syncline): New.
14736 Recognize `#line'.
14737 * src/output.c (user_actions_output, symbol_destructors_output)
14738 (symbol_printers_output): Use the location's file name, not
14739 infile.
14740 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14741
14742 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14743
14744 * src/tables.c (matching_state): Don't allow states to match if
14745 either has GLR conflict entries.
14746
14747 2002-11-05 Paul Eggert <eggert@twinsun.com>
14748
14749 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14750 "integer out of range" rather than "invalid value".
14751 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14752 accordingly.
14753
14754 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14755 Also, remove one static variable in the scanner.
14756
14757 * src/scan-gram.l (braces_level): Now auto, not static.
14758 Initialize to zero if the compiler is being picky.
14759 (INITIAL): Clear braces_level instead of incrementing it.
14760 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14761 as POSIX 1003.1-2001 requires.
14762 * src/system.h (IF_LINT): New macro, taken from coreutils.
14763 * configure.ac: Define "lint" if --enable-gcc-warnings.
14764
14765 2002-11-05 Akim Demaille <akim@epita.fr>
14766
14767 * src/scan-gram.l: When it starts with `%', complain about the
14768 whole directive, not just that `invalid character: %'.
14769
14770 2002-11-04 Akim Demaille <akim@epita.fr>
14771
14772 * Makefile.maint: Update from Autoconf.
14773 (update, cvs-update, po-update, do-po-update): New.
14774
14775 2002-11-04 Akim Demaille <akim@epita.fr>
14776
14777 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14778 and yyerror.
14779 Have yyerror `use' its arguments.
14780 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14781 returns true when location & yacc & pure & parse-param.
14782 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14783
14784 2002-11-04 Akim Demaille <akim@epita.fr>
14785
14786 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14787 clashes.
14788 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14789 font-lock-mode.
14790 Use complain_at.
14791 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14792 slot 0.
14793
14794 2002-11-03 Paul Eggert <eggert@twinsun.com>
14795
14796 * src/reader.c (get_merge_function, grammar_current_rule_check):
14797 Use consistent diagnostics for reporting type name clashes.
14798 Quote the types with <>, for consistency with Yacc.
14799 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14800
14801 2002-11-03 Akim Demaille <akim@epita.fr>
14802
14803 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14804 New.
14805 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14806 (b4_parse_param): Remove.
14807 Use b4_identification.
14808 Propagate b4_pure_args where needed to pass them to yyerror.
14809 * data/glr.m4 (b4_parse_param): Remove.
14810 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14811 (b4_lpure_formals): New.
14812 Use b4_identification.
14813 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14814 b4_user_formals and b4_user_args.
14815 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14816 (yyreportAmbiguity): When using a pure parser, also need
14817 the location, and the parse-params.
14818 Adjust callers.
14819 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14820 When using a pure parser, also need the parse-params.
14821 Adjust callers.
14822 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14823 (%pure-parser + %parse-param) LALR and GLR parsers.
14824 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14825 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14826 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14827 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14828 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14829 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14830 * doc/bison.texinfo: Untabify the whole file.
14831 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14832 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14833 (Error Reporting): Adjust to these new directives.
14834 Document %error-verbose, deprecate YYERROR_VERBOSE.
14835
14836 2002-11-03 Akim Demaille <akim@epita.fr>
14837
14838 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14839 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14840 command line options.
14841 * tests/cxx-type.at: Formatting changes.
14842
14843 2002-11-03 Paul Eggert <eggert@twinsun.com>
14844
14845 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14846 to count columns correctly, and to check for invalid inputs.
14847
14848 Use mbsnwidth to count columns correctly. Account for tabs, too.
14849 Include mbswidth.h.
14850 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14851 (extend_location): New function.
14852 (YY_LINES): Remove.
14853
14854 Handle CRLF in C code rather than in Lex code.
14855 (YY_INPUT): New macro.
14856 (no_cr_read): New function.
14857
14858 Scan UCNs, even though we don't fully handle them yet.
14859 (convert_ucn_to_byte): New function.
14860
14861 Handle backslash-newline correctly in C code.
14862 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14863 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14864 all uses changed.
14865 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14866 Use {splice} wherever C allows backslash-newline.
14867 YY_STEP after space, newline, vertical-tab.
14868 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14869
14870 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14871
14872 ({int}, handle_action_dollar, handle_action_at): Check for integer
14873 overflow.
14874
14875 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14876
14877 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14878 as well as \000. Check for UCHAR_MAX, not 255.
14879 Allow \x with an arbitrary positive number of digits, as in C.
14880 Check for overflow here.
14881 Allow \? and UCNs, for compatibility with C.
14882
14883 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14884 with quote slot used by complain_at.
14885
14886 * tests/input.at: Add tests for backslash-newline, m4 quotes
14887 in symbols, long literals, and funny escapes in strings.
14888
14889 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14890 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14891 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14892 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14893 * m4/mbswidth.m4: New file, from GNU coreutils.
14894
14895 * doc/bison.texinfo (Grammar Outline): Document // comments.
14896 (Symbols): Document that trigraphs have no special meaning in Bison,
14897 nor is backslash-newline allowed.
14898 (Actions): Document that trigraphs have no special meaning.
14899
14900 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14901 no longer used.
14902
14903 2002-11-02 Paul Eggert <eggert@twinsun.com>
14904
14905 * src/reader.c: Don't include quote.h; not needed.
14906 (get_merge_function): Reword warning to be consistent with
14907 type clash diagnostic in grammar_current_rule_check.
14908
14909 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14910 bug in trigraph handling.
14911
14912 * src/output.c (prepare_symbols): When printing token names,
14913 escape "[" as "@<:@" and likewise for "]".
14914
14915 * src/system.h (errno): Remove declaration, as we are now
14916 assuming C89 or better, and C89 guarantees errno.
14917
14918 2002-10-30 Paul Eggert <eggert@twinsun.com>
14919
14920 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14921 Check for close failures.
14922 * src/files.h (xfclose): Return void, not int, since it always
14923 returned zero.
14924 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14925 indicates one.
14926 * src/output.c (output_skeleton): Use xfclose rather than fclose
14927 and ferror. xfclose now checks ferror.
14928
14929 * data/glr.c (YYLEFTMOST_STATE): Remove.
14930 (yyreportTree): Use a stack-based leftmost state. This avoids
14931 our continuing battles with bogus warnings about initializers.
14932
14933 2002-10-30 Akim Demaille <akim@epita.fr>
14934
14935 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14936 #if.
14937
14938 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14939
14940 * tests/glr-regr1.at: New test for reported regressions.
14941 * tests/testsuite.at: Add glr-regr1.at test.
14942 * tests/Makefile.am: Add glr-regr1.at test.
14943
14944 2002-10-24 Paul Eggert <eggert@twinsun.com>
14945
14946 Version 1.75a.
14947
14948 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14949 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14950 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14951 Don't assume strdup exists; POSIX says its an XSI extension.
14952 Check for buffer overflow on input.
14953
14954 2002-10-24 Akim Demaille <akim@epita.fr>
14955
14956 * src/output.c (output_skeleton): Don't disable M4sugar comments
14957 too soon: it results in comments being expanded.
14958 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14959 first output.
14960
14961 2002-10-24 Akim Demaille <akim@epita.fr>
14962
14963 * data/yacc.c (m4_int_type): New.
14964 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14965 char' as only yacc.c wants K&R portability.
14966 * data/glr.c (yysigned_char): Remove.
14967 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14968 Reported by Quoc Peyrot.
14969
14970 2002-10-23 Paul Eggert <eggert@twinsun.com>
14971
14972 * src/main.c (main): With --trace=time, report times even if a
14973 non-fatal error occurs. Formerly, the times were reported in some
14974 such cases but not in others.
14975 * src/reader.c (reader): Just return if a complaint has been issued,
14976 instead of exiting, so that 'main' can report times.
14977
14978 2002-10-22 Akim Demaille <akim@epita.fr>
14979
14980 * src/system.h: Include sys/types.
14981 Reported by Bert Deknuydt.
14982
14983 2002-10-23 Paul Eggert <eggert@twinsun.com>
14984
14985 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14986 Suggested by Art Haas.
14987
14988 2002-10-22 Paul Eggert <eggert@twinsun.com>
14989
14990 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14991 decl; not needed any more.
14992 * src/main.c (main): Use return to exit, undoing yesterday's change.
14993 The last OS that we could find where this wouldn't work is
14994 SunOS 3.5, and that's too old to worry about now.
14995
14996 * data/glr.c (struct yyltype): Define members even when not
14997 doing locations. This is more consistent with yacc.c, and it
14998 works around the following bug reports:
14999 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15000 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15001
15002 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15003 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15004 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15005
15006 2002-10-22 Akim Demaille <akim@epita.fr>
15007
15008 * data/README: New.
15009
15010 2002-10-21 Paul Eggert <eggert@twinsun.com>
15011
15012 Be consistent about 'bool'; the old code used an enum in one
15013 module and an int in another, and this violates the C standard.
15014 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15015 * configure.ac (AC_HEADER_STDBOOL): Add.
15016 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15017 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15018 * src/symtab.c (hash_compare_symbol_t): Likewise.
15019 * src/system.h (bool, false, true): Use a definition consistent
15020 with ../lib/hash.c. All uses changed.
15021
15022 * src/complain.c (warning_issued): Renamed from warn_message_count,
15023 so that we needn't worry about integer overflow (!).
15024 Now of type bool. All uses changed.
15025 (complaint_issued): Renamed from complain_message_count; likewise.
15026
15027 * src/main.c (main): Use exit to exit with failure.
15028
15029 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15030 rather than 1 and 0.
15031 * src/main.c (main): Likewise.
15032 * src/getargs.c (getargs): Likewise.
15033 * src/reader.c (reader): Likewise.
15034
15035 * src/getarg.c (getargs): Remove duplicate code for
15036 "Try `bison --help'".
15037
15038 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15039 What was that "2" for?
15040
15041 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15042 * src/getargs.c (usage): Likewise.
15043
15044 * src/getargs.c (getargs): When there are too few operands, report
15045 the last one. When there are too many, report the first extra
15046 one. This is how diffutils does it.
15047
15048 2002-10-20 Paul Eggert <eggert@twinsun.com>
15049
15050 Remove K&R vestiges.
15051 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15052 * src/complain.c (VA_START): Remove. Assume prototypes.
15053 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15054 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15055 fatal): Assume prototypes.
15056 * src/complain.h: Assume prototypes.
15057 * src/system.h (PARAMS): Remove.
15058 Include <limits.h> unconditionally, since it's guaranteeed even
15059 for a freestanding C89 compiler.
15060 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15061 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15062
15063 2002-10-20 Akim Demaille <akim@epita.fr>
15064
15065 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15066 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15067 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15068 (yyresolveStates, yyresolveAction, yyresolveStack)
15069 (yyprocessOneStack): Use them.
15070 (yy_reduce_print): New.
15071 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15072
15073 2002-10-20 Akim Demaille <akim@epita.fr>
15074
15075 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15076 arguments and output `void'.
15077 (b4_c_function): Rename as...
15078 (b4_c_function_def): this.
15079 (b4_c_function_decl, b4_c_ansi_function_def)
15080 (b4_c_ansi_function_decl): New.
15081 Change the interpretation of the arguments: before `int, foo', now
15082 `int foo, foo'.
15083 * data/yacc.c (yyparse): Prototype and define thanks to these.
15084 Adjust b4_c_function_def uses.
15085 * data/glr.c (yyparse): Likewise, but ANSI only.
15086
15087 2002-10-20 Akim Demaille <akim@epita.fr>
15088
15089 * src/output.c (prepare): Move the definition of `tokens_number',
15090 `nterms_number', `undef_token_number', `user_token_number_max'
15091 to...
15092 (prepare_tokens): Here.
15093 (prepare_tokens): Rename as...
15094 (prepare_symbols): this.
15095 (prepare): Move the definition of `rules_number' to...
15096 (prepare_rules): here.
15097 (prepare): Move the definition of `last', `final_state_number',
15098 `states_number' to...
15099 (prepare_states): here.
15100 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15101
15102 2002-10-20 Akim Demaille <akim@epita.fr>
15103
15104 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15105
15106 2002-10-20 Akim Demaille <akim@epita.fr>
15107
15108 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15109 * data/c.m4: here.
15110
15111 2002-10-20 Akim Demaille <akim@epita.fr>
15112
15113 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15114 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15115 `pair'.
15116 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15117 `name' to...
15118 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15119 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15120 These.
15121
15122 2002-10-19 Paul Eggert <eggert@twinsun.com>
15123
15124 Do not create a temporary file, as that involves security and
15125 cleanup headaches. Instead, use a pair of pipes.
15126 Derived from a suggestion by Florian Krohm.
15127 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15128 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15129 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15130 (BISON_PREREQ_SUBPIPE): Add.
15131 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15132 Add subpipe.h, subpipe.c.
15133 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15134 * po/POTFILES.in: Add lib/subpipe.c.
15135 * src/output.c: Include "subpipe.h".
15136 (m4_invoke): Remove decl.
15137 (scan_skel): New decl.
15138 (output_skeleton): Use pipe rather than temporary file for m4 input.
15139 Check that m4sugar.m4 is readable, to avoid deadlock.
15140 Check for pipe I/O error.
15141 * src/scan-skel.l (readpipe): Remove decl.
15142 (scan_skel): New function, to be used in place of m4_invoke.
15143 Read from stream rather than file.
15144
15145 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15146 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15147 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15148 this generates a more-accurate value anyway.
15149
15150 * lib/timevar.c (timervar_accumulate): Rename locals to
15151 avoid confusion with similarly-named more-global.
15152 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15153
15154 * src/output.c (prepare): Use xstrdup to convert char const *
15155 to char *, to avoid GCC warning.
15156
15157 2002-10-19 Akim Demaille <akim@epita.fr>
15158
15159 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15160 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15161 Use them to have `calc.y' ready for %pure-parser.
15162 * data/yacc.c (YYLEX): Pass a yylex return type to
15163 b4_c_function_call.
15164
15165 2002-10-19 Akim Demaille <akim@epita.fr>
15166
15167 Prototype support of %lex-param and %parse-param.
15168
15169 * src/parse-gram.y: Add the definition of the %lex-param and
15170 %parse-param tokens, plus their rules.
15171 Drop the `_' version of %glr-parser.
15172 Add the "," token.
15173 * src/scan-gram.l (INITIAL): Scan them.
15174 * src/muscle_tab.c: Comment changes.
15175 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15176 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15177 (muscle_entry_s): The `value' member is no longer const.
15178 Adjust all dependencies.
15179 * src/muscle_tab.c (muscle_init): Adjust: use
15180 MUSCLE_INSERT_STRING.
15181 Initialize the obstack earlier.
15182 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15183 (muscle_pair_list_grow): New.
15184 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15185 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15186 * tests/calc.at: Use %locations, not --locations.
15187 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15188
15189 2002-10-19 Akim Demaille <akim@epita.fr>
15190
15191 * src/getargs.c (usage): Take status as argument and exit
15192 accordingly.
15193 Report the traditional `Try ... --help' message when status != 0.
15194 (usage, version): Don't take a FILE * as arg, it is pointless.
15195 (getargs): When there is an incorrect number of arguments, make it
15196 an error, and report it GNUlically thanks to `usage ()'.
15197
15198 2002-10-18 Paul Eggert <eggert@twinsun.com>
15199
15200 * data/glr.c (yyreportParseError): Don't assume that sprintf
15201 yields the length of the printed string, as this is not true
15202 on SunOS 4.1.4. Reported by Peter Klein.
15203
15204 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15205 * tests/conflicts.at (%nonassoc and eof): Likewise.
15206 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15207
15208 2002-10-17 Akim Demaille <akim@epita.fr>
15209
15210 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15211 * src/getargs.c (trace_types, trace_args): Adjust.
15212 * src/reader.c (grammar_current_rule_prec_set)
15213 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15214 Standardize error messages.
15215 And s/@prec/%prec/!
15216 (reader): Use trace_flag to enable scanner/parser debugging,
15217 instead of an adhoc scheme.
15218 * src/scan-gram.l: Remove trailing debugging code.
15219
15220 2002-10-16 Paul Eggert <eggert@twinsun.com>
15221
15222 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15223 MUSCLE_TAB_H.
15224
15225 * NEWS: Officially drop support for building Bison with K&R C,
15226 since it didn't work anyway and it's not worth worrying about.
15227 * Makefile.maint (wget_files): Remove ansi2knr.c.
15228 (ansi2knr.c-url_prefix): Remove.
15229 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15230 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15231 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15232
15233 2002-10-15 Paul Eggert <eggert@twinsun.com>
15234
15235 Stop using the "enum_" trick for K&R-style function definitions;
15236 it confused me, and I was the author! Instead, assume that people
15237 who want to use K&R C compilers (when using these modules in GCC,
15238 perhaps?) will run ansi2knr.
15239
15240 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15241 All uses of "enum_" changed to "enum ".
15242 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15243 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15244
15245 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15246 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15247 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15248 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15249 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15250 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15251 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15252 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15253 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15254 Use function prototypes; this removes the need for declaring
15255 static functions simply to provide their prototypes.
15256 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15257 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15258 bitset_count_, bitset_create, bitset_dump, bitset_first,
15259 bitset_free, bitset_init, bitset_last, bitset_next,
15260 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15261 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15262 bitset_print, bitset_release_memory, bitset_toggle_,
15263 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15264 debug_bitset): Likewise.
15265 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15266 * lib/bitset_stats.c (bitset_log_histogram_print,
15267 bitset_percent_histogram_print, bitset_stats_and,
15268 bitset_stats_and_cmp, bitset_stats_and_or,
15269 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15270 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15271 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15272 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15273 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15274 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15275 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15276 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15277 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15278 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15279 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15280 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15281 bitset_stats_zero): Likewise.
15282 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15283 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15284 bitsetv_dump, debug_bitsetv): Likewise.
15285 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15286 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15287 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15288 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15289 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15290 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15291 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15292 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15293 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15294 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15295 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15296 Likewise.
15297 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15298 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15299 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15300 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15301 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15302 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15303 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15304 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15305 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15306 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15307 lbitset_xor_cmp, lbitset_zero): Likewise.
15308
15309 2002-10-14 Akim Demaille <akim@epita.fr>
15310
15311 Version 1.75.
15312
15313 2002-10-14 Akim Demaille <akim@epita.fr>
15314
15315 * tests/Makefile.am (maintainer-check-posix): New.
15316
15317 2002-10-14 Akim Demaille <akim@epita.fr>
15318
15319 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15320 member.
15321
15322 2002-10-14 Akim Demaille <akim@epita.fr>
15323
15324 * src/tables.c (table_ninf_remap): base -> tab.
15325 Reported by Matt Rosing.
15326
15327 2002-10-14 Paul Eggert <eggert@twinsun.com>
15328
15329 * tests/action.at, tests/calc.at, tests/conflicts.at,
15330 tests/cxx-type.at, tests/headers.at, tests/input.at,
15331 tests/regression.at, tests/synclines.at, tests/torture.at:
15332 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15333 so that the tests still work even if POSIXLY_CORRECT is set.
15334 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15335
15336 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15337 for portability to K&R hosts. Fix typo: signed char is guaranteed
15338 only to 127, not to 128.
15339 * data/glr.c (yysigned_char): New type.
15340 * data/yacc.c (yysigned_char): Likewise.
15341 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15342
15343 2002-10-13 Paul Eggert <eggert@twinsun.com>
15344
15345 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15346 true due to limited range of data type" warning from GCC.
15347
15348 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15349 by wrapping enum yytokentype's definition inside #ifndef
15350 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15351
15352 2002-10-13 Akim Demaille <akim@epita.fr>
15353
15354 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15355 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15356
15357 2002-10-13 Akim Demaille <akim@epita.fr>
15358
15359 * Makefile.maint: Update from Autoconf 2.54.
15360 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15361
15362 2002-10-13 Akim Demaille <akim@epita.fr>
15363
15364 * src/print.c (print_state): Separate the list of solved conflicts
15365 from the other items.
15366 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15367
15368 2002-10-13 Akim Demaille <akim@epita.fr>
15369
15370 Let nondeterministic skeletons be usable with deterministic
15371 tables.
15372
15373 With the patch, GAWK compiled by GCC without -O2 passes its test
15374 suite using a GLR parser driven by LALR tables. It fails with -O2
15375 because `struct stat' gives two different answers on my machine:
15376 88 (definition of an auto var) and later 96 (memset on this var).
15377 Hence the stack is badly corrumpted. The headers inclusion is to
15378 blame: if I move the awk.h inclusion before GLR's system header
15379 inclusion, the two struct stat have the same size.
15380
15381 * src/tables.c (pack_table): Always create conflict_table.
15382 (token_actions): Always create conflict_list.
15383 * data/glr.c (YYFLAG): Remove, unused.
15384
15385 2002-10-13 Akim Demaille <akim@epita.fr>
15386
15387 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15388 (O0FLAGS): New.
15389 (VALGRIND, GXX): New.
15390 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15391 * tests/bison.in: Run $PREBISON a pre-command.
15392 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15393 (maintainer-check-g++): New.
15394 * Makefile.am (maintainer-check): New.
15395
15396 2002-10-13 Akim Demaille <akim@epita.fr>
15397
15398 * data/glr.c: Formatting changes.
15399 Tweak some trace messages to match yacc.c's.
15400
15401 2002-10-13 Akim Demaille <akim@epita.fr>
15402
15403 GLR parsers sometimes raise parse errors instead of performing the
15404 default reduction.
15405 Reported by Charles-Henry de Boysson.
15406
15407 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15408 check the length of the traces when %glr.
15409 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15410 GLR's traces.
15411 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15412 Test GLR parsers.
15413 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15414 (yyltype): Remove the yy prefix from the member names.
15415 (yytable): Complete its comment.
15416 (yygetLRActions): Map error action number from YYTABLE from
15417 YYTABLE_NINF to 0.
15418 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15419 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15420 not satisfying as we could compare an YYACTION computed from
15421 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15422 only value for error actions.
15423 (yyreportParseError): In verbose parse error messages, don't issue
15424 `error' in the list of expected tokens.
15425 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15426 next action to perform to match glr.c's decoding.
15427 (yytable): Complete its comment.
15428
15429 2002-10-13 Paul Eggert <eggert@twinsun.com>
15430
15431 Fix problem reported by Henrik Grubbstroem in
15432 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15433 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15434 because the Bison parser reads the second action before reducing
15435 the first one.
15436 * src/scan-gram.l (rule_length): New static var.
15437 Use it to keep track of the rule length in the scanner, since
15438 we can't expect the parser to be in lock-step sync with the scanner.
15439 (handle_action_dollar, handle_action_at): Use this var.
15440 * tests/actions.at (Exotic Dollars): Test for the problem.
15441
15442 2002-10-12 Paul Eggert <eggert@twinsun.com>
15443
15444 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15445 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15446 Include <sys/time.h> when checking for clock_t and struct tms.
15447 Use same include order as source.
15448 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15449 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15450
15451 * lib/timevar.c: Update copyright date and clarify comments.
15452 (get_time) [IN_GCC]: Keep the GCC version for reference.
15453
15454 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15455 GCC version as of today, then merge Bison's changes.
15456 Change "GCC" to "Bison" in copyright notice. timevar.def's
15457 author is Akim, so change that too.
15458
15459 * src/reader.c (grammar_current_rule_check):
15460 Don't worry about the default action if $$ is untyped.
15461 Prevents bogus warnings reported by Jim Gifford in
15462 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15463
15464 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15465 * data/glr.c, data/lalr1.cc, data/yacc.c:
15466 Output token definitions before the first part of user declarations.
15467 Fixes compatibility problem reported by Jim Gifford for kbd in
15468 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15469
15470 2002-10-11 Paul Eggert <eggert@twinsun.com>
15471
15472 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15473 (yyparse): here. This undoes some of the 2002-07-25 change.
15474 Compatibility problem reported by Ralf S. Engelschall with
15475 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15476
15477 2002-10-11 Akim Demaille <akim@epita.fr>
15478
15479 * tests/regression.at Characters Escapes): New.
15480 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15481 characters.
15482 Reported by Jan Nieuwenhuizen.
15483
15484 2002-10-11 Akim Demaille <akim@epita.fr>
15485
15486 * po/id.po: New.
15487
15488 2002-10-10 Paul Eggert <eggert@twinsun.com>
15489
15490 Portability fixes for bitsets; this also avoids several GCC
15491 warnings.
15492
15493 * lib/abitset.c: Include <stddef.h>, for offsetof.
15494 * lib/lbitset.c: Likewise.
15495
15496 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15497 properly for vectors of objects. Do not assume that adding a
15498 header size to a multiple of a word size yields a value that is
15499 properly aligned for the whole union.
15500 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15501
15502 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15503 unique names for structures.
15504 * lib/ebitset.c (ebitset_bytes): Likewise.
15505 * lib/lbitset.c (lbitset_bytes): Likewise.
15506
15507 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15508 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15509 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15510 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15511 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15512 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15513 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15514 to improve the type-checking that GCC can do.
15515 * lib/bitset.c (bitset_op4_cmp): Likewise.
15516 * lib/bitset_stats.c (bitset_stats_count,
15517 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15518 bitset_stats_copy, bitset_stats_disjoint_p,
15519 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15520 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15521 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15522 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15523 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15524 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15525 bitset_stats_or_and_cmp): Likewise.
15526 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15527 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15528 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15529 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15530
15531 * lib/abitset.h: Include bitset.h, not bbitset.h.
15532 * lib/ebitset.h: Likewise.
15533 * lib/lbitset.h: Likewise.
15534
15535 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15536 All instances of parameters of type enum bitset_opts are now of
15537 type enum_bitset_opts, to conform to the C Standard, and similarly
15538 for enum_bitset_type.
15539 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15540 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15541
15542 Do not use "struct bitset_struct" to mean different things in
15543 different modules. Not only is this confusing, it violates
15544 the C Standard, which requires that structure types in different
15545 modules must be compatible if one is to be passed to the other.
15546 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15547 All instances of "struct bitset_struct *" replaced with "bitset".
15548 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15549 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15550 struct lbitset_struct, struct bitset_stats_struct): New types.
15551 All uses of struct bitset_struct changed to union bitset_union,
15552 etc.
15553 * lib/abitset.c (struct abitset_struct, abitset,
15554 struct bitset_struct): Remove.
15555 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15556 struct bitset_struct): Remove.
15557 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15558 bitset_struct): Remove.
15559 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15560 Likewise.
15561
15562 Do not call a function of type T using a call that assumes the
15563 function is of a different type U. Standard C requires that a
15564 function must be called with a type that is compatible with its
15565 definition.
15566 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15567 New decls.
15568 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15569 New functions.
15570 * lib/ebitset.c (PFV): Remove.
15571 * lib/lbitset.c (PFV): Likewise.
15572 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15573 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15574 decls.
15575 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15576 (ebitset_vtable): Use them.
15577 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15578 lbitset_xor): New functions.
15579 (lbitset_vtable): Use them.
15580
15581 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15582 Declare.
15583
15584 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15585 GCC warning.
15586 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15587 Use offsetof, for simplicity.
15588
15589 2002-10-06 Paul Eggert <eggert@twinsun.com>
15590
15591 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15592 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15593 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15594 which was inadvertently undone by the 2002-09-30 patch.
15595 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15596 the same width as int.
15597
15598 2002-10-04 Paul Eggert <eggert@twinsun.com>
15599
15600 Version 1.50.
15601
15602 * configure.ac (AC_INIT), NEWS: Increment version number.
15603
15604 * doc/bison.texinfo: Minor spelling, grammar, and white space
15605 fixes.
15606 (Symbols): Mention that any negative value returned from yylex
15607 signifies end-of-input. Warn about negative chars. Mention
15608 the portable Standard C character set.
15609
15610 The GNU coding standard says CFLAGS and YFLAGS are reserved
15611 for the installer to set.
15612 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15613 * src/Makefile.am (AM_CFLAGS): Likewise.
15614 (AM_YFLAGS): Renamed from YFLAGS.
15615
15616 Fix some MAX and MIN problems.
15617 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15618 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15619 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15620 * src/reader.c (reader): Use it.
15621
15622 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15623 POSIX 1003.1-2001 has removed fgrep.
15624
15625 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15626
15627 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15628 interpreted as signed.
15629 * lib/ebitset.c (ebitset_list): Fix bug.
15630
15631 2002-10-01 Paul Eggert <eggert@twinsun.com>
15632
15633 More fixes for 64-bit hosts and large bitsets.
15634
15635 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15636 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15637 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15638 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15639 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15640 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15641 bitset_count_): Likewise.
15642 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15643 bitset_first, bitset_last): Likewise.
15644 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15645 bitset_stats_list_reverse, bitset_stats_size,
15646 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15647 Likewise.
15648 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15649 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15650 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15651 bitsetv_reflexive_transitive_closure): Likewise.
15652 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15653 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15654 Likewise.
15655 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15656 Likewise.
15657
15658 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15659 Use size_t, not unsigned int, to count bytes.
15660 * lib/abitset.h (abitset_bytes): Likewise.
15661 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15662 Likewise.
15663 * lib/bitset.h (bitset_bytes): Likewise.
15664 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15665 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15666 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15667 * lib/ebitset.c (ebitset_bytes): Likewise.
15668 * lib/ebitset.h (ebitset_bytes): Likewise.
15669 * lib/lbitset.c (lbitset_bytes): Likewise.
15670 * lib/lbitset.h (lbitset_bytes): Likewise.
15671
15672 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15673 abitset_subset_p, abitset_disjoint_p, abitset_and,
15674 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15675 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15676 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15677 abitset_or_and, abitset_or_and_cmp):
15678 Use bitset_windex instead of unsigned int.
15679 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15680 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15681 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15682 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15683 Likewise.
15684 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15685
15686 * lib/bitset.c (bitset_print):
15687 Use proper printf formats for widths of integer types.
15688 * lib/bitset_stats.c (bitset_percent_histogram_print,
15689 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15690 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15691 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15692 * lib/lbitset.c (lbitset_bytes): Likewise.
15693
15694 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15695 BITSET_SIZE_MAX): New macros.
15696 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15697 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15698 to BITSET_WINDEX_MAX.
15699
15700 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15701 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15702 since we now return the bitset_bindex type (not int).
15703
15704 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15705 when computing sizes.
15706 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15707
15708 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15709 and avoid cast to unsigned.
15710
15711 2002-09-30 Akim Demaille <akim@epita.fr>
15712
15713 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15714 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15715 Updates from Michael Hayes.
15716
15717 2002-09-30 Art Haas <ahaas@neosoft.com>
15718
15719 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15720 invocations.
15721 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15722 defined.
15723
15724 2002-09-27 Akim Demaille <akim@epita.fr>
15725
15726 Version 1.49c.
15727
15728 2002-09-27 Akim Demaille <akim@epita.fr>
15729
15730 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15731 (Because of AC_LIBSOURCE).
15732
15733 2002-09-27 Akim Demaille <akim@epita.fr>
15734
15735 Playing with Autoscan.
15736
15737 * configure.ac: Remove the old LIBOBJ tweaks.
15738 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15739 * lib/strrchr.c: New.
15740 * lib/strtol.c: New, from the Coreutils 4.5.1.
15741
15742 2002-09-27 Akim Demaille <akim@epita.fr>
15743
15744 Playing with Autoscan.
15745
15746 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15747 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15748 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15749 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15750 Coreutils 4.5.1.
15751
15752 2002-09-24 Akim Demaille <akim@epita.fr>
15753
15754 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15755 (Frequently Asked Questions, Parser Stack Overflow): New.
15756
15757 2002-09-13 Akim Demaille <akim@epita.fr>
15758
15759 Playing with autoscan.
15760
15761 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15762 * src/files.c (skeleton_find): Remove, unused.
15763 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15764 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15765
15766 2002-09-13 Akim Demaille <akim@epita.fr>
15767
15768 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15769 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15770
15771 2002-09-13 Akim Demaille <akim@epita.fr>
15772
15773 * configure.ac: Require 2.54.
15774 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15775 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15776 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15777 Remove, provided by Autoconf macros.
15778
15779 2002-09-12 Akim Demaille <akim@epita.fr>
15780
15781 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15782
15783 2002-09-12 Akim Demaille <akim@epita.fr>
15784
15785 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15786 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15787 Reported by Martin Mokrejs.
15788
15789 2002-09-10 Akim Demaille <akim@epita.fr>
15790
15791 * src/parse-gram.y: Associate a human readable string to each
15792 token type.
15793 * tests/regression.at (Invalid inputs): Adjust.
15794
15795 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15796
15797 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15798 with an Autoconf-2.5x style configure.ac.
15799
15800 2002-09-06 Paul Eggert <eggert@twinsun.com>
15801
15802 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15803 exception applies only to yacc.c. This is a modification of a
15804 patch originally suggested by Akim Demaille.
15805
15806 2002-09-06 Akim Demaille <akim@epita.fr>
15807
15808 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15809 here to...
15810 * data/yacc.c: here.
15811
15812 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15813 LocationType.
15814 (b4_ltype): Default to yy::Location from location.hh.
15815
15816 2002-09-04 Jim Meyering <jim@meyering.net>
15817
15818 * data/yacc.c: Guard the declaration of yytoknum also with
15819 `#ifdef YYPRINT', so it is declared only when used.
15820
15821 2002-09-04 Akim Demaille <akim@epita.fr>
15822
15823 * configure.in: Rename as...
15824 * configure.ac: this.
15825 Bump to 1.49c.
15826
15827 2002-09-04 Akim Demaille <akim@epita.fr>
15828
15829 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15830 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15831 translate maintainer only messages.
15832
15833 2002-08-12 Paul Eggert <eggert@twinsun.com>
15834
15835 Version 1.49b.
15836
15837 * Makefile.am (SUBDIRS): Remove intl.
15838 (DISTCLEANFILES): Remove.
15839 * NEWS: Mention that GNU M4 is now required. Clarify what is
15840 meant by "larger grammars". Mention the pt_BR translation.
15841 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15842 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15843 Bump version from 0.11.2 to 0.11.5.
15844 (BISON_PREREQ_STAGE): Remove.
15845 (AM_GNU_GETTEXT): Use external gettext.
15846 (AC_OUTPUT): Remove intl/Makefile.
15847
15848 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15849
15850 * data/glr.c: Include string.h, for strlen.
15851 (yyreportParseError): Use size_t for yysize.
15852 (yy_yypstack): No longer nested inside yypstates, as nested
15853 functions are not portable. Do not assume size_t is the
15854 same width as int.
15855 (yypstates): Do not assume that ptrdiff_t is the same width
15856 as int, and similarly for yyposn and YYINDEX.
15857
15858 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15859
15860 * lib/Makefile.am (INCLUDES): Do not include from the intl
15861 directory, which has been removed.
15862 * src/Makefile.am (INCLUDES): Likewise.
15863
15864 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15865 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15866 New vars.
15867
15868 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15869 * tests/Makefile.am (EXTRA_DIST): Likewise.
15870
15871 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15872 Do not assume that bitset_windex is the same width as unsigned.
15873
15874 * lib/abitset.c (abitset_unused_clear): Do not assume that
15875 bitset_word is the same width as int.
15876 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15877 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15878 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15879 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15880 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15881
15882 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15883 portability to one's complement hosts!).
15884 * lib/ebitset.c (ebitset_op1): Likewise.
15885 * lib/lbitset.c (lbitset_op1): Likewise.
15886
15887 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15888 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15889 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15890 Sync with fileutils.
15891 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15892 lib/gettext.h: Sync with diffutils.
15893
15894 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15895 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15896
15897 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15898 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15899 check for void *.
15900
15901 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15902 size_t; the old version tried to do this but casted improperly.
15903 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15904 (bitset_test): Now returns int, not unsigned long.
15905
15906 * lib/bitset_stats.c: Include "gettext.h".
15907 (_): New macro.
15908 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15909 name locals "index", as it generates unnecessary warnings on some
15910 hosts that have an "index" function.
15911
15912 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15913 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15914 they need translation.
15915 * src/LR0.c (state_list_append, new_itemsets, get_state,
15916 append_states, generate_states): Likewise.
15917 * src/assoc.c (assoc_to_string): Likewise.
15918 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15919 * src/gram.c (grammar_dump): Likewise.
15920 * src/injections.c (injections_compute): Likewise.
15921 * src/lalr.c (lookaheads_print): Likewise.
15922 * src/relation.c (relation_transpose): Likewise.
15923 * src/scan-gram.l: Likewise.
15924 * src/tables.c (table_grow, pack_vector): Likewise.
15925
15926 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15927 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15928 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15929 * m4/mbstate_t.m4: Sync with fileutils.
15930 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15931
15932 * po/LINGUAS: Add pt_BR.
15933 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15934 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15935 lib/timevar.c.
15936 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15937 manual recommends.
15938 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15939
15940 * src/complain.c (strerror_r): Remove decl; not needed.
15941 (strerror): Use same pattern as ../lib/error.c.
15942
15943 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15944
15945 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15946
15947 * src/main.c (main): Cast result of bindtextdomain and textdomain
15948 to void, to avoid a GCC warning when --disable-nls is in effect.
15949
15950 * src/scan-gram.l: Use strings rather than escapes when possible,
15951 to minimize the number of warnings from xgettext.
15952 (handle_action_dollar, handle_action_at): Don't use isdigit,
15953 as it mishandles negative chars and it may not work as expected
15954 outside the C locale.
15955
15956 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15957 this is a GCC extension and is not portable to other compilers.
15958
15959 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15960 Do not include <ctype.h>; no longer needed.
15961 Do not include <malloc.h>; no longer needed (and generates
15962 warnings on OpenBSD 3.0).
15963
15964 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15965 it's not portable.
15966
15967 * tests/regression.at: Do not use 'cc -c input.c -o input';
15968 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15969
15970 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15971 exit status as failure, not just exit status 1. Sun C exits
15972 with status 2 sometimes.
15973
15974 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15975 Use it for the two large tests.
15976
15977 2002-08-02 Akim Demaille <akim@epita.fr>
15978
15979 * src/conflicts.c (conflicts_output): Don't output rules never
15980 reduced here, since anyway that computation doesn't work.
15981 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15982 (rule_useless_p, rule_never_reduced_p): New.
15983 (grammar_rules_partial_print): Use a filter instead of a range.
15984 Display the title only if needed.
15985 (grammar_rules_print): Adjust.
15986 (grammar_rules_never_reduced_report): New.
15987 * src/tables.c (action_row): Move the computation of rules never
15988 reduced to...
15989 (token_actions): here.
15990 * src/main.c (main): Make the parser before making the report, so
15991 that rules never reduced are computed.
15992 Call grammar_rules_never_reduced_report.
15993 * src/print.c (print_results): Report rules never reduced.
15994 * tests/conflicts.at, tests/reduce.at: Adjust.
15995
15996 2002-08-01 Akim Demaille <akim@epita.fr>
15997
15998 Instead of attaching lookaheads and duplicating the rules being
15999 reduced by a state, attach the lookaheads to the reductions.
16000
16001 * src/state.h (state_t): Remove the `lookaheads',
16002 `lookaheads_rule' member.
16003 (reductions_t): Add a `lookaheads' member.
16004 Use a regular array for the `rules'.
16005 * src/state.c (reductions_new): Initialize the lookaheads member
16006 to 0.
16007 (state_rule_lookaheads_print): Adjust.
16008 * src/state.h, src/state.c (state_reductions_find): New.
16009 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16010 (count_rr_conflicts): Adjust.
16011 * src/lalr.c (LArule): Remove.
16012 (add_lookback_edge): Adjust.
16013 (state_lookaheads_count): New.
16014 (states_lookaheads_initialize): Merge into...
16015 (initialize_LA): this.
16016 (lalr_free): Adjust.
16017 * src/main.c (main): Don't free nullable and derives too early: it
16018 is used by --verbose.
16019 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16020
16021 2002-08-01 Akim Demaille <akim@epita.fr>
16022
16023 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16024 `rule_number_t**'.
16025 (set_derives, free_derives): Rename as...
16026 (derives_compute, derives_free): this.
16027 Adjust all dependencies.
16028 * src/nullable.c (set_nullable, free_nullable): Rename as...
16029 (nullable_compute, nullable_free): these.
16030 (rule_list_t): Store rule_t *, not rule_number_t.
16031 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16032 pointers, instead of their numbers.
16033 * src/main.c (main): Call nullable_free, and derives_free earlier,
16034 as they were lo longer used.
16035
16036 2002-08-01 Akim Demaille <akim@epita.fr>
16037
16038 * lib/timevar.c (get_time): Include children time.
16039 * src/lalr.h (LA, LArule): Don't export them: used with the
16040 state_t.
16041 * src/lalr.c (LA, LArule): Static.
16042 * src/lalr.h, src/lalr.c (lalr_free): New.
16043 * src/main.c (main): Call it.
16044 * src/tables.c (pack_vector): Check whether loc is >= to the
16045 table_size, not >.
16046 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16047 (tables_generate): do it, since that's also it which allocates
16048 them.
16049 Don't free LA and LArule, main does.
16050
16051 2002-07-31 Akim Demaille <akim@epita.fr>
16052
16053 Separate parser tables computation and output.
16054
16055 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16056 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16057 (yydefgoto, yydefact, high): Move to...
16058 * src/tables.h, src/tables.c: here.
16059 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16060 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16061 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16062 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16063 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16064 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16065 (action_row, save_row, token_actions, save_column, default_goto)
16066 (goto_actions, sort_actions, matching_state, pack_vector)
16067 (table_ninf_remap, pack_table, prepare_actions): Move to...
16068 * src/tables.c: here.
16069 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16070 * src/output.c (token_actions, output_base, output_conflicts)
16071 (output_check): Merge into...
16072 (prepare_actions): this.
16073 (actions_output): Rename as...
16074 (user_actions_output): this.
16075 * src/main.c (main): Call tables_generate and tables_free.
16076
16077 2002-07-31 Akim Demaille <akim@epita.fr>
16078
16079 Steal GCC's --time-report support.
16080
16081 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16082 stolen/adjusted from GCC.
16083 * m4/stage.m4: Remove time related checks.
16084 * m4/timevar.m4: New.
16085 * configure.in: Adjust.
16086 * src/system.h: Adjust to using timevar.h.
16087 * src/getargs.h, src/getargs.c: Support trace_time for
16088 --trace=time.
16089 * src/main.c (stage): Remove.
16090 (main): Replace `stage' invocations with timevar calls.
16091 * src/output.c: Insert pertinent timevar calls.
16092
16093 2002-07-31 Akim Demaille <akim@epita.fr>
16094
16095 Let --trace have arguments.
16096
16097 * src/getargs.h (enum trace_e): New.
16098 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16099 (long_options, short_options): --trace/-T takes an optional
16100 argument.
16101 Change all the uses of trace_flag to reflect the new flags.
16102 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16103
16104 Strengthen `stage' portability.
16105
16106 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16107 * configure.in: Use it.
16108 Don't check for malloc.h and sys/times.h.
16109 * src/system.h: Include them when appropriate.
16110 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16111 times and struct tms are available.
16112
16113 2002-07-30 Akim Demaille <akim@epita.fr>
16114
16115 In verbose parse error message, don't report `error' as an
16116 expected token.
16117 * tests/actions.at (Printers and Destructors): Adjust.
16118 * tests/calc.at (Calculator $1): Adjust.
16119 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16120 error message, do not report the parser accepts the error token in
16121 that state.
16122
16123 2002-07-30 Akim Demaille <akim@epita.fr>
16124
16125 Normalize conflict related messages.
16126
16127 * src/complain.h, src/complain.c (warn, complain): New.
16128 * src/conflicts.c (conflicts_print): Use them.
16129 (conflict_report_yacc): New, extracted from...
16130 (conflicts_print): here.
16131 * tests/conflicts.at, tests/existing.at: Adjust.
16132
16133 2002-07-30 Akim Demaille <akim@epita.fr>
16134
16135 Report rules which are never reduced by the parser: those hidden
16136 by conflicts.
16137
16138 * src/LR0.c (save_reductions): Don't make the final state too
16139 different: save its reduction (accept) instead of having a state
16140 without any action (no shift or goto, no reduce).
16141 Note: the final state is now a ``regular'' state, i.e., the
16142 parsers now contain `reduce 0' as default reduction.
16143 Nevertheless, since they decide to `accept' when yystate =
16144 final_state, they still will not reduce rule 0.
16145 * src/print.c (print_actions, print_reduction): Adjust.
16146 * src/output.c (action_row): Track reduced rules.
16147 (token_actions): Report rules never reduced.
16148 * tests/conflicts.at, tests/regression.at: Adjust.
16149
16150 2002-07-30 Akim Demaille <akim@epita.fr>
16151
16152 `stage' was accidently included in a previous patch.
16153 Initiate its autoconfiscation.
16154
16155 * configure.in: Look for malloc.h and sys/times.h.
16156 * src/main.c (stage): Adjust.
16157 Report only when trace_flag.
16158
16159 2002-07-29 Akim Demaille <akim@epita.fr>
16160
16161 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16162 state_number_t.
16163 (errs_t): symbol_t*, not symbol_number_t.
16164 (reductions_t): rule_t*, not rule_number_t.
16165 (FOR_EACH_SHIFT): New.
16166 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16167 * src/print.c, src/print_graph.c: Adjust.
16168
16169 2002-07-29 Akim Demaille <akim@epita.fr>
16170
16171 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16172
16173 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16174 (endtoken, accept): these.
16175 * src/reader.c (reader): Set endtoken's default tag to "$end".
16176 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16177 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16178 Adjust.
16179
16180 2002-07-29 Akim Demaille <akim@epita.fr>
16181
16182 * src/reduce.c (reduce_grammar): When the language is empty,
16183 complain about the start symbol, not the axiom.
16184 Use its location.
16185 * tests/reduce.at (Empty Language): New.
16186
16187 2002-07-26 Akim Demaille <akim@epita.fr>
16188
16189 * src/reader.h, src/reader.c (gram_error): ... can't get
16190 yycontrol without making too strong assumptions on the parser
16191 itself.
16192 * src/output.c (prepare_tokens): Use the real 0th value of
16193 token_translations instead of `0'.
16194 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16195 visible here.
16196 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16197 for the time being: %locations ought to provide it to yyerror.
16198
16199 2002-07-25 Akim Demaille <akim@epita.fr>
16200
16201 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16202 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16203 * tests/regression.at (Web2c Actions): Adjust.
16204
16205 2002-07-25 Akim Demaille <akim@epita.fr>
16206
16207 Stop storing rules from 1 to nrules + 1.
16208
16209 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16210 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16211 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16212 Iterate from 0 to nrules.
16213 Use rule_number_as_item_number and item_number_as_rule_number.
16214 Adjust to `derive' now containing possibly 0.
16215 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16216 Handle the `- 1' part in rule numbers from/to item numbers.
16217 * src/conflicts.c (log_resolution): Fix the message which reversed
16218 shift and reduce.
16219 * src/output.c (action_row): Initialize default_rule to -1.
16220 (token_actions): Adjust.
16221 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16222 expected output.
16223 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16224
16225 2002-07-25 Akim Demaille <akim@epita.fr>
16226
16227 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16228 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16229 (b4_c_knr_arg_decl): New.
16230 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16231 yyreport_parse_error.
16232
16233 2002-07-25 Akim Demaille <akim@epita.fr>
16234
16235 * data/yacc.c (yyreport_parse_error): New, extracted from...
16236 (yyparse): here.
16237 (yydestruct, yysymprint): Move above yyparse.
16238 Be K&R compliant.
16239
16240 2002-07-25 Akim Demaille <akim@epita.fr>
16241
16242 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16243 replace...
16244 (b4_sint_type, b4_uint_type): these.
16245 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16246 * tests/regression.at (Web2c Actions): Adjust.
16247
16248 2002-07-25 Akim Demaille <akim@epita.fr>
16249
16250 * src/gram.h (TIEM_NUMBER_MAX): New.
16251 (item_number_of_rule_number, rule_number_of_item_number): Rename
16252 as...
16253 (rule_number_as_item_number, item_number_as_rule_number): these.
16254 Adjust dependencies.
16255 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16256 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16257 (symbol_number_to_vector_number): New.
16258 (order): Of vector_number_t* type.
16259 (base_t, BASE_MAX, BASE_MIN): New.
16260 (froms, tos, width, pos, check): Of base_t type.
16261 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16262 (actrow): Of action_number_t type.
16263 (conflrow): Of unsigned int type.
16264 (table_ninf, base_ninf): New.
16265 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16266 (muscle_insert_int_table, muscle_insert_base_table)
16267 (muscle_insert_rule_number_table): New.
16268 (prepare_tokens): Output `toknum' as int_table.
16269 (action_row): Returns a rule_number_t.
16270 Use ACTION_MIN, not SHRT_MIN.
16271 (token_actions): yydefact is rule_number_t*.
16272 (table_ninf_remap): New.
16273 (pack_table): Use it for `base' and `table'.
16274 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16275 replaced with...
16276 (YYPACT_NINF, YYTABLE_NINF): these.
16277 (yypact, yytable): Compute their types instead of hard-coded
16278 `short'.
16279 * tests/regression.at (Web2c Actions): Adjust.
16280
16281 2002-07-19 Akim Demaille <akim@epita.fr>
16282
16283 * src/scan-gram.l (id): Can start with an underscore.
16284
16285 2002-07-16 Akim Demaille <akim@epita.fr>
16286
16287 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16288 Adjust all former `associativity' dependencies.
16289 * src/symtab.c (symbol_new): Default associativity is `undef', not
16290 `right'.
16291 (symbol_check_alias_consistence): Adjust.
16292
16293 2002-07-09 Akim Demaille <akim@epita.fr>
16294
16295 * doc/bison.texinfo: Properly set the ``header'' part.
16296 Use @dircategory ``GNU programming tools'' as per Texinfo's
16297 documentation.
16298 Use @copying.
16299
16300 2002-07-09 Akim Demaille <akim@epita.fr>
16301
16302 * lib/quotearg.h: Protect against multiple inclusions.
16303 * src/location.h (location_t): Add a `file' member.
16304 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16305 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16306 `error_one_per_line' support.
16307
16308 2002-07-09 Akim Demaille <akim@epita.fr>
16309
16310 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16311 * src/reader.c (lineno): Remove.
16312 Adjust all dependencies.
16313 (get_merge_function): Take a location and use complain_at.
16314 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16315 * tests/regression.at (Invalid inputs, Mixing %token styles):
16316 Adjust.
16317
16318 2002-07-09 Akim Demaille <akim@epita.fr>
16319
16320 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16321 recovery rule, and forbid extensions when --yacc.
16322 (gram_error): Use complain_at.
16323 * src/reader.c (reader): Exit if there were parse errors.
16324
16325 2002-07-09 Akim Demaille <akim@epita.fr>
16326
16327 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16328 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16329 Reported by R Blake <blakers@mac.com>.
16330
16331 2002-07-09 Akim Demaille <akim@epita.fr>
16332
16333 * data/yacc.c: Output the copyright notive in the header.
16334
16335 2002-07-03 Akim Demaille <akim@epita.fr>
16336
16337 * src/output.c (froms, tos): Are state_number_t.
16338 (save_column): sp, sp1, and sp2 are state_number_t.
16339 (prepare): Rename `final' as `final_state_number', `nnts' as
16340 `nterms_number', `nrules' as `rules_number', `nstates' as
16341 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16342 unused.
16343 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16344 * data/lalr1.cc (nsym_): Remove, unused.
16345
16346 2002-07-03 Akim Demaille <akim@epita.fr>
16347
16348 * src/lalr.h, src/lalr.c (goto_number_t): New.
16349 * src/lalr.c (goto_list_t): New.
16350 Propagate them.
16351 * src/nullable.c (rule_list_t): New.
16352 Propagate.
16353 * src/types.h: Remove.
16354
16355 2002-07-03 Akim Demaille <akim@epita.fr>
16356
16357 * src/closure.c (print_fderives): Use rule_rhs_print.
16358 * src/derives.c (print_derives): Use rule_rhs_print.
16359 (rule_list_t): New, replaces `shorts'.
16360 (set_derives): Add comments.
16361 * tests/sets.at (Nullable, Firsts): Adjust.
16362
16363 2002-07-03 Akim Demaille <akim@epita.fr>
16364
16365 * src/output.c (prepare_actions): Free `tally' and `width'.
16366 (prepare_actions): Allocate and free `order'.
16367 * src/symtab.c (symbols_free): Free `symbols'.
16368 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16369 * src/output.c (m4_invoke): Move to...
16370 * src/scan-skel.l: here.
16371 (<<EOF>>): Close yyout, and free its name.
16372
16373 2002-07-03 Akim Demaille <akim@epita.fr>
16374
16375 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16376
16377 * src/LR0.c (new_state): Merge into...
16378 (state_list_append): this.
16379 (new_states): Merge into...
16380 (generate_states): here.
16381 (set_states): Don't ensure a proper `errs' state member here, do it...
16382 * src/conflicts.c (conflicts_solve): here.
16383 * src/state.h, src/state.c: Comment changes.
16384 (state_t): Rename member `shifts' as `transitions'.
16385 Adjust all dependencies.
16386 (errs_new): For consistency, also take the values as argument.
16387 (errs_dup): Remove.
16388 (state_errs_set): New.
16389 (state_reductions_set, state_transitions_set): Assert that no
16390 previous value was assigned.
16391 (state_free): New.
16392 (states_free): Use it.
16393 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16394 temporary storage: use `errs' and `nerrs' as elsewhere.
16395 (set_conflicts): Allocate and free this `errs'.
16396
16397 2002-07-02 Akim Demaille <akim@epita.fr>
16398
16399 * lib/libiberty.h: New.
16400 * lib: Update the bitset implementation from upstream.
16401 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16402 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16403 * src/main.c: Adjust bitset stats calls.
16404
16405 2002-07-01 Paul Eggert <eggert@twinsun.com>
16406
16407 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16408 char, so that negative chars don't collide with $.
16409
16410 2002-06-30 Akim Demaille <akim@epita.fr>
16411
16412 Have the GLR tests be `warning' checked, and fix the warnings.
16413
16414 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16415 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16416 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16417 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16418 (yyaddDeferredAction): static.
16419 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16420 (yyreportParseError): yyprefix is const.
16421 yytokenp is used only when verbose.
16422 (yy__GNUC__): Replace with __GNUC__.
16423 (yypdumpstack): yyi is size_t.
16424 (yypreference): Un-yy local variables and arguments, to avoid
16425 clashes with `yyr1'. Anyway, we are not in the user name space.
16426 (yytname_size): be an int, as is compared with ints.
16427 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16428 Use them.
16429 * tests/cxx-gram.at: Use quotation to protect $1.
16430 Use AT_COMPILE to enable warnings hunts.
16431 Prototype yylex and yyerror.
16432 `Use' argc.
16433 Include `string.h', not `strings.h'.
16434 Produce and prototype stmtMerge only when used.
16435 yylex takes a location.
16436
16437 2002-06-30 Akim Demaille <akim@epita.fr>
16438
16439 We spend a lot of time in quotearg, in particular when --verbose.
16440
16441 * src/symtab.c (symbol_get): Store a quoted version of the key.
16442 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16443 Adjust all callers.
16444
16445 2002-06-30 Akim Demaille <akim@epita.fr>
16446
16447 * src/state.h (reductions_t): Rename member `nreds' as num.
16448 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16449 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16450
16451 2002-06-30 Akim Demaille <akim@epita.fr>
16452
16453 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16454 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16455 (shifts_to): Rename as...
16456 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16457 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16458 (TRANSITION_IS_DISABLED, transitions_to): these.
16459
16460 2002-06-30 Akim Demaille <akim@epita.fr>
16461
16462 * src/print.c (print_shifts, print_gotos): Merge into...
16463 (print_transitions): this.
16464 (print_transitions, print_errs, print_reductions): Align the
16465 lookaheads columns.
16466 (print_core, print_transitions, print_errs, print_state,
16467 print_grammar): Output empty lines separator before, not after.
16468 (state_default_rule_compute): Rename as...
16469 (state_default_rule): this.
16470 * tests/conflicts.at (Defaulted Conflicted Reduction),
16471 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16472 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16473
16474 2002-06-30 Akim Demaille <akim@epita.fr>
16475
16476 Display items as we display rules.
16477
16478 * src/gram.h, src/gram.c (rule_lhs_print): New.
16479 * src/gram.c (grammar_rules_partial_print): Use it.
16480 * src/print.c (print_core): Likewise.
16481 * tests/conflicts.at (Defaulted Conflicted Reduction),
16482 (Unresolved SR Conflicts): Adjust.
16483 (Unresolved SR Conflicts): Adjust and rename as...
16484 (Resolved SR Conflicts): this, as was meant.
16485 * tests/regression.at (Web2c Report): Adjust.
16486
16487 2002-06-30 Akim Demaille <akim@epita.fr>
16488
16489 * src/print.c (state_default_rule_compute): New, extracted from...
16490 (print_reductions): here.
16491 Pessimize, but clarify the code.
16492 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16493
16494 2002-06-30 Akim Demaille <akim@epita.fr>
16495
16496 * src/output.c (action_row): Let default_rule be always a rule
16497 number.
16498
16499 2002-06-30 Akim Demaille <akim@epita.fr>
16500
16501 * src/closure.c (print_firsts, print_fderives, closure):
16502 Use BITSET_EXECUTE.
16503 * src/lalr.c (lookaheads_print): Likewise.
16504 * src/state.c (state_rule_lookaheads_print): Likewise.
16505 * src/print_graph.c (print_core): Likewise.
16506 * src/print.c (print_reductions): Likewise.
16507 * src/output.c (action_row): Likewise.
16508 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16509
16510 2002-06-30 Akim Demaille <akim@epita.fr>
16511
16512 * src/print_graph.c: Use report_flag.
16513
16514 2002-06-30 Akim Demaille <akim@epita.fr>
16515
16516 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16517 to...
16518 * src/relation.h, src/relation.c (traverse, relation_digraph)
16519 (relation_print, relation_transpose): New.
16520
16521 2002-06-30 Akim Demaille <akim@epita.fr>
16522
16523 * src/state.h, src/state.c (shifts_to): New.
16524 * src/lalr.c (build_relations): Use it.
16525
16526 2002-06-30 Akim Demaille <akim@epita.fr>
16527
16528 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16529 (item_number_of_rule_number, rule_number_of_item_number): New.
16530 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16531 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16532 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16533 Propagate their use.
16534 Much remains to be done, in particular wrt `shorts' from types.h.
16535
16536 2002-06-30 Akim Demaille <akim@epita.fr>
16537
16538 * src/symtab.c (symbol_new): Initialize the `printer' member.
16539
16540 2002-06-30 Akim Demaille <akim@epita.fr>
16541
16542 * src/LR0.c (save_reductions): Remove, replaced by...
16543 * src/state.h, src/state.c (state_reductions_set): New.
16544 (reductions, errs): Rename as...
16545 (reductions_t, errs_t): these.
16546 Adjust all dependencies.
16547
16548 2002-06-30 Akim Demaille <akim@epita.fr>
16549
16550 * src/LR0.c (state_list_t, state_list_append): New.
16551 (first_state, last_state): Now symbol_list_t.
16552 (this_state): Remove.
16553 (new_itemsets, append_states, save_reductions): Take a state_t as
16554 argument.
16555 (set_states, generate_states): Adjust.
16556 (save_shifts): Remove, replaced by...
16557 * src/state.h, src/state.c (state_shifts_set): New.
16558 (shifts): Rename as...
16559 (shifts_t): this.
16560 Adjust all dependencies.
16561 * src/state.h (state_t): Remove the `next' member.
16562
16563 2002-06-30 Akim Demaille <akim@epita.fr>
16564
16565 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16566 escaped in slot 0.
16567
16568 2002-06-30 Akim Demaille <akim@epita.fr>
16569
16570 Use hash.h for the state hash table.
16571
16572 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16573 (allocate_storage): Use state_hash_new.
16574 (free_storage): Use state_hash_free.
16575 (new_state, get_state): Adjust.
16576 * src/lalr.h, src/lalr.c (states): Move to...
16577 * src/states.h (state_t): Remove the `link' member, no longer
16578 used.
16579 * src/states.h, src/states.c: here.
16580 (state_hash_new, state_hash_free, state_hash_lookup)
16581 (state_hash_insert, states_free): New.
16582 * src/states.c (state_table, state_compare, state_hash): New.
16583 * src/output.c (output_actions): Do not free states now, since we
16584 still need to know the final_state number in `prepare', called
16585 afterwards. Do it...
16586 * src/main.c (main): here: call states_free after `output'.
16587
16588 2002-06-30 Akim Demaille <akim@epita.fr>
16589
16590 * src/state.h, src/state.c (state_new): New, extracted from...
16591 * src/LR0.c (new_state): here.
16592 * src/state.h (STATE_ALLOC): Move to...
16593 * src/state.c: here.
16594 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16595 * src/state.h, src/state.c: here.
16596
16597 2002-06-30 Akim Demaille <akim@epita.fr>
16598
16599 * src/reader.c (gensym): Rename as...
16600 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16601 (getsym): Rename as...
16602 (symbol_get): this.
16603
16604 2002-06-30 Akim Demaille <akim@epita.fr>
16605
16606 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16607 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16608 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16609 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16610
16611 2002-06-30 Akim Demaille <akim@epita.fr>
16612
16613 Make the test suite pass with warnings checked.
16614
16615 * tests/actions.at (Printers and Destructors): Improve.
16616 Avoid unsigned vs. signed issues.
16617 * tests/calc.at: Don't exercise the scanner here, do it...
16618 * tests/input.at (Torturing the Scanner): here.
16619
16620 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16621
16622 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16623 reorganize first lines parallel to yacc.c.
16624
16625 2002-06-28 Akim Demaille <akim@epita.fr>
16626
16627 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16628 (b4_token_enum, b4_token_defines): New, factored from...
16629 * data/lalr1.cc, data/yacc.c, glr.c: here.
16630
16631 2002-06-28 Akim Demaille <akim@epita.fr>
16632
16633 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16634 unused variables.
16635 * src/output.c (merger_output): static.
16636
16637 2002-06-28 Akim Demaille <akim@epita.fr>
16638
16639 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16640 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16641 pacify GCC.
16642 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16643
16644 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16645
16646 Accumulated changelog for new GLR parsing features.
16647
16648 * src/conflicts.c (count_total_conflicts): Change name to
16649 conflicts_total_count.
16650 * src/conflicts.h: Ditto.
16651 * src/output.c (token_actions): Use the new name.
16652 (output_conflicts): Change conflp => conflict_list_heads, and
16653 confl => conflict_list for better readability.
16654 * data/glr.c: Use the new names.
16655 * NEWS: Add self to GLR announcement.
16656
16657 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16658
16659 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16660 Akim Demaille.
16661
16662 * data/bison.glr: Change name to glr.c
16663 * data/glr.c: Renamed from bison.glr.
16664 * data/Makefile.am: Add glr.c
16665
16666 * src/getargs.c:
16667
16668 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16669 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16670
16671 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16672
16673 * data/bison.glr: Be sure to restore the
16674 current #line when returning to the skeleton contents after having
16675 exposed the input file's #line.
16676
16677 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16678
16679 * data/bison.glr: Bring up to date with changes to bison.simple.
16680
16681 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16682
16683 * data/bison.glr: Correct definitions that use b4_prefix.
16684 Various reformatting.
16685 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16686 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16687 yytokenp argument; now part of stack.
16688 (yychar): Define to behave as documented.
16689 (yyclearin): Ditto.
16690
16691 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16692
16693 * src/reader.h: Add declaration for free_merger_functions.
16694
16695 * src/reader.c (merge_functions): New variable.
16696 (get_merge_function): New function.
16697 (free_merger_functions): New function.
16698 (readgram): Check for %prec that is not followed by a symbol.
16699 Handle %dprec and %merge declarations.
16700 (packgram): Initialize dprec and merger fields in rules array.
16701
16702 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16703 conflict_list_cnt, conflict_list_free): New variables.
16704 (table_grow): Also grow conflict_table.
16705 (prepare_rules): Output dprec and merger tables.
16706 (conflict_row): New function.
16707 (action_row): Output conflict lists for GLR parser. Don't use
16708 default reduction in conflicted states for GLR parser so that there
16709 are spaces for the conflict lists.
16710 (save_row): Also save conflict information.
16711 (token_actions): Allocate conflict list.
16712 (merger_output): New function.
16713 (pack_vector): Pack conflict table, too.
16714 (output_conflicts): New function to output yyconflp and yyconfl.
16715 (output_check): Allocate conflict_tos.
16716 (output_actions): Output conflict tables, also.
16717 (output_skeleton): Output b4_mergers definition.
16718 (prepare): Output b4_max_rhs_length definition.
16719 Use 'bison.glr' as default skeleton for GLR parsers.
16720
16721 * src/gram.c (glr_parser): New flag.
16722 (grammar_free): Call free_merger_functions.
16723
16724 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16725 all pairs of conflicting reductions, rather than just all tokens
16726 causing conflicts. Needed to size conflict tables.
16727 (conflicts_output): Modify call to count_rr_conflicts for new
16728 interface.
16729 (conflicts_print): Ditto.
16730 (count_total_conflicts): New function.
16731
16732 * src/reader.h (merger_list): New type.
16733 (merge_functions): New variable.
16734
16735 * src/lex.h (tok_dprec, tok_merge): New token types.
16736
16737 * src/gram.h (rule_s): Add dprec and merger fields.
16738 (glr_parser): New flag.
16739
16740 * src/conflicts.h (count_total_conflicts): New function.
16741
16742 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16743
16744 * doc/bison.texinfo (Generalized LR Parsing): New section.
16745 (GLR Parsers): New section.
16746 (Language and Grammar): Mention GLR parsing.
16747 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16748 Correct typo ("tge" -> "the").
16749
16750 * data/bison.glr: New skeleton for GLR parsing.
16751
16752 * tests/cxx-gram.at: New tests for GLR parsing.
16753
16754 * tests/testsuite.at: Include cxx-gram.at.
16755
16756 * tests/Makefile.am: Add cxx-gram.at.
16757
16758 * src/parse-gram.y:
16759
16760 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16761
16762 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16763
16764 2002-06-27 Akim Demaille <akim@epita.fr>
16765
16766 * src/options.h, src/options.c: Remove.
16767 * src/getargs.c (short_options, long_options): New.
16768
16769 2002-06-27 Akim Demaille <akim@epita.fr>
16770
16771 * data/bison.simple, data/bison.c++: Rename as...
16772 * data/yacc.c, data/lalr1.cc: these.
16773 * doc/bison.texinfo (Environment Variables): Remove.
16774
16775 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16776
16777 * src/getargs.c (report_argmatch): Initialize strtok().
16778
16779 2002-06-20 Akim Demaille <akim@epita.fr>
16780
16781 * data/bison.simple (b4_symbol_actions): New, replaces...
16782 (b4_symbol_destructor, b4_symbol_printer): these.
16783 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16784 user token numbers.
16785
16786 2002-06-20 Akim Demaille <akim@epita.fr>
16787
16788 * data/bison.simple (yydestructor): Rename as...
16789 (yydestruct): this.
16790
16791 2002-06-20 Akim Demaille <akim@epita.fr>
16792
16793 * src/symtab.h, src/symtab.c (symbol_type_set)
16794 (symbol_destructor_set, symbol_precedence_set): The location is
16795 the last argument.
16796 Adjust all callers.
16797
16798 2002-06-20 Akim Demaille <akim@epita.fr>
16799
16800 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16801 internals.
16802 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16803 Takes a location.
16804 * src/symtab.h, src/symtab.c (symbol_class_set)
16805 (symbol_user_token_number_set): Likewise.
16806 Adjust all callers.
16807 Promote complain_at.
16808 * tests/input.at (Type Clashes): Adjust.
16809
16810 2002-06-20 Akim Demaille <akim@epita.fr>
16811
16812 * data/bison.simple (YYLEX): Fix the declaration when
16813 %pure-parser.
16814
16815 2002-06-20 Akim Demaille <akim@epita.fr>
16816
16817 * data/bison.simple (yysymprint): Don't print the token number,
16818 just its name.
16819 * tests/actions.at (Destructors): Rename as...
16820 (Printers and Destructors): this.
16821 Also exercise %printer.
16822
16823 2002-06-20 Akim Demaille <akim@epita.fr>
16824
16825 * data/bison.simple (YYDSYMPRINT): New.
16826 Use it to remove many of the #if YYDEBUG/if (yydebug).
16827
16828 2002-06-20 Akim Demaille <akim@epita.fr>
16829
16830 * src/symtab.h, src/symtab.c (symbol_t): printer and
16831 printer_location are new members.
16832 (symbol_printer_set): New.
16833 * src/parse-gram.y (PERCENT_PRINTER): New token.
16834 Handle its associated rule.
16835 * src/scan-gram.l: Adjust.
16836 (handle_destructor_at, handle_destructor_dollar): Rename as...
16837 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16838 * src/output.c (symbol_printers_output): New.
16839 (output_skeleton): Call it.
16840 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16841 since there are already many grammar files with a user `yyprint'.
16842 Replace the calls to YYPRINT to calls to yysymprint.
16843 * tests/calc.at: Adjust.
16844 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16845 taking advantage of parser very internal details (stack size!).
16846
16847 2002-06-20 Akim Demaille <akim@epita.fr>
16848
16849 * src/scan-gram.l: Complete the scanner with the missing patterns
16850 to pacify Flex.
16851 Use `quote' and `symbol_tag_get' where appropriate.
16852
16853 2002-06-19 Akim Demaille <akim@epita.fr>
16854
16855 * tests/actions.at (Destructors): Augment to test locations.
16856 * data/bison.simple (yydestructor): Pass it the current location
16857 if locations are enabled.
16858 Prototype only when __STDC__ or C++.
16859 Change the argument names to move into the yy name space: there is
16860 user code here.
16861
16862 2002-06-19 Akim Demaille <akim@epita.fr>
16863
16864 * data/bison.simple (b4_pure_if): New.
16865 Use it instead of #ifdef YYPURE.
16866
16867 2002-06-19 Akim Demaille <akim@epita.fr>
16868
16869 * data/bison.simple (b4_location_if): New.
16870 Use it instead of #ifdef YYLSP_NEEDED.
16871
16872 2002-06-19 Akim Demaille <akim@epita.fr>
16873
16874 Prepare @$ in %destructor, but currently don't bind it in the
16875 skeleton, as %location use is not cleaned up yet.
16876
16877 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16878 (handle_action_at): New.
16879 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16880 a braced_code_t and a location as additional arguments.
16881 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16882 unquote one when outputting `b4_dollar_dollar'.
16883 Adjust callers.
16884 * data/bison.simple (b4_eval): Remove.
16885 (b4_symbol_destructor): Adjust.
16886 * tests/input.at (Invalid @n): Adjust.
16887
16888 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16889
16890 * doc/bison.texinfo: Document ability to have multiple
16891 prologue sections.
16892
16893 2002-06-18 Akim Demaille <akim@epita.fr>
16894
16895 * src/files.c (compute_base_names): When computing the output file
16896 names from the input file name, strip the directory part.
16897
16898 2002-06-18 Akim Demaille <akim@epita.fr>
16899
16900 * data/bison.simple.new: Comment changes.
16901 Reported by Andreas Schwab.
16902
16903 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16904
16905 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16906 there are no `label `yyoverflowlab' defined but not used' warnings
16907 when yyoverflow is defined.
16908
16909 2002-06-18 Akim Demaille <akim@epita.fr>
16910
16911 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16912 new member.
16913 (symbol_destructor_set): Adjust.
16914 * src/output.c (symbol_destructors_output): Output the destructor
16915 locations.
16916 Output the symbol name.
16917 * data/bison.simple (b4_symbol_destructor): Adjust.
16918
16919 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16920 and Akim Demaille <akim@epita.fr>
16921
16922 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16923 what's left on the stack when the error recovery hits EOF.
16924 * tests/actions.at (Destructors): Complete to exercise this case.
16925
16926 2002-06-17 Akim Demaille <akim@epita.fr>
16927
16928 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16929 arguments is really empty, not only equal to `[]'.
16930 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16931 member.
16932 (symbol_destructor_set): New.
16933 * src/output.c (symbol_destructors_output): New.
16934 * src/reader.h (brace_code_t, current_braced_code): New.
16935 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16936 (handle_dollar): Rename as...
16937 (handle_action_dollar): this.
16938 (handle_destructor_dollar): New.
16939 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16940 (grammar_declaration): Use it.
16941 * data/bison.simple (yystos): Is always defined.
16942 (yydestructor): New.
16943 * tests/actions.at (Destructors): New.
16944 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16945
16946 2002-06-17 Akim Demaille <akim@epita.fr>
16947
16948 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16949 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16950 rule_length only when needed.
16951 * src/output.c (actions_output, token_definitions_output): Output
16952 the full M4 block.
16953 * src/symtab.c: Don't access directly to the symbol tag, use
16954 symbol_tag_get.
16955 * src/parse-gram.y: Use symbol_list_free.
16956
16957 2002-06-17 Akim Demaille <akim@epita.fr>
16958
16959 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16960 (symbol_list_prepend, get_type_name): Move to...
16961 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16962 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16963 Adjust all callers.
16964 (symbol_list_free): New.
16965 * src/scan-gram.l (handle_dollar): Takes a location.
16966 * tests/input.at (Invalid $n): Adjust.
16967
16968 2002-06-17 Akim Demaille <akim@epita.fr>
16969
16970 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16971 (symbol_list_prepend): New.
16972 * src/parse-gram.y (%union): `list' is a new member.
16973 (symbols.1): New, replaces...
16974 (terms_to_prec.1, nterms_to_type.1): these.
16975 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16976 Take a location as additional argument.
16977 Adjust all callers.
16978
16979 2002-06-15 Akim Demaille <akim@epita.fr>
16980
16981 * src/parse-gram.y: Move %token in the declaration section so that
16982 we don't depend upon CVS Bison.
16983
16984 2002-06-15 Akim Demaille <akim@epita.fr>
16985
16986 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16987 * src/print.c (print_core): Use it.
16988
16989 2002-06-15 Akim Demaille <akim@epita.fr>
16990
16991 * src/conflicts.c (log_resolution): Accept the rule involved in
16992 the sr conflicts instead of the lookahead number that points to
16993 that rule.
16994 (flush_reduce): Accept the current lookahead vector as argument,
16995 instead of the index in LA.
16996 (resolve_sr_conflict): Accept the current number of lookahead
16997 bitset to consider for the STATE, instead of the index in LA.
16998 (set_conflicts): Adjust.
16999 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17000
17001 2002-06-15 Akim Demaille <akim@epita.fr>
17002
17003 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17004 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17005 Adjust all dependencies.
17006 * src/lalr.c (initialize_lookaheads): Split into...
17007 (states_lookaheads_count, states_lookaheads_initialize): these.
17008 (lalr): Adjust.
17009
17010 2002-06-15 Akim Demaille <akim@epita.fr>
17011
17012 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17013 out of...
17014 (grammar_rules_print): here.
17015 * src/reduce.c (reduce_output): Use it.
17016 * tests/reduce.at (Useless Rules, Reduced Automaton)
17017 (Underivable Rules): Adjust.
17018
17019 2002-06-15 Akim Demaille <akim@epita.fr>
17020
17021 Copy BYacc's nice way to report the grammar.
17022
17023 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17024 New.
17025 Don't print the rules' location, it is confusing and useless.
17026 (rule_print): Use grammar_rhs_print.
17027 * src/print.c (print_grammar): Use grammar_rules_print.
17028
17029 2002-06-15 Akim Demaille <akim@epita.fr>
17030
17031 Complete and rationalize `useless thing' warnings.
17032
17033 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17034 (symbol_tag_print): New.
17035 Use them everywhere in place of accessing directly the tag member.
17036 * src/gram.h, src/gram.c (rule_print): New.
17037 Use it where a rule used to be printed `by hand'.
17038 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17039 (reduce_grammar_tables): Report the useless rules.
17040 (reduce_print): Useless things are a warning, not an error.
17041 Report it as such.
17042 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17043 (Reduced Automaton, Underivable Rules): Adjust.
17044 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17045 * tests/conflicts.at (Unresolved SR Conflicts)
17046 (Solved SR Conflicts): Adjust.
17047
17048 2002-06-15 Akim Demaille <akim@epita.fr>
17049
17050 Let symbols have a location.
17051
17052 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17053 (getsym): Adjust.
17054 Adjust all callers.
17055 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17056 Use location_t, not int.
17057 * src/symtab.c (symbol_check_defined): Take advantage of the
17058 location.
17059 * tests/regression.at (Invalid inputs): Adjust.
17060
17061 2002-06-15 Akim Demaille <akim@epita.fr>
17062
17063 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17064 (input): Don't try to initialize yylloc here, do it in the
17065 scanner.
17066 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17067 * src/gram.h (rule_t): Change line and action_line into location
17068 and action_location, of location_t type.
17069 Adjust all dependencies.
17070 * src/location.h, src/location.c (empty_location): New.
17071 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17072 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17073 (grammar_current_rule_symbol_append)
17074 (grammar_current_rule_action_append): Expect a location as argument.
17075 * src/reader.c (grammar_midrule_action): Adjust to attach an
17076 action's location as dummy symbol location.
17077 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17078 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17079 the line numbers.
17080
17081 2002-06-14 Akim Demaille <akim@epita.fr>
17082
17083 Grammar declarations may be found in the grammar section.
17084
17085 * src/parse-gram.y (rules_or_grammar_declaration): New.
17086 (declarations): Each declaration may end with a semicolon, not
17087 just...
17088 (grammar_declaration): `"%union"'.
17089 (grammar): Branch to rules_or_grammar_declaration.
17090
17091 2002-06-14 Akim Demaille <akim@epita.fr>
17092
17093 * src/main.c (main): Invoke scanner_free.
17094
17095 2002-06-14 Akim Demaille <akim@epita.fr>
17096
17097 * src/output.c (m4_invoke): Extracted from...
17098 (output_skeleton): here.
17099 Free tempfile.
17100
17101 2002-06-14 Akim Demaille <akim@epita.fr>
17102
17103 * src/parse-gram.y (directives, directive, gram)
17104 (grammar_directives, precedence_directives, precedence_directive):
17105 Rename as...
17106 (declarations, declaration, grammar, grammar_declaration)
17107 (precedence_declaration, precedence_declarator): these.
17108 (symbol_declaration): New.
17109
17110 2002-06-14 Akim Demaille <akim@epita.fr>
17111
17112 * src/files.c (action_obstack): Remove, unused.
17113 (output_obstack): Remove it, and all its dependencies, as it is no
17114 longer needed.
17115 * src/reader.c (epilogue_set): Build the epilogue in the
17116 muscle_obstack.
17117 * src/output.h, src/output.c (muscle_obstack): Move to...
17118 * src/muscle_tab.h, src/muscle_tab.h: here.
17119 (muscle_init): Initialize muscle_obstack.
17120 (muscle_free): New.
17121 * src/main.c (main): Call it.
17122
17123 2002-06-14 Akim Demaille <akim@epita.fr>
17124
17125 * src/location.h: New, extracted from...
17126 * src/reader.h: here.
17127 * src/Makefile.am (noinst_HEADERS): Merge into
17128 (bison_SOURCES): this.
17129 Add location.h.
17130 * src/parse-gram.y: Use location_t instead of Bison's.
17131 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17132 Use location_t instead of ints.
17133
17134 2002-06-14 Akim Demaille <akim@epita.fr>
17135
17136 * data/bison.simple, data/bison.c++: Be sure to restore the
17137 current #line when returning to the skeleton contents after having
17138 exposed the input file's #line.
17139
17140 2002-06-12 Akim Demaille <akim@epita.fr>
17141
17142 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17143 eager.
17144 * tests/actions.at (Exotic Dollars): New.
17145
17146 2002-06-12 Akim Demaille <akim@epita.fr>
17147
17148 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17149 ['"/] too eagerly.
17150 * tests/input.at (Torturing the Scanner): New.
17151
17152 2002-06-11 Akim Demaille <akim@epita.fr>
17153
17154 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17155 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17156 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17157 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17158 * src/reader.c (reader): Use it.
17159
17160 2002-06-11 Akim Demaille <akim@epita.fr>
17161
17162 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17163 Adjust all callers.
17164 (scanner_last_string_free): New.
17165
17166 2002-06-11 Akim Demaille <akim@epita.fr>
17167
17168 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17169 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17170 (last_string, YY_OBS_FREE): New.
17171 Use them when returning an ID.
17172
17173 2002-06-11 Akim Demaille <akim@epita.fr>
17174
17175 Have Bison grammars parsed by a Bison grammar.
17176
17177 * src/reader.c, src/reader.h (prologue_augment): New.
17178 * src/reader.c (copy_definition): Remove.
17179
17180 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17181 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17182 (grammar_current_rule_prec_set, grammar_current_rule_check)
17183 (grammar_current_rule_symbol_append)
17184 (grammar_current_rule_action_append): Export.
17185 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17186 (symbol_list_action_append): Remove.
17187 Hook the routines from reader.
17188 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17189 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17190
17191 * src/reader.c (read_declarations): Remove, unused.
17192
17193 * src/parse-gram.y: Handle the epilogue.
17194 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17195 (grammar_start_symbol_set): this.
17196 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17197 * src/reader.c (readgram): Remove, unused.
17198 (reader): Adjust to insert eoftoken and axiom where appropriate.
17199
17200 * src/reader.c (copy_dollar): Replace with...
17201 * src/scan-gram.h (handle_dollar): this.
17202 * src/parse-gram.y: Remove `%thong'.
17203
17204 * src/reader.c (copy_at): Replace with...
17205 * src/scan-gram.h (handle_at): this.
17206
17207 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17208 New.
17209
17210 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17211 time being.
17212
17213 * src/reader.h, src/reader.c (grammar_rule_end): New.
17214
17215 * src/parse.y (current_type, current_class): New.
17216 Implement `%nterm', `%token' support.
17217 Merge `%term' into `%token'.
17218 (string_as_id): New.
17219 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17220 type name.
17221
17222 * src/parse-gram.y: Be sure to handle properly the beginning of
17223 rules.
17224
17225 * src/parse-gram.y: Handle %type.
17226 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17227
17228 * src/parse-gram.y: More directives support.
17229 * src/options.c: No longer handle source directives.
17230
17231 * src/parse-gram.y: Fix %output.
17232
17233 * src/parse-gram.y: Handle %union.
17234 Use the prologue locations.
17235 * src/reader.c (parse_union_decl): Remove.
17236
17237 * src/reader.h, src/reader.c (epilogue_set): New.
17238 * src/parse-gram.y: Use it.
17239
17240 * data/bison.simple, data/bison.c++: b4_stype is now either not
17241 defined, then default to int, or to the contents of %union,
17242 without `union' itself.
17243 Adjust.
17244 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17245
17246 * src/output.c (actions_output): Don't output braces, as they are
17247 already handled by the scanner.
17248
17249 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17250 characters to themselves.
17251
17252 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17253 that the epilogue has a proper #line.
17254
17255 * src/parse-gram.y: Handle precedence/associativity.
17256
17257 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17258 a terminal.
17259 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17260 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17261 at all to define terminals that cannot be emitted.
17262
17263 * src/scan-gram.l: Escape M4 characters.
17264
17265 * src/scan-gram.l: Working properly with escapes in user
17266 strings/characters.
17267
17268 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17269 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17270 grammar.
17271 Use more modest sizes, as for the time being the parser does not
17272 release memory, and therefore the process swallows a huge amount
17273 of memory.
17274
17275 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17276 stricter %token grammar.
17277
17278 * src/symtab.h (associativity): Add `undef_assoc'.
17279 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17280 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17281
17282 * tests/regression.at (Invalid %directive): Remove, as it is now
17283 meaningless.
17284 (Invalid inputs): Adjust to the new error messages.
17285 (Token definitions): The new grammar doesn't allow too many
17286 eccentricities.
17287
17288 * src/lex.h, src/lex.c: Remove.
17289 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17290 (copy_character, copy_string2, copy_string, copy_identifier)
17291 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17292 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17293 (parse_action): Remove.
17294 * po/POTFILES.in: Adjust.
17295
17296 2002-06-11 Akim Demaille <akim@epita.fr>
17297
17298 * src/reader.c (parse_action): Don't store directly into the
17299 rule's action member: return the action as a string.
17300 Don't require `rule_length' as an argument: compute it.
17301 (grammar_current_rule_symbol_append)
17302 (grammar_current_rule_action_append): New, eved out from
17303 (readgram): here.
17304 Remove `action_flag', `rulelength', unused now.
17305
17306 2002-06-11 Akim Demaille <akim@epita.fr>
17307
17308 * src/reader.c (grammar_current_rule_prec_set).
17309 (grammar_current_rule_check): New, eved out from...
17310 (readgram): here.
17311 Remove `xaction', `first_rhs': useless.
17312 * tests/input.at (Type clashes): New.
17313 * tests/existing.at (GNU Cim Grammar): Adjust.
17314
17315 2002-06-11 Akim Demaille <akim@epita.fr>
17316
17317 * src/reader.c (grammar_midrule_action): New, Eved out from
17318 (readgram): here.
17319
17320 2002-06-11 Akim Demaille <akim@epita.fr>
17321
17322 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17323 New.
17324 (readgram): Use them as replacement of inlined code, crule and
17325 crule1.
17326
17327 2002-06-11 Akim Demaille <akim@epita.fr>
17328
17329 * src/reader.c (grammar_end, grammar_symbol_append): New.
17330 (readgram): Use them.
17331 Make the use of `p' as local as possible.
17332
17333 2002-06-10 Akim Demaille <akim@epita.fr>
17334
17335 GCJ's parser requires the tokens to be defined before the prologue.
17336
17337 * data/bison.simple: Output the token definition before the user's
17338 prologue.
17339 * tests/regression.at (Braces parsing, Duplicate string)
17340 (Mixing %token styles): Check the output from bison.
17341 (Early token definitions): New.
17342
17343 2002-06-10 Akim Demaille <akim@epita.fr>
17344
17345 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17346 assigning twice the same user number to a token, so that we can
17347 use it in...
17348 * src/lex.c (lex): here.
17349 Also use `symbol_class_set' instead of hand written code.
17350 * src/reader.c (parse_assoc_decl): Likewise.
17351
17352 2002-06-10 Akim Demaille <akim@epita.fr>
17353
17354 * src/symtab.c, src/symtab.c (symbol_class_set)
17355 (symbol_user_token_number_set): New.
17356 * src/reader.c (parse_token_decl): Use them.
17357 Use a switch instead of ifs.
17358 Use a single argument.
17359
17360 2002-06-10 Akim Demaille <akim@epita.fr>
17361
17362 Remove `%thong' support as it is undocumented, unused, duplicates
17363 `%token's job, and creates useless e-mail traffic with people who
17364 want to know what it is, why it is undocumented, unused, and
17365 duplicates `%token's job.
17366
17367 * src/reader.c (parse_thong_decl): Remove.
17368 * src/options.c (option_table): Remove "thong".
17369 * src/lex.h (tok_thong): Remove.
17370
17371 2002-06-10 Akim Demaille <akim@epita.fr>
17372
17373 * src/symtab.c, src/symtab.c (symbol_type_set)
17374 (symbol_precedence_set): New.
17375 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17376 (value_components_used): Remove, unused.
17377
17378 2002-06-09 Akim Demaille <akim@epita.fr>
17379
17380 Move symbols handling code out of the reader.
17381
17382 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17383 (axiom): Move to...
17384 * src/symtab.h, src/symtab.c: here.
17385
17386 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17387 * src/reader.c (startval): Rename as...
17388 * src/symtab.h, src/symtab.c (startsymbol): this.
17389 * src/reader.c: Adjust.
17390
17391 * src/reader.c (symbol_check_defined, symbol_make_alias)
17392 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17393 (token_translations_init)
17394 Move to...
17395 * src/symtab.c: here.
17396 * src/reader.c (packsymbols): Move to...
17397 * src/symtab.h, src/symtab.c (symbols_pack): here.
17398 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17399 argument.
17400
17401 2002-06-03 Akim Demaille <akim@epita.fr>
17402
17403 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17404 then statements.
17405
17406 2002-06-03 Akim Demaille <akim@epita.fr>
17407
17408 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17409 structs with non literals.
17410 * src/scan-skel.l: never-interactive.
17411 * src/conflicts.c (enum conflict_resolution_e): No trailing
17412 comma.
17413 * src/getargs.c (usage): Split long literal strings.
17414 Reported by Hans Aberg.
17415
17416 2002-05-28 Akim Demaille <akim@epita.fr>
17417
17418 * data/bison.c++: Use C++ ostreams.
17419 (cdebug_): New member.
17420
17421 2002-05-28 Akim Demaille <akim@epita.fr>
17422
17423 * src/output.c (output_skeleton): Be sure to allocate enough room
17424 for `/' _and_ for `\0' in full_skeleton.
17425
17426 2002-05-28 Akim Demaille <akim@epita.fr>
17427
17428 * data/bison.c++: Catch up with bison.simple:
17429 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17430 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17431 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17432 and popping traces.
17433
17434 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17435
17436 * src/output.c (output_skeleton): Put an explicit path in front of
17437 the skeleton file name, rather than relying on the -I directory,
17438 to partially alleviate effects of having a skeleton file lying around
17439 in the current directory.
17440
17441 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17442
17443 * src/conflicts.c (log_resolution): Correct typo:
17444 obstack_printf should be obstack_fgrow1.
17445
17446 2002-05-26 Akim Demaille <akim@epita.fr>
17447
17448 * src/state.h (state_t): `solved_conflicts' is a new member.
17449 * src/LR0.c (new_state): Set it to 0.
17450 * src/conflicts.h, src/conflicts.c (print_conflicts)
17451 (free_conflicts, solve_conflicts): Rename as...
17452 (conflicts_print, conflicts_free, conflicts_solve): these.
17453 Adjust callers.
17454 * src/conflicts.c (enum conflict_resolution_e)
17455 (solved_conflicts_obstack): New, used by...
17456 (log_resolution): this.
17457 Adjust to attach the conflict resolution to each state.
17458 Complete the description with the precedence/associativity
17459 information.
17460 (resolve_sr_conflict): Adjust.
17461 * src/print.c (print_state): Output its solved_conflicts.
17462 * tests/conflicts.at (Unresolved SR Conflicts)
17463 (Solved SR Conflicts): Exercise --report=all.
17464
17465 2002-05-26 Akim Demaille <akim@epita.fr>
17466
17467 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17468 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17469 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17470 (token_number_t, item_number_as_token_number)
17471 (token_number_as_item_number, muscle_insert_token_number_table):
17472 Rename as...
17473 (symbol_number_t, item_number_as_symbol_number)
17474 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17475 these, since it is more appropriate.
17476
17477 2002-05-26 Akim Demaille <akim@epita.fr>
17478
17479 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17480 `Error:' lines.
17481 * data/bison.simple (yystos) [YYDEBUG]: New.
17482 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17483 error recovery.
17484 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17485
17486 2002-05-25 Akim Demaille <akim@epita.fr>
17487
17488 * doc/bison.texinfo (Debugging): Split into...
17489 (Tracing): this new section, its former contents, and...
17490 (Understanding): this new section.
17491 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17492 by...
17493 (report_flag): this.
17494 Adjust all dependencies.
17495 (report_args, report_types, report_argmatch): New.
17496 (usage, getargs): Report/support -r, --report.
17497 * src/options.h
17498 (struct option_table_struct): Rename as..,
17499 (struct option_table_s): this.
17500 Rename the `set_flag' member to `flag' to match with getopt_long's
17501 struct.
17502 * src/options.c (option_table): Split verbose into an entry for
17503 %verbose, and another for --verbose.
17504 Support --report/-r, so remove -r from the obsolete --raw.
17505 * src/print.c: Attach full item sets and lookaheads reports to
17506 report_flag instead of trace_flag.
17507 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17508
17509 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17510 and Paul Eggert <eggert@twinsun.com>
17511
17512 * data/bison.simple (yyparse): Correct error handling to conform to
17513 POSIX and yacc. Specifically, after syntax error is discovered,
17514 do not reduce further before shifting the error token.
17515 Clean up the code a bit by removing the labels yyerrdefault,
17516 yyerrhandle, yyerrpop.
17517 * NEWS: Document the above.
17518
17519 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17520
17521 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17522 type; it isn't always big enough, since it doesn't necessarily
17523 include non-terminals.
17524 (yytranslate): Expand definition of yy_token_number_type, so that
17525 the latter can be removed.
17526 (yy_token_number_type): Remove, only one use.
17527 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17528 don't use TokenNumberType as element type.
17529
17530 * tests/regression.at: Modify expected output to agree with change
17531 to yyr1 and yytranslate.
17532
17533 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17534
17535 * src/reader.c (parse_action): Use copy_character instead of
17536 obstack_1grow.
17537
17538 2002-05-13 Akim Demaille <akim@epita.fr>
17539
17540 * tests/regression.at (Token definitions): Prototype yylex and
17541 yyerror.
17542
17543 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17544
17545 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17546 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17547 32-bit arithmetic.
17548 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17549
17550 2002-05-07 Akim Demaille <akim@epita.fr>
17551
17552 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17553 avoid GCC warnings.
17554
17555 2002-05-07 Akim Demaille <akim@epita.fr>
17556
17557 Kill GCC warnings.
17558
17559 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17560 over the RHS of each rule.
17561 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17562 * src/state.h (state_t): Member `nitems' is unsigned short.
17563 * src/LR0.c (get_state): Adjust.
17564 * src/reader.c (packgram): Likewise.
17565 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17566 `Type'.
17567 (muscle_insert_int_table): Remove, unused.
17568 (prepare_rules): Remove `max'.
17569
17570 2002-05-06 Akim Demaille <akim@epita.fr>
17571
17572 * src/closure.c (print_firsts): Display of the symbol tags.
17573 (bitmatrix_print): Move to...
17574 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17575 here.
17576 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17577
17578 2002-05-06 Akim Demaille <akim@epita.fr>
17579
17580 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17581 hash_do_for_each.
17582
17583 2002-05-06 Akim Demaille <akim@epita.fr>
17584
17585 * src/LR0.c (new_state, get_state): Instead of using the global
17586 `kernel_size' and `kernel_base', have two new arguments:
17587 `core_size' and `core'.
17588 Adjust callers.
17589
17590 2002-05-06 Akim Demaille <akim@epita.fr>
17591
17592 * src/reader.c (packgram): No longer end `ritem' with a 0
17593 sentinel: it is not used.
17594
17595 2002-05-05 Akim Demaille <akim@epita.fr>
17596
17597 New experimental feature: display the lookaheads in the report and
17598 graph.
17599
17600 * src/print (print_core): When --trace-flag, display the rules
17601 lookaheads.
17602 * src/print_graph.c (print_core): Likewise.
17603 Swap the arguments.
17604 Adjust caller.
17605
17606 2002-05-05 Akim Demaille <akim@epita.fr>
17607
17608 * tests/torture.at (Many lookaheads): New test.
17609
17610 2002-05-05 Akim Demaille <akim@epita.fr>
17611
17612 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17613 (GENERATE_MUSCLE_INSERT_TABLE): this.
17614 (output_int_table, output_unsigned_int_table, output_short_table)
17615 (output_token_number_table, output_item_number_table): Replace with...
17616 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17617 (muscle_insert_short_table, muscle_insert_token_number_table)
17618 (muscle_insert_item_number_table): these.
17619 Adjust all callers.
17620 (prepare_tokens): Don't free `translations', since...
17621 * src/reader.h, src/reader.c (grammar_free): do it.
17622 Move to...
17623 * src/gram.h, src/gram.c (grammar_free): here.
17624 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17625 b4_translate_max.
17626
17627 2002-05-05 Akim Demaille <akim@epita.fr>
17628
17629 * src/output.c (output_unsigned_int_table): New.
17630 (prepare_rules): `i' is unsigned.
17631 `prhs', `rline', `r2' are unsigned int.
17632 Rename muscle `rhs_number_max' as `rhs_max'.
17633 Output muscles `prhs_max', `rline_max', and `r2_max'.
17634 Free rline and r1.
17635 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17636 to compute types instead of constant types.
17637 * tests/regression.at (Web2c Actions): Adjust.
17638
17639 2002-05-04 Akim Demaille <akim@epita.fr>
17640
17641 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17642 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17643 Adjust dependencies.
17644 * src/output.c (token_definitions_output): Be sure not to output a
17645 `#define 'a'' when fed with `%token 'a' "a"'.
17646 * tests/regression.at (Token definitions): New.
17647
17648 2002-05-03 Paul Eggert <eggert@twinsun.com>
17649
17650 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17651 for K&R C.
17652
17653 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17654
17655 * Makefile.am (SUBDIRS): Remove intl.
17656 (EXTRA_DIST): Add config/config.rpath.
17657
17658 2002-05-03 Akim Demaille <akim@epita.fr>
17659
17660 * data/bison.simple (m4_if): Don't output empty enums.
17661 And actually, output valid enum definitions :(.
17662
17663 2002-05-03 Akim Demaille <akim@epita.fr>
17664
17665 * configure.bat: Remove, completely obsolete.
17666 * Makefile.am (EXTRA_DIST): Adjust.
17667 Don't distribute config.rpath...
17668 * config/Makefile.am (EXTRA_DIST): Do it.
17669
17670 2002-05-03 Akim Demaille <akim@epita.fr>
17671
17672 * configure.in (GETTEXT_VERSION): New.
17673 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17674
17675 2002-05-03 Akim Demaille <akim@epita.fr>
17676
17677 * data/bison.simple (b4_token_enum): New.
17678 (b4_token_defines): Use it to output tokens both as #define and
17679 enums.
17680 Suggested by Paul Eggert.
17681 * src/output.c (token_definitions_output): Don't output spurious
17682 white spaces.
17683
17684 2002-05-03 Akim Demaille <akim@epita.fr>
17685
17686 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17687
17688 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17689
17690 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17691 Update the stack class, give a try to deque as the default container.
17692
17693 2002-05-02 Akim Demaille <akim@epita.fr>
17694
17695 * data/bison.simple (yyparse): Do not implement @$ = @1.
17696 (YYLLOC_DEFAULT): Adjust to do it.
17697 * doc/bison.texinfo (Location Default Action): Fix.
17698
17699 2002-05-02 Akim Demaille <akim@epita.fr>
17700
17701 * src/reader.c (parse_braces): Merge into...
17702 (parse_action): this.
17703
17704 2002-05-02 Akim Demaille <akim@epita.fr>
17705
17706 * configure.in (ALL_LINGUAS): Remove.
17707 * po/LINGUAS, hr.po: New.
17708
17709 2002-05-02 Akim Demaille <akim@epita.fr>
17710
17711 Remove the so called hairy (semantic) parsers.
17712
17713 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17714 * src/gram.h, src/gram.c (semantic_parser): Remove.
17715 (rule_t): Remove the guard and guard_line members.
17716 * src/lex.h (token_t): remove tok_guard.
17717 * src/options.c (option_table): Remove %guard and %semantic_parser
17718 support.
17719 * src/output.c, src/output.h (guards_output): Remove.
17720 (prepare): Adjust.
17721 (token_definitions_output): Don't output the `T'
17722 tokens (???).
17723 (output_skeleton): Don't output the guards.
17724 * src/files.c, src/files.c (attrsfile): Remove.
17725 * src/reader.c (symbol_list): Remove the guard and guard_line
17726 members.
17727 Adjust dependencies.
17728 (parse_guard): Remove.
17729 * data/bison.hairy: Remove.
17730 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17731 BISON_HAIRY.
17732
17733 2002-05-02 Akim Demaille <akim@epita.fr>
17734
17735 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17736 (parse_guard): Rename the formal argument `stack_offset' as
17737 `rule_length', which is more readable.
17738 Adjust callers.
17739 (copy_at, copy_dollar): Instead of outputting the hard coded
17740 values of $$, $n and so forth, output invocation to b4_lhs_value,
17741 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17742 Note: this patch partially drops `semantic-parser' support: it
17743 always does `rule_length - n', where semantic parsers ought to
17744 always use `-n'.
17745 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17746 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17747
17748 2002-05-02 Akim Demaille <akim@epita.fr>
17749
17750 * configure.in (AC_INIT): Bump to 1.49b.
17751 (AM_INIT_AUTOMAKE): Short invocation.
17752
17753 2002-05-02 Akim Demaille <akim@epita.fr>
17754
17755 Version 1.49a.
17756
17757 2002-05-01 Akim Demaille <akim@epita.fr>
17758
17759 * src/skeleton.h: Remove.
17760
17761 2002-05-01 Akim Demaille <akim@epita.fr>
17762
17763 * src/skeleton.h: Fix the #endif.
17764 Reported by Magnus Fromreide.
17765
17766 2002-04-26 Paul Eggert <eggert@twinsun.com>
17767
17768 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17769 Define if we define YYSTYPE and YYLTYPE, respectively.
17770 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17771
17772 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17773
17774 * src/scan-skel.l: Postprocess quadrigraphs.
17775
17776 * src/reader.c (copy_character): New function, used to output
17777 single characters while replacing `[' and `]' with quadrigraphs, to
17778 avoid troubles with M4 quotes.
17779 (copy_comment): Output characters with copy_character.
17780 (read_additionnal_code): Likewise.
17781 (copy_string2): Likewise.
17782 (copy_definition): Likewise.
17783
17784 * tests/calc.at: Exercise M4 quoting.
17785
17786 2002-04-25 Akim Demaille <akim@epita.fr>
17787
17788 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17789 between `!' and the command.
17790 Reported by Paul Eggert.
17791
17792 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17793
17794 * tests/calc.at: Exercise prologue splitting.
17795
17796 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17797 `b4_post_prologue' instead of `b4_prologue'.
17798
17799 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17800 muscles.
17801 (output): Free pre_prologue_obstack and post_prologue_obstack.
17802 * src/files.h, src/files.c (attrs_obstack): Remove.
17803 (pre_prologue_obstack, post_prologue_obstack): New.
17804 * src/reader.c (copy_definition): Add a parameter to specify the
17805 obstack to fill, instead of using attrs_obstack unconditionally.
17806 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17807 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17808
17809 2002-04-23 Paul Eggert <eggert@twinsun.com>
17810
17811 * data/bison.simple: Remove unnecessary commentary and white
17812 space differences from 1_29-branch.
17813 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17814
17815 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17816 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17817 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17818 constructors or destructors.
17819
17820 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17821
17822 2002-04-23 Akim Demaille <akim@epita.fr>
17823
17824 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17825 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17826 location with columns.
17827 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17828 All reported by Paul Eggert.
17829
17830 2002-04-22 Akim Demaille <akim@epita.fr>
17831
17832 * src/reduce.c (dump_grammar): Move to...
17833 * src/gram.h, src/gram.c (grammar_dump): here.
17834 Be sure to separate long item numbers.
17835 Don't read the members of a rule's prec if its nil.
17836
17837 2002-04-22 Akim Demaille <akim@epita.fr>
17838
17839 * src/output.c (table_size, table_grow): New.
17840 (MAXTABLE): Remove, replace uses with table_size.
17841 (pack_vector): Instead of dying when the table is too big, grow it.
17842
17843 2002-04-22 Akim Demaille <akim@epita.fr>
17844
17845 * data/bison.simple (yyr1): Its type is that of a token number.
17846 * data/bison.c++ (r1_): Likewise.
17847 * tests/regression.at (Web2c Actions): Adjust.
17848
17849 2002-04-22 Akim Demaille <akim@epita.fr>
17850
17851 * src/reader.c (token_translations_init): 256 is now the default
17852 value for the error token, i.e., it will be assigned another
17853 number if the user assigned 256 to one of her tokens.
17854 (reader): Don't force 256 to error.
17855 * doc/bison.texinfo (Symbols): Adjust.
17856 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17857 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17858 etc. instead of 10, 20, 30 (which was used to `jump' over error
17859 (256) and undefined (2)).
17860
17861 2002-04-22 Akim Demaille <akim@epita.fr>
17862
17863 Propagate more token_number_t.
17864
17865 * src/gram.h (token_number_as_item_number)
17866 (item_number_as_token_number): New.
17867 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17868 Use it to create output_item_number_table and
17869 output_token_number_table.
17870 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17871 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17872 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17873 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17874
17875 2002-04-22 Akim Demaille <akim@epita.fr>
17876
17877 * src/output.h, src/output.c (get_lines_number): Remove.
17878
17879 2002-04-19 Akim Demaille <akim@epita.fr>
17880
17881 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17882 as Lex/Flex'.
17883 (Debugging): More details about enabling the debugging features.
17884 (Table of Symbols): Describe $$, $n, @$, and @n.
17885 Suggested by Tim Josling.
17886
17887 2002-04-19 Akim Demaille <akim@epita.fr>
17888
17889 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17890
17891 2002-04-10 Akim Demaille <akim@epita.fr>
17892
17893 * src/system.h: Rely on HAVE_LIMITS_H.
17894 Suggested by Paul Eggert.
17895
17896 2002-04-09 Akim Demaille <akim@epita.fr>
17897
17898 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17899 full stderr, and strip it according to the bison options, instead
17900 of composing the error message from different bits.
17901 This makes it easier to check for several error messages.
17902 Adjust all the invocations.
17903 Add an invocation exercising the error token.
17904 Add an invocation demonstrating a stupid error message.
17905 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17906 Adjust the tests.
17907 Error message are for stderr, not stdout.
17908
17909 2002-04-09 Akim Demaille <akim@epita.fr>
17910
17911 * src/gram.h, src/gram.c (error_token_number): Remove, use
17912 errtoken->number.
17913 * src/reader.c (reader): Don't specify the user token number (2)
17914 for $undefined, as it uselessly prevents using it.
17915 * src/gram.h (token_number_t): Move to...
17916 * src/symtab.h: here.
17917 (state_t.number): Is a token_number_t.
17918 * src/print.c, src/reader.c: Use undeftoken->number instead of
17919 hard coded 2.
17920 (Even though this 2 is not the same as above: the number of the
17921 undeftoken remains being 2, it is its user token number which
17922 might not be 2).
17923 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17924 `user_token_number_max'.
17925 Output `undef_token_number'.
17926 * data/bison.simple, data/bison.c++: Use them.
17927 Be sure to map invalid yylex return values to
17928 `undef_token_number'. This saves us from gratuitous SEGV.
17929
17930 * tests/conflicts.at (Solved SR Conflicts)
17931 (Unresolved SR Conflicts): Adjust.
17932 * tests/regression.at (Web2c Actions): Adjust.
17933
17934 2002-04-08 Akim Demaille <akim@epita.fr>
17935
17936 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17937 Adding #line.
17938 Remove the duplicate `typedefs'.
17939 (RhsNumberType): Fix the declaration and various other typos.
17940 Use __ofile__.
17941 * data/bison.simple: Use __ofile__.
17942 * src/scan-skel.l: Handle __ofile__.
17943
17944 2002-04-08 Akim Demaille <akim@epita.fr>
17945
17946 * src/gram.h (item_number_t): New, the type of item numbers in
17947 RITEM. Note that it must be able to code symbol numbers as
17948 positive number, and the negation of rule numbers as negative
17949 numbers.
17950 Adjust all dependencies (pretty many).
17951 * src/reduce.c (rule): Remove this `short *' pointer: use
17952 item_number_t.
17953 * src/system.h (MINSHORT, MAXSHORT): Remove.
17954 Include `limits.h'.
17955 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17956 (shortcpy): Remove.
17957 (MAXTABLE): Move to...
17958 * src/output.c (MAXTABLE): here.
17959 (prepare_rules): Use output_int_table to output rhs.
17960 * data/bison.simple, data/bison.c++: Adjust.
17961 * tests/torture.at (Big triangle): Move the limit from 254 to
17962 500.
17963 * tests/regression.at (Web2c Actions): Ajust.
17964
17965 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17966 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17967 passes, but produces negative #line number, once fixed, GCC is
17968 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17969 C), it passes.
17970 * src/state.h (state_h): Code input lines on ints, not shorts.
17971
17972 2002-04-08 Akim Demaille <akim@epita.fr>
17973
17974 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17975 and then the grammar.
17976
17977 2002-04-08 Akim Demaille <akim@epita.fr>
17978
17979 * src/system.h: No longer using strndup.
17980
17981 2002-04-07 Akim Demaille <akim@epita.fr>
17982
17983 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17984 * src/output.c (output_table_data): Return the longest number.
17985 (prepare_tokens): Output `token_number_max').
17986 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17987 New.
17988 Use them to define yy_token_number_type/TokenNumberType.
17989 Use this type for yytranslate.
17990 * tests/torture.at (Big triangle): Push the limit from 124 to
17991 253.
17992 * tests/regression.at (Web2c Actions): Adjust.
17993
17994 2002-04-07 Akim Demaille <akim@epita.fr>
17995
17996 * tests/torture.at (Big triangle): New.
17997 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17998 * tests/existing.at: here.
17999
18000 2002-04-07 Akim Demaille <akim@epita.fr>
18001
18002 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18003 nritems.
18004 Adjust dependencies.
18005
18006 2002-04-07 Akim Demaille <akim@epita.fr>
18007
18008 * src/reader.c: Normalize increments to prefix form.
18009
18010 2002-04-07 Akim Demaille <akim@epita.fr>
18011
18012 * src/reader.c, symtab.c: Remove debugging code.
18013
18014 2002-04-07 Akim Demaille <akim@epita.fr>
18015
18016 Rename all the `bucket's as `symbol_t'.
18017
18018 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18019 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18020 * src/symtab.c, src/symtab.h (bucket): Rename as...
18021 (symbol_t): this.
18022 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18023 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18024 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18025 (buckets_new, buckets_free, buckets_do): Rename as...
18026 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18027 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18028 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18029 (symbols_new, symbols_free, symbols_do): these.
18030
18031 2002-04-07 Akim Demaille <akim@epita.fr>
18032
18033 Use lib/hash for the symbol table.
18034
18035 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18036 EOF.
18037 * src/lex.c (lex): Set the `number' member of new terminals.
18038 * src/reader.c (bucket_check_defined, bucket_make_alias)
18039 (bucket_check_alias_consistence, bucket_translation): New.
18040 (reader, grammar_free, readgram, token_translations_init)
18041 (packsymbols): Adjust.
18042 (reader): Number the predefined tokens.
18043 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18044 for predefined tokens.
18045 * src/symtab.h (bucket): Remove all the hash table related
18046 members.
18047 * src/symtab.c (symtab): Replace by...
18048 (bucket_table): this.
18049 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18050 (buckets_new, buckets_do): New.
18051
18052 2002-04-07 Akim Demaille <akim@epita.fr>
18053
18054 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18055 (start_symbol, max_user_token_number, semantic_parser)
18056 (error_token_number): Initialize.
18057 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18058 Initialize.
18059 (reader): Don't.
18060 (errtoken, eoftoken, undeftoken, axiom): Extern.
18061
18062 2002-04-07 Akim Demaille <akim@epita.fr>
18063
18064 * src/gram.h (rule_s): prec and precsym are now pointers
18065 to the bucket giving the priority/associativity.
18066 Member `associativity' removed: useless.
18067 * src/reduce.c, src/conflicts.c: Adjust.
18068
18069 2002-04-07 Akim Demaille <akim@epita.fr>
18070
18071 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18072 Properly escape the symbols' TAG when outputting them.
18073
18074 2002-04-07 Akim Demaille <akim@epita.fr>
18075
18076 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18077
18078 2002-04-07 Akim Demaille <akim@epita.fr>
18079
18080 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18081 (LArule): this, which is an array to rule_t*.
18082 * src/print.c, src/conflicts.c: Adjust.
18083
18084 2002-04-07 Akim Demaille <akim@epita.fr>
18085
18086 * src/gram.h (rule_t): Rename `number' as `user_number'.
18087 `number' is a new member.
18088 Adjust dependencies.
18089 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18090
18091 2002-04-07 Akim Demaille <akim@epita.fr>
18092
18093 As a result of the previous patch, it is no longer needed
18094 to reorder ritem itself.
18095
18096 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18097
18098 2002-04-07 Akim Demaille <akim@epita.fr>
18099
18100 Be sure never to walk through RITEMS, but use only data related to
18101 the rules themselves. RITEMS should be banished.
18102
18103 * src/output.c (output_token_translations): Rename as...
18104 (prepare_tokens): this.
18105 In addition to `translate', prepare the muscles `tname' and
18106 `toknum', which were handled by...
18107 (output_rule_data): this.
18108 Remove, and move the remainder of its outputs into...
18109 (prepare_rules): this new routines, which also merges content from
18110 (output_gram): this.
18111 (prepare_rules): Be sure never to walk through RITEMS.
18112 (output_stos): Rename as...
18113 (prepare_stos): this.
18114 (output): Always invoke prepare_states, after all, just don't use it
18115 in the output if you don't need it.
18116
18117 2002-04-07 Akim Demaille <akim@epita.fr>
18118
18119 * src/LR0.c (new_state): Display `nstates' as the name of the
18120 newly created state.
18121 Adjust to initialize first_state and last_state if needed.
18122 Be sure to distinguish the initial from the final state.
18123 (new_states): Create the itemset of the initial state, and use
18124 new_state.
18125 * src/closure.c (closure): Now that the initial state has its
18126 items properly set, there is no need for a special case when
18127 creating `ruleset'.
18128
18129 As a result, now the rule 0, reducing to $axiom, is visible in the
18130 outputs. Adjust the test suite.
18131
18132 * tests/conflicts.at (Solved SR Conflicts)
18133 (Unresolved SR Conflicts): Adjust.
18134 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18135 * tests/conflicts.at (S/R in initial): New.
18136
18137 2002-04-07 Akim Demaille <akim@epita.fr>
18138
18139 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18140 the RHS of the rules.
18141 * src/output.c (output_gram): Likewise.
18142
18143 2002-04-07 Akim Demaille <akim@epita.fr>
18144
18145 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18146 bucket.
18147 Adjust all dependencies.
18148 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18149 `number' of the buckets too.
18150 * src/gram.h: Include `symtab.h'.
18151 (associativity): Move to...
18152 * src/symtab.h: here.
18153 No longer include `gram.h'.
18154
18155 2002-04-07 Akim Demaille <akim@epita.fr>
18156
18157 * src/gram.h, src/gram.c (rules_rhs_length): New.
18158 (ritem_longest_rhs): Use it.
18159 * src/gram.h (rule_t): `number' is a new member.
18160 * src/reader.c (packgram): Set it.
18161 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18162 the end of `rules', and count them out of `nrules'.
18163 (reduce_output, dump_grammar): Adjust.
18164 * src/print.c (print_grammar): It is no longer needed to check for
18165 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18166 * tests/reduce.at (Reduced Automaton): New test.
18167
18168 2002-04-07 Akim Demaille <akim@epita.fr>
18169
18170 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18171 lacking `+ 1' to nrules, Bison reported as useless a token if it
18172 was used solely to set the precedence of the last rule...
18173
18174 2002-04-07 Akim Demaille <akim@epita.fr>
18175
18176 * data/bison.c++, data/bison.simple: Don't output the current file
18177 name in #line, to avoid useless diffs between two identical
18178 outputs under different names.
18179
18180 2002-04-07 Akim Demaille <akim@epita.fr>
18181
18182 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18183 Normalize loops to using `< nrules + 1', not `<= nrules'.
18184
18185 2002-04-07 Akim Demaille <akim@epita.fr>
18186
18187 * TODO: Update.
18188
18189 2002-04-07 Akim Demaille <akim@epita.fr>
18190
18191 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18192 bucket.value as bucket.number.
18193
18194 2002-04-07 Akim Demaille <akim@epita.fr>
18195
18196 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18197 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18198 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18199 RHS, instead of being an index in RITEMS.
18200
18201 2002-04-04 Paul Eggert <eggert@twinsun.com>
18202
18203 * doc/bison.texinfo: Update copyright date.
18204 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18205 (Symbols): Warn about running Bison in one character set,
18206 but compiling and/or running in an incompatible one.
18207 Warn about character code 256, too.
18208
18209 2002-04-03 Paul Eggert <eggert@twinsun.com>
18210
18211 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18212 YYERROR_VERBOSE is nonzero, not whether it is defined.
18213
18214 Merge changes from bison-1_29-branch.
18215
18216 2002-03-20 Paul Eggert <eggert@twinsun.com>
18217
18218 Merge fixes from Debian bison_1.34-1.diff.
18219
18220 * configure.in (AC_PREREQ): 2.53.
18221
18222 2002-03-20 Akim Demaille <akim@epita.fr>
18223
18224 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18225
18226 2002-03-19 Paul Eggert <eggert@twinsun.com>
18227
18228 * src/bison.simple (YYCOPY): New macro.
18229 (YYSTACK_RELOCATE): Use it.
18230 Remove Type arg; no longer needed. All callers changed.
18231 (yymemcpy): Remove; no longer needed.
18232
18233 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18234 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18235
18236 2002-03-19 Akim Demaille <akim@epita.fr>
18237
18238 Test and fix the #line outputs.
18239
18240 * tests/atlocal.at (GCC): New.
18241 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18242 (Prologue synch line, %union synch line, Postprologue synch line)
18243 (Action synch line, Epilogue synch line): New tests.
18244 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18245 * data/bison.simple, data/bison.c++: Use it.
18246
18247 2002-03-19 Akim Demaille <akim@epita.fr>
18248
18249 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18250 (Solved SR Conflicts, %expect not enough, %expect right)
18251 (%expect too much): Move to...
18252 * tests/conflicts.at: this new file.
18253
18254 2002-03-19 Akim Demaille <akim@epita.fr>
18255
18256 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18257 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18258 that we can move to enums for instance.
18259 * src/output.c (token_definitions_output): Output a list of
18260 `token-name, token-number' instead of the #define.
18261 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18262
18263 2002-03-14 Akim Demaille <akim@epita.fr>
18264
18265 Use Gettext 0.11.1.
18266
18267 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18268
18269 * data/bison.c++: Make the user able to add members to the generated
18270 parser by subclassing.
18271
18272 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18273
18274 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18275 a character.
18276 Reported by Nicolas Tisserand and Nicolas Burrus.
18277
18278 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18279
18280 * src/reader.c: Warn about lacking semi-colons, do not complain.
18281
18282 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18283
18284 * data/bison.c++: Remove a debug line.
18285
18286 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18287
18288 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18289 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18290 provide a default implementation.
18291
18292 2002-03-04 Akim Demaille <akim@epita.fr>
18293
18294 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18295 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18296 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18297 * tests/semantic.at (Parsing Guards): Similarly.
18298 * src/reader.at (readgram): Complain if the last rule is not ended
18299 with a semi-colon.
18300
18301 2002-03-04 Akim Demaille <akim@epita.fr>
18302
18303 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18304 * src/closure.c: here.
18305 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18306 RTC.
18307 * src/warshall.h, src/warshall.c: Remove.
18308 * tests/sets.at (Broken Closure): Adjust.
18309
18310 2002-03-04 Akim Demaille <akim@epita.fr>
18311
18312 * src/output.c (output_skeleton): tempdir is const.
18313 bytes_read is unused.
18314
18315 2002-03-04 Akim Demaille <akim@epita.fr>
18316
18317 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18318 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18319 Update.
18320 From Michael Hayes.
18321
18322 2002-03-04 Akim Demaille <akim@epita.fr>
18323
18324 * src/closure.c (closure): `r' is unused.
18325
18326 2002-03-04 Akim Demaille <akim@epita.fr>
18327
18328 * tests/sets.at (Broken Closure): Add the ending `;'.
18329 * src/reader.at (readgram): Complain if a rule is not ended with a
18330 semi-colon.
18331
18332 2002-03-04 Akim Demaille <akim@epita.fr>
18333
18334 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18335 (count_sr_conflicts): Use bitset_count.
18336 * src/reduce.c (inaccessable_symbols): Ditto.
18337 (bits_size): Remove.
18338 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18339
18340 2002-03-04 Akim Demaille <akim@epita.fr>
18341
18342 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18343 * src/reduce.c: Remove the `bitset_zero's following the
18344 `bitset_create's, as now it is performed by the latter.
18345
18346 2002-03-04 Akim Demaille <akim@epita.fr>
18347
18348 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18349 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18350 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18351 latest sources from Michael.
18352
18353 2002-03-04 Akim Demaille <akim@epita.fr>
18354
18355 * src/output.c (output): Don't free the grammar.
18356 * src/reader.c (grammar_free): New.
18357 * src/main.c (main): Call it and don't free symtab here.
18358
18359 2002-03-04 Akim Demaille <akim@epita.fr>
18360
18361 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18362 before returning.
18363 Reported by Benoit Perrot.
18364
18365 2002-03-04 Akim Demaille <akim@epita.fr>
18366
18367 Use bitset operations when possible, not loops over bits.
18368
18369 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18370 bitset_or.
18371 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18372 * src/reduce.c (useless_nonterminals): Formatting changes.
18373 * src/warshall.c (TC): Use bitset_or.
18374
18375 2002-03-04 Akim Demaille <akim@epita.fr>
18376
18377 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18378 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18379 Ditto.
18380
18381 2002-03-04 Akim Demaille <akim@epita.fr>
18382
18383 * src/lalr.c (F): Now a bitset*.
18384 Adjust all dependencies.
18385
18386 2002-03-04 Akim Demaille <akim@epita.fr>
18387
18388 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18389 Adjust all dependencies.
18390
18391 2002-03-04 Akim Demaille <akim@epita.fr>
18392
18393 * src/L0.c, src/LR0.h (nstates): Be size_t.
18394 Adjust comparisons (signed vs unsigned).
18395 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18396 bitset*.
18397 Adjust all dependencies.
18398
18399 2002-03-04 Akim Demaille <akim@epita.fr>
18400
18401 * src/closure.c (firsts): Now, also a bitset.
18402 Adjust all dependencies.
18403 (varsetsize): Remove, now unused.
18404 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18405
18406 2002-03-04 Akim Demaille <akim@epita.fr>
18407
18408 * src/print.c: Convert to use bitset.h, not hand coded iterations
18409 over ints.
18410
18411 2002-03-04 Akim Demaille <akim@epita.fr>
18412
18413 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18414
18415 2002-03-04 Akim Demaille <akim@epita.fr>
18416
18417 * src/closure.c (ruleset): Be a bitset.
18418 (rulesetsize): Remove.
18419
18420 2002-03-04 Akim Demaille <akim@epita.fr>
18421
18422 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18423 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18424 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18425 * src/closure.c (fderives): Be an array of bitsets.
18426
18427 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18428
18429 * data/bison.c++: Merge the two generated headers. Insert a copyright
18430 notice in each output file.
18431
18432 2002-02-28 Akim Demaille <akim@epita.fr>
18433
18434 * data/bison.c++: Copy the prologue of bison.simple to fetch
18435 useful M4 definitions, such as b4_header_guard.
18436
18437 2002-02-25 Akim Demaille <akim@epita.fr>
18438
18439 * src/getargs.c (version): Give the name of the authors, and use a
18440 translator friendly scheme for the bgr
18441 copyright notice.
18442
18443 2002-02-25 Akim Demaille <akim@epita.fr>
18444
18445 * src/output.c (header_output): Remove, now handled completely via
18446 M4.
18447
18448 2002-02-25 Akim Demaille <akim@epita.fr>
18449
18450 * m4/m4.m4: New, from CVS Autoconf.
18451 * configure.in: Invoke it.
18452 * src/output.c (output_skeleton): Use its result instead of the
18453 hard coded name.
18454
18455 2002-02-25 Akim Demaille <akim@epita.fr>
18456
18457 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18458 Fileutils 4.1.5.
18459 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18460 * src/output.c (output_skeleton): Use mkstemp to create a real
18461 temporary file.
18462 Move the filling of `skeleton' and its muscle to...
18463 (prepare): here.
18464 (output): Move the definition of the prologue muscle to...
18465 (prepare): here.
18466 * src/system.h (DEFAULT_TMPDIR): New.
18467
18468 2002-02-14 Paul Eggert <eggert@twinsun.com>
18469
18470 Remove the support for C++ namespace cleanliness; it was
18471 causing more problems than it was curing, since it didn't work
18472 properly on some nonstandard C++ compilers. This can wait
18473 for a proper C++ parser.
18474
18475 * NEWS: Document this.
18476 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18477 of C++, as it's treated like C now.
18478 * src/bison.simple (YYSTD): Remove.
18479 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18480 Treat C++ just like Standard C instead of trying to support
18481 namespace cleanliness.
18482
18483 2002-02-14 Akim Demaille <akim@epita.fr>
18484
18485 * tests/regression.at (else): Adjust to Andreas' change.
18486
18487 2002-02-14 Akim Demaille <akim@epita.fr>
18488
18489 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18490
18491 2002-02-13 Andreas Schwab <schwab@suse.de>
18492
18493 * src/output.c (output_rule_data): Don't output NULL, it might
18494 not be defined yet.
18495
18496 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18497
18498 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18499 (Copyright notice): Update.
18500
18501 2002-02-11 Akim Demaille <akim@epita.fr>
18502
18503 * tests/regression.at (%nonassoc and eof): Don't include
18504 nonportable headers.
18505
18506 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18507
18508 * data/bison.c++: Correct error recovery. Make the user able to
18509 initialize the starting location.
18510
18511 2002-02-07 Akim Demaille <akim@epita.fr>
18512
18513 * tests/input.at: New.
18514
18515 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18516
18517 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18518 more consistent when naming methods and variables. Put preprocessor
18519 directives around tables only needed for debugging.
18520
18521 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18522
18523 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18524 C++ parsers.
18525 (yy::b4_name::parse): Use print_.
18526
18527 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18528
18529 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18530
18531 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18532
18533 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18534 C++ parsers.
18535 (yy::b4_name::parse): Build verbose error messages, and use error_.
18536
18537 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18538
18539 * data/bison.c++: Fix m4 quoting in comments.
18540
18541 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18542
18543 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18544 not expanded by m4.
18545
18546 2002-02-05 Akim Demaille <akim@epita.fr>
18547
18548 * data/bison.c++: Adjust to the M4 back end.
18549 More is certainly needed.
18550
18551 2002-02-05 Akim Demaille <akim@epita.fr>
18552
18553 Give a try to M4 as a back end.
18554
18555 * lib/readpipe.c: New, from wdiff.
18556 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18557 BISON_HAIRY.
18558 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18559 specific values. Now it is m4 that performs the lookup.
18560 * src/parse-skel.y: Remove.
18561 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18562 * src/output.c (actions_output, guards_output)
18563 (token_definitions_output): No longer keeps track of the output
18564 line number, hence remove the second argument.
18565 (guards_output): Check against the guard member of a rule, not the
18566 action member.
18567 Adjust callers.
18568 (output_skeleton): Don't look for the skeleton location, let m4 do
18569 that.
18570 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18571 file will be used.
18572 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18573 (prepare): Given that for the time being changesyntax is not
18574 usable in M4, rename the muscles using `-' to `_'.
18575 Define `defines_flag', `output_parser_name' and `output_header_name'.
18576 * src/output.h (actions_output, guards_output)
18577 (token_definitions_output): Adjust prototypes.
18578 * src/scan-skel.l: Instead of scanning the skeletons, it now
18579 processes the output of m4: `__oline__' and `#output'.
18580 * data/bison.simple: Adjust to be used by M4(sugar).
18581 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18582 to date.
18583 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18584 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18585 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18586 shamelessly stolen from CVS Autoconf.
18587
18588 2002-02-05 Akim Demaille <akim@epita.fr>
18589
18590 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18591 * configure.in: Check for the declarations of free and malloc.
18592 * src/muscle_tab.c: Adjust.
18593
18594 2002-02-05 Akim Demaille <akim@epita.fr>
18595
18596 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18597 which have no values.
18598
18599 2002-02-05 Akim Demaille <akim@epita.fr>
18600
18601 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18602 * data/: here.
18603
18604 2002-01-29 Paul Eggert <eggert@twinsun.com>
18605
18606 * src/bison.simple (YYSIZE_T): Do not define merely because
18607 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18608 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18609
18610 2002-01-27 Akim Demaille <akim@epita.fr>
18611
18612 Fix `%nonassoc and eof'.
18613
18614 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18615 which were not properly copied! Replace
18616 memcpy (res->errs, src->errs, src->nerrs);
18617 with
18618 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18619 !!!
18620 * tests/regression.at (%nonassoc and eof): Adjust to newest
18621 Autotest: `.' is not in the PATH.
18622
18623 2002-01-27 Akim Demaille <akim@epita.fr>
18624
18625 * tests/sets.at (AT_EXTRACT_SETS): New.
18626 (Nullable): Use it.
18627 (Firsts): New.
18628
18629 2002-01-26 Akim Demaille <akim@epita.fr>
18630
18631 * tests/actions.at, tests/calc.at, tests/headers.at,
18632 * tests/torture.at: Adjust to the newest Autotest which no longer
18633 forces `.' in the PATH.
18634
18635 2002-01-25 Akim Demaille <akim@epita.fr>
18636
18637 * tests/regression.at (%nonassoc and eof): New.
18638 Suggested by Robert Anisko.
18639
18640 2002-01-24 Akim Demaille <akim@epita.fr>
18641
18642 Bison dumps core when trying to complain about broken input files.
18643 Reported by Cris van Pelt.
18644
18645 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18646 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18647 into...
18648 (Invalid inputs): Strengthen: exercise parse_percent_token.
18649
18650 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18651
18652 * src/Makefile.am: Add bison.c++.
18653 * src/bison.c++: New skeleton.
18654
18655 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18656
18657 * po/it.po: New.
18658
18659 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18660
18661 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18662
18663 2002-01-20 Marc Autret <marc@gnu.org>
18664
18665 * src/files.c (compute_output_file_names): Fix
18666
18667 2002-01-20 Marc Autret <marc@gnu.org>
18668
18669 * tests/output.at: New test.
18670 * src/files.c (compute_base_names): Don't map extensions when
18671 the YACC flag is set, use defaults.
18672 Reported by Evgeny Stambulchik.
18673
18674 2002-01-20 Marc Autret <marc@gnu.org>
18675
18676 * src/system.h: Need to define __attribute__ away for non-GCC
18677 compilers as well (i.e., the vendor C compiler).
18678 Suggested by Albert Chin-A-Young.
18679
18680 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18681
18682 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18683 canonical definition.
18684 * src/system.h: Use the canonical definition for PARAMS (avoids
18685 a conflict with the macro from lib/hash.h).
18686
18687 2002-01-11 Akim Demaille <akim@epita.fr>
18688
18689 * configure.in: Use AC_FUNC_STRNLEN.
18690 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18691
18692 2002-01-09 Akim Demaille <akim@epita.fr>
18693
18694 * src/files.c, src/files.h (output_infix): New.
18695 (tab_extension): Remove.
18696 (compute_base_names): Compute the former, drop the latter.
18697 * src/output.c (prepare): Insert the muscles `output-infix', and
18698 `output-suffix'.
18699 * src/parse-skel.y (string, string.1): New.
18700 (section.header): Use it.
18701 (section.yacc): Remove.
18702 (prefix): Remove too.
18703 * src/scan-skel.l: Adjust.
18704 * src/bison.simple, src/bison.hairy: Adjust.
18705
18706 2002-01-09 Akim Demaille <akim@epita.fr>
18707
18708 * configure.in (WERROR_CFLAGS): Compute it.
18709 * src/Makefile.am (CFLAGS): Pass it.
18710 * tests/atlocal.in (CFLAGS): Idem.
18711 * src/files.c: Fix a few warnings.
18712 (get_extension_index): Remove, unused.
18713
18714 2002-01-08 Akim Demaille <akim@epita.fr>
18715
18716 * src/getargs.c (AS_FILE_NAME): New.
18717 (getargs): Use it to convert DOSish file names.
18718 * src/files.c (base_name): Rename as full_base_name to avoid
18719 clashes with `base_name ()'.
18720 (filename_split): New.
18721 (compute_base_names): N-th rewrite, using filename_split.
18722
18723 2002-01-08 Akim Demaille <akim@epita.fr>
18724
18725 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18726 New, stolen from the Fileutils 4.1.
18727 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18728 * configure.in: Check for the presence of memrchr, and of its
18729 prototype.
18730
18731 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18732
18733 * lib/hash.h (__P): Added definition for this macro.
18734 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18735 BUILT_SOURCES, to ensure they are generated first.
18736 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18737 %error-verbose to allow bootstrapping with bison 1.30x.
18738
18739 2002-01-06 Akim Demaille <akim@epita.fr>
18740
18741 * src/reader.c (parse_braces): Don't fetch the next char, the
18742 convention is to fetch on entry.
18743 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18744 'switch' without a following semicolon.
18745 * tests/regression.at (braces parsing): New.
18746
18747 2002-01-06 Akim Demaille <akim@epita.fr>
18748
18749 Bison is dead wrong in its RR conflict reports.
18750
18751 * tests/torture.at (GNU Cim Grammar): New.
18752 * src/conflicts.c (count_rr_conflicts): Fix.
18753
18754 2002-01-06 Akim Demaille <akim@epita.fr>
18755
18756 Creating package.m4 from configure.ac causes too many problems.
18757
18758 * tests/Makefile.am (package.m4): Create it by hand,
18759 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18760
18761 2002-01-06 Akim Demaille <akim@epita.fr>
18762
18763 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18764 skeleton.h.
18765
18766 2002-01-04 Paul Eggert <eggert@twinsun.com>
18767
18768 * doc/bison.texinfo (Debugging):
18769 Remove YYSTDERR; it's no longer defined or used.
18770 Also, s/cstdio.h/cstdio/.
18771
18772 2002-01-03 Akim Demaille <akim@epita.fr>
18773
18774 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18775
18776 2002-01-03 Akim Demaille <akim@epita.fr>
18777
18778 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18779 tracing code to --trace, wait for a better --trace option, with
18780 args.
18781
18782 2002-01-03 Akim Demaille <akim@epita.fr>
18783
18784 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18785 The ISO C++ standard is extremely clear about it: stderr is
18786 considered a macro, not a regular symbol (see table 94 `Header
18787 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18788 Therefore std:: does not apply to it. It still does with fprintf.
18789 Also, s/cstdio.h/cstdio/.
18790
18791 2002-01-03 Akim Demaille <akim@epita.fr>
18792
18793 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18794 for non system headers.
18795
18796 2002-01-02 Akim Demaille <akim@epita.fr>
18797
18798 Equip the skeleton chain with location tracking, runtime trace,
18799 pure parser and scanner.
18800
18801 * src/parse-skel.y: Request a pure parser, locations, and prefix
18802 renaming.
18803 (%union): Having several members with the same type does not help
18804 type mismatches, simplify.
18805 (YYPRINT, yyprint): New.
18806 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18807 (skel_error): this.
18808 Handle locations.
18809 * src/scan-skel.l: Adjust to these changes.
18810 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18811 (LOCATION_PRINT, skel_control_t): New.
18812
18813 2001-12-30 Akim Demaille <akim@epita.fr>
18814
18815 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18816 replace `gb' with BLANKS.
18817 * src/scan-skel.l: Adjust.
18818
18819 2001-12-30 Akim Demaille <akim@epita.fr>
18820
18821 * src/system.h: We don't need nor want bcopy.
18822 Throw away MS-DOS crap: we don't need getpid.
18823 * configure.in: We don't need strndup. It was even causing
18824 problems: because Flex includes the headers *before* us,
18825 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18826 not visible.
18827 * lib/xstrndup.c: New.
18828 * src/scan-skel.l: Use it.
18829 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18830 * src/parse-skel.y: Use %directives instead of #defines.
18831
18832 2001-12-30 Akim Demaille <akim@epita.fr>
18833
18834 * src/skeleton.h: New.
18835 * src/output.c (output_parser, output_master_parser): Remove, dead
18836 code.
18837 * src/output.h (get_lines_number, actions_output, guards_output)
18838 (token_definitions_output): Prototype them.
18839 * src/parse-skel.y: Add the license notice.
18840 Include output.h and skeleton.h.
18841 (process_skeleton): Returns void, and takes a single parameter.
18842 * src/scan-skel.l: Add the license notice.
18843 Include skeleton.h.
18844 Don't use %option yylineno: it seems that then Flex imagines
18845 REJECT has been used, and therefore it won't reallocate its
18846 buffers (which makes no other sense to me than a bug). It results
18847 in warnings for `unused: yy_flex_realloc'.
18848
18849 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18850
18851 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18852 (MUSCLE_INSERT_PREFIX): ...to there.
18853 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18854 (MUSCLE_INSERT_PREFIX): Move from here...
18855
18856 * src/bison.hairy: Add a section directive. Put braces around muscle
18857 names. This parser skeleton is still broken, but Bison should not
18858 choke on a bad muscle 'syntax'.
18859 * src/bison.simple: Add a section directive. Put braces around muscle
18860 names.
18861
18862 * src/files.h (strsuffix, stringappend): Add declarations.
18863 (tab_extension): Add declaration.
18864 (short_base_name): Add declaration.
18865
18866 * src/files.c (strsuffix, stringappend): No longer static. These
18867 functions are used in the skeleton parser.
18868 (tab_extension): New.
18869 (compute_base_names): Use the computations done in this function
18870 to guess if the generated parsers should have '.tab' in their
18871 names.
18872 (short_base_name): No longer static.
18873
18874 * src/output.c (output_skeleton): New.
18875 (output): Disable call to output_master_parser, and give a try to
18876 a new skeleton handling system.
18877 (guards_output, actions_output): No longer static.
18878 (token_definitions_output, get_lines_number): No longer static.
18879
18880 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18881
18882 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18883 parse-skel.y.
18884
18885 * src/parse-skel.y: New file.
18886 * src/scan-skel.l: New file.
18887
18888 2001-12-29 Akim Demaille <akim@epita.fr>
18889
18890 %name-prefix is broken.
18891
18892 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18893 Adjust all dependencies.
18894 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18895 %name-prefix.
18896
18897 Renaming yylval but not yylloc is not consistent. Now we do.
18898
18899 * src/bison.simple: Prefix yylloc if used.
18900 * doc/bison.texinfo (Decl Summary): Document that.
18901
18902 2001-12-29 Akim Demaille <akim@epita.fr>
18903
18904 * doc/bison.texinfo: Promote `%long-directive' over
18905 `%long_directive'.
18906 Remove all references to fixed-output-files, yacc is enough.
18907
18908 2001-12-29 Akim Demaille <akim@epita.fr>
18909
18910 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18911 user prologue. These are defaults.
18912 * tests/actions.at (Mid-rule actions): Make sure the user can
18913 define YYDEBUG and YYERROR_VERBOSE.
18914
18915 2001-12-29 Akim Demaille <akim@epita.fr>
18916
18917 * src/output.c (header_output): Don't forget to export YYLTYPE and
18918 yylloc.
18919 * tests/headers.at (export YYLTYPE): New, make sure it does.
18920 * tests/regression.at (%union and --defines, Invalid CPP headers):
18921 Move to...
18922 * tests/headers.at: here.
18923
18924 2001-12-29 Akim Demaille <akim@epita.fr>
18925
18926 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18927
18928 2001-12-29 Akim Demaille <akim@epita.fr>
18929
18930 * tests/actions.at (Mid-rule actions): Output on a single line
18931 instead of several.
18932
18933 2001-12-29 Akim Demaille <akim@epita.fr>
18934
18935 * doc/bison.texinfo: Formatting changes.
18936
18937 2001-12-29 Akim Demaille <akim@epita.fr>
18938
18939 Don't store the token defs in a muscle, just be ready to output it
18940 on command. Now possible via `symbols'. Fixes a memory leak.
18941
18942 * src/output.c (token_definitions_output): New.
18943 (output_parser, header_output): Use it.
18944 * src/reader.c (symbols_save): Remove.
18945
18946 2001-12-29 Akim Demaille <akim@epita.fr>
18947
18948 * src/bison.simple: Do not provide a default for YYSTYPE and
18949 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18950 default.
18951
18952 2001-12-29 Akim Demaille <akim@epita.fr>
18953
18954 Mid-rule actions are simply... ignored!
18955
18956 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18957 the empty-rule associated to the dummy symbol, not to the host
18958 rule.
18959 * tests/actions.at (Mid-rule actions): New.
18960
18961 2001-12-29 Akim Demaille <akim@epita.fr>
18962
18963 Memory leak.
18964
18965 * src/reader.c (reader): Free grammar.
18966
18967 2001-12-29 Akim Demaille <akim@epita.fr>
18968
18969 Memory leak.
18970
18971 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18972 since it allocates it for each state, although only one is needed.
18973 (allocate_storage): Do it here.
18974
18975 2001-12-29 Akim Demaille <akim@epita.fr>
18976
18977 * src/options.h, src/options.c (create_long_option_table): Rename
18978 as...
18979 (long_option_table_new): this, with a clearer prototype.
18980 (percent_table): Remove, unused,
18981 * src/getargs.c (getargs): Adjust.
18982
18983 2001-12-29 Akim Demaille <akim@epita.fr>
18984
18985 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18986 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18987 as states.
18988
18989 2001-12-29 Akim Demaille <akim@epita.fr>
18990
18991 * src/lalr.c (build_relations): Rename `states' as `states1'.
18992 Sorry, I don't understand exactly what it is, no better name...
18993
18994 2001-12-29 Akim Demaille <akim@epita.fr>
18995
18996 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18997 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18998 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18999 as rules.
19000
19001 2001-12-29 Akim Demaille <akim@epita.fr>
19002
19003 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19004 ago.
19005
19006 2001-12-29 Akim Demaille <akim@epita.fr>
19007
19008 * src/reader.c, src/reader.h (user_toknums): Remove.
19009 Adjust all users to use symbols[i]->user_token_number.
19010
19011 2001-12-29 Akim Demaille <akim@epita.fr>
19012
19013 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19014 Adjust all users to use symbols[i]->prec or ->assoc.
19015
19016 2001-12-29 Akim Demaille <akim@epita.fr>
19017
19018 * src/reader.c, src/reader.h (tags): Remove.
19019 Adjust all users to use symbols[i]->tag.
19020
19021 2001-12-29 Akim Demaille <akim@epita.fr>
19022
19023 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19024 and rule_table.
19025 * src/reader.c (packsymbols): Fill this table.
19026 Drop sprec.
19027 * src/conflicts.c (resolve_sr_conflict): Adjust.
19028 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19029 single table.
19030 Use symbols[i]->tag instead of tags[i].
19031
19032 2001-12-29 Akim Demaille <akim@epita.fr>
19033
19034 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19035 In addition, put a comment in there, to replace...
19036 * tests/regression.at (%union and C comments): Remove.
19037
19038 2001-12-29 Akim Demaille <akim@epita.fr>
19039
19040 * tests/regression.at (Web2c Actions): Blindly move the actual
19041 output as expected output. The contents *seem* right to me, but I
19042 can't pretend reading perfectly parser tables... Nonetheless, all
19043 the other tests pass correctly, the table look OK, even though the
19044 presence of `$axiom' is to be noted: AFAICS it is useless (but
19045 harmless).
19046
19047 2001-12-29 Akim Demaille <akim@epita.fr>
19048
19049 * src/reader.c (readgram): Don't add the rule 0 if there were no
19050 rules read. In other words, add it _after_ having performed
19051 grammar sanity checks.
19052 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19053
19054 2001-12-29 Akim Demaille <akim@epita.fr>
19055
19056 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19057 visible, and some states have now a different number.
19058
19059 2001-12-29 Akim Demaille <akim@epita.fr>
19060
19061 * src/reader.c (readgram): Bind the initial rule's lineno to that
19062 of the first rule.
19063 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19064 (Solved SR Conflicts): Adjust rule 0's line number.
19065
19066 2001-12-29 Akim Demaille <akim@epita.fr>
19067
19068 Fix the `GAWK Grammar' failure.
19069
19070 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19071 the reductions of the first state which was mistakenly confused
19072 with the final state because precisely final_state was initialized
19073 to 0.
19074 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19075 now noticed by Bison.
19076 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19077 have a reduction on $default.
19078
19079 2001-12-29 Akim Demaille <akim@epita.fr>
19080
19081 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19082 rule line numbers.
19083 * src/closure.c (print_closure): Likewise.
19084 * src/derives.c (print_derives): Likewise.
19085 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19086 now.
19087
19088 2001-12-29 Akim Demaille <akim@epita.fr>
19089
19090 * src/lalr.c (lookaheads_print): New.
19091 (lalr): Call it when --trace-flag.
19092 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19093 are dumped.
19094
19095 2001-12-29 Akim Demaille <akim@epita.fr>
19096
19097 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19098 when walking through ritem, even via rule->rhs.
19099 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19100 (useful_production, useless_nonterminals): Likewise.
19101 (reduce_grammar_tables): Likewise, plus update nritems.
19102 * src/nullable.c (set_nullable): Likewise.
19103 * src/lalr.c (build_relations): Likewise.
19104 * tests/sets.at (Nullable): Adjust.
19105 Fortunately, now, the $axiom is no longer nullable.
19106
19107 2001-12-29 Akim Demaille <akim@epita.fr>
19108
19109 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19110 the 0-sentinel.
19111 * src/gram.c (ritem_longest_rhs): Likewise.
19112 * src/reduce.c (nonterminals_reduce): Likewise.
19113 * src/print_graph.c (print_graph): Likewise.
19114 * src/output.c (output_rule_data): Likewise.
19115 * src/nullable.c (set_nullable): Likewise.
19116
19117 2001-12-29 Akim Demaille <akim@epita.fr>
19118
19119 * src/output.c: Comment changes.
19120
19121 2001-12-27 Paul Eggert <eggert@twinsun.com>
19122
19123 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19124 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19125 Sparc, as they were causing more porting problems than the
19126 (minor) performance improvement was worth.
19127
19128 Also, catch up with 1.31's YYSTD.
19129
19130 2001-12-27 Akim Demaille <akim@epita.fr>
19131
19132 * src/output.c (output_gram): Rely on nritems, not the
19133 0-sentinel. See below.
19134 Use -1 as separator, not 0.
19135 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19136 Rely on -1 as separator in yyrhs, instead of 0.
19137 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19138 twice `Now at end of input', therefore there are two lines less to
19139 expect.
19140
19141 2001-12-27 Akim Demaille <akim@epita.fr>
19142
19143 * tests/regression.at (Unresolved SR Conflicts):
19144 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19145 below.
19146
19147 2001-12-27 Akim Demaille <akim@epita.fr>
19148
19149 * src/LR0.c (new_state): Recognize the final state by the fact it
19150 is reached by eoftoken.
19151 (insert_start_shifting_state, insert_eof_shifting_state)
19152 (insert_accepting_state, augment_automaton): Remove, since now
19153 these states are automatically computed from the initial state.
19154 (generate_states): Adjust.
19155 * src/print.c: When reporting a rule number to the user, substract
19156 1, so that the axiom rule is rule 0, and the first user rule is 1.
19157 * src/reduce.c: Likewise.
19158 * src/print_graph.c (print_core): For the time being, just as for
19159 the report, depend upon --trace-flags to dump the full set of
19160 items.
19161 * src/reader.c (readgram): Once the grammar read, insert the rule
19162 0: `$axiom: START-SYMBOL $'.
19163 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19164 number of the states has changed (the final state is no longer
19165 necessarily the last), catch up.
19166
19167 2001-12-27 Akim Demaille <akim@epita.fr>
19168
19169 Try to make the use of the eoftoken valid. Given that its value
19170 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19171 is used instead of > 0 where appropriate, (ii), depend upon nritems
19172 instead of the 0-sentinel.
19173
19174 * src/gram.h, src/gram.c (nritems): New.
19175 Expected to be duplication of nitems, but for the time being...
19176 * src/reader.c (packgram): Assert nritems and nitems are equal.
19177 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19178 * src/closure.c (print_closure, print_fderives): Likewise.
19179 * src/gram.c (ritem_print): Likewise.
19180 * src/print.c (print_core, print_grammar): Likewise.
19181 * src/print_graph.c: Likewise.
19182
19183 2001-12-27 Akim Demaille <akim@epita.fr>
19184
19185 * src/main.c (main): If there are complains after grammar
19186 reductions, then output the report anyway if requested, then die.
19187 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19188 * src/reader.c (eoftoken): New.
19189 (parse_token_decl): If the token being defined has value `0', it
19190 is the eoftoken.
19191 (packsymbols): No longer hack `tags' to insert `$' by hand.
19192 Be sure to preserve the value of the eoftoken.
19193 (reader): Make sure eoftoken is defined.
19194 Initialize nsyms to 0: now eoftoken is created just like the others.
19195 * src/print.c (print_grammar): Don't special case the eof token.
19196 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19197 lie anyway, albeit pleasant.
19198 * tests/calc.at: Exercise error messages with eoftoken.
19199 Change the grammar so that empty input is invalid.
19200 Adjust expectations.
19201 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19202
19203 2001-12-27 Akim Demaille <akim@epita.fr>
19204
19205 * configure.in: Check the protos of strchr ans strspn.
19206 Replace strchr if needed.
19207 * src/system.h: Provide the protos of strchr, strspn and memchr if
19208 missing.
19209 * lib/strchr.c: New.
19210 * src/reader.c (symbols_save): Use strchr.
19211
19212 2001-12-27 Akim Demaille <akim@epita.fr>
19213
19214 * src/print.c, src/print_graph.c (escape): New.
19215 Use it to quote the TAGS outputs.
19216 * src/print_graph.c (print_state): Now errors are in red, and
19217 reductions in green.
19218 Prefer high to wide: output the state number on a line of its own.
19219
19220 2001-12-27 Akim Demaille <akim@epita.fr>
19221
19222 * src/state.h, src/state.c (reductions_new): New.
19223 * src/LR0.c (set_state_table): Let all the states have a
19224 `reductions', even if reduced to 0.
19225 (save_reductions): Adjust.
19226 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19227 * src/print.c (print_reductions, print_actions): Adjust.
19228 * src/output.c (action_row): Adjust.
19229
19230 2001-12-27 Akim Demaille <akim@epita.fr>
19231
19232 * src/state.h, src/state.c (errs_new, errs_dup): New.
19233 * src/LR0.c (set_state_table): Let all the states have an errs,
19234 even if reduced to 0.
19235 * src/print.c (print_errs, print_reductions): Adjust.
19236 * src/output.c (output_actions, action_row): Adjust.
19237 * src/conflicts.c (resolve_sr_conflict): Adjust.
19238
19239 2001-12-27 Akim Demaille <akim@epita.fr>
19240
19241 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19242
19243 2001-12-27 Akim Demaille <akim@epita.fr>
19244
19245 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19246 * src/print.c: here.
19247 (lookaheadset, shiftset): New, used as additional storage by
19248 print_reductions.
19249 (print_results): Adjust.
19250 (print_shifts, print_gotos, print_errs): New, extracted from...
19251 (print_actions): here.
19252 * src/print_graph.c (print_actions): Remove dead code.
19253
19254 2001-12-27 Akim Demaille <akim@epita.fr>
19255
19256 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19257 `$n' and `@n'.
19258
19259 2001-12-27 Akim Demaille <akim@epita.fr>
19260
19261 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19262 (build_relations): Adjust.
19263
19264 2001-12-27 Akim Demaille <akim@epita.fr>
19265
19266 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19267 duplication.
19268
19269 2001-12-27 Akim Demaille <akim@epita.fr>
19270
19271 * src/reader.c (packgram): Catch nitems overflows.
19272
19273 2001-12-27 Akim Demaille <akim@epita.fr>
19274
19275 * src/files.c, src/files.h (guard_obstack): Remove.
19276 * src/output.c (output): Adjust.
19277 * src/reader.c (parse_braces): New, factoring...
19278 (copy_action, copy_guard): these two which are renamed as...
19279 (parse_action, parse_guard): these.
19280 As a voluntary consequence, using braces around guards is now
19281 mandatory.
19282
19283 2001-12-27 Akim Demaille <akim@epita.fr>
19284
19285 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19286 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19287 members.
19288 (symbol_list_new): Adjust.
19289 (copy_action): action_line is the first line, not the last.
19290 (copy_guard): Just as for actions, store the `action' only, not
19291 the switch/case/break flesh.
19292 Don't parse the user action that might follow the guard, let...
19293 (readgram): do it, i.e., now, there can be an action after a
19294 guard.
19295 In other words the guard is just explicitly optional.
19296 (packgram): Adjust.
19297 * src/output.c (guards_output): New.
19298 (output_parser): Call it when needed.
19299 (output): Also free the guard and attrs obstacks.
19300 * src/files.c, src/files.h (obstack_save): Remove.
19301 (output_files): Remove.
19302 As a result, if one needs the former `.act' file, using an
19303 appropriate skeleton which requires actions and guards is now
19304 required.
19305 * src/main.c (main): Adjust.
19306 * tests/semantic.at: New.
19307 * tests/regression.at: Use `input.y' as input file name.
19308 Avoid 8+3 problems by requiring input.c when the test needs the
19309 parser.
19310
19311 2001-12-27 Akim Demaille <akim@epita.fr>
19312
19313 * src/reader.c (symbol_list_new): Be sure to initialize all the
19314 fields.
19315
19316 2001-12-27 Akim Demaille <akim@epita.fr>
19317
19318 All the hacks using a final pseudo state are now useless.
19319
19320 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19321 * src/lalr.c (nLA): New.
19322 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19323 instead of lookaheadsp from the pseudo state (nstate + 1).
19324
19325 2001-12-27 Akim Demaille <akim@epita.fr>
19326
19327 * src/output.c (action_row, token_actions): Use a state_t instead
19328 of a integer, and nlookaheads instead of the following state's
19329 lookaheadsp.
19330
19331 2001-12-27 Akim Demaille <akim@epita.fr>
19332
19333 * src/conflicts.c (log_resolution, flush_shift)
19334 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19335 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19336 (conflicts_print, print_reductions): Use a state_t instead of an
19337 integer when referring to a state.
19338 As much as possible, depend upon nlookaheads, instead of the
19339 `lookaheadsp' member of the following state (since lookaheads of
19340 successive states are successive, the difference between state n + 1
19341 and n served as the number of lookaheads for state n).
19342 * src/lalr.c (add_lookback_edge): Likewise.
19343 * src/print.c (print_core, print_actions, print_state)
19344 (print_results): Likewise.
19345 * src/print_graph.c (print_core, print_actions, print_state)
19346 (print_graph): Likewise.
19347 * src/conflicts.h: Adjust.
19348
19349 2001-12-27 Akim Demaille <akim@epita.fr>
19350
19351 * src/bison.hairy: Formatting/comment changes.
19352 ANSIfy.
19353 Remove `register' indications.
19354 Add plenty of `static'.
19355
19356 2001-12-27 Akim Demaille <akim@epita.fr>
19357
19358 * src/output.c (prepare): Drop the muscle `ntbase' which
19359 duplicates ntokens.
19360 * src/bison.simple: Formatting/comment changes.
19361 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19362 is an undocumented synonym.
19363
19364 2001-12-22 Akim Demaille <akim@epita.fr>
19365
19366 * src/output.c (output_table_data): Change the prototype to use
19367 `int' for array ranges: some invocations do pass an int, not a
19368 short.
19369 Reported by Wayne Green.
19370
19371 2001-12-22 Akim Demaille <akim@epita.fr>
19372
19373 Some actions of web2c.y are improperly triggered.
19374 Reported by Mike Castle.
19375
19376 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19377 * tests/regression.at (Web2c): Rename as...
19378 (Web2c Report): this.
19379 (Web2c Actions): New.
19380
19381 2001-12-22 Akim Demaille <akim@epita.fr>
19382
19383 Reductions in web2c.y are improperly reported.
19384 Reported by Mike Castle.
19385
19386 * src/conflicts.c (print_reductions): Fix.
19387 * tests/regression.at (Web2c): New.
19388
19389 2001-12-18 Akim Demaille <akim@epita.fr>
19390
19391 Some host fail on `assert (!"foo")', which expands to
19392 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19393 Reported by Nelson Beebee.
19394
19395 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19396 `#define it_succeeded 0' and `assert (it_succeeded)'.
19397
19398 2001-12-17 Marc Autret <autret_m@epita.fr>
19399
19400 * src/bison.simple: Don't hard code the skeleton line and filename.
19401 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19402 New line counter 'skeleton_line' (skeleton-line muscle).
19403
19404 2001-12-17 Paul Eggert <eggert@twinsun.com>
19405
19406 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19407 YYDEBUG must be defined to a nonzero value.
19408
19409 * src/bison.simple (yytname): Do not assume that the user defines
19410 YYDEBUG to a properly parenthesized expression.
19411
19412 2001-12-17 Akim Demaille <akim@epita.fr>
19413
19414 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19415 nlookaheads is a new member.
19416 Adjust all users.
19417 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19418 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19419 state.
19420
19421 2001-12-17 Akim Demaille <akim@epita.fr>
19422
19423 * src/files.h, src/files.c (open_files, close_files): Remove.
19424 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19425 let...
19426 * src/reader.c (reader): Do it.
19427
19428 2001-12-17 Akim Demaille <akim@epita.fr>
19429
19430 * src/conflicts.c (print_reductions): Formatting changes.
19431
19432 2001-12-17 Akim Demaille <akim@epita.fr>
19433
19434 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19435 (flush_reduce): New.
19436 (resolve_sr_conflict): Adjust.
19437
19438 2001-12-17 Akim Demaille <akim@epita.fr>
19439
19440 * src/output.c (output_obstack): Be static and rename as...
19441 (format_obstack): this, to avoid any confusion with files.c's
19442 output_obstack.
19443 * src/reader.h (muscle_obstack): Move to...
19444 * src/output.h: here, since it's defined in output.c.
19445
19446 2001-12-17 Akim Demaille <akim@epita.fr>
19447
19448 * src/output.c (action_row, save_column, default_goto)
19449 (sort_actions, matching_state, pack_vector): Better variable
19450 locality.
19451
19452 2001-12-17 Akim Demaille <akim@epita.fr>
19453
19454 * src/output.c: Various formatting changes.
19455
19456 2001-12-17 Akim Demaille <akim@epita.fr>
19457
19458 * src/files.c (output_files): Free the output_obstack.
19459 * src/main.c (main): Call print and print_graph conditionally.
19460 * src/print.c (print): Work unconditionally.
19461 * src/print_graph.c (print_graph): Work unconditionally.
19462 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19463
19464 2001-12-16 Marc Autret <autret_m@epita.fr>
19465
19466 * src/output.c (actions_output): Fix. When we use %no-lines,
19467 there is one less line per action.
19468
19469 2001-12-16 Marc Autret <autret_m@epita.fr>
19470
19471 * src/bison.simple: Remove a useless #line directive.
19472 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19473 * src/output.c (get_lines_number): New.
19474 (output_parser): Adjust, now takes care about the lines of a
19475 output muscles.
19476 Fix line numbering.
19477 (actions_output): Computes the number of lines taken by actions.
19478 (output_master_parser): Insert new skeleton which is the name of
19479 the output parser file name.
19480
19481 2001-12-15 Marc Autret <autret_m@epita.fr>
19482
19483 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19484
19485 2001-12-15 Marc Autret <autret_m@epita.fr>
19486
19487 * src/output.c (output_gram): Keep track of the hairy one.
19488
19489 2001-12-15 Akim Demaille <akim@epita.fr>
19490
19491 Make `make distcheck' work.
19492
19493 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19494 system.h which uses libgettext.h.
19495
19496 2001-12-15 Akim Demaille <akim@epita.fr>
19497
19498 * src/nullable.c (set_nullable): Useless rules must be skipped,
19499 otherwise, since we range over their symbols, we might look at a
19500 nonterminal which no longer ``exists'', i.e., it is not counted in
19501 `nvars', hence we overflow our arrays.
19502
19503 2001-12-15 Akim Demaille <akim@epita.fr>
19504
19505 The header can also be produced directly, without any obstack!
19506 Yahoo!
19507
19508 * src/files.c, src/files.h (defines_obstack): Remove.
19509 (compute_header_macro): Global.
19510 (defines_obstack_save): Remove.
19511 * src/reader.c (parse_union_decl): No longer output to
19512 defines_obstack: its content can be found in the `stype' muscle
19513 anyway.
19514 (output_token_translations): Merge into...
19515 (symbols_output): this.
19516 Rename as...
19517 (symbols_save): this.
19518 (reader): Adjust.
19519 * src/output.c (header_output): New.
19520 (output): Call it.
19521
19522 2001-12-15 Akim Demaille <akim@epita.fr>
19523
19524 * src/reader.c (parse_union_decl): Instead of handling two obstack
19525 simultaneously, use one to define the `stype' muscle, and use the
19526 value of the latter to fill defines_obstack.
19527 (copy_comment): Remove.
19528 (copy_comment2): Work for a single obstack.
19529 Rename as...
19530 (copy_comment): this.
19531
19532 2001-12-15 Akim Demaille <akim@epita.fr>
19533
19534 * src/lex.c, src/lex.h (xgetc): No longer static.
19535 * src/reader.c (parse_union_decl): Revamp.
19536
19537 2001-12-15 Akim Demaille <akim@epita.fr>
19538
19539 Still making progress in separating Bison into (i) input, (ii)
19540 process, (iii) output: now we can directly output the parser file
19541 without using table_obstack at all.
19542
19543 * src/files.c, src/files.h (table_obstack): Bye bye.
19544 (parser_file_name): New.
19545 * src/files.c (compute_output_file_names): Compute it.
19546 * src/output.c (actions_output, output_parser)
19547 (output_master_parser): To a file instead of an obstack.
19548
19549 2001-12-15 Akim Demaille <akim@epita.fr>
19550
19551 Attach actions to rules, instead of pre-outputting them to
19552 actions_obstack.
19553
19554 * src/gram.h (rule_t): action and action_line are new members.
19555 * src/reader.c (symbol_list): Likewise.
19556 (copy_action): Save the actions within the rule.
19557 (packgram): Save them in rule_table.
19558 * src/output.c (actions_output): New.
19559 (output_parser): Use it on `%%actions'.
19560 (output_rule_data): Don't free rule_table.
19561 (output): Do it.
19562 (prepare): Don't save the `action' muscle.
19563 * src/bison.simple: s/%%action/%%actions/.
19564
19565 2001-12-15 Akim Demaille <akim@epita.fr>
19566
19567 * src/reader.c (copy_action): When --yacc, don't append a `;'
19568 to the user action: let it fail if lacking.
19569 Suggested by Arnold Robbins and Tom Tromey.
19570
19571 2001-12-14 Akim Demaille <akim@epita.fr>
19572
19573 * src/lex.c (literalchar): Simply return the char you decoded, non
19574 longer mess around with obstacks and int pointers.
19575 Adjust all callers.
19576
19577 2001-12-14 Akim Demaille <akim@epita.fr>
19578
19579 * src/lex.c (literalchar): Don't escape the special characters,
19580 just decode them, and keep them as char (before, eol was output as
19581 the 2 char string `\n' etc.).
19582 * src/output.c (output_rule_data): Use quotearg to output the
19583 token strings.
19584
19585 2001-12-13 Paul Eggert <eggert@twinsun.com>
19586
19587 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19588 Do not infringe on the global user namespace when using C++.
19589 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19590 All uses of `fprintf' and `stderr' changed.
19591
19592 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19593
19594 2001-12-13 Akim Demaille <akim@epita.fr>
19595
19596 The computation of nullable is broken: it doesn't handle empty
19597 RHS's properly.
19598
19599 * tests/torture.at (GNU AWK Grammar): New.
19600 * tests/sets.at (Nullable): New.
19601 * src/nullable.c (set_nullable): Instead of blindly looping over
19602 `ritems', loop over the rules, and then over their rhs's.
19603
19604 Work around Autotest bugs.
19605
19606 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19607 frame, because Autotest understand lines starting with a `+' as
19608 traces from the shell. Then, they are not processed properly.
19609 Admittedly an Autotest bug, but we don't have time to wait for
19610 Autotest to catch up.
19611 * tests/regression.at (Broken Closure): Adjust to the new table
19612 frames.
19613 Move to...
19614 * tests/sets.at: here.
19615
19616 2001-12-13 Akim Demaille <akim@epita.fr>
19617
19618 * src/closure.c (closure): Use nrules instead of playing tricks
19619 with BITS_PER_WORD.
19620
19621 2001-12-13 Akim Demaille <akim@epita.fr>
19622
19623 * src/print.c (print_actions): Output the handling of `$' as the
19624 traces do: shifting the token EOF. Before EOF was treated as a
19625 nonterminal.
19626 * tests/regression.at: Adjust some tests.
19627 * src/print_graph.c (print_core): Complete the set of items via
19628 closure. The next-to-final and final states are still unsatisfying,
19629 but that's to be addressed elsewhere.
19630 No longer output the rule numbers, but do output the state number.
19631 A single loop for the shifts + gotos is enough, but picked a
19632 distinct color for each.
19633 (print_graph): Initialize and finalize closure.
19634
19635 2001-12-13 Akim Demaille <akim@epita.fr>
19636
19637 * src/reader.c (readgram): Remove dead code, an strip useless
19638 braces.
19639 (get_type): Remove, unused.
19640
19641 2001-12-12 Akim Demaille <akim@epita.fr>
19642
19643 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19644 on that of lib/error.c.
19645
19646 2001-12-12 Akim Demaille <akim@epita.fr>
19647
19648 Some hosts don't like `/' in includes.
19649
19650 * src/system.h: Include libgettext.h without qualifying the path.
19651 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19652 $(top_srcdir).
19653
19654 2001-12-11 Marc Autret <autret_m@epita.fr>
19655
19656 * src/output.c (output_parser): Remove useless muscle.
19657
19658 2001-12-11 Marc Autret <autret_m@epita.fr>
19659
19660 * src/bison.simple: Remove #line just before %%epilogue. It
19661 is now handled in ...
19662 * src/reader.c (read_additionnal_code): Add the output of a
19663 #line for the epilogue.
19664
19665 2001-12-10 Marc Autret <autret_m@epita.fr>
19666
19667 * src/reader.c (copy_definition): Re-use CPP-outed code which
19668 replace precedent remove.
19669 * src/bison.simple: Remove #line before %%prologue because
19670 %%input-line is wrong at this time.
19671
19672 2001-12-10 Marc Autret <autret_m@epita.fr>
19673
19674 * src/reader.c (symbols_output): Clean up.
19675 * src/output.c (output_gram, output): Clean up.
19676
19677 2001-12-10 Akim Demaille <akim@epita.fr>
19678
19679 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19680 * src/LR0.c (set_state_table): here.
19681 * src/lalr.c (lalr): Call it.
19682
19683 2001-12-10 Akim Demaille <akim@epita.fr>
19684
19685 * src/state.h (shifts): Remove the `number' member: shifts are
19686 attached to state, hence no longer need to be labelled with a
19687 state number.
19688
19689 2001-12-10 Akim Demaille <akim@epita.fr>
19690
19691 Now that states have a complete set of members, the linked list of
19692 shifts is useless: just fill directly the state's shifts member.
19693
19694 * src/state.h (shifts): Remove the `next' member.
19695 * src/LR0.c (first_state, last_state): Remove.
19696 Adjust the callers.
19697 (augment_automaton): Don't look for the shifts that must be added
19698 a shift on EOF: it is those of the state we looked for! But now,
19699 since shifts are attached, it is no longer needed to looking
19700 merely by its id: its number.
19701
19702 2001-12-10 Akim Demaille <akim@epita.fr>
19703
19704 * src/LR0.c (augment_automaton): Better variable locality.
19705 Remove an impossible branch: if there is a state corresponding to
19706 the start symbol being shifted, then there is shift for the start
19707 symbol from the initial state.
19708
19709 2001-12-10 Akim Demaille <akim@epita.fr>
19710
19711 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19712 only when appropriate: when insert_start_shifting_state' is not
19713 invoked.
19714 * tests/regression.at (Rule Line Numbers): Adjust.
19715
19716 2001-12-10 Akim Demaille <akim@epita.fr>
19717
19718 * src/LR0.c (augment_automaton): Now that all states have shifts,
19719 merge the two cases addition shifts to the initial state.
19720
19721 2001-12-10 Akim Demaille <akim@epita.fr>
19722
19723 * src/lalr.c (set_state_table): Move to...
19724 * src/LR0.c: here.
19725 * src/lalr.c (lalr): Don't call it...
19726 * src/LR0.c (generate_states): do it.
19727 * src/LR0.h (first_state): Remove, only the table is used.
19728
19729 2001-12-10 Akim Demaille <akim@epita.fr>
19730
19731 * src/LR0.h (first_shift, first_reduction): Remove.
19732 * src/lalr.c: Don't use first_shift: find shifts through the
19733 states.
19734
19735 2001-12-10 Akim Demaille <akim@epita.fr>
19736
19737 * src/LR0.c: Attach shifts to states as soon as they are
19738 computed.
19739 * src/lalr.c (set_state_table): Instead of assigning shifts to
19740 state, just assert that the mapping was properly done.
19741
19742 2001-12-10 Akim Demaille <akim@epita.fr>
19743
19744 * src/LR0.c (insert_start_shift): Rename as...
19745 (insert_start_shifting_state): this.
19746 (insert_eof_shifting_state, insert_accepting_state): New.
19747 (augment_automaton): Adjust.
19748 Better locality of the variables.
19749 When looking if the start_symbol is shifted from the initial
19750 state, using `while (... symbol != start_symbol ...)' sounds
19751 better than `while (... symbol < start_symbol ...)': If fail
19752 to see how the order between symbols could be relevant!
19753
19754 2001-12-10 Akim Demaille <akim@epita.fr>
19755
19756 * src/getargs.h: Don't declare `spec_name_prefix' and
19757 `spec_file_prefix', declared by src/files.h.
19758 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19759 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19760 * src/output.c (prepare): Adjust.
19761 * src/reader.c (symbols_output): Likewise.
19762 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19763
19764 2001-12-10 Akim Demaille <akim@epita.fr>
19765
19766 * src/muscle_tab.c (muscle_init): NULL is a better default than
19767 `"0"'.
19768
19769 2001-12-10 Akim Demaille <akim@epita.fr>
19770
19771 * src/reader.c (reader): Calling symbols_output once is enough.
19772
19773 2001-12-10 Akim Demaille <akim@epita.fr>
19774
19775 Now that states have a complete set of members, the linked list of
19776 reductions is useless: just fill directly the state's reductions
19777 member.
19778
19779 * src/state.h (struct reductions): Remove member `number' and
19780 `next'.
19781 * src/LR0.c (first_reduction, last_reduction): Remove.
19782 (save_reductions): Don't link the new reductions, store them in
19783 this_state.
19784 * src/lalr.c (set_state_table): No need to attach reductions to
19785 states, it's already done.
19786 * src/output.c (output_actions): No longer free the shifts, then
19787 the reductions, then the states: free all the states and their
19788 members.
19789
19790 2001-12-10 Akim Demaille <akim@epita.fr>
19791
19792 * src/options.c (OPTN, DRTV, BOTH): New.
19793 (option_table): Use them.
19794
19795 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19796 the job of system.h.
19797 * src/options.c: Don't include stdio.h and xalloc.h for the same
19798 reasons.
19799
19800 2001-12-10 Akim Demaille <akim@epita.fr>
19801
19802 * src/output.c (output, prepare): Make sure the values of the
19803 muscles `action' and `prologue' are 0-terminated.
19804
19805 2001-12-10 Akim Demaille <akim@epita.fr>
19806
19807 Clean up GCC warnings.
19808
19809 * src/reader.c (copy_action): `buf' is not used.
19810 (parse_skel_decl): Be static.
19811 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19812 * src/options.h (create_long_option_table): Have a real prototype.
19813 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19814 (hash_delete_at): Return const void *.
19815 Adjust casts to preserve the const.
19816
19817 2001-12-10 Akim Demaille <akim@epita.fr>
19818
19819 * configure.in: Require 2.52g.
19820 M4 is not needed, but AUTOM4TE is.
19821 * m4/m4.m4: Remove.
19822 * tests/Makefile.am: Adjust.
19823
19824 2001-12-10 Akim Demaille <akim@epita.fr>
19825
19826 One structure for states is enough, even though theoretically
19827 there are LR(0) states and LALR(1) states.
19828
19829 * src/lalr.h (state_t): Remove.
19830 (state_table): Be state_t **, not state_t *.
19831 * src/state.h (core, CORE_ALLOC): Rename as...
19832 (state_t, STATE_ALLOC): this.
19833 Add the LALR(1) members: shifts, reductions, errs.
19834 * src/LR0.c (state_table): Rename as...
19835 (state_hash): this, to avoid name clashes with the global
19836 `state_table'.
19837 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19838 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19839
19840 2001-12-10 Akim Demaille <akim@epita.fr>
19841
19842 Bison dumps core on bash.y.
19843 Reported by Pascal Bart.
19844
19845 * src/warshall.c (bitmatrix_print): New.
19846 (TC): Use it.
19847 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19848 j must be the outer loop.
19849 * tests/regression.at (Broken Closure): New.
19850
19851 2001-12-05 Akim Demaille <akim@epita.fr>
19852
19853 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19854 its argument.
19855 Reported by Peter Hamorsky.
19856
19857 2001-12-05 Akim Demaille <akim@epita.fr>
19858
19859 * src/conflicts.c (err_table): Remove.
19860 (resolve_sr_conflict): Adjust.
19861 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19862 Rename as...
19863 (state_t.reductions, state_t.shifts): this.
19864
19865 2001-12-05 Akim Demaille <akim@epita.fr>
19866
19867 * src/reduce.c (reduce_grammar_tables): No longer disable the
19868 removal of useless rules via CPP but via `if (0)', so that the
19869 compiler still check the code is valid.
19870 For instance, it should have noticed `rline' no longer exists: use
19871 the `line' member of rule_t.
19872 * src/gram.c (dummy, rline): Remove, unused.
19873
19874 2001-12-05 Akim Demaille <akim@epita.fr>
19875
19876 * src/output.c (pack_vector): Use assert, not berror.
19877 * src/main.c (berror): Remove, unused.
19878
19879 2001-12-05 Akim Demaille <akim@epita.fr>
19880
19881 New experimental feature: if --verbose --trace output all the
19882 items of a state, not only its kernel.
19883
19884 * src/print.c (print_core): If `trace_flag', then invoke closure
19885 before outputting the items of the state (print_core is no longer
19886 a correct name them).
19887 (print_results): Invoke new_closure/free_closure if needed.
19888
19889 2001-12-05 Akim Demaille <akim@epita.fr>
19890
19891 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19892 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19893 (nitemset): for consistency with the rest of the project.
19894
19895 2001-12-05 Akim Demaille <akim@epita.fr>
19896
19897 * src/closure.c (print_closure): Improve.
19898 (closure): Use it for printing input and output.
19899
19900 2001-12-05 Akim Demaille <akim@epita.fr>
19901
19902 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19903 indexed by nonterminals.
19904
19905 2001-12-05 Akim Demaille <akim@epita.fr>
19906
19907 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19908 what it was!).
19909 * src/warshall.h: Remove accidental duplication of the content.
19910
19911 2001-12-05 Akim Demaille <akim@epita.fr>
19912
19913 * src/closure.c (set_fderives): De-obfuscate.
19914
19915 2001-12-05 Akim Demaille <akim@epita.fr>
19916
19917 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19918
19919 2001-12-05 Akim Demaille <akim@epita.fr>
19920
19921 * src/closure.c (set_firsts): De-obfuscate.
19922
19923 2001-12-05 Akim Demaille <akim@epita.fr>
19924
19925 * src/output.c (action_row): De-obfuscate
19926 using the good o' techniques: arrays not pointers, variable
19927 locality, BITISSET, RESETBIT etc.
19928
19929 2001-12-05 Akim Demaille <akim@epita.fr>
19930
19931 Pessimize the code to simplify it: from now on, all the states
19932 have a valid SHIFTS, which NSHIFTS is possibly 0.
19933
19934 * src/LR0.c (shifts_new): Be global and move to..
19935 * src/state.c, src/state.h: here.
19936 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19937 * src/print_graph: Adjust.
19938
19939 2001-12-05 Akim Demaille <akim@epita.fr>
19940
19941 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19942 * src/conflicts.c: Use it.
19943 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19944 incorrectly ``simplified''.
19945
19946 2001-12-05 Akim Demaille <akim@epita.fr>
19947
19948 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19949 using the good o' techniques: arrays not pointers, variable
19950 locality, BITISSET, RESETBIT etc.
19951
19952 2001-12-05 Akim Demaille <akim@epita.fr>
19953
19954 * src/state.h (SHIFT_SYMBOL): New.
19955 * src/conflicts.c: Use it to deobfuscate.
19956
19957 2001-12-05 Akim Demaille <akim@epita.fr>
19958
19959 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19960 (print_reductions): De-obfuscate using the good o' techniques:
19961 arrays not pointers, variable locality, BITISSET.
19962
19963 2001-12-05 Akim Demaille <akim@epita.fr>
19964
19965 * src/conflicts.c (print_reductions): Arrays, not pointers.
19966 Use BITISSET.
19967
19968 2001-12-05 Akim Demaille <akim@epita.fr>
19969
19970 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19971
19972 2001-12-05 Akim Demaille <akim@epita.fr>
19973
19974 * src/conflicts.c (print_reductions): Improve variable locality.
19975
19976 2001-12-05 Akim Demaille <akim@epita.fr>
19977
19978 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19979
19980 2001-12-05 Akim Demaille <akim@epita.fr>
19981
19982 * src/conflicts.c (print_reductions): Improve variable locality.
19983
19984 2001-12-05 Akim Demaille <akim@epita.fr>
19985
19986 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19987 * src/lalr.c: Use them.
19988
19989 2001-12-05 Akim Demaille <akim@epita.fr>
19990
19991 * src/LR0.c (augment_automaton): Formatting changes.
19992 Better variable locality.
19993
19994 2001-12-05 Akim Demaille <akim@epita.fr>
19995
19996 * src/lalr.c (matrix_print): New.
19997 (transpose): Use it.
19998 Use arrays instead of pointers.
19999
20000 2001-12-05 Akim Demaille <akim@epita.fr>
20001
20002 * src/lalr.c (maxrhs): Move to...
20003 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20004 * src/lalr.c (build_relations): Adjust.
20005
20006 2001-12-05 Akim Demaille <akim@epita.fr>
20007
20008 * src/lalr.c (transpose): Free the memory allocated to the
20009 argument, as it is replaced by the results by the unique caller.
20010 (build_relations): Merely invoke transpose: it handles the memory
20011 deallocation.
20012 Improve variable locality.
20013 Avoid variables used as mere abbreviations.
20014 (compute_lookaheads): Use arrays instead of pointers.
20015
20016 2001-12-05 Akim Demaille <akim@epita.fr>
20017
20018 * src/lalr.c (initialize_F): Improve variable locality.
20019 Avoid variables used as mere abbreviations.
20020
20021 2001-12-05 Akim Demaille <akim@epita.fr>
20022
20023 * src/derives.c (print_derives): Display the ruleno.
20024 * src/lalr.c (initialize_F, transpose): Better variable locality
20025 to improve readability.
20026 Avoid variables used as mere abbreviations.
20027
20028 2001-12-05 Akim Demaille <akim@epita.fr>
20029
20030 * src/lalr.c (traverse): Use arrays instead of pointers.
20031
20032 2001-12-05 Akim Demaille <akim@epita.fr>
20033
20034 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20035 the handling of squeue.
20036 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20037
20038 2001-12-05 Akim Demaille <akim@epita.fr>
20039
20040 Because useless nonterminals are now kept alive (instead of being
20041 `destroyed'), we now sometimes examine them, and store information
20042 related to them. Hence we need to know their number, and adjust
20043 memory allocations.
20044
20045 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20046 static.
20047 * src/LR0.c (allocate_itemsets): The memory allocated to
20048 `symbol_count' was used for two different purpose: once to count
20049 the number of occurrences of each symbol, and later reassigned to
20050 `shift_symbol', containing the symbol that can be shifted from a
20051 given state.
20052 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20053 only, and...
20054 (new_itemsets): Allocate `shift_symbol' here.
20055 (allocate_itemsets): symbol_count includes useless nonterminals.
20056 Make room for them.
20057 (free_storage): Use `free', not `XFREE', for pointers that cannot
20058 be null.
20059
20060 2001-12-05 Akim Demaille <akim@epita.fr>
20061
20062 * src/nullable.c (set_nullable): Deobfuscate the handling of
20063 ritem.
20064 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20065
20066 2001-12-05 Akim Demaille <akim@epita.fr>
20067
20068 * src/gram.c, src/gram.h (ritem_print): New.
20069 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20070 (This useless function was defined only to work around VMS linkers
20071 that can't handle compilation units with variables only).
20072 * src/reduce.c (dump_grammar): Use it to trace the construction of
20073 ritem.
20074
20075 2001-12-04 Paul Eggert <eggert@twinsun.com>
20076
20077 * src/bison.simple (union yyalloc): Change member names
20078 to be the same as the stack names.
20079 (yyparse): yyptr is now union yyalloc *, not char *.
20080 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20081 and may generate better code on some machines.
20082 (yystpcpy): Use prototype if __STDC__ is defined, not just
20083 if __cplusplus is defined.
20084
20085 2001-11-30 Akim Demaille <akim@epita.fr>
20086
20087 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20088 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20089 Gettext doesn't compile cleanly, and dies with -Werror.
20090 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20091 Include WARNING_CFLAGS here.
20092 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20093 before being defined.
20094
20095 2001-11-27 Paul Eggert <eggert@twinsun.com>
20096
20097 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20098 First arg is int, not unsigned.
20099 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20100 (SIZE_MAX, UINT_MAX): New macros.
20101 (quotearg_n_options): Abort if N is negative.
20102 Avoid overflow check on hosts where size_t is 64 bits and int
20103 is 32 bits, as overflow is impossible there.
20104 Fix off-by-one typo that caused unnecessary reallocation.
20105
20106 2001-11-29 Paul Eggert <eggert@twinsun.com>
20107
20108 Name space cleanup in generated parser.
20109
20110 * doc/bison.texinfo (Bison Parser): Discuss system headers
20111 and their effect on the user name space.
20112
20113 * src/bison.simple:
20114 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20115 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20116 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20117
20118 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20119 on user names when possible.
20120
20121 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20122 Simplify test for whather <alloca.h> exists.
20123
20124 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20125
20126 (<stdio.h>): Include if YYDEBUG.
20127
20128 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20129 ! defined (yyoverflow) && ! defined (yymemcpy).
20130
20131 (yymemcpy, yyparse): Rename local variables as needed so that
20132 they all begin with 'yy'.
20133
20134 (yystrlen, yystpcpy): New functions.
20135
20136 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20137 All uses changed.
20138
20139 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20140 instead of relying on string.h functions. Use YYSTACK_ALLOC
20141 and YYSTACK_FREE instead of malloc and free.
20142
20143 2001-11-30 Akim Demaille <akim@epita.fr>
20144
20145 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20146 before their first uses.
20147 (YYBISON, YYPURE): Move to the top of the output.
20148
20149 2001-11-30 Akim Demaille <akim@epita.fr>
20150
20151 * tests/reduce.at (Useless Nonterminals): Fix.
20152
20153 2001-11-30 Akim Demaille <akim@epita.fr>
20154
20155 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20156 if body instead of `;' to pacify GCC's warnings.
20157
20158 2001-11-30 Akim Demaille <akim@epita.fr>
20159
20160 Instead of mapping the LHS of unused rules to -1, keep the LHS
20161 valid, but flag the rules as invalid.
20162
20163 * src/gram.h (rule_t): `useful' is a new member.
20164 * src/print.c (print_grammar): Adjust.
20165 * src/derives.c (set_derives): Likewise.
20166 * src/reader.c (packgram, reduce_output): Likewise.
20167 * src/reduce.c (reduce_grammar_tables): Likewise.
20168 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20169
20170 2001-11-30 Akim Demaille <akim@epita.fr>
20171
20172 * src/reduce.c (reduce_output): Formatting changes.
20173 * src/print.c (print_results, print_grammar): Likewise.
20174 * tests/regression.at (Rule Line Numbers)
20175 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20176
20177 2001-11-30 Akim Demaille <akim@epita.fr>
20178
20179 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20180 useless nonterminals, move them at the end of the symbol arrays.
20181 (reduce_output): Adjust.
20182 * tests/reduce.at (Useless Nonterminals): Adjust.
20183
20184 2001-11-30 Akim Demaille <akim@epita.fr>
20185
20186 * src/reduce.c: Various comment/formatting changes.
20187 (nonterminals_reduce): New, extracted from...
20188 (reduce_grammar_tables): here.
20189 (reduce_grammar): Call nonterminals_reduce.
20190
20191 2001-11-29 Paul Eggert <eggert@twinsun.com>
20192
20193 * src/bison.simple (YYSTACK_REALLOC): Remove.
20194 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20195 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20196 New macros.
20197 (union yyalloc): New type.
20198 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20199 an arbitrary restriction on hosts where size_t is wider than int.
20200
20201 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20202 a parser stack overflow. Allocate just one block of memory for all
20203 three stacks, instead of allocating three blocks; this typically is
20204 faster and reduces fragmentation.
20205
20206 Do not limit the number of items in the stack to a value that fits
20207 in 'int', as this is an arbitrary limit on hosts with 64-bit
20208 size_t and 32-bit int.
20209
20210 2001-11-29 Marc Autret <autret_m@epita.fr>
20211
20212 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20213 of defining YYERROR_VERBOSE.
20214 [AT_DATA]: $4 is now out of C declarations in the prologue.
20215
20216 2001-11-28 Marc Autret <autret_m@epita.fr>
20217
20218 * src/reader.c (parse_dquoted_param): New.
20219 (parse_skel_decl): Use it.
20220 * src/lex.h: Add its prototype.
20221 * src/lex.c (literalchar): Become not static.
20222
20223 2001-11-28 Marc Autret <autret_m@epita.fr>
20224
20225 * src/output.h: And put its extern declaration here.
20226 * src/output.c (error_verbose): Define here.
20227 (prepare): Echo name modification.
20228 * src/getargs.h: Clean its extern declaration.
20229 * src/getargs.c (error_verbose_flag): Remove.
20230 (getargs): Remove case 'e'.
20231 * src/options.c (option_table): 'error-verbose' is now seen as simple
20232 percent option.
20233 Include output.h.
20234
20235 * src/reader.c (read_declarations): Remove case tok_include.
20236 (parse_include_decl): Remove.
20237 * src/lex.h (token_t): Remove tok_include.
20238 * src/options.c (option_table): 'include' is now a simple command line
20239 option.
20240
20241 2001-11-28 Marc Autret <autret_m@epita.fr>
20242
20243 * src/bison.simple: Adjust muscle names.
20244 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20245 * src/output.c (prepare): s/_/-/ for the muscles names.
20246 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20247
20248 2001-11-28 Marc Autret <autret_m@epita.fr>
20249
20250 * src/bison.simple: Fix debug.
20251 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20252
20253 2001-11-28 Akim Demaille <akim@epita.fr>
20254
20255 * src/LR0.c (shifts_new): New.
20256 (save_shifts, insert_start_shift, augment_automaton): Use it.
20257
20258 2001-11-28 Akim Demaille <akim@epita.fr>
20259
20260 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20261 keep ruleno only.
20262
20263 2001-11-28 Akim Demaille <akim@epita.fr>
20264
20265 * src/closure.c (closure): Instead of looping over word in array
20266 then bits in words, loop over bits in array.
20267
20268 2001-11-28 Akim Demaille <akim@epita.fr>
20269
20270 * src/closure.c (closure): No longer optimize the special case
20271 where all the bits of `ruleset[r]' are set to 0, to make the code
20272 clearer.
20273
20274 2001-11-28 Akim Demaille <akim@epita.fr>
20275
20276 * src/closure.c (closure): `r' and `c' are new variables, used to
20277 de-obfuscate accesses to RULESET and CORE.
20278
20279 2001-11-28 Akim Demaille <akim@epita.fr>
20280
20281 * src/reduce.c (reduce_print): Use ngettext.
20282 (dump_grammar): Improve the trace accuracy.
20283
20284 2001-11-28 Akim Demaille <akim@epita.fr>
20285
20286 * src/reduce.c (dump_grammar): Don't translate trace messages.
20287
20288 2001-11-28 Akim Demaille <akim@epita.fr>
20289
20290 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20291 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20292 as all tags are free'ed afterwards.
20293 From Enrico Scholz.
20294
20295 2001-11-27 Paul Eggert <eggert@twinsun.com>
20296
20297 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20298 use alloca when we didn't want to, and vice versa.
20299
20300 2001-11-27 Marc Autret <autret_m@epita.fr>
20301
20302 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20303 initialization.
20304 * src/output.c (prepare): Remove its update.
20305
20306 2001-11-27 Marc Autret <autret_m@epita.fr>
20307
20308 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20309 Use %error-verbose.
20310
20311 2001-11-27 Marc Autret <autret_m@epita.fr>
20312
20313 * src/bison.simple: Remove YYERROR_VERBOSE using.
20314 Use %%error_verbose.
20315 (yyparse): Likewise.
20316 * src/output.c (prepare): Give its final value.
20317 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20318 * src/getargs.h: Add its extern declaration.
20319 * src/getargs.c (error_verbose_flag): New int.
20320 (getargs): Update to catch new case.
20321 * src/options.c (option_table): 'error-verbose' is a new option.
20322 (shortopts): Update.
20323
20324 2001-11-27 Akim Demaille <akim@epita.fr>
20325
20326 * src/system.h: Use intl/libgettext.h.
20327 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20328
20329 2001-11-27 Akim Demaille <akim@epita.fr>
20330
20331 * tests/torture.at (Exploding the Stack Size with Malloc):
20332 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20333
20334 2001-11-27 Akim Demaille <akim@epita.fr>
20335
20336 * src/files.c: Include error.h.
20337 Reported by Hans Aberg.
20338
20339 2001-11-26 Marc Autret <autret_m@epita.fr>
20340
20341 * src/reader.c (parse_include_decl): New, not yet implemented.
20342 (read_declarations): Add case tok_include.
20343 * src/getargs.h (include): Add its extern definition.
20344 * src/getargs.c (include): New const char *.
20345 (getargs): Add case '-I'.
20346 * src/options.c (option_table): Add include as command line and
20347 percent option.
20348 * src/lex.h (token_t): Add tok_include.
20349
20350 2001-11-26 Akim Demaille <akim@epita.fr>
20351
20352 * src/reader.c (readgram): Make sure rules for mid-rule actions
20353 have a lineno equal to that of their host rule.
20354 Reported by Hans Aberg.
20355 * tests/regression.at (Rule Line Numbers): New.
20356
20357 2001-11-26 Akim Demaille <akim@epita.fr>
20358
20359 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20360 size_ts.
20361
20362 2001-11-26 Akim Demaille <akim@epita.fr>
20363
20364 * src/complain.c, src/complain.h (error): Remove, provided by
20365 lib/error.[ch].
20366
20367 2001-11-26 Akim Demaille <akim@epita.fr>
20368
20369 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20370 issue an error message.
20371 * tests/regression.at (Invalid %directive): New.
20372 Reported by Hans Aberg.
20373
20374 2001-11-26 Akim Demaille <akim@epita.fr>
20375
20376 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20377 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20378
20379 2001-11-26 Akim Demaille <akim@epita.fr>
20380
20381 * src/conflicts.c (conflicts_print): Don't complain at all when
20382 there are no reduce/reduce conflicts, and as many shift/reduce
20383 conflicts as expected.
20384 * tests/regression.at (%expect right): Adjust.
20385
20386 2001-11-23 Akim Demaille <akim@epita.fr>
20387
20388 * lib/alloca.c: Update, from fileutils.
20389
20390 2001-11-23 Akim Demaille <akim@epita.fr>
20391
20392 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20393
20394 2001-11-23 Akim Demaille <akim@epita.fr>
20395
20396 * src/system.h: Include alloca.h.
20397 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20398
20399 2001-11-23 Akim Demaille <akim@epita.fr>
20400
20401 * src/print_graph.c (print_actions): Remove `rule', unused.
20402 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20403 pacify GCC's signed < unsigned warnings.
20404 * src/closure.c (itemsetsize): Likewise.
20405 * src/reader.c (symbol_list_new): Static.
20406
20407 2001-11-23 Akim Demaille <akim@epita.fr>
20408
20409 Attaching lineno to buckets is stupid, since only one copy of each
20410 symbol is kept, only the line of the first occurrence is kept too.
20411
20412 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20413 * src/reader.c (rline_allocated): Remove, unused.
20414 (symbol_list): Have a `line' member.
20415 (symbol_list_new): New.
20416 (readgram): Use it.
20417 * src/print.c (print_grammar): Output the rule line numbers.
20418 * tests/regression.at (Solved SR Conflicts)
20419 (Unresolved SR Conflicts): Adjust.
20420 Reported by Hans Aberg.
20421
20422 2001-11-22 Marc Autret <autret_m@epita.fr>
20423
20424 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20425
20426 2001-11-22 Marc Autret <autret_m@epita.fr>
20427
20428 * src/muscle_tab.c (muscle_init): Remove initialization of
20429 skeleton muscle.
20430 * src/output.c (output_master_parser): Do it here.
20431
20432 2001-11-20 Akim Demaille <akim@epita.fr>
20433
20434 * po/sv.po: New.
20435 * configure.in (ALL_LINGUAS): Adjust.
20436 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20437 longer contains strings to translate.
20438
20439 2001-11-19 Akim Demaille <akim@epita.fr>
20440
20441 * src/conflicts.c (conflicts_print): Add a missing \n.
20442
20443 2001-11-19 Akim Demaille <akim@epita.fr>
20444
20445 * src/nullable.c (nullable_print): New.
20446 (set_nullable): Call it when tracing.
20447 Better locality of variables.
20448
20449 2001-11-19 Akim Demaille <akim@epita.fr>
20450
20451 * src/print.c (print_actions): Better locality of variables.
20452
20453 2001-11-19 Akim Demaille <akim@epita.fr>
20454
20455 * src/derives.c (print_derives): Fix and enrich.
20456 * src/closure.c (print_fderives): Likewise.
20457
20458 2001-11-19 Akim Demaille <akim@epita.fr>
20459
20460 * src/closure.c (itemsetend): Remove, replaced with...
20461 (itemsetsize): new.
20462
20463 2001-11-19 Akim Demaille <akim@epita.fr>
20464
20465 * src/LR0.c (kernel_end): Remove, replaced with...
20466 (kernel_size): new.
20467
20468 2001-11-19 Akim Demaille <akim@epita.fr>
20469
20470 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20471 to clarify.
20472
20473 2001-11-19 Akim Demaille <akim@epita.fr>
20474
20475 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20476
20477 2001-11-19 Akim Demaille <akim@epita.fr>
20478
20479 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20480 trace messages.
20481 * src/LR0.c: Likewise.
20482 (allocate_itemsets): Use arrays instead of pointers to clarify.
20483
20484 2001-11-19 Akim Demaille <akim@epita.fr>
20485
20486 * src/getargs.c (statistics_flag): Replace with...
20487 (trace_flag): New.
20488 (longopts): Accept --trace instead of --statistics.
20489 * src/getargs.h, src/options.c: Adjust.
20490 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20491 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20492
20493 2001-11-19 Akim Demaille <akim@epita.fr>
20494
20495 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20496 pointers to clarify the code.
20497 (save_reductions, save_shifts): Factor common parts of alternatives.
20498
20499 2001-11-19 Akim Demaille <akim@epita.fr>
20500
20501 * src/LR0.c (new_state, get_state): Complete TRACE code.
20502 * src/closure.c: Include `reader.h' to get `tags', needed by the
20503 trace code.
20504 Rename the conditional DEBUG as TRACE.
20505 Output consistently TRACEs to stderr, not stdout.
20506 * src/derives.c: Likewise.
20507 * src/reduce.c: (inaccessable_symbols): Using if is better style
20508 than goto.
20509 Use `#if TRACE' instead of `#if 0' for tracing code.
20510
20511 2001-11-19 Akim Demaille <akim@epita.fr>
20512
20513 * src/system.h (LIST_FREE, shortcpy): New.
20514 * src/LR0.c: Use them.
20515 * src/output.c (free_itemsets, free_reductions, free_shifts):
20516 Remove, replaced by LIST_FREE.
20517
20518 2001-11-19 Akim Demaille <akim@epita.fr>
20519
20520 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20521 (REDUCTIONS_ALLOC): New.
20522 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20523 allocation.
20524
20525 2001-11-19 Akim Demaille <akim@epita.fr>
20526
20527 * src/LR0.c (new_state): Complete trace code.
20528 * src/nullable.c (set_nullable): Don't translate traces.
20529
20530 2001-11-19 Akim Demaille <akim@epita.fr>
20531
20532 * src/print_graph.c (print_core): Better locality of variables.
20533 * src/print.c (print_core): Likewise.
20534
20535 2001-11-19 Akim Demaille <akim@epita.fr>
20536
20537 * src/vcg.c: You do the output, so you are responsible of the
20538 handling of VCG syntax, in particular: use quotearg.
20539 * src/print_graph.c: Don't.
20540 (print_actions): Don't output the actions as part of the nodes,
20541 since that's the job of the edges.
20542 (print_state): Don't output by hand: fill the node description,
20543 and ask for its output.
20544
20545 2001-11-19 Akim Demaille <akim@epita.fr>
20546
20547 * src/bison.simple (yyparse): When verbosely reporting an error,
20548 no longer put additional quotes around token names.
20549 * tests/calc.at: Adjust.
20550
20551 2001-11-19 Akim Demaille <akim@epita.fr>
20552
20553 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20554 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20555 * src/output.c: Adjust.
20556
20557 2001-11-19 Akim Demaille <akim@epita.fr>
20558
20559 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20560 (rule_t): this.
20561 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20562
20563 2001-11-19 Akim Demaille <akim@epita.fr>
20564
20565 * src/gram.h (rule_t): New.
20566 (rule_table): New.
20567 (rrhs, rlhs): Remove, part of state_t.
20568 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20569 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20570 * src/reader.c, src/reduce.c: Adjust.
20571
20572 2001-11-19 Akim Demaille <akim@epita.fr>
20573
20574 * src/reader.c (symbols_output): New, extracted from...
20575 (packsymbols): Here.
20576 (reader): Call it.
20577
20578 2001-11-19 Akim Demaille <akim@epita.fr>
20579
20580 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20581 (maxrhs): this new function.
20582
20583 2001-11-19 Akim Demaille <akim@epita.fr>
20584
20585 * src/lalr.c (F): New macro to access the variable F.
20586 Adjust.
20587
20588 2001-11-19 Akim Demaille <akim@epita.fr>
20589
20590 * src/lalr.h (LA): New macro to access the variable LA.
20591 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20592 * src/lalr.c: Adjust.
20593
20594 2001-11-19 Akim Demaille <akim@epita.fr>
20595
20596 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20597 (set_state_table): handle the `lookaheads' members.
20598
20599 2001-11-19 Akim Demaille <akim@epita.fr>
20600
20601 * src/lalr.h (lookaheads): Removed array, whose contents is now
20602 a member of...
20603 (state_t): this structure.
20604 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20605 Adjust.
20606
20607 2001-11-19 Akim Demaille <akim@epita.fr>
20608
20609 * src/lalr.h (consistent): Removed array, whose contents is now
20610 a member of...
20611 (state_t): this structure.
20612 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20613 Adjust.
20614
20615 2001-11-19 Akim Demaille <akim@epita.fr>
20616
20617 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20618 contents are now members of...
20619 (state_t): this structure.
20620 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20621 Adjust.
20622
20623 2001-11-19 Akim Demaille <akim@epita.fr>
20624
20625 * src/lalr.h (state_t): New.
20626 (state_table): Be a state_t * instead of a core **.
20627 (accessing_symbol): Remove, part of state_t.
20628 * src/lalr.c: Adjust.
20629 (set_accessing_symbol): Merge into...
20630 (set_state_table): this.
20631 * src/print_graph.c, src/conflicts.c: Adjust.
20632
20633 2001-11-14 Akim Demaille <akim@epita.fr>
20634
20635 * tests/calc.at, tests/output.at, tests/regression.at,
20636 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20637 now the tests are run in private dirs, therefore AC_CLEANUP and
20638 family can be simplified to 0-ary.
20639 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20640 use abs. path to find config.h.
20641 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20642 stderr, there can be way too much random noise.
20643 Instead pass -Werror to GCC and rely on the exit status.
20644 Reported by Wolfram Wagner.
20645
20646 2001-11-14 Akim Demaille <akim@epita.fr>
20647
20648 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20649 defined only if yyoverflow is defined, to avoid `warning: unused
20650 variable `yyvs1''.
20651 Reported by The Test Suite.
20652
20653 2001-11-14 Akim Demaille <akim@epita.fr>
20654
20655 * src/print.c: Include reduce.h.
20656 Reported by Hans Aberg.
20657
20658 2001-11-14 Akim Demaille <akim@epita.fr>
20659
20660 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20661 Revert a previous patch: these are really const.
20662 * src/conflicts.c (conflict_report): Additional useless pair of
20663 braces to pacify GCC's warnings for `if () if () {} else {}'.
20664 * src/lex.c (parse_percent_token): Replace equal_offset with
20665 arg_offset.
20666 arg is const.
20667 Be sure to strdup `arg' when used, since there is no reason for
20668 token_buffer not to change.
20669
20670 2001-11-14 Akim Demaille <akim@epita.fr>
20671
20672 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20673 definition.
20674 * src/main.c (main): Use them.
20675 Suggested by Hans Aberg.
20676
20677 2001-11-12 Akim Demaille <akim@epita.fr>
20678
20679 * src/system.h (ngettext): Now that we use ngettext, be sure to
20680 provide a default definition when NLS are not used.
20681
20682 2001-11-12 Akim Demaille <akim@epita.fr>
20683
20684 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20685 Use @kbd to denote user input.
20686 (Language and Grammar): ANSIfy the example.
20687 Adjust its layout for info/notinfo.
20688 (Location Tracking Calc): Output error messages to stderr.
20689 Output locations in a more GNUtically correct way.
20690 Fix a couple of Englishos.
20691 Adjust @group/@end group pairs.
20692
20693 2001-11-12 Akim Demaille <akim@epita.fr>
20694
20695 %expect was not functioning at all.
20696
20697 * src/conflicts.c (expected_conflicts): Set to -1.
20698 (conflict_report): Use ngettext.
20699 (conflicts_print): Check %expect and make its violation an error.
20700 * doc/bison.texinfo (Expect Decl): Adjust.
20701 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20702 * tests/regression.at (%expect not enough, %expect right)
20703 (%expect too much): New.
20704
20705 2001-11-12 Akim Demaille <akim@epita.fr>
20706
20707 * tests/regression.at (Conflicts): Rename as...
20708 (Unresolved SR Conflicts): this.
20709 (Solved SR Conflicts): New.
20710
20711 2001-11-12 Akim Demaille <akim@epita.fr>
20712
20713 * src/reduce.c (print_results): Rename as...
20714 (reduce_output): This.
20715 Output to OUT, passed as argument, instead of output_obstack.
20716 (dump_grammar): Likewise.
20717 (reduce_free): New.
20718 Also free V1.
20719 (reduce_grammar): No longer call reduce_output, since...
20720 * src/print.c (print_results): do it.
20721 * src/main.c (main): Call reduce_free;
20722
20723 2001-11-12 Akim Demaille <akim@epita.fr>
20724
20725 * src/conflicts.c (print_reductions): Accept OUT as argument.
20726 Output to it, not to output_obstack.
20727 * src/print.c (print_actions): Adjust.
20728
20729 2001-11-12 Akim Demaille <akim@epita.fr>
20730
20731 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20732 the result instead of using...
20733 (src_total, rrc_total, src_count, rrc_count): Remove.
20734 (any_conflicts): Remove.
20735 (print_conflicts): Split into...
20736 (conflicts_print, conflicts_output): New.
20737 * src/conflicts.h: Adjust.
20738 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20739 * src/print.c (print_grammar): Issue `\n' between two rules.
20740 * tests/regression.at (Conflicts): New.
20741 Reported by Tom Lane.
20742
20743 2001-11-12 Akim Demaille <akim@epita.fr>
20744
20745 * tests/regression.at (Invalid input): Remove, duplicate with
20746 ``Invalid input: 1''.
20747
20748 2001-11-12 Akim Demaille <akim@epita.fr>
20749
20750 * tests/torture.at (AT_DATA_STACK_TORTURE)
20751 (Exploding the Stack Size with Alloca)
20752 (Exploding the Stack Size with Malloc): New.
20753
20754 2001-11-12 Akim Demaille <akim@epita.fr>
20755
20756 * src/bison.simple (YYSTACK_REALLOC): New.
20757 (yyparse) [!yyoverflow]: Use it and free the old stack.
20758 Reported by Per Allansson.
20759
20760 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20761
20762 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20763 define CPP macro, which substitute YYSTYPE by yystype.
20764 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20765 with yyltype/YYLTYPE. This allows inclusion of the generated
20766 header within the parser if the compiler, such as GGC, accepts
20767 multiple equivalent #defines.
20768 From Akim.
20769
20770 2001-11-05 Akim Demaille <akim@epita.fr>
20771
20772 * src/reader.c (symbols_output): New, extracted from...
20773 (packsymbols): here.
20774 (reader): Adjust.
20775
20776 2001-11-05 Akim Demaille <akim@epita.fr>
20777
20778 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20779
20780 2001-11-05 Akim Demaille <akim@epita.fr>
20781
20782 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20783 pattern.
20784
20785 2001-11-05 Akim Demaille <akim@epita.fr>
20786
20787 * src/options.h (struct option_table_struct): set_flags is void*.
20788 * src/options.c (longopts): Support `--output' and `%output'.
20789 (usage): Adjust.
20790 * src/lex.h (tok_setopt): Remove, replaced with...
20791 (tok_intopt, tok_stropt): these new guys.
20792 * src/lex.c (getopt.h): Not needed.
20793 (token_buffer, unlexed_token_buffer): Not const.
20794 (percent_table): Promote `-' over `_' in directive names.
20795 Active `%name-prefix', `file-prefix', and `output'.
20796 (parse_percent_token): Accept possible arguments to directives.
20797 Promote `-' over `_' in directive names.
20798
20799 2001-11-04 Akim Demaille <akim@epita.fr>
20800
20801 * doc/bison.texinfo (Decl Summary): Split the list into
20802 `directives for grammars' and `directives for bison'.
20803 Sort'em.
20804 Add description of `%name-prefix', `file-prefix', and `output'.
20805 Promote `-' over `_' in directive names.
20806 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20807 Simplify the description of `--name-prefix'.
20808 Promote `-' over `_' in directive names.
20809 Promote `--output' over `--output-file'.
20810 Fix the description of `--defines'.
20811 * tests/output.at: Exercise %file-prefix and %output.
20812
20813 2001-11-02 Akim Demaille <akim@epita.fr>
20814
20815 * doc/refcard.tex: Update.
20816
20817 2001-11-02 Akim Demaille <akim@epita.fr>
20818
20819 * src/symtab.h (SUNDEF): New.
20820 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20821 stand for `uninitialized', instead of 0.
20822 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20823 * src/lex.c (lex): Adjust.
20824
20825 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20826 Number it 0.
20827 Let yylex return it instead of a plain 0.
20828 Reported by Dick Streefland.
20829
20830 2001-11-02 Akim Demaille <akim@epita.fr>
20831
20832 * tests/regression.at (Mixing %token styles): New test.
20833
20834 2001-11-02 Akim Demaille <akim@epita.fr>
20835
20836 * src/reader.c (parse_thong_decl): Formatting changes.
20837 (token_translations_init): New, extracted from...
20838 (packsymbols): Here.
20839 Adjust.
20840
20841 2001-11-01 Akim Demaille <akim@epita.fr>
20842
20843 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20844 Check that `9foo.y' produces correct cpp guards.
20845 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20846 guards.
20847 Reported by Wwp.
20848
20849 2001-11-01 Akim Demaille <akim@epita.fr>
20850
20851 * tests/regression.at (Invalid input: 2): New.
20852 * src/lex.c (unlexed_token_buffer): New.
20853 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20854 too.
20855 Reported by Wwp.
20856
20857 2001-11-01 Akim Demaille <akim@epita.fr>
20858
20859 * tests/calc.at: Catch up with 1.30.
20860 * configure.in: Bump to 1.49a.
20861 Adjust to newer Autotest.
20862
20863 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20864
20865 * src/conflicts.c: Move global variables rrc_total and src_total ...
20866 (print_conflicts): here.
20867 * src/output.c (output): Free global variable user_toknums.
20868 * src/lex.c (token_obstack): Become static.
20869
20870 2001-10-18 Akim Demaille <akim@epita.fr>
20871
20872 * tests/atlocal.in (GCC): Add.
20873 * tests/calc.at: s/m4_match/m4_bmatch/.
20874 s/m4_patsubst/m4_bpatsubst/.
20875 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20876 * configure.in: AC_SUBST(GCC).
20877
20878 2001-10-14 Marc Autret <autret_m@epita.fr>
20879
20880 * src/options.c (create_long_option_table): Fix.
20881
20882 2001-10-10 Akim Demaille <akim@epita.fr>
20883
20884 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20885
20886 2001-10-04 Akim Demaille <akim@epita.fr>
20887
20888 * src/reader.c (parse_union_decl): Push the caracters in
20889 union_obstack, not attrs_obstack.
20890
20891 2001-10-04 Akim Demaille <akim@epita.fr>
20892
20893 Merge in the branch 1.29.
20894
20895 * src/reader.c (packsymbols): Use a temporary obstack for
20896 `%%tokendef', since output_stack is already used elsewhere.
20897
20898 2001-10-02 Akim Demaille <akim@epita.fr>
20899
20900 Bump 1.29d.
20901
20902 2001-10-02 Akim Demaille <akim@epita.fr>
20903
20904 Version 1.29c.
20905
20906 2001-10-02 Akim Demaille <akim@epita.fr>
20907
20908 * tests/regression.at (Invalid CPP headers): New.
20909 From Alexander Belopolsky.
20910 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20911
20912 2001-10-02 Akim Demaille <akim@epita.fr>
20913
20914 * tests/regression.at (Invalid input): New.
20915 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20916 Reported by Shura.
20917
20918 2001-10-02 Akim Demaille <akim@epita.fr>
20919
20920 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20921
20922 2001-10-02 Akim Demaille <akim@epita.fr>
20923
20924 * src/output.c (output_parser): Assert `skeleton'.
20925 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20926 systems.
20927 From Shura.
20928
20929 2001-10-01 Marc Autret <autret_m@epita.fr>
20930
20931 * src/lex.h: Echo modifications.
20932 * src/lex.c (unlex): Parameter is now token_t.
20933 From Hans Aberg.
20934
20935 2001-10-01 Marc Autret <autret_m@epita.fr>
20936
20937 * src/main.c: Include lex.h.
20938 From Hans Aberg.
20939
20940 2001-09-29 Akim Demaille <akim@epita.fr>
20941
20942 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20943
20944 2001-09-28 Akim Demaille <akim@epita.fr>
20945
20946 * tests/testsuite.at: Update to newer Autotest.
20947 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20948
20949 2001-09-27 Akim Demaille <akim@epita.fr>
20950
20951 Position independent wrapper.
20952
20953 * tests/bison: Remove.
20954 * tests/bison.in: New.
20955 * configure.in: Adjust.
20956
20957 2001-09-27 Paul Eggert <eggert@twinsun.com>
20958
20959 Port quotearg fixes from tar 1.13.24.
20960
20961 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20962 tm to be declared.
20963 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20964 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20965
20966 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20967 * m4/mbrtowc.m4: New file.
20968 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20969 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20970
20971 2001-09-27 Akim Demaille <akim@epita.fr>
20972
20973 Bump to 1.29c.
20974
20975 2001-09-27 Akim Demaille <akim@epita.fr>
20976
20977 Version 1.29b.
20978
20979 2001-09-25 Akim Demaille <akim@epita.fr>
20980
20981 * src/system.h: Include `xalloc.h'.
20982 Remove it from the C files.
20983 * src/files.c (output_files): Free the obstacks.
20984 * src/lex.c (init_lex): Rename as...
20985 (lex_init): this.
20986 (lex_free): New.
20987 * src/main.c (main): Use it.
20988
20989 2001-09-24 Marc Autret <autret_m@epita.fr>
20990
20991 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20992 to output informations in fout (FILE*).
20993 (open_graph, close_graph): Likewise.
20994 (output_graph, output_edge, output_node): Likewise.
20995 * src/vcg.h: Update function prototypes.
20996 * src/print_graph.c (print_graph): Open output graph file.
20997 (print_actions): Adjust.
20998 * src/files.h: Remove extern declaration.
20999 * src/files.c: Remove graph_obstack declaration.
21000 (open_files): Remove graph_obstack initialization.
21001 (output_files): Remove graph_obstack saving.
21002
21003 2001-09-24 Marc Autret <autret_m@epita.fr>
21004
21005 * src/files.c (compute_output_file_names): Fix.
21006
21007 2001-09-24 Marc Autret <autret_m@epita.fr>,
21008 Akim Demaille <akim@epita.fr>
21009
21010 * src/reader.c (reader): Remove call to free_symtab ().
21011 * src/main.c (main): Call it here.
21012 Include symtab.h.
21013 * src/conflicts.c (initialize_conflicts): Rename as...
21014 (solve_conflicts): this.
21015 * src/print.c (print_core, print_actions, print_state)
21016 (print_grammar): Dump to a file instead a `output_obstack'.
21017 (print_results): Dump `output_obstack', and then proceed with the
21018 FILE *.
21019 * src/files.c (compute_output_file_names, close_files): New.
21020 (output_files): Adjust.
21021 * src/main.c (main): Adjust.
21022
21023 2001-09-23 Marc Autret <autret_m@epita.fr>
21024
21025 * src/files.c (compute_header_macro): Computes header macro name
21026 from spec_defines_file when given.
21027
21028 2001-09-23 Marc Autret <autret_m@epita.fr>
21029
21030 * src/files.c (output_files): Add default extensions.
21031
21032 2001-09-22 Akim Demaille <akim@epita.fr>
21033
21034 * src/conflicts.c (finalize_conflicts): Rename as...
21035 (free_conflicts): this.
21036
21037 2001-09-22 Akim Demaille <akim@epita.fr>
21038
21039 * src/gram.c (gram_free): Rename back as...
21040 (dummy): this.
21041 (output_token_translations): Free `token_translations'.
21042 * src/symtab.c (free_symtab): Free the tag field.
21043
21044 2001-09-22 Akim Demaille <akim@epita.fr>
21045
21046 Remove `translations' as it is always set to true.
21047
21048 * src/gram.h: Adjust.
21049 * src/reader.c (packsymbols, parse_token_decl): Adjust
21050 * src/print.c (print_grammar): Adjust.
21051 * src/output.c (output_token_translations): Adjust.
21052 * src/lex.c (lex): Adjust.
21053 * src/gram.c: Be sure the set pointers to NULL.
21054 (dummy): Rename as...
21055 (gram_free): this.
21056
21057 2001-09-22 Akim Demaille <akim@epita.fr>
21058
21059 * configure.in: Invoke AM_LIB_DMALLOC.
21060 * src/system.h: Use dmalloc.
21061 * src/LR0.c: Be sure to have pointers initialized to NULL.
21062 (allocate_itemsets): Allocate kernel_items only if needed.
21063
21064 2001-09-22 Akim Demaille <akim@epita.fr>
21065
21066 * configure.in: Bump to 1.29b.
21067 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21068 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21069 need xmalloc.c in calc.y.
21070 From Pascal Bart.
21071
21072 2001-09-21 Akim Demaille <akim@epita.fr>
21073
21074 Version 1.29a.
21075 * Makefile.maint, config/config.guess, config/config.sub,
21076 * config/missing: Update from masters.
21077 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21078 upon package.m4.
21079 * configure.in (ALL_LINGUAS): Add `tr'.
21080
21081 2001-09-21 Akim Demaille <akim@epita.fr>
21082
21083 * tests/Makefile.am (package.m4): Move to...
21084 ($(srcdir)/$(TESTSUITE)): here.
21085
21086 2001-09-20 Akim Demaille <akim@epita.fr>
21087
21088 * src/complain.c: No longer try to be standalone: use system.h.
21089 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21090 * src/complain.h: Likewise.
21091 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21092 Remove the unused variable `n'.
21093 From Albert Chin-A-Young.
21094
21095 2001-09-18 Marc Autret <autret_m@epita.fr>
21096
21097 * doc/bison.1: Update.
21098 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21099 descriptions.
21100 (Option Cross Key): Update.
21101 Add --graph.
21102
21103 2001-09-18 Marc Autret <autret_m@epita.fr>
21104
21105 * tests/regression.at: New test (comment in %union).
21106
21107 2001-09-18 Marc Autret <autret_m@epita.fr>
21108
21109 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21110 do that.
21111 Reported by Keith Browne.
21112
21113 2001-09-18 Marc Autret <autret_m@epita.fr>
21114
21115 * tests/output.at: Add tests for --defines and --graph.
21116
21117 2001-09-18 Marc Autret <autret_m@epita.fr>
21118
21119 * tests/output.at: Removes tests of %{header,src}_extension features.
21120
21121 2001-09-18 Akim Demaille <akim@epita.fr>
21122
21123 * tests/Makefile.am (package.m4): New.
21124 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21125 (_AT_CHECK_CALC_ERROR): Likewise.
21126 Factor the `, ' part of verbose error messages.
21127
21128 2001-09-18 Marc Autret <autret_m@epita.fr>
21129
21130 * src/getargs.c (longopts): Declare --defines and --graph as options
21131 with optional arguments.
21132 * src/files.h: Add extern declarations.
21133 * src/files.c (spec_graph_file, spec_defines_file): New.
21134 (output_files): Update.
21135 Remove CPP-outed code.
21136
21137 2001-09-18 Marc Autret <autret_m@epita.fr>
21138
21139 Turn off %{source,header}_extension feature.
21140
21141 * src/files.c (compute_exts_from_gf): Update.
21142 (compute_exts_from_src): Update.
21143 (output_files): CPP-out useless code.
21144 * src/files.h: Remove {header,source}_extension extern declarations.
21145 * src/reader.c (parse_dquoted_param): CPP-out.
21146 (parse_header_extension_decl): Remove.
21147 (parse_source_extension_decl): Remove.
21148 (read_declarations): Remove cases tok_{hdrext,srcext}.
21149 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21150 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21151
21152 2001-09-10 Akim Demaille <akim@epita.fr>
21153
21154 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21155 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21156 (AT_CHECK_OUTPUT): this.
21157 Merely check ls' exit status, its output is useless.
21158
21159 2001-09-10 Akim Demaille <akim@epita.fr>
21160
21161 * tests/calc.at: Use m4_match.
21162 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21163
21164 2001-09-10 Marc Autret <autret_m@epita.fr>,
21165 Akim Demaille <akim@epita.fr>
21166
21167 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21168 enum color_e.
21169 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21170 to `normal'.
21171 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21172 * src/lex.h: Adjust prototype.
21173 (token_t): Add `tok_undef'.
21174 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21175 (parse_percent_token): Now returns token_t.
21176 Add default statement in switch.
21177 (lex): Separate `c' as an input variable, from the token_t result
21178 part.
21179 (unlexed): Is a token_t.
21180
21181 2001-09-10 Akim Demaille <akim@epita.fr>
21182
21183 * configure.in: Bump to 1.29a.
21184
21185 2001-09-07 Akim Demaille <akim@epita.fr>
21186
21187 Version 1.29.
21188
21189 2001-08-30 Akim Demaille <akim@epita.fr>
21190
21191 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21192 * m4/atconfig.m4: Remove.
21193 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21194 * tests/bison: New.
21195 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21196 m4_if, m4_patsubst, and m4_regexp.
21197 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21198 `input' file instead of echo.
21199
21200 2001-08-29 Akim Demaille <akim@epita.fr>
21201
21202 Bump to 1.28e.
21203
21204 2001-08-29 Akim Demaille <akim@epita.fr>
21205
21206 Version 1.28d.
21207
21208 2001-08-29 Paul Eggert <eggert@twinsun.com>
21209
21210 * src/bison.simple (yyparse): Don't take the address of an
21211 item before the start of an array, as that doesn't conform to
21212 the C Standard.
21213
21214 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21215
21216 * doc/bison.texinfo (Location Tracking Calc): New node.
21217
21218 2001-08-29 Paul Eggert <eggert@twinsun.com>
21219
21220 * src/output.c (output): Do not define const, as this now
21221 causes more problems than it cures.
21222
21223 2001-08-29 Akim Demaille <akim@epita.fr>
21224
21225 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21226 the nodes.
21227 Be sure to tag the `detailmenu'.
21228
21229 2001-08-29 Akim Demaille <akim@epita.fr>
21230
21231 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21232 download in a tmp dir.
21233
21234 2001-08-28 Marc Autret <autret_m@epita.fr>
21235
21236 * config/depcomp: New file.
21237
21238 2001-08-28 Marc Autret <autret_m@epita.fr>
21239
21240 * doc/bison.1 (mandoc): Adjust.
21241 From Juan Manuel Guerrero.
21242
21243 2001-08-28 Marc Autret <autret_m@epita.fr>
21244
21245 * src/print_graph.c (print_state): Fix.
21246
21247 2001-08-27 Marc Autret <autret_m@epita.fr>
21248
21249 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21250 char * members.
21251 Echo modifications to the functions prototypes.
21252 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21253
21254 2001-08-27 Marc Autret <autret_m@epita.fr>
21255
21256 * src/vcg.c: Include `xalloc.h'.
21257 (add_colorentry): New.
21258 (add_classname): New.
21259 (add_infoname): New.
21260 * src/vcg.h: Add new prototypes.
21261
21262 2001-08-27 Akim Demaille <akim@epita.fr>
21263
21264 * Makefile.maint: Sync. again with CVS Autoconf.
21265
21266 2001-08-27 Akim Demaille <akim@epita.fr>
21267
21268 * Makefile.maint: Formatting changes.
21269 (po-update, cvs-update, update): New targets.
21270 (AMTAR): Remove.
21271
21272 2001-08-27 Akim Demaille <akim@epita.fr>
21273
21274 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21275 * Makefile.maint: Sync. with CVS Autoconf.
21276
21277 2001-08-27 Marc Autret <autret_m@epita.fr>
21278
21279 * src/vcg.h (struct infoname_s): New.
21280 (struct colorentry_s): New.
21281 (graph_s): New fields {vertical,horizontal}_order in structure.
21282 Add `infoname' field.
21283 Add `colorentry' field;
21284 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21285 (G_HORIZONTAL_ORDER): New.
21286 (G_INFONAME): New.
21287 (G_COLORENTRY): New.
21288 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21289 Add output of `infoname'.
21290 Add output of `colorentry'.
21291
21292 2001-08-27 Marc Autret <autret_m@epita.fr>
21293
21294 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21295 This one shadowed a global parameter.
21296
21297 2001-08-24 Marc Autret <autret_m@epita.fr>
21298
21299 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21300 instead of `unsigned'.
21301 (print_state): Do not call obstack_object_size () in obstack_grow ()
21302 to avoid macro variables shadowing.
21303
21304 2001-08-23 Marc Autret <autret_m@epita.fr>
21305
21306 * src/lex.c (percent_table): Typo: s/naem/name/.
21307 Add graph option.
21308 Normalize new options declarations.
21309
21310 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21311
21312 * tests/suite.at: Exercise %header_extension and %source_extension.
21313
21314 2001-08-16 Marc Autret <autret_m@epita.fr>
21315
21316 * src/reader.c (parse_dquoted_param): New.
21317 (parse_header_extension_decl): Use it.
21318 (parse_source_extension_decl): Likewise.
21319
21320 2001-08-16 Marc Autret <autret_m@epita.fr>
21321
21322 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21323 (get_xxxx_str): Use assert () instead of complain ().
21324 Remove return invokations in default cases.
21325 (get_decision_str): Modify default behaviour. Remove second argument.
21326 Echo modifications on calls.
21327 (output_graph): Fix.
21328
21329 2001-08-16 Marc Autret <autret_m@epita.fr>
21330
21331 * src/getargs.c (usage): Update with ``-g, --graph''.
21332
21333 2001-08-16 Marc Autret <autret_m@epita.fr>
21334
21335 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21336 (Option Cross Key): Likewise.
21337 * doc/bison.1: Update.
21338
21339 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21340
21341 * src/output.c (output_master_parser): Don't finish action_obstack.
21342 (output_parser): Don't care about the muscle action, here.
21343 (prepare): Copy the action_obstack in the action muscle.
21344 (output): Free action_obstack.
21345
21346 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21347
21348 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21349 will contain `%union' declaration.
21350 (parse_union_decl): Delete #line directive output.
21351 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21352 informations about %union.
21353 (parse_union_decl): Copy the union_obstack in the muscle stype.
21354 * src/bison.simple: Add new #line directive.
21355 Add typdef %%stype YYSTYPE.
21356
21357 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21358
21359 * src/bison.simple: Add new `#line' directive.
21360
21361 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21362
21363 * src/bison.simple: New `#line' directive.
21364 * src/output.c (output_parser): Support new dynamic muscle input_line.
21365
21366 2001-09-22 Marc Autret <autret_m@epita.fr>
21367
21368 * src/output.c (output_master_parser): New.
21369 (output_parser): Be more re-entrant.
21370
21371 2001-09-21 Marc Autret <autret_m@epita.fr>
21372
21373 * src/reader.c (copy_definition, parse_union_decl): Update and use
21374 `linef' muscle.
21375 (copy_action): Likewise.
21376 Use obstack_1grow ().
21377 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21378
21379 2001-09-21 Marc Autret <autret_m@epita.fr>
21380
21381 * src/options.c (option_table): Adjust.
21382 * src/lex.c (parse_percent_token): Fix.
21383
21384 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21385
21386 * src/options.c (symtab.h): Include it, need by lex.h.
21387
21388 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21389
21390 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21391 is now an option_table_struct*.
21392 (option_strcmp): New function option_strcmp.
21393 (parse_percent_token): Call option_strcmp.
21394 * src/getargs.c (xalloc.h, options.h): Include it.
21395 (getargs): Call create_long_option_table.
21396 (getargs): Free longopts at the end of the function.
21397 (shortopts): Move in options.c.
21398 * src/options.c (create_long_option_table): New function. Convert
21399 information from option_table to option structure.
21400 * src/reader.c (options.h): Include it.
21401
21402 * src/Makefile.am: Adjust.
21403 * src/options.c (option_table): Create from longopts and percent_table.
21404 * src/getargs.c (longopts): Delete.
21405 * src/lex.c (struct percent_table_struct): Delete.
21406 (percent_table): Delete.
21407 (options.h): Include it.
21408 * src/options.c: Create.
21409 * src/options.h: Create.
21410 Declare enum opt_access_e.
21411 Define struct option_table_struct.
21412
21413 2001-09-20 Marc Autret <autret_m@epita.fr>
21414
21415 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21416 sections of Bison.
21417
21418 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21419
21420 * src/bison.simple: s/%%filename/%%skeleton.
21421 * src/muscle_tab.c (getargs.h): Include it.
21422 (muscle_init): Insert new muscle skeleton.
21423
21424 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21425
21426 * src/output.c (output_parser): Delete unused variable actions_dumped.
21427
21428 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21429
21430 * src/output.c (output): Delete call to reader_output_yylsp.
21431 * src/reader.c (reader): Likewise.
21432 * src/reader.h: Delete declaration of reader_output_yylsp.
21433
21434 2001-09-02 Marc Autret <autret_m@epita.fr>
21435
21436 * src/reader.c: Include muscle_tab.h.
21437 (parse_union_decl): Update.
21438 (parse_macro_decl): Rename parse_muscle_decl.
21439 Update to use renamed functions and variable.
21440 (read_declarations, copy_action, read_additionnal_code, : Updated
21441 with correct variables and functions names.
21442 (packsymbols, reader): Likewise.
21443
21444 * src/reader.h (muscle_obstack): Extern declaration update.
21445
21446 * src/output.c: Include muscle_tab.h
21447 In all functions using macro_insert, change by using muscle_insert ().
21448 (macro_obstack): Rename muscle_obstack.
21449 Echo modifications in the whole file.
21450 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21451 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21452 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21453
21454 * src/muscle_tab.h: Update double inclusion macros.
21455 (macro_entry_s): Rename muscle_entry_s.
21456 Update prototypes.
21457
21458 * src/muscle_tab.c: Include muscle_tab.h.
21459 Rename macro_tabble to muscle_table.
21460 (mhash1, mhash2, mcmp): Use muscle_entry.
21461 (macro_init): Rename muscle_init. Update.
21462 (macro_insert): Rename muscle_insert. Update.
21463 (macro_find): Rename muscle_find. Update.
21464
21465 * src/main.c: Include muscle_tab.h.
21466 (main): Call muscle_init ().
21467 * src/Makefile.am (bison_SOURCES): Echo modifications.
21468
21469 2001-09-02 Marc Autret <autret_m@epita.fr>
21470
21471 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21472
21473 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21474
21475 2001-09-02 Marc Autret <autret_m@epita.fr>
21476
21477 * src/macrotab.c, src/macrotab.h: Remove.
21478
21479 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21480
21481 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21482 filename.
21483
21484 2001-09-01 Marc Autret <autret_m@epita.fr>
21485
21486 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21487 to an explicit value to activate the feature. We do it here.
21488
21489 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21490
21491 * src/output.c (prepare): Delete the `filename' muscule insertion.
21492 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21493 (parse_union_decl): Likewise.
21494 * src/macrotab.c (macro_init): Initialize filename by infile.
21495
21496 2001-08-31 Marc Autret <autret_m@epita.fr>
21497
21498 * src/bison.simple (YYLSP_NEEDED): New definition.
21499 * src/output.c (prepare): Add macro insertion of `locations_flag'
21500
21501 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21502
21503 * src/output.c (prepare): Delete insertion of previous muscles,
21504 and insert the `prefix' muscles.
21505 * src/macrotab.c (macro_init): Likewise.
21506 (macro_init): Initialization prefix directive by `yy'.
21507 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21508 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21509 yylval, yydebug, yyerror, yynerrs and yyparse.
21510 New directive `#define' to substitute yydebug, ... with option
21511 name_prefix.
21512
21513 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21514
21515 * src/main.c (main): Standardize.
21516 * src/output.c (output_table_data, output_parser): Likewise.
21517 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21518
21519 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21520
21521 * src/reader.c (read_additionnal_code): Rename %%user_code to
21522 %%epilogue.
21523 * src/output.c (output): Rename %%declarations to %%prologue.
21524 * src/bison.simple: Echo modifications.
21525
21526 2001-08-31 Marc Autret <autret_m@epita.fr>
21527
21528 * src/reader.c (readgram): CleanUp.
21529 (output_token_defines): Likewise.
21530 (packsymbols): Likewise.
21531 (reader): Likewise.
21532 * src/output.c (output): CPP-out useless code.
21533
21534 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21535
21536 * src/reader.c (reader): Delete obsolete call to function
21537 output_trailers and output_headers.
21538 * src/output.h: Remove obsolete functions prototypes of output_headers
21539 and output_trailers.
21540
21541 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21542
21543 * src/main.c: Include macrotab.h.
21544 * src/macrotab.h (macro_entry_s): Constify fields.
21545 Adjust functions prototypes.
21546 * src/macrotab.c (macro_insert): Constify key and value.
21547 (macro_find): Constify key.
21548 (macro_insert): Include 'xalloc.h'
21549 (macro_insert): Use XMALLOC.
21550 (macro_find): Constify return value.
21551 * src/output.c (output_table_data): Rename table to table_data.
21552 (output_parser): Constify macro_key, macro_value.
21553
21554 2001-08-30 Marc Autret <autret_m@epita.fr>
21555
21556 * src/reader.c (parse_skel_decl): New.
21557 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21558 * src/lex.h (token_t): New token `tok_skel'.
21559 * src/lex.c (percent_table): Add skeleton option entry.
21560 Standardize.
21561
21562 2001-08-29 Marc Autret <autret_m@epita.fr>
21563
21564 * src/bison.simple: Add %%user_code directive at the end.
21565 * src/reader.c (read_additionnal_code): New.
21566 (reader): Use it.
21567 * src/output.c (output_program): Remove.
21568 (output): Update.
21569
21570 2001-08-28 Marc Autret <autret_m@epita.fr>
21571
21572 * src/output.c (output_actions): Clean up.
21573 (output_gram): CPP-out useless code.
21574 * src/reader.c (reader): Clean up, CPP-out useless code.
21575
21576 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21577
21578 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21579 directive.
21580 * src/bison.simple: Add `%%definitions'.
21581
21582 2001-08-28 Marc Autret <autret_m@epita.fr>
21583
21584 * config/depcomp: New file.
21585
21586 2001-08-27 Paul Eggert <eggert@twinsun.com>
21587
21588 * src/bison.simple (yyparse): Don't take the address of an
21589 item before the start of an array, as that doesn't conform to
21590 the C Standard.
21591
21592 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21593
21594 * src/output.c (output): Remove the initialization of the macro
21595 obstack. It was done too late here.
21596
21597 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21598 completely wrong.
21599 (reader): Initialize the macro obstack here, since we need it to grow
21600 '%define' directives.
21601
21602 * src/reader.h: Declare the macro obstack as extern.
21603
21604 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21605
21606 * src/output.c (output_parser): Fix. Store single '%' characters in
21607 the output obstack instead of throwing them away.
21608
21609 2001-08-27 Akim Demaille <akim@epita.fr>
21610
21611 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21612
21613 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21614
21615 * lib/Makefile.am: Adjust.
21616
21617 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21618
21619 * src/bison.simple: Update and add '%%' directives.
21620
21621 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21622
21623 * src/reader.c (reader): Remove calls to 'output_headers' and
21624 'output_trailers'. Remove some C output.
21625 (readgram): Disable a piece of code that was writing a default
21626 definition for 'YYSTYPE'.
21627 (reader_output_yylsp): Remove.
21628 (packsymbols): Output token defintions to a macro.
21629 (copy_definition): Disable C output.
21630
21631 * src/reader.c (parse_macro_decl): New function used to parse macro
21632 declarations.
21633 (copy_string2): Put the body of copy_string into this new function.
21634 Add a parameter to let the caller choose whether he wants to copy the
21635 string delimiters or not.
21636 (copy_string): Be a simple call to copy_string2 with the last argument
21637 bound to true.
21638 (read_declarations): Add case for macro definition.
21639 (copy_identifier): New.
21640 (parse_macro_decl): Read macro identifiers using copy_identifier
21641 rather than lex.
21642
21643 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21644
21645 * src/output.c (prepare): Add prefixed names.
21646 (output_parser): Output semantic actions.
21647 (output_parser): Fix bug on '%%line' directives.
21648
21649 * src/output.c (output_headers): Remove. The C code printed by this
21650 function should now be in the skeletons.
21651 (output_trailers): Remove.
21652 (output): Disable call to 'reader_output_yylsp'.
21653 (output_rule_data): Do not output tables to the table obstack.
21654
21655 * src/output.c: Remove some C dedicated output.
21656 Improve the use of macro and output obstacks.
21657 (output_defines): Remove.
21658
21659 * src/output.c (output_token_translations): Associate 'translate'
21660 table with a macro. No output to the table obstack.
21661 (output_gram): Same for 'rhs' and 'prhs'.
21662 (output_stos): Same for 'stos'.
21663 (output_rule_data): Same for 'r1' and 'r2'.
21664 (token_actions): Same for 'defact'.
21665 (goto_actions): Same for 'defgoto'.
21666 (output_base): Same for 'pact' and 'pgoto'.
21667 (output_table): Same for 'table'.
21668 (output_check): Same for 'check'.
21669
21670 * src/output.c (output_table_data): New function.
21671 (output_short_table): Remove.
21672 (output_short_or_char_table): Remove.
21673
21674 * src/output.c (output_parser): Replace most of the skeleton copy code
21675 with something new. Skeletons are now processed character by character
21676 rather than line by line, and Bison looks for '%%' macros. This is the
21677 first step in making Bison's output process (a lot) more flexible.
21678 (output_parser): Use the macro table.
21679
21680 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21681
21682 * src/main.c (main): Initialize the macro table.
21683
21684 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21685
21686 * src/lex.c (percent_table): Add tok_define.
21687 * src/lex.h: Add tok_define.
21688
21689 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21690
21691 * src/macrotab.c: New file.
21692 * src/macrotab.h: New file.
21693 * src/Makefile.am: Update.
21694
21695 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21696
21697 * lib/hash.c: New file.
21698 * lib/hash.h: New file.
21699 * lib/Makefile.am: Update.
21700
21701 2001-08-15 Akim Demaille <akim@epita.fr>
21702
21703 Version 1.28c.
21704
21705 2001-08-15 Marc Autret <autret_m@epita.fr>
21706
21707 * src/reader.c (readgram): Indent output macro YYSTYPE.
21708 (packsymbols): Likewise.
21709 (output_token_defines): Likewise.
21710 * src/files.c: Standardize.
21711 (compute_header_macro): New.
21712 (defines_obstack_save): New. Use compute_header_macro.
21713 (output_files): Update. Use defines_obstack_save.
21714
21715 2001-08-15 Akim Demaille <akim@epita.fr>
21716
21717 * doc/bison.texinfo (Table of Symbols): Document
21718 YYSTACK_USE_ALLOCA.
21719
21720 2001-08-15 Akim Demaille <akim@epita.fr>
21721
21722 * missing: Update from CVS Automake.
21723 * config/config.guess, config/config.sub, config/texinfo.tex:
21724 Update from gnu.org.
21725
21726 2001-08-15 Akim Demaille <akim@epita.fr>
21727
21728 * Makefile.maint: Sync with CVS Autoconf.
21729
21730 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21731
21732 * doc/bison.texinfo: Include GNU Free Documentation License from
21733 `fdl.texi'.
21734 * doc/fdl.texi: Add to package.
21735
21736 2001-08-14 Marc Autret <autret_m@epita.fr>
21737
21738 Turn on %{source,header}_extension features.
21739
21740 * src/lex.c (percent_table): Un-CPP out header_extension and
21741 source_extension.
21742 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21743 (compute_exts_from_src): Remove conditions. It restores priorities
21744 between options.
21745
21746 2001-08-14 Marc Autret <autret_m@epita.fr>
21747
21748 * src/files.c (compute_base_names): Add extensions computing when
21749 `--file-prefix' used.
21750 Standardize function calls.
21751
21752 2001-08-13 Marc Autret <autret_m@epita.fr>
21753
21754 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21755 defining it (defined but null disables alloca).
21756
21757 2001-08-13 Marc Autret <autret_m@epita.fr>
21758
21759 * src/bison.simple (_yy_memcpy): CPP reformat.
21760
21761 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21762
21763 * tests/atconfig.in (CPPFLAGS): Fix.
21764
21765 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21766
21767 * doc/bison.texinfo: Include GNU General Public License from
21768 `gpl.texi'.
21769 * doc/gpl.texi: Add to package.
21770
21771 2001-08-10 Marc Autret <autret_m@epita.fr>
21772
21773 * src/print_graph.h: Fix.
21774 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21775
21776 2001-08-10 Akim Demaille <akim@epita.fr>
21777
21778 * src/system.h: Provide default declarations for stpcpy, strndup,
21779 and strnlen.
21780
21781 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21782
21783 * doc/bison.texinfo (Locations): Update @$ stuff.
21784
21785 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21786
21787 * src/bison.simple (YYLLOC_DEFAULT): Update.
21788 (yyparse): Adjust.
21789
21790 2001-08-08 Marc Autret <autret_m@epita.fr>
21791
21792 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21793 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21794 Reported by Fabrice Bauzac.
21795
21796 2001-08-08 Marc Autret <autret_m@epita.fr>
21797
21798 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21799 * src/vcg.c (output_node): Fix.
21800 * src/vcg.h: Cleanup.
21801 * src/print_graph.c: Add comments.
21802 (node_output_size): New global variable. Simplify the formatting of
21803 the VCG graph output.
21804 (print_actions): Unused code is now used. It notifies the final state
21805 and no action states in the VCG graph. It also give the reduce actions.
21806 The `shift and goto' edges are red and the `go to state' edges are
21807 blue.
21808 Get the current node name and node_obstack by argument.
21809 (node_obstack): New variable.
21810 (print_state): Manage node_obstack.
21811 (print_core): Use node_obstack given by argument.
21812 A node is not only computed here but in print_actions also.
21813 (print_graph): CPP out useless code instead of commenting it.
21814
21815 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21816
21817 * tests/atconfig.in (CPPFLAGS): Fix.
21818
21819 2001-08-07 Akim Demaille <akim@epita.fr>
21820
21821 * src/print_graph.c (quote): New.
21822 (print_core): Use it.
21823
21824 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21825
21826 * src/vcg.c (complain.h): Include it.
21827 Unepitaize `return' invocations.
21828 [NDEBUG] (main): Remove.
21829 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21830 * src/files.c (open_files): Initialize graph_obstack.
21831 * src/print_graph.c (print_actions): CPP out useless code.
21832 (print_core): Don't output the last `\n' in labels.
21833 Use `quote'.
21834 * src/files.c (output_files): Output the VCG file.
21835 * src/main.c (main): Invoke print_graph ();
21836
21837 2001-08-06 Marc Autret <autret_m@epita.fr>
21838
21839 Automaton VCG graph output.
21840 Using option ``-g'' or long option ``--graph'', you can generate
21841 a gram_filename.vcg file containing a VCG description of the LALR (1)
21842 automaton of your grammar.
21843
21844 * src/main.c: Call to print_graph() function.
21845 * src/getargs.h: Update.
21846 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21847 (graph_flag): New flag.
21848 (longopts): Update.
21849 (getargs): Add case `g'.
21850 * src/files.c (graph_obstack): New obstack struct.
21851 (open_files): Initialize new obstack.
21852 (output_files): Saves graph_obstack if required.
21853 * src/files.h (graph_obstack): New extern declaration.
21854 * src/Makefile.am: Add new source files.
21855
21856 2001-08-06 Marc Autret <autret_m@epita.fr>
21857
21858 * src/print_graph.c, src/print_graph.h (graph): New.
21859 * src/vcg.h: New file.
21860 * src/vcg.c: New file, VCG graph handling.
21861
21862 2001-08-06 Marc Autret <autret_m@epita.fr>
21863
21864 Add of %source_extension and %header_extension which specify
21865 the source or/and the header output file extension.
21866
21867 * src/files.c (compute_base_names): Remove initialisation of
21868 src_extension and header_extension.
21869 (compute_exts_from_gf): Update.
21870 (compute_exts_from_src): Update.
21871 (output_files): Update.
21872 * src/reader.c (parse_header_extension_decl): New.
21873 (parse_source_extension_decl): New.
21874 (read_declarations): New case statements for the new tokens.
21875 * src/lex.c (percent_table): Add entries for %source_extension
21876 and %header_extension.
21877 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21878
21879 2001-08-06 Marc Autret <autret_m@epita.fr>
21880
21881 * configure.in: Bump to 1.28c.
21882 * doc/bison.texinfo: Texinfo thingies.
21883
21884 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21885
21886 * tests/atconfig.in (CPPFLAGS): Add.
21887 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21888
21889 2001-08-03 Akim Demaille <akim@epita.fr>
21890
21891 Version 1.28b.
21892
21893 2001-08-03 Akim Demaille <akim@epita.fr>
21894
21895 * tests/Makefile.am (check-local): Ship testsuite.
21896 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21897 Include `string.h'.
21898
21899 2001-08-03 Akim Demaille <akim@epita.fr>
21900
21901 * configure.in: Try using -Wformat when compiling.
21902
21903 2001-08-03 Akim Demaille <akim@epita.fr>
21904
21905 * configure.in: Bump to 1.28b.
21906
21907 2001-08-03 Akim Demaille <akim@epita.fr>
21908
21909 * src/complain.c: Adjust strerror_r portability issues.
21910
21911 2001-08-03 Akim Demaille <akim@epita.fr>
21912
21913 Version 1.28a.
21914
21915 2001-08-03 Akim Demaille <akim@epita.fr>
21916
21917 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21918 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21919 * src/getargs.c: Include complain.h.
21920 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21921 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21922
21923 2001-08-03 Akim Demaille <akim@epita.fr>
21924
21925 * src/reader.c (readgram): Display hidden chars in error messages.
21926
21927 2001-08-03 Akim Demaille <akim@epita.fr>
21928
21929 Update to gettext 0.10.39.
21930
21931 2001-08-03 Akim Demaille <akim@epita.fr>
21932
21933 * lib/strspn.c: New.
21934
21935 2001-08-01 Marc Autret <autret_m@epita.fr>
21936
21937 * doc/bison.texinfo: Update.
21938 * doc/bison.1 (mandoc): Update.
21939 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21940 * src/files.c: Support output files extensions computing.
21941 (src_extension): New static variable.
21942 (header_extension): New static variable.
21943 (tr): New function.
21944 (get_extension_index): New function, gets the index of an extension
21945 filename in a string.
21946 (compute_exts_from_gf): New function, computes extensions from the
21947 grammar file extension.
21948 (compute_exts_from_src): New functions, computes extensions from the
21949 C source file extension, file given by ``-o'' option.
21950 (compute_base_names): Update.
21951 (output_files): Update.
21952
21953 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21954
21955 * doc/bison.texi: Document @$.
21956 (Locations): New section.
21957
21958 2001-07-18 Akim Demaille <akim@epita.fr>
21959
21960 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21961 * config/prev-version.txt, config/move-if-change: New.
21962 * Makefile.am: Adjust.
21963
21964 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21965
21966 * src/bison.simple (yyparse): Suppress warning `comparaison
21967 between signed and unsigned'.
21968
21969 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21970
21971 * src/getargs.h (raw_flag): Remove.
21972 * src/getargs.c: Die on `-r'/`--raw'.
21973 * src/lex.c (parse_percent_token): Die on `%raw'.
21974 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21975 * tests/calc.at: Suppress test with option `--raw'.
21976
21977 2001-07-14 Akim Demaille <akim@epita.fr>
21978
21979 * config/: New.
21980 * configure.in: Require Autoconf 2.50.
21981 Update to gettext 0.10.38.
21982
21983 2001-03-16 Akim Demaille <akim@epita.fr>
21984
21985 * doc/bison.texinfo: ANSIfy the examples.
21986
21987 2001-03-16 Akim Demaille <akim@epita.fr>
21988
21989 * getargs.c (skeleton): New variable.
21990 (longopts): --skeleton is a new option.
21991 (shortopts, getargs): -S is a new option.
21992 * getargs.h: Declare skeleton.
21993 * output.c (output_parser): Use it.
21994
21995 2001-03-16 Akim Demaille <akim@epita.fr>
21996
21997 * m4/strerror_r.m4: New.
21998 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21999 * lib/error.h, lib/error.c: Update.
22000
22001 2001-03-16 Akim Demaille <akim@epita.fr>
22002
22003 * src/getargs.c (longopts): Clean up.
22004
22005 2001-02-21 Akim Demaille <akim@epita.fr>
22006
22007 * src/reader.c (gensym): `gensym_count' is your own.
22008 Use a static buf to create the symbol name, as token_buffer is no
22009 longer a buffer.
22010
22011 2001-02-08 Akim Demaille <akim@epita.fr>
22012
22013 * src/conflicts.c (conflict_report): Be sure not to append to res
22014 between two calls, which could happen if both first sprintf were
22015 skipped, but not the first cp += strlen.
22016
22017 2001-02-08 Akim Demaille <akim@epita.fr>
22018
22019 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22020 New, from fileutils 4.0.37.
22021 * configure.in: Require Autoconf 2.49c. I took some time before
22022 making this decision. This is the only way out for portability
22023 issues in Bison, it would mean way too much duplicate effort to
22024 import in Bison features implemented in 2.49c since 2.13.
22025 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22026
22027 2001-02-02 Akim Demaille <akim@epita.fr>
22028
22029 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22030 * lib/xalloc.h, lib/xmalloc.c: Update.
22031
22032 2001-01-19 Akim Demaille <akim@epita.fr>
22033
22034 Get rid of the ad hoc handling of token_buffer in the scanner: use
22035 the obstacks.
22036
22037 * src/lex.c (token_obstack): New.
22038 (init_lex): Initialize it. No longer call...
22039 (grow_token_buffer): this. Remove it.
22040 Adjust all the places which used it to use the obstack.
22041
22042 2001-01-19 Akim Demaille <akim@epita.fr>
22043
22044 * src/lex.h: Rename all the tokens:
22045 s/\bENDFILE\b/tok_eof/g;
22046 s/\bIDENTIFIER\b/tok_identifier/g;
22047 etc.
22048 Let them be enums, not #define, to ease debugging.
22049 Adjust all the code.
22050
22051 2001-01-18 Akim Demaille <akim@epita.fr>
22052
22053 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22054 * src/lex.c (maxtoken, grow_token_buffer): Static.
22055
22056 2001-01-18 Akim Demaille <akim@epita.fr>
22057
22058 Since we now use obstacks, more % directives can be enabled.
22059
22060 * src/lex.c (percent_table): Also accept `%yacc',
22061 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22062 `%debug'.
22063 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22064 instead of returning a token.
22065 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22066 * src/reader.c (read_declarations): Adjust.
22067 * src/files.c (open_files): Don't call `compute_base_names', don't
22068 compute `attrsfile' since they depend upon data which might be
22069 *in* the input file now.
22070 (output_files): Do it here.
22071 * src/output.c (output_headers): Document the fact that this patch
22072 introduces a guaranteed SEGV for semantic parsers.
22073 * doc/bison.texinfo: Document them.
22074 * tests/suite.at: Exercise these %options.
22075
22076 2000-12-20 Akim Demaille <akim@epita.fr>
22077
22078 Also handle the output file (--verbose) with obstacks.
22079
22080 * files.c (foutput): Remove.
22081 (output_obstack): New.
22082 Adjust all dependencies.
22083 * src/conflicts.c: Return a string.
22084 * src/system.h (obstack_grow_string): Rename as...
22085 (obstack_sgrow): this. Be ready to work with non literals.
22086 (obstack_fgrow4): New.
22087
22088 2000-12-20 Akim Demaille <akim@epita.fr>
22089
22090 * src/files.c (open_files): Fix the computation of short_base_name
22091 in the case of `-o foo.tab.c'.
22092
22093 2000-12-20 Akim Demaille <akim@epita.fr>
22094
22095 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22096 (copy_dollar): Now that everything uses obstacks, get rid of the
22097 FILE * parameters.
22098
22099 2000-12-20 Akim Demaille <akim@epita.fr>
22100
22101 * src/files.c (open_files): Actually the `.output' file is based
22102 on the short_base_name, not base_name.
22103 * tests/suite.at (Checking output file names): Adjust.
22104
22105 2000-12-20 Akim Demaille <akim@epita.fr>
22106
22107 * src/bison.s1: Remove, we now use directly...
22108 * src/bison.simple: this.
22109 * src/Makefile.am: Use pkgdata instead of data.
22110
22111 2000-12-20 Akim Demaille <akim@epita.fr>
22112
22113 * src/files.c (guard_obstack): New.
22114 (open_files): Initialize it.
22115 (output_files): Dump it...
22116 * src/files.h: Export it.
22117 * src/reader.c (copy_guard): Use it.
22118
22119 2000-12-19 Akim Demaille <akim@epita.fr>
22120
22121 * src/files.c (outfile, defsfile, actfile): Removed as global
22122 vars.
22123 (open_files): Don't compute them.
22124 (output_files): Adjust.
22125 (base_name, short_base_name): Be global.
22126 Adjust dependencies.
22127
22128 2000-12-19 Akim Demaille <akim@epita.fr>
22129
22130 * src/files.c (strsuffix): New.
22131 (stringappend): Be just like strcat but allocate.
22132 (base_names): Eve out from open_files.
22133 Try to simplify the rather hairy computation of base_name and
22134 short_base_name.
22135 (open_files): Use it.
22136 * tests/suite.at (Checking output file names): New test.
22137
22138 2000-12-19 Akim Demaille <akim@epita.fr>
22139
22140 * src/system.h (obstack_grow_literal_string): Rename as...
22141 (obstack_grow_string): this.
22142 * src/output.c (output_parser): Recognize `%% actions' instead of
22143 `$'.
22144 * src/bison.s1: s/$/%% actions/.
22145 * src/bison.hairy: Likewise.
22146
22147 2000-12-19 Akim Demaille <akim@epita.fr>
22148
22149 * src/output.c (output_parser): Compute the `#line' lines when
22150 there are.
22151 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22152 Suggested by Hans Aberg.
22153
22154 2000-12-19 Akim Demaille <akim@epita.fr>
22155
22156 Let the handling of the skeleton files be local to the procedures
22157 that use it.
22158
22159 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22160 longer static.
22161 (fparser, open_extra_files): Remove.
22162 (open_files, output_files): Don't take care of fparser.
22163 * src/files.h: Adjust.
22164 * src/output.c (output_parser): Open and close the file to the
22165 skeleton.
22166 * src/reader.c (read_declarations): When %semantic_parser, open
22167 fguard.
22168
22169 2000-12-19 Akim Demaille <akim@epita.fr>
22170
22171 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22172 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22173
22174 2000-12-19 Akim Demaille <akim@epita.fr>
22175
22176 * src/files.c (open_files): Yipee! We no longer need all the code
22177 looking for `/tmp' since we have no tmp file.
22178
22179 2000-12-19 Akim Demaille <akim@epita.fr>
22180
22181 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22182 New macros.
22183 * src/files.c (open_files): Less dependency on MSDOS etc.
22184
22185 2000-12-14 Akim Demaille <akim@epita.fr>
22186
22187 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22188 Provide a default definition.
22189 Use it when executing the default @ action.
22190 * src/reader.c (reader_output_yylsp): No longer include
22191 `timestamp' and `text' in the default YYLTYPE.
22192
22193 2000-12-12 Akim Demaille <akim@epita.fr>
22194
22195 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22196 (copy_guard): Quote the file names.
22197 Reported by Laurent Mascherpa.
22198
22199 2000-12-12 Akim Demaille <akim@epita.fr>
22200
22201 * src/output.c (output_headers, output_program, output): Be sure
22202 to escape special characters when outputting filenames.
22203 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22204 (output_headers): Don't depend on them, Use ACTSTR.
22205
22206 2000-11-17 Akim Demaille <akim@epita.fr>
22207
22208 * lib/obstack.h: Formatting changes.
22209 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22210 prevents type checking.
22211 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22212 cast the value to (void *): assigning a `foo *' to a `void *'
22213 variable is valid.
22214 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22215 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22216 append characters.
22217
22218 2000-11-17 Akim Demaille <akim@epita.fr>
22219
22220 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22221 as...
22222 (suite.m4, regression.m4, calc.m4): these.
22223 * tests/atgeneral.m4: Update from CVS Autoconf.
22224
22225 2000-11-17 Akim Demaille <akim@epita.fr>
22226
22227 * tests/regression.m4 (%union and --defines): New test,
22228 demonstrating a current bug in the obstack implementation.
22229
22230 2000-11-17 Akim Demaille <akim@epita.fr>
22231
22232 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22233 macros.
22234 Use them to declare the variables which are global or local to
22235 `yyparse'.
22236
22237 2000-11-17 Akim Demaille <akim@epita.fr>
22238
22239 * acconfig.h: Remove, no longer used.
22240
22241 2000-11-07 Akim Demaille <akim@epita.fr>
22242
22243 * src: s/Copyright (C)/Copyright/g.
22244
22245 2000-11-07 Akim Demaille <akim@epita.fr>
22246
22247 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22248 defining.
22249 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22250
22251 2000-11-07 Akim Demaille <akim@epita.fr>
22252
22253 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22254 Merge in a single CPP if/else.
22255
22256 2000-11-07 Akim Demaille <akim@epita.fr>
22257
22258 * src/output.c (output): Remove useless variables.
22259 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22260 argument `data' for consistency with the prototypes.
22261 Qualify it `const'.
22262 (obstack_copy, obstack_copy0): Rename the second argument as
22263 `address' for consistency. Qualify it `const'.
22264 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22265 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22266 `const' their input argument (`data' or `address').
22267 Adjust the corresponding macros to include `const' in casts.
22268
22269 2000-11-03 Akim Demaille <akim@epita.fr>
22270
22271 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22272 s/PFILE1/BISON_HAIRY/.
22273 Adjust dependencies.
22274
22275 2000-11-03 Akim Demaille <akim@epita.fr>
22276
22277 For some reason, this was not applied.
22278
22279 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22280 `unlink': it's no longer used.
22281
22282 2000-11-03 Akim Demaille <akim@epita.fr>
22283
22284 * src/files.c (skeleton_find): New function, eved out of...
22285 (open_files, open_extra_files): here.
22286
22287 2000-11-03 Akim Demaille <akim@epita.fr>
22288
22289 Don't use `atexit'.
22290
22291 * src/files.c (obstack_save): New function.
22292 (done): Rename as...
22293 (output_files): this.
22294 Use `obstack_save'.
22295 * src/main.c (main): Don't use `atexit' to register `done', since
22296 it no longer has to remove tmp files, just call `output_files'
22297 when there are no errors.
22298
22299 2000-11-02 Akim Demaille <akim@epita.fr>
22300
22301 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22302 `unlink': it's no longer used.
22303 * src/files.h: Formatting changes.
22304
22305 2000-11-02 Akim Demaille <akim@epita.fr>
22306
22307 Remove the last uses of mktemp and unlink/delete.
22308
22309 * src/files.c (fdefines, ftable): Removed.
22310 (defines_ostack, table_obstack): New.
22311 Adjust dependencies of the former into uses of the latter.
22312 * src/output.c (output_short_or_char_table, output_short_table):
22313 Convert to using obstacks.
22314 * src/reader.c (copy_comment2): Accept one FILE * and two
22315 obstacks.
22316 (output_token_defines, reader_output_yylsp): Use obstacks.
22317 * src/system.h (obstack_fgrow3): New.
22318 * po/POTFILES.in: Adjust.
22319
22320 2000-11-01 Akim Demaille <akim@epita.fr>
22321
22322 Change each use of `fattrs' into a use of `attrs_obstack'.
22323
22324 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22325 * src/files.c (fattrs): Remove.
22326 (attrs_obstack): New.
22327 Adjust all dependencies.
22328 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22329
22330 2000-11-01 Akim Demaille <akim@epita.fr>
22331
22332 Introduce obstacks.
22333 Change each use of `faction' into a use of `action_obstack'.
22334
22335 * lib/obstack.h, lib/obstack.c: New files.
22336 * src/files.c (faction): Remove.
22337 (action_obstack): New.
22338 Adjust all dependencies.
22339
22340 2000-10-20 Akim Demaille <akim@epita.fr>
22341
22342 * lib/quote.h (PARAMS): New macro. Use it.
22343
22344 2000-10-16 Akim Demaille <akim@epita.fr>
22345
22346 * src/output.c (output_short_or_char_table): New function.
22347 (output_short_table, output_token_translations): Use it.
22348 (goto_actions): Use output_short_table.
22349
22350 2000-10-16 Akim Demaille <akim@epita.fr>
22351
22352 * src/symtab.c (bucket_new): New function.
22353 (getsym): Use it.
22354
22355 * src/output.c (output_short_table): New argument to display the
22356 comment associated with the table.
22357 Adjust dependencies.
22358 (output_gram): Use it.
22359 (output_rule_data): Nicer output layout for YYTNAME.
22360
22361 2000-10-16 Akim Demaille <akim@epita.fr>
22362
22363 * src/lex.c (read_typename): New function.
22364 (lex): Use it.
22365 * src/reader.c (copy_dollar): Likewise.
22366
22367 2000-10-16 Akim Demaille <akim@epita.fr>
22368
22369 * src/reader.c (copy_comment2): Expect the input stream to be on
22370 the `/' which is suspected to open a comment, instead of being
22371 called after `//' or `/*' was read.
22372 (copy_comment, copy_definition, parse_union_decl, copy_action)
22373 (copy_guard): Adjust.
22374
22375 2000-10-16 Akim Demaille <akim@epita.fr>
22376
22377 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22378 `read_signed_integer'.
22379
22380 2000-10-16 Akim Demaille <akim@epita.fr>
22381
22382 * src/reader.c (copy_dollar): New function.
22383 (copy_guard, copy_action): Use it.
22384
22385 2000-10-16 Akim Demaille <akim@epita.fr>
22386
22387 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22388 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22389 New files, from Fileutils 4.0.27.
22390 * src/main.c (printable_version): Remove.
22391 * src/lex.c, src/reader.c: Use `quote'.
22392
22393 2000-10-04 Akim Demaille <akim@epita.fr>
22394
22395 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22396
22397 2000-10-04 Akim Demaille <akim@epita.fr>
22398
22399 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22400
22401 2000-10-04 Akim Demaille <akim@epita.fr>
22402
22403 When a literal string is used to define two different tokens,
22404 `bison -v' segfaults.
22405 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22406
22407 * tests/regression.m4: New file.
22408 Include the core of the sample provided by Piotr Gackiewicz.
22409 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22410 properly.
22411
22412 2000-10-04 Akim Demaille <akim@epita.fr>
22413
22414 * src/reader.c (parse_expect_decl): Keep `count' within the size
22415 of `buffer'.
22416 From Neil Booth.
22417
22418 2000-10-02 Paul Eggert <eggert@twinsun.com>
22419
22420 * bison.s1 (yyparse): Assign the default value
22421 unconditionally, to avoid a GCC warning and make the parser a
22422 tad smaller.
22423
22424 2000-10-02 Akim Demaille <akim@epita.fr>
22425
22426 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22427 options.
22428
22429 2000-10-02 Akim Demaille <akim@epita.fr>
22430
22431 * src/derives.c, src/print.c, src/reduce.c: To ease the
22432 translation, move some `\n' out of the translated strings.
22433
22434 2000-10-02 Akim Demaille <akim@epita.fr>
22435
22436 The location tracking mechanism is precious for parse error
22437 messages. Nevertheless, it is enabled only when `@n' is used in
22438 the grammar, which is a different issue (you can use it in error
22439 message, but not in the grammar per se). Therefore, there should
22440 be another means to enable it.
22441
22442 * src/getargs.c (getargs): Support `--locations'.
22443 (usage): Report it.
22444 * src/getargs.h (locationsflag): Export it.
22445 * src/lex.c (percent_table): Support `%locations'.
22446 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22447 with `locationsflag'.
22448 * doc/bison.texinfo: Document `--locations' and `%locations'.
22449 Sort the options.
22450 * tests/calc.m4: Test it.
22451
22452 For regularity of the names, replace each
22453 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22454 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22455 In addition replace each `flag' with `_flag'.
22456
22457 2000-10-02 Akim Demaille <akim@epita.fr>
22458
22459 Also test parse error messages, including with YYERROR_VERBOSE.
22460
22461 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22462 associative).
22463 Use it to check the computations.
22464 Use it to check `nonassoc' is honored.
22465 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22466 `--yyerror-verbose'.
22467 (_AT_CHECK_CALC): Adjust to this option.
22468 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22469
22470 2000-10-02 Akim Demaille <akim@epita.fr>
22471
22472 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22473 the latter demonstrates a flaw in the handling of non debugging
22474 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22475 was used in order to simplify:
22476
22477 #if YYDEBUG
22478 if (yydebug)
22479 {
22480 ...
22481 }
22482 #endif
22483
22484 into
22485
22486 if (yydebug)
22487 {
22488 ...
22489 }
22490
22491 unfortunately this leads to a CPP conflict when
22492 `--name-prefix=foo' is used since it produces `#define yydebug
22493 foodebug'.
22494
22495 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22496 (YYDPRINTF): New macro.
22497 Spread its use.
22498 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22499 the bison options.
22500 Also test `--verbose', `--defines' and `--name-prefix'.
22501
22502 2000-10-02 Akim Demaille <akim@epita.fr>
22503
22504 Improve the readability of the produced parsers.
22505
22506 * src/bison.s1: Formatting changes.
22507 Improve the comment related to the `$' mark.
22508 (yydefault): Don't fall through to `yyresume': `goto' there.
22509 * src/output.c (output_parser): When the `$' is met, skip the end
22510 of its line.
22511 New variable, `number_of_dollar_signs', to check there's exactly
22512 one `$' in the parser skeleton.
22513
22514 2000-10-02 Akim Demaille <akim@epita.fr>
22515
22516 * lib/xstrdup.c: New file, from the fileutils.
22517 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22518 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22519 instead of strlen + xmalloc + strcpy.
22520 * src/symtab.c (copys): Remove, use xstrdup instead.
22521
22522 2000-10-02 Akim Demaille <akim@epita.fr>
22523
22524 * src/gram.h (associativity): New enum type which replaces the
22525 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22526 `right_assoc', `left_assoc' and `non_assoc'.
22527 Adjust all dependencies.
22528 * src/reader.c: Formatting changes.
22529 (LTYPESTR): Don't define it, use it as a literal in
22530 `reader_output_yylsp'.
22531 * src/symtab.h (symbol_class): New enum type which replaces the
22532 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22533 `sunknown', `stoken and `snterm'.
22534
22535 2000-10-02 Akim Demaille <akim@epita.fr>
22536
22537 * src/getargs.c (fixed_outfiles): Rename as...
22538 (yaccflag): for consistency and accuracy.
22539 Adjust dependencies.
22540
22541 2000-10-02 Akim Demaille <akim@epita.fr>
22542
22543 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22544 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22545 difficult and introduced a lot of core dump. It turns out that
22546 Bison used an implementation of `xmalloc' based on `calloc', and
22547 at various places it does depend upon the initialization to 0. I
22548 have not tried to isolate the pertinent places, and all the former
22549 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22550 someone should address this issue.
22551
22552 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22553 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22554 files.
22555 Adjust dependencies.
22556 * src/warshall.h: New file.
22557 Propagate.
22558
22559 2000-10-02 Akim Demaille <akim@epita.fr>
22560
22561 Various anti-`extern in *.c' changes.
22562
22563 * src/system.h: Include `assert.h'.
22564
22565 2000-10-02 Akim Demaille <akim@epita.fr>
22566
22567 * src/state.h (nstates, final_state, first_state, first_shift)
22568 (first_reduction): Move their exportation from here...
22569 * src/LR0.h: to here.
22570 Adjust dependencies.
22571 * src/getargs.c (statisticsflag): New variable.
22572 Add support for `--statistics'.
22573 Adjust dependencies.
22574
22575 Remove a lot of now useless `extern' statements in most files.
22576
22577 2000-10-02 Akim Demaille <akim@epita.fr>
22578
22579 * src/LR0.h: New file.
22580 Propagate its use.
22581
22582 2000-10-02 Akim Demaille <akim@epita.fr>
22583
22584 * src/print.h: New file.
22585 Propagate its use.
22586 * src/print.c: Formatting and ordering changes.
22587 (verbose, terse): Replace with...
22588 (print_results): this new function.
22589 Adjust dependencies.
22590
22591 2000-10-02 Akim Demaille <akim@epita.fr>
22592
22593 * src/conflicts.c (conflict_report): New function.
22594 (conflict_log, verbose_conflict_log): Replace with...
22595 (print_conflicts): this function.
22596 Adjust dependencies.
22597 * src/conflicts.h: New file.
22598 Propagate its inclusion.
22599
22600 2000-10-02 Akim Demaille <akim@epita.fr>
22601
22602 * src/nullable.h: New file.
22603 Propagate its inclusion.
22604 * src/nullable.c: Formatting changes.
22605
22606 2000-10-02 Akim Demaille <akim@epita.fr>
22607
22608 * src/reduce.h: New file.
22609 Propagate its inclusion.
22610 * src/reduce.c: Topological sort and other formatting changes.
22611 (bool, TRUE, FALSE): Move their definition to...
22612 * src/system.h: here.
22613
22614 2000-10-02 Akim Demaille <akim@epita.fr>
22615
22616 * src/files.c: Formatting changes.
22617 (tryopen, tryclose, openfiles): Rename as...
22618 (xfopen, xfclose, open_files): this.
22619 (stringappend): static.
22620 * src/files.h: Complete the list of exported symbols.
22621 Propagate its use.
22622
22623 2000-10-02 Akim Demaille <akim@epita.fr>
22624
22625 * src/reader.h: New file.
22626 Propagate its use instead of tedious list of `extern' and
22627 prototypes.
22628 * src/reader.c: Formatting changes, topological sort,
22629 s/register//.
22630
22631 2000-10-02 Akim Demaille <akim@epita.fr>
22632
22633 * src/lex.h: Prototype `lex.c' exported functions.
22634 * src/reader.c: Adjust.
22635 * src/lex.c: Formatting changes.
22636 (safegetc): Rename as...
22637 (xgetc): this.
22638
22639 2000-10-02 Akim Demaille <akim@epita.fr>
22640
22641 * src/lalr.h: New file.
22642 Propagate its inclusion instead of prototypes and `extern'.
22643 * src/lalr.c: Formatting changes, topological sorting etc.
22644
22645 2000-10-02 Akim Demaille <akim@epita.fr>
22646
22647 * src/output.c (token_actions): Introduce a temporary array,
22648 YYDEFACT, that makes it possible for this function to use
22649 output_short_table.
22650
22651 2000-10-02 Akim Demaille <akim@epita.fr>
22652
22653 `user_toknums' is output as a `short[]' in `output.c', while it is
22654 defined as a `int[]' in `reader.c'. For consistency with the
22655 other output tables, `user_toknums' is now defined as a table of
22656 shorts.
22657
22658 * src/reader.c (user_toknums): Be a short table instead of an int
22659 table.
22660 Adjust dependencies.
22661
22662 Factor the short table outputs.
22663
22664 * src/output.c (output_short_table): New function.
22665 * src/output.c (output_gram, output_stos, output_rule_data)
22666 (output_base, output_table, output_check): Use it.
22667
22668 2000-10-02 Akim Demaille <akim@epita.fr>
22669
22670 * src/output.c (output): Topological sort of the functions, in
22671 order to get rid of the `static' prototypes.
22672 No longer use `register'.
22673 * src/output.h: New file.
22674 Propagate its inclusion in files explicitly prototyping functions
22675 from output.c.
22676
22677 2000-09-21 Akim Demaille <akim@epita.fr>
22678
22679 * src/atgeneral.m4: Update from Autoconf.
22680
22681 2000-09-21 Akim Demaille <akim@epita.fr>
22682
22683 * src/closure.h: New file.
22684 * src/closure.c: Formatting changes, topological sort over the
22685 functions, use of closure.h.
22686 (initialize_closure, finalize_closure): Rename as...
22687 (new_closure, free_closure): these. Adjust dependencies.
22688 * src/LR0.c: Formatting changes, topological sort, use of
22689 cloture.h.
22690 (initialize_states): Rename as...
22691 (new_states): this.
22692 * src/Makefile.am (noinst_HEADERS): Adjust.
22693
22694 2000-09-20 Akim Demaille <akim@epita.fr>
22695
22696 * src/acconfig.h: Don't protect config.h against multiple
22697 inclusion.
22698 Don't define PARAMS.
22699 * src/system.h: Define PARAMS.
22700 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22701 purpose of config.h. system.h must not try to fix wrong
22702 definitions in config.h.
22703
22704 2000-09-20 Akim Demaille <akim@epita.fr>
22705
22706 * src/derives.h: New file.
22707 * src/main.c, src/derives.h: Use it.
22708 Formatting changes.
22709 * src/Makefile.am (noinst_HEADERS): Adjust.
22710
22711 2000-09-20 Akim Demaille <akim@epita.fr>
22712
22713 * tests/atgeneral.m4: Update from Autoconf.
22714 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22715 (AT_CHECK_CALC): New macros.
22716 Use these macros to test bison with options `', `--raw',
22717 `--debug', `--yacc', `--yacc --debug'.
22718
22719 2000-09-19 Akim Demaille <akim@epita.fr>
22720
22721 * src/output.c: Formatting changes.
22722 * src/machine.h: Remove, leaving its contents in...
22723 * src/system.h: here.
22724 Include stdio.h.
22725 Adjust all dependencies on stdio.h and machine.h.
22726 * src/getargs.h: New file.
22727 Let all `extern' declarations about getargs.c be replaced with
22728 inclusion of `getargs.h'.
22729 * src/Makefile.am (noinst_HEADERS): Adjust.
22730
22731 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22732 scope.
22733 (yyerror): Returns void, not int.
22734 * doc/bison.texinfo: Formatting changes.
22735
22736 2000-09-19 Akim Demaille <akim@epita.fr>
22737
22738 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22739 portable.
22740
22741 2000-09-18 Akim Demaille <akim@epita.fr>
22742
22743 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22744 * src/Makefile.am (INCLUDES): Don't.
22745 Be ready to fetch headers in lib/.
22746
22747 2000-09-18 Akim Demaille <akim@epita.fr>
22748
22749 * doc/bison.texinfo: Update the copyright.
22750 ANSIfy and GNUify the examples.
22751 Remove the old menu.
22752
22753 2000-09-18 Akim Demaille <akim@epita.fr>
22754
22755 First set of tests: use the `calc' example from the documentation.
22756
22757 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22758 is defined only when YYDEBUG is.
22759 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22760 * src/files.c (tryopen, tryclose): Formatting changes.
22761 Move to the top and be static.
22762 * src/reader.c (read_signed_integer): Likewise.
22763 * tests/calc.m4: New file.
22764 * Makefile.am, suite.m4: Adjust.
22765 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22766
22767 2000-09-18 Akim Demaille <akim@epita.fr>
22768
22769 Add support for an Autotest test suite for Bison.
22770
22771 * m4/m4.m4, m4/atconfig.m4: New files.
22772 * m4/Makefile.am (EXTRA_DIST): Adjust.
22773 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22774 files.
22775 * src/getargs.c: Display a more standard --version message.
22776 * src/reader.c (reader): Formatting changes.
22777 No longer depend upon VERSION_STRING.
22778 * configure.in: No longer use `dnl'.
22779 Set up the test suite and the new directory `tests/.
22780 (VERSION_STRING): Remove.
22781
22782 2000-04-14 Akim Demaille <akim@epita.fr>
22783
22784 * src/reader.c (copy_comment2): New function, same as former
22785 `copy_comment', but outputs into two FILE *.
22786 (copy_comment): Use it.
22787 (parse_union_decl): Use it.
22788 (get_type, parse_start_decl): Use the same `invalid' message.
22789 (parse_start_decl, parse_union_decl): Use the same `multiple'
22790 message.
22791 (parse_union_decl, copy_guard, copy_action): Use the same
22792 `unmatched' message.
22793 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22794
22795 2000-03-31 Akim Demaille <akim@epita.fr>
22796
22797 * src/files.c (tryopen, tryclose): Move to the top.
22798 Be static.
22799
22800 2000-03-31 Akim Demaille <akim@epita.fr>
22801
22802 * src/main.c (main): Don't call `done', exit does it.
22803
22804 2000-03-31 Akim Demaille <akim@epita.fr>
22805
22806 * allocate.c: s/return (foo)/return foo/.
22807 * lalr.c: Likewise.
22808 * LR0.c: Likewise.
22809 * output.c: Likewise.
22810 * reader.c: Likewise.
22811 * symtab.c: Likewise.
22812 * vmsgetargs.c: Likewise.
22813
22814 2000-03-31 Akim Demaille <akim@epita.fr>
22815
22816 Clean up the error reporting functions.
22817
22818 * src/report.c: New file.
22819 * src/report.h: Likewise.
22820 * src/Makefile.am: Adjust.
22821 * m4/error.m4: New file.
22822 * m4/Makefile.am: Adjust.
22823 * configure.in (jm_PREREQ_ERROR): Call it.
22824 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22825 Remove.
22826 (fatal, fatals): Remove. All callers use complain.c::fatal.
22827 (warn, warni, warns, warnss, warnss): Remove. All callers use
22828 complain.c::complain.
22829 (toomany): Remove, use fatal instead.
22830 * src/files.c (done): No argument, use complain_message_count.
22831 * src/main.c (main): Register `done' to `atexit'.
22832
22833 * src/getargs.c (usage): More `fputs', less `fprintf'.
22834
22835 2000-03-28 Akim Demaille <akim@epita.fr>
22836
22837 * lib/: New directory.
22838 * Makefile.am (SUBDIRS): Adjust.
22839 * configure.in: Adjust.
22840 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22841 useless.
22842 * src/alloca.c: Moved to lib/.
22843 * src/getopt.c: Likewise.
22844 * src/getopt1.c: Likewise.
22845 * src/getopt.h: Likewise.
22846 * src/ansi2knr.c: Likewise.
22847 * src/ansi2knr.1: Likewise.
22848 * src/Makefile.am: Adjust.
22849 * lib/Makefile.am: New file.
22850
22851 2000-03-28 Akim Demaille <akim@epita.fr>
22852
22853 * src/getargs.c (usage): Refresh the help message.
22854
22855 2000-03-17 Akim Demaille <akim@epita.fr>
22856
22857 * src/getopt1.c: Updated from textutils 2.0e
22858 * src/getopt.c: Likewise.
22859 * src/getopt.h: Likewise.
22860
22861 2000-03-17 Akim Demaille <akim@epita.fr>
22862
22863 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22864 the file name, not the whole `#line LINE FILE'.
22865
22866 2000-03-17 Akim Demaille <akim@epita.fr>
22867
22868 On syntax errors, report the token on which we choked.
22869
22870 * src/bison.s1 (yyparse): In the label yyerrlab, when
22871 YYERROR_VERBOSE, add yychar in msg.
22872
22873 2000-03-17 Akim Demaille <akim@epita.fr>
22874
22875 * src/reader.c (copy_at): New function.
22876 (copy_guard): Use it.
22877 (copy_action): Use it.
22878
22879 2000-03-17 Akim Demaille <akim@epita.fr>
22880
22881 Be kind to translators, save some useless translations.
22882
22883 * src/main.c (banner): New function.
22884 (fatal_banner): Use it.
22885 (warn_banner): Use it.
22886
22887 2000-03-17 Akim Demaille <akim@epita.fr>
22888
22889 * src/reader.c (copy_definition): Use copy_string and
22890 copy_comment. Removed now unused `match', `ended',
22891 `cplus_comment'.
22892 (copy_comment, copy_string): Moved, to be visible from
22893 copy_definition.
22894
22895 2000-03-17 Akim Demaille <akim@epita.fr>
22896
22897 * src/reader.c (copy_string): Declare `static inline'. No
22898 problems with inline, since it is checked by configure.
22899 (copy_comment): Likewise.
22900
22901 2000-03-17 Akim Demaille <akim@epita.fr>
22902
22903 * src/reader.c (packsymbols): Formatting changes.
22904
22905 2000-03-17 Akim Demaille <akim@epita.fr>
22906
22907 * src/reader.c (copy_comment): New function, factored out from:
22908 (copy_action): Use it. Removed now unused `match', `ended',
22909 `cplus_comment'.
22910 (copy_guard): Likewise.
22911
22912 2000-03-17 Akim Demaille <akim@epita.fr>
22913
22914 * src/reader.c (copy_string): New function, factored out from:
22915 (copy_action): Use it.
22916 (copy_guard): Likewise.
22917
22918 2000-03-17 Akim Demaille <akim@epita.fr>
22919
22920 Change the handling of @s so that they behave exactly like $s.
22921 There is now a pseudo variable @$ (readble and writable), location
22922 of the lhs of the rule (by default ranging from the location of
22923 the first symbol of the rhs, to the location of the last symbol,
22924 or, if the rhs is empty, YYLLOC).
22925
22926 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22927 yyval.
22928 (yyparse): When providing a default semantic action, provide a
22929 default location action.
22930 (after the $): No longer change `*YYLSP', just stack YYLOC the
22931 same way you stack YYVAL.
22932 * src/reader.c (read_declarations): Use warns.
22933 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22934 (copy_action, case '@'): Likewise.
22935 Use a standard error message, to save useless work from
22936 translators.
22937
22938 2000-03-17 Akim Demaille <akim@epita.fr>
22939
22940 * src/bison.s1: Formatting and cosmetics changes.
22941 * src/reader.c: Likewise.
22942 Update the Copyright notice.
22943
22944 2000-03-17 Akim Demaille <akim@epita.fr>
22945
22946 * src/bison.s1 (#line): All set to `#line' only, since the
22947 Makefile now handles them.
22948
22949 2000-03-16 Akim Demaille <akim@epita.fr>
22950
22951 * src/output.c (output_rule_data): Output the documentation of
22952 some of the tables.
22953 (Copyright notice): Update.
22954 Formatting changes.
22955
22956 2000-03-16 Akim Demaille <akim@epita.fr>
22957
22958 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22959 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22960 One `#if YYDEBUG' remains, since it uses variables which are
22961 defined only if `YYDEBUG != 0'.
22962
22963 2000-03-16 Akim Demaille <akim@epita.fr>
22964
22965 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22966 and related variables so that the similarities are highlighted.
22967
22968 2000-03-16 Akim Demaille <akim@epita.fr>
22969
22970 * src/bison.s1: Properly indent CPP directives.
22971
22972 2000-03-16 Akim Demaille <akim@epita.fr>
22973
22974 * src/bison.s1: Properly indent the `alloca' CPP section.
22975
22976 2000-03-16 Akim Demaille <akim@epita.fr>
22977
22978 Do not hard code values of directories in `configure.in'.
22979 Update the `configure' tool chain.
22980
22981 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22982 src/makefile.am.
22983 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22984 (AC_OUTPUT): Add m4/Makefile.
22985 Bump to bison 1.28a, 1.29 has never been released.
22986 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22987 handled via src/Makefile.am.
22988 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22989 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22990 autoheader.
22991 * Makefile.am (SUBDIRS): Add m4.
22992 (ACLOCAL_AM_FLAGS): New variable.
22993 (AUTOMAKE_OPTIONS): Add check-news.
22994 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22995 the proper line number and file name.
22996 (DEFS): Propagate the location of bison library files and of the
22997 locale files.
22998 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22999 builddir.
23000 * acinclude.m4: Remove, replaced by the directory m4.
23001 * m4/Makefile.am (EXTRA_DIST): New variable.
23002 * m4/gettext.m4: New file, from the fileutils.
23003 * m4/lcmessage.m4: Likewise
23004 * m4/progtest.m4: Likewise.
23005 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23006
23007 2000-03-10 Akim Demaille <akim@epita.fr>
23008
23009 * src/closure.c:
23010 Formatting changes of various comments.
23011 Respect the GNU coding standards at various places.
23012 Don't use `_()' when no translation is needed.
23013
23014 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23015
23016 * src/files.c:
23017 OS/2 honors TMPDIR environment variable.
23018
23019 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23020
23021 * doc/bison.texinfo: Tweaked spelling and grammar.
23022 Updated ISBN.
23023 Removed reference to price of printed copy.
23024 Mention BISON_SIMPLE and BISON_HAIRY.
23025
23026 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23027
23028 * configure.in, NEWS:
23029 Bison 1.29 released.
23030
23031 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23032
23033 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23034 Added reference card.
23035
23036 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23037
23038 * po/ru.po: Added Russian translation.
23039
23040 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23041
23042 * configure.in: Added Russian translation.
23043
23044 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23045
23046 * configure.in, NEWS, README:
23047 Released version 1.28.
23048
23049 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23050
23051 * src/system.h:
23052 Squashed redefinition warning on some systems.
23053
23054 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23055 Have configure build version string instead of relying on ANSI string
23056 concatentation.
23057
23058 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23059
23060 * po/POTFILES.in: Got rid of version.c.
23061
23062 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23063
23064 * acconfig.h, configure.in:
23065 Have configure build version string instead of relying on ANSI string
23066 concatentation.
23067
23068 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23069
23070 * doc/bison.1:
23071 Dropped mention of `+' for long-named options.
23072
23073 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23074
23075 * src/files.c: Added <unistd.h> for unlink().
23076
23077 * src/Makefile.am, src/system.h:
23078 I18n fixes.
23079
23080 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23081
23082 * README: Added a FAQ list.
23083
23084 * configure.in, acconfig.h:
23085 I18n fixes.
23086
23087 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23088
23089 * doc/FAQ, doc/Makefile.am:
23090 Added a FAQ list.
23091
23092 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23093
23094 * src/alloc.h, src/symtab.h, src/version.c:
23095 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23096
23097 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23098
23099 * src/.cvsignore, src/Makefile.am:
23100 Reorganized: sources in `src', documentation in `doc'.
23101
23102 * src/lex.c (literalchar):
23103 fixed the code for escaping double quotes (thanks
23104 Jonathan Czisny.)
23105
23106 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23107
23108 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23109 Adjusted paths to reflect directory reorganization.
23110
23111 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23112
23113 * doc/.cvsignore, doc/Makefile.am:
23114 Reorganized: sources in `src', documentation in `doc'.
23115
23116 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23117
23118 * configure.in:
23119 Updated AC_INIT file to reflect directory reorganization.
23120
23121 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23122 Reorganized: sources in `src', documentation in `doc'.
23123
23124 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23125
23126 * src/allocate.c:
23127 Don't declare calloc() and realloc() if not necessary.
23128
23129 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23130
23131 * configure.in, acconfig.h, acinclude.m4:
23132 Don't declare calloc() and realloc() if not necessary.
23133
23134 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23135
23136 * po/.cvsignore: Added i18n support.
23137
23138 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23139
23140 * acconfig.h, configure.in, Makefile.am:
23141 Added i18n support.
23142
23143 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23144
23145 * src/bison.s1: Fixed #line numbers.
23146
23147 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23148
23149 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23150 Added PO files from Translation Project.
23151
23152 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23153
23154 * Makefile.am:
23155 Added support for non-ANSI compilers (ansi2knr).
23156
23157 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23158
23159 * configure.in: Bumped version number to 1.27.
23160
23161 * Makefile.am:
23162 Added `bison.simple' to list of files removed by `make distclean'.
23163
23164 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23165
23166 * src/files.c, src/files.h:
23167 Defined locations of parser files in config.h instead of Makefile.
23168
23169 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23170
23171 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23172 Defined locations of parser files in config.h instead of Makefile.
23173
23174 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23175
23176 * Makefile.am:
23177 Removed inappropriate use of $< macro.
23178
23179 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23180
23181 * po/Makefile.in.in, po/POTFILES.in:
23182 Add `po' directory skeleton.
23183
23184 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23185
23186 * README: Document help-bison list.
23187
23188 * configure.in: Add check for mkstemp().
23189
23190 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23191
23192 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23193 Hush a few compiler warnings.
23194
23195 * src/files.c:
23196 Add tryclose(), which verifies that fclose was successful.
23197 Hush a couple of compiler warnings.
23198
23199 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23200
23201 * Makefile.am, OChangeLog:
23202 ChangeLog is now automatically generated. Include the old version as
23203 OChangeLog.
23204
23205 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23206
23207 * 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:
23208 Update FSF address.
23209
23210 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23211
23212 * doc/bison.texinfo: Fix formatting glitch.
23213
23214 * doc/bison.texinfo: Update FSF address.
23215
23216 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23217
23218 * acconfig.h: Update FSF address.
23219
23220 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23221
23222 * src/system.h:
23223 Don't define PACKAGE here, since config.h defines it.
23224
23225 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23226
23227 * src/reader.c: Update copyright date.
23228
23229 * src/main.c:
23230 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23231 favor of output directly to stderr (avoids buffer overruns).
23232
23233 * src/reader.c: Some checks for premature EOF.
23234
23235 * 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:
23236 Use prototypes if the compiler understands them.
23237
23238 * src/files.c: Honor TMPDIR on Unix hosts.
23239 Use prototypes if the compiler understands them.
23240
23241 * src/reader.c:
23242 Fix a couple of buffer overrun bugs.
23243 Use prototypes if the compiler understands them.
23244
23245 * src/system.h: Include unistd.h and ctype.h.
23246 Use #ifdef instead of #if for NLS symbols.
23247
23248 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23249
23250 * doc/bison.texinfo:
23251 Delete comment "consider using @set for edition number, etc..." since
23252 we now are doing so.
23253
23254 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23255
23256 * configure.in:
23257 Use prototypes if the compiler understands them.
23258
23259 * NEWS: Document 1.26 highlights.
23260
23261 * Makefile.am: Require Automake 1.3 or later.
23262
23263 * acconfig.h:
23264 Use prototypes if the compiler understands them.
23265
23266 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23267
23268 * src/version.c:
23269 Use VERSION symbol from automake for version number.
23270
23271 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23272
23273 * acconfig.h, configure.in, version.cin:
23274 Use VERSION symbol from automake for version number.
23275
23276 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23277
23278 * Makefile.am:
23279 Distribute original version of simple parser (bison.s1), not built
23280 version (bison.simple).
23281
23282 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23283
23284 * doc/bison.texinfo: Add info dir entry.
23285
23286 * doc/bison.texinfo:
23287 Let automake put version number into documentation.
23288
23289 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23290
23291 * src/bison.cld, src/build.com, src/vmshlp.mar:
23292 Add non-RCS files from /gd/gnu/bison.
23293
23294 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23295
23296 * doc/bison.1:
23297 Document the BISON_HAIRY and BISON_SIMPLE variables.
23298
23299 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23300
23301 * src/version.c: Build version.c automatically.
23302
23303 * src/reader.c:
23304 Fix token numbering (used to start at 258, not 257).
23305
23306 * src/system.h: Include config.h.
23307
23308 * src/getargs.c: Update bug report address.
23309
23310 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23311 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23312
23313 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23314
23315 * Makefile.am:
23316 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23317
23318 * configure.in, version.cin:
23319 Build version.c automatically.
23320
23321 * AUTHORS: Add AUTHORS file.
23322
23323 * README: Update bug report address.
23324
23325 * bison.simple:
23326 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23327
23328 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23329 Add automake stuff.
23330
23331 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23332
23333 * doc/bison.texinfo: Clean up some formatting.
23334
23335 1998-05-05 Richard Stallman <rms@gnu.org>
23336
23337 * doc/bison.texinfo:
23338 Explain better why to make a pure parser.
23339
23340 1998-01-05 Richard Stallman <rms@gnu.org>
23341
23342 * src/files.c (openfiles):
23343 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23344 find a temporary directory, if possible. Do not unlink files while
23345 they are open.
23346
23347 1997-08-25 Richard Stallman <rms@gnu.org>
23348
23349 * src/reader.c (stack_offset;):
23350 Change some warni to warns.
23351
23352 * src/lex.c (literalchar): Use warns, not warni.
23353
23354 1997-06-28 Richard Stallman <rms@gnu.org>
23355
23356 * src/bison.s1: Add a Bison version comment.
23357
23358 * src/main.c (fatal, warn, berror):
23359 Use program_name.
23360
23361 1997-06-28 Richard Stallman <rms@gnu.org>
23362
23363 * Makefile.in (bison_version): New variable.
23364 (dist): Use that variable.
23365 (bison.s1): Substitute the Bison version into bison.simple.
23366
23367 * bison.simple: Add a Bison version comment.
23368
23369 1997-06-18 Richard Stallman <rms@gnu.org>
23370
23371 * src/main.c (fatal, warn, berror):
23372 Make error messages standard.
23373 (toomany): Improve error message text.
23374
23375 * 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:
23376 new.h renamed to alloc.h.
23377
23378 1997-06-18 Richard Stallman <rms@gnu.org>
23379
23380 * Makefile.in: new.h renamed to alloc.h.
23381
23382 1997-05-24 Richard Stallman <rms@gnu.org>
23383
23384 * src/lex.c (literalchar):
23385 Fix the code for escaping \, " and '.
23386
23387 (lex): Avoid trouble when there are many chars
23388 to discard in a char literal with just several chars in it.
23389
23390 1997-05-17 Richard Stallman <rms@gnu.org>
23391
23392 * src/bison.s1:
23393 Use malloc, if using alloca is troublesome.
23394 (YYSTACK_USE_ALLOCA): New flag macro.
23395 Define it for some systems and compilers.
23396 (YYSTACK_ALLOC): New macro.
23397 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23398 If it was malloc'd, free it.
23399
23400 1997-05-17 Richard Stallman <rms@gnu.org>
23401
23402 * bison.simple:
23403 Use malloc, if using alloca is troublesome.
23404 (YYSTACK_USE_ALLOCA): New flag macro.
23405 Define it for some systems and compilers.
23406 (YYSTACK_ALLOC): New macro.
23407 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23408 If it was malloc'd, free it.
23409
23410 1997-04-23 Richard Stallman <rms@gnu.org>
23411
23412 * src/bison.s1:
23413 (alloca) [__hpux]: Always define as __builtin_alloca.
23414
23415 1997-04-23 Richard Stallman <rms@gnu.org>
23416
23417 * bison.simple:
23418 (alloca) [__hpux]: Always define as __builtin_alloca.
23419
23420 1997-04-22 Richard Stallman <rms@gnu.org>
23421
23422 * src/bison.s1:
23423 [__hpux]: Include alloca.h (right for HPUX 10)
23424 instead of declaring alloca (right for HPUX 9).
23425
23426 * src/bison.s1 (__yy_memcpy):
23427 Declare arg `count' as unsigned int.
23428 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23429
23430 1997-04-22 Richard Stallman <rms@gnu.org>
23431
23432 * bison.simple:
23433 [__hpux]: Include alloca.h (right for HPUX 10)
23434 instead of declaring alloca (right for HPUX 9).
23435
23436 * bison.simple (__yy_memcpy):
23437 Declare arg `count' as unsigned int.
23438 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23439
23440 1997-01-03 Richard Stallman <rms@gnu.org>
23441
23442 * src/allocate.c: [__STDC__ or _MSC_VER]:
23443 Declare calloc and realloc to return void *.
23444
23445 1997-01-02 Richard Stallman <rms@gnu.org>
23446
23447 * src/system.h:
23448 [_MSC_VER]: Include stdlib.h and process.h.
23449 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23450
23451 * src/main.c (main): Return FAILURE as a value.
23452 (printable_version): Declare arg as int, not char.
23453
23454 1997-01-02 Richard Stallman <rms@gnu.org>
23455
23456 * Makefile.in (dist):
23457 Explicitly check for symlinks, and copy them.
23458
23459 1996-12-19 Richard Stallman <rms@gnu.org>
23460
23461 * src/files.c:
23462 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23463
23464 1996-12-18 Paul Eggert <eggert@gnu.org>
23465
23466 * src/bison.s1 (yyparse):
23467 If __GNUC__ and YYPARSE_PARAM are both defined,
23468 declare yyparse to have a void * argument.
23469
23470 1996-12-18 Paul Eggert <eggert@gnu.org>
23471
23472 * bison.simple (yyparse):
23473 If __GNUC__ and YYPARSE_PARAM are both defined,
23474 declare yyparse to have a void * argument.
23475
23476 1996-12-17 Richard Stallman <rms@gnu.org>
23477
23478 * src/reduce.c (nbits): Add some casts.
23479
23480 1996-08-12 Richard Stallman <rms@gnu.org>
23481
23482 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23483
23484 1996-08-12 Richard Stallman <rms@gnu.org>
23485
23486 * bison.simple: Test _MSDOS as well as _MSDOS_.
23487
23488 1996-07-31 Richard Stallman <rms@gnu.org>
23489
23490 * src/bison.s1:
23491 [__sun && __i386]: Include alloca.h.
23492
23493 1996-07-31 Richard Stallman <rms@gnu.org>
23494
23495 * bison.simple:
23496 [__sun && __i386]: Include alloca.h.
23497
23498 1996-07-30 Richard Stallman <rms@gnu.org>
23499
23500 * src/bison.s1: Comment change.
23501
23502 * src/bison.s1: Test _MSDOS_, not MSDOS.
23503
23504 1996-07-30 Richard Stallman <rms@gnu.org>
23505
23506 * bison.simple: Comment change.
23507
23508 * bison.simple: Test _MSDOS_, not MSDOS.
23509
23510 1996-06-01 Richard Stallman <rms@gnu.org>
23511
23512 * 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:
23513 Insert `_' macro around many string constants.
23514
23515 * src/main.c:
23516 Insert `_' macro around many string constants.
23517
23518 (main): Call setlocale, bindtextdomain and textdomain.
23519
23520 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23521 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23522 [ENABLE_NLS]: Include libintl.h.
23523 [ENABLE_NLS] (gettext): Define.
23524 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23525 (N_, PACKAGE, LOCALEDIR): New macros.
23526
23527 1996-06-01 Richard Stallman <rms@gnu.org>
23528
23529 * POTFILES.in: New file.
23530
23531 * Makefile.in (allocate.o):
23532 Define target explicitly.
23533
23534 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23535 (LDFLAGS): Set to @LDFLAGS@.
23536 (configure): Run autoconf only if preceding `cd' succeeds.
23537 (bison.s1): Redirect output to temporary file then move the
23538 temporary to the target, rather than redirecting directly to bison.s1.
23539 (clean): Remove config.status and config.log.
23540 (distclean): Don't remove config.status here.
23541
23542 1996-05-12 Richard Stallman <rms@gnu.org>
23543
23544 * src/bison.s1:
23545 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23546
23547 1996-05-12 Richard Stallman <rms@gnu.org>
23548
23549 * bison.simple:
23550 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23551
23552 1996-05-11 Richard Stallman <rms@gnu.org>
23553
23554 * src/bison.s1 (__yy_memcpy):
23555 Really reorder the args, as was supposedly done on Feb 14 1995.
23556 (yyparse): Calls changed accordingly.
23557
23558 1996-05-11 Richard Stallman <rms@gnu.org>
23559
23560 * Makefile.in (dist): Don't use $(srcdir).
23561
23562 * bison.simple (__yy_memcpy):
23563 Really reorder the args, as was supposedly done on Feb 14 1995.
23564 (yyparse): Calls changed accordingly.
23565
23566 1996-01-27 Richard Stallman <rms@gnu.org>
23567
23568 * src/output.c (output_rule_data):
23569 Test YYERROR_VERBOSE in the conditional
23570 around the definition of ttyname.
23571
23572 1995-12-29 Richard Stallman <rms@gnu.org>
23573
23574 * src/bison.s1:
23575 Fix line numbers in #line commands.
23576
23577 1995-12-29 Richard Stallman <rms@gnu.org>
23578
23579 * bison.simple:
23580 Fix line numbers in #line commands.
23581
23582 1995-12-27 Richard Stallman <rms@gnu.org>
23583
23584 * src/bison.s1 (YYPARSE_PARAM_DECL):
23585 In C++, make it always null.
23586 (YYPARSE_PARAM_ARG): New macro.
23587 (yyparse): Use YYPARSE_PARAM_ARG.
23588
23589 1995-12-27 Richard Stallman <rms@gnu.org>
23590
23591 * bison.simple (YYPARSE_PARAM_DECL):
23592 In C++, make it always null.
23593 (YYPARSE_PARAM_ARG): New macro.
23594 (yyparse): Use YYPARSE_PARAM_ARG.
23595
23596 1995-11-29 Richard Stallman <rms@gnu.org>
23597
23598 * doc/bison.texinfo:
23599 Describe literal string tokens, %raw, %no_lines, %token_table.
23600
23601 1995-11-29 Daniel Hagerty <hag@gnu.org>
23602
23603 * doc/bison.texinfo: Fixed update date
23604
23605 1995-10-16 Richard Stallman <rms@gnu.org>
23606
23607 * src/version.c: Version 1.25.
23608
23609 1995-10-16 Richard Stallman <rms@gnu.org>
23610
23611 * NEWS: *** empty log message ***
23612
23613 1995-10-16 Richard Stallman <rms@gnu.org>
23614
23615 * doc/bison.1, doc/bison.rnh:
23616 Add new options.
23617
23618 1995-10-15 Richard Stallman <rms@gnu.org>
23619
23620 * src/vmsgetargs.c, src/getargs.c:
23621 Added -n, -k, and -raw switches.
23622 (noparserflag, toknumflag, rawtoknumflag): New variables.
23623
23624 * src/symtab.h (SALIAS):
23625 New #define for adding aliases to %token.
23626 (struct bucket): Added `alias' field.
23627
23628 * src/reduce.c (reduce_grammar):
23629 Revise error message.
23630 (print_notices): Remove final `.' from error message.
23631
23632 * src/reader.c (reader_output_yylsp):
23633 New function.
23634 (readgram): Use `#if 0' around code that accepted %command
23635 inside grammar rules: The documentation doesn't allow it,
23636 and it will fail since the %command processors scan for the next %.
23637 (parse_token_decl): Extended the %token
23638 declaration to allow a multi-character symbol as an alias.
23639 (parse_thong_decl): New function.
23640 (read_declarations): Added %thong declarations.
23641 (read_declarations): Handle NOOP to deal with allowing
23642 % declarations as another means to specify the flags.
23643 (readgram): Allow %prec prior to semantics embedded in a rule.
23644 (skip_to_char, read_declarations, copy_definition)
23645 (parse_token_decl, parse_start_decl, parse_type_decl)
23646 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23647 (get_type_name, copy_guard, copy_action, readgram)
23648 (get_type, packsymbols): Revised most error messages.
23649 Changed `fatal' to `warnxxx' to avoid aborting for error.
23650 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23651 (read_declarations): Improve the error message for
23652 an invalid character. Do not abort.
23653 (read_declarations, copy_guard, copy_action): Use
23654 printable_version to avoid unprintable characters in printed output.
23655 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23656 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23657 Allow the type of a non-terminal can be given
23658 more than once, as long as all specifications give the same type.
23659
23660 * src/output.c:
23661 (output_headers, output_trailers, output, output_gram)
23662 (output_rule_data): Implement noparserflag variable.
23663 Implement toknumflag variable.
23664 (output): Call reader_output_yylsp to output LTYPESTR.
23665
23666 * src/main.c (main):
23667 If reader sees an error, don't process the grammar.
23668 (fatals): Updated to not use VARARGS1.
23669 (printable_version, int_to_string, warn, warni, warns, warnss)
23670 (warnsss): New error reporting functions. Avoid abort for error.
23671
23672 * src/lex.h:
23673 Added THONG and NOOP for alias processing.
23674 Added SETOPT for the new code that allows setting options with %flags.
23675
23676 * src/lex.c:
23677 Include getopt.h. Add some extern decls.
23678 (safegetc): New function to deal with EOF gracefully.
23679 (literalchar); new function to deal with reading \ escapes.
23680 (lex): Use literalchar.
23681 (lex): Implemented "..." tokens.
23682 (literalchar, lex, parse_percent_token): Made tokenbuffer
23683 always contain the token. This includes growing the token
23684 buffer while reading an integer.
23685 (parse_percent_token): Replaced if-else statement with percent_table.
23686 (parse_percent_token): Added % declarations as another
23687 way to specify the flags -n, -l, and -r. Also added hooks for
23688 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23689 major changes to files.c.
23690 (lex) Retain in the incoming stream a character following
23691 an incorrect '/'.
23692 (skip_white_space, lex): Revised most error messages
23693 and changed fatal to warn to avoid aborting.
23694 (percent_table): Added %thong declarations.
23695
23696 * src/gram.h: Comment changes.
23697
23698 * src/files.c (openfiles, open_extra_files, done):
23699 Add faction flag
23700 and actfile file. Handle noparserflag. Both for -n switch.
23701
23702 * src/conflicts.c (resolve_sr_conflict):
23703 Remove use of alloca.
23704
23705 1995-06-01 Jim Meyering <meyering@gnu.org>
23706
23707 * doc/bison.texinfo: *** empty log message ***
23708
23709 1995-05-06 Richard Stallman <rms@gnu.org>
23710
23711 * src/bison.s1: Comment change.
23712
23713 1995-05-06 Richard Stallman <rms@gnu.org>
23714
23715 * bison.simple: Comment change.
23716
23717 1995-05-03 Richard Stallman <rms@gnu.org>
23718
23719 * src/version.c: Version now 1.24.
23720
23721 * src/bison.s1: Change distribution terms.
23722
23723 * src/version.c: Version now 1.23.
23724
23725 1995-05-03 Richard Stallman <rms@gnu.org>
23726
23727 * doc/bison.texinfo:
23728 Rewrite "Conditions for Using Bison".
23729 Update version to 1.24.
23730
23731 1995-05-03 Richard Stallman <rms@gnu.org>
23732
23733 * bison.simple: Change distribution terms.
23734
23735 1995-02-23 Richard Stallman <rms@gnu.org>
23736
23737 * src/files.c: Test __VMS_POSIX as well as VMS.
23738
23739 1995-02-14 Jim Meyering <meyering@gnu.org>
23740
23741 * src/bison.s1 (__yy_memcpy):
23742 Renamed from __yy_bcopy to avoid
23743 confusion. Reverse FROM and TO arguments to be consistent with
23744 those of memcpy.
23745
23746 1995-02-14 Jim Meyering <meyering@gnu.org>
23747
23748 * bison.simple (__yy_memcpy):
23749 Renamed from __yy_bcopy to avoid
23750 confusion. Reverse FROM and TO arguments to be consistent with
23751 those of memcpy.
23752
23753 1994-11-10 David J. MacKenzie <djm@gnu.org>
23754
23755 * NEWS: reformat
23756
23757 * NEWS: New file.
23758
23759 * Makefile.in (DISTFILES): Include NEWS.
23760
23761 * Makefile.in (DISTFILES):
23762 Include install-sh, not install.sh.
23763
23764 * configure.in: Update to Autoconf v2 macro names.
23765
23766 1994-10-05 David J. MacKenzie <djm@gnu.org>
23767
23768 * Makefile.in: fix typo
23769
23770 * Makefile.in (prefix, exec_prefix):
23771 Let configure set them.
23772
23773 1994-09-28 David J. MacKenzie <djm@gnu.org>
23774
23775 * Makefile.in: Set datadir to $(prefix)/share.
23776
23777 1994-09-15 Richard Stallman <rms@gnu.org>
23778
23779 * src/bison.s1:
23780 Update copyright notice and GPL version.
23781
23782 1994-09-15 Richard Stallman <rms@gnu.org>
23783
23784 * bison.simple:
23785 Update copyright notice and GPL version.
23786
23787 1994-07-12 Richard Stallman <rms@gnu.org>
23788
23789 * src/reduce.c, src/reader.c:
23790 entered into RCS
23791
23792 1994-05-05 David J. MacKenzie <djm@gnu.org>
23793
23794 * Makefile.in: entered into RCS
23795
23796 1994-03-26 Richard Stallman <rms@gnu.org>
23797
23798 * src/bison.s1: entered into RCS
23799
23800 1994-03-26 Richard Stallman <rms@gnu.org>
23801
23802 * bison.simple: entered into RCS
23803
23804 1994-03-25 Richard Stallman <rms@gnu.org>
23805
23806 * src/main.c: entered into RCS
23807
23808 1994-03-24 Richard Stallman <rms@gnu.org>
23809
23810 * src/conflicts.c: entered into RCS
23811
23812 1994-01-02 Richard Stallman <rms@gnu.org>
23813
23814 * Makefile.in: *** empty log message ***
23815
23816 1993-11-21 Richard Stallman <rms@gnu.org>
23817
23818 * src/bison.s1: *** empty log message ***
23819
23820 1993-11-21 Richard Stallman <rms@gnu.org>
23821
23822 * doc/bison.texinfo: entered into RCS
23823
23824 * doc/bison.texinfo: *** empty log message ***
23825
23826 1993-11-21 Richard Stallman <rms@gnu.org>
23827
23828 * bison.simple: *** empty log message ***
23829
23830 1993-10-25 David J. MacKenzie <djm@gnu.org>
23831
23832 * doc/bison.texinfo: *** empty log message ***
23833
23834 1993-10-19 Richard Stallman <rms@gnu.org>
23835
23836 * src/bison.s1: *** empty log message ***
23837
23838 1993-10-19 Richard Stallman <rms@gnu.org>
23839
23840 * bison.simple: *** empty log message ***
23841
23842 1993-10-14 Richard Stallman <rms@gnu.org>
23843
23844 * src/bison.s1: *** empty log message ***
23845
23846 1993-10-14 Richard Stallman <rms@gnu.org>
23847
23848 * bison.simple: *** empty log message ***
23849
23850 1993-09-14 David J. MacKenzie <djm@gnu.org>
23851
23852 * doc/bison.texinfo: *** empty log message ***
23853
23854 1993-09-13 Noah Friedman <friedman@gnu.org>
23855
23856 * Makefile.in: *** empty log message ***
23857
23858 1993-09-10 Richard Stallman <rms@gnu.org>
23859
23860 * src/conflicts.c: *** empty log message ***
23861
23862 * src/system.h: entered into RCS
23863
23864 1993-09-10 Richard Stallman <rms@gnu.org>
23865
23866 * doc/bison.1: entered into RCS
23867
23868 1993-09-06 Noah Friedman <friedman@gnu.org>
23869
23870 * src/version.c: entered into RCS
23871
23872 1993-09-06 Noah Friedman <friedman@gnu.org>
23873
23874 * Makefile.in: *** empty log message ***
23875
23876 1993-07-30 David J. MacKenzie <djm@gnu.org>
23877
23878 * Makefile.in: *** empty log message ***
23879
23880 1993-07-24 Richard Stallman <rms@gnu.org>
23881
23882 * src/bison.s1: *** empty log message ***
23883
23884 1993-07-24 Richard Stallman <rms@gnu.org>
23885
23886 * bison.simple: *** empty log message ***
23887
23888 1993-07-08 David J. MacKenzie <djm@gnu.org>
23889
23890 * Makefile.in: *** empty log message ***
23891
23892 1993-07-04 Richard Stallman <rms@gnu.org>
23893
23894 * src/bison.s1: *** empty log message ***
23895
23896 1993-07-04 Richard Stallman <rms@gnu.org>
23897
23898 * bison.simple: *** empty log message ***
23899
23900 1993-06-26 David J. MacKenzie <djm@gnu.org>
23901
23902 * src/getargs.c: entered into RCS
23903
23904 1993-06-26 David J. MacKenzie <djm@gnu.org>
23905
23906 * doc/bison.texinfo: *** empty log message ***
23907
23908 * doc/bison.1: New file.
23909
23910 1993-06-25 Richard Stallman <rms@gnu.org>
23911
23912 * src/getargs.c: New file.
23913
23914 1993-06-16 Richard Stallman <rms@gnu.org>
23915
23916 * src/bison.s1: *** empty log message ***
23917
23918 1993-06-16 Richard Stallman <rms@gnu.org>
23919
23920 * bison.simple: *** empty log message ***
23921
23922 1993-06-03 Richard Stallman <rms@gnu.org>
23923
23924 * src/bison.s1: New file.
23925
23926 1993-06-03 Richard Stallman <rms@gnu.org>
23927
23928 * doc/bison.texinfo: *** empty log message ***
23929
23930 1993-06-03 Richard Stallman <rms@gnu.org>
23931
23932 * bison.simple: New file.
23933
23934 1993-05-19 Richard Stallman <rms@gnu.org>
23935
23936 * doc/bison.texinfo: New file.
23937
23938 1993-05-07 Noah Friedman <friedman@gnu.org>
23939
23940 * Makefile.in: *** empty log message ***
23941
23942 1993-04-28 Noah Friedman <friedman@gnu.org>
23943
23944 * src/reader.c: *** empty log message ***
23945
23946 1993-04-23 Noah Friedman <friedman@gnu.org>
23947
23948 * src/alloc.h: entered into RCS
23949
23950 1993-04-20 David J. MacKenzie <djm@gnu.org>
23951
23952 * src/version.c: *** empty log message ***
23953
23954 * src/files.c, src/allocate.c:
23955 entered into RCS
23956
23957 * src/reader.c: *** empty log message ***
23958
23959 * src/lex.c: entered into RCS
23960
23961 * src/conflicts.c: New file.
23962
23963 * src/symtab.c: entered into RCS
23964
23965 * src/alloc.h: New file.
23966
23967 * src/LR0.c: entered into RCS
23968
23969 1993-04-18 Noah Friedman <friedman@gnu.org>
23970
23971 * src/reader.c: New file.
23972
23973 * src/version.c: *** empty log message ***
23974
23975 1993-04-18 Noah Friedman <friedman@gnu.org>
23976
23977 * Makefile.in: *** empty log message ***
23978
23979 1993-04-17 Noah Friedman <friedman@gnu.org>
23980
23981 * Makefile.in: *** empty log message ***
23982
23983 1993-04-15 Richard Stallman <rms@gnu.org>
23984
23985 * src/main.c, src/files.c:
23986 New file.
23987
23988 1993-04-15 Noah Friedman <friedman@gnu.org>
23989
23990 * configure.in: entered into RCS
23991
23992 * configure.in: *** empty log message ***
23993
23994 * configure.in: New file.
23995
23996 1993-04-14 Richard Stallman <rms@gnu.org>
23997
23998 * Makefile.in: New file.
23999
24000 1993-04-13 Richard Stallman <rms@gnu.org>
24001
24002 * src/version.c: New file.
24003
24004 1993-03-25 Richard Stallman <rms@gnu.org>
24005
24006 * src/output.c: entered into RCS
24007
24008 1992-09-25 Richard Stallman <rms@gnu.org>
24009
24010 * configure.bat: entered into RCS
24011
24012 1992-06-22 Richard Stallman <rms@gnu.org>
24013
24014 * src/vmsgetargs.c: entered into RCS
24015
24016 1992-06-22 Richard Stallman <rms@gnu.org>
24017
24018 * doc/bison.rnh: entered into RCS
24019
24020 1992-04-20 David J. MacKenzie <djm@gnu.org>
24021
24022 * README: entered into RCS
24023
24024 1992-01-22 Richard Stallman <rms@gnu.org>
24025
24026 * src/machine.h: entered into RCS
24027
24028 1991-12-21 Richard Stallman <rms@gnu.org>
24029
24030 * src/lalr.c, src/closure.c:
24031 entered into RCS
24032
24033 1991-12-20 Richard Stallman <rms@gnu.org>
24034
24035 * src/state.h: entered into RCS
24036
24037 1991-12-18 Richard Stallman <rms@gnu.org>
24038
24039 * src/print.c, src/nullable.c, src/derives.c:
24040 entered into RCS
24041
24042 1991-11-03 David J. MacKenzie <djm@gnu.org>
24043
24044 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24045 entered into RCS
24046
24047 1988-09-09 Richard Stallman <rms@gnu.org>
24048
24049 * src/bison.hairy: entered into RCS
24050
24051 1987-12-16 Richard Stallman <rms@gnu.org>
24052
24053 * REFERENCES: entered into RCS
24054
24055
24056 -----
24057
24058 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
24059 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24060 2008, 2009 Free Software Foundation, Inc.
24061
24062 Copying and distribution of this file, with or without
24063 modification, are permitted provided the copyright notice and this
24064 notice are preserved.