]> git.saurik.com Git - bison.git/blob - ChangeLog
bcf5d96c241e5c4a2c575b20641ee77d766c0d30
[bison.git] / ChangeLog
1 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
2
3 Pacify "gcc -Wunused" for the input function from Flex.
4 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
5 and later.
6 * src/scan-code.l: Add "%option noinput", which I cannot find in
7 the Flex manual, but which Flex has supported since at least as
8 far back as 2.5.4. However, if any of our developers still use
9 Flex 2.5.4, they'll need to stop configuring with
10 --enable-gcc-warnings because "%option noinput" didn't work
11 correctly until Flex 2.5.6.
12 * src/scan-gram.l: Likewise.
13 * src/scan-skel.l: Likewise.
14
15 2009-07-31 Alex Rozenman <rozenman@gmail.com>
16
17 Fix --enable-gcc-warnings problems.
18 * src/reader.c: Adjust variable names.
19 * src/scan-code.l: Fix prototypes and adjust names.
20 * src/named-ref.c: Remove redundant "if".
21
22 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
23
24 Fix a --enable-gcc-warnings problem.
25 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
26 variable.
27
28 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
29
30 Warn about character literals not of length one.
31 * NEWS (2.5): Document.
32 * src/scan-gram.l (INITIAL): Remove comment that we don't check
33 the length.
34 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
35 * tests/input.at (Bad character literals): New test group.
36
37 2009-07-24 Alex Rozenman <rozenman@gmail.com>
38
39 Fix some memory leaks.
40 * src/named-ref.c: Add a pointer check (named_ref_free).
41 * src/scan-code.l: New function (variant_table_free). Called in
42 code_scanner_free.
43 * src/symlist.c: Call to named_ref_free (symbol_list_free).
44
45 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
46
47 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
48
49 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
50
51 Some M4 cleanup in the testsuite.
52 Suggested by Eric Blake at
53 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
54 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
55 complicate the code by distinguishing between a missing value
56 and an empty string value for an optional argument. This fix is
57 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
58 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
59 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
60 arguments are not needed because of the following changes.
61 Fix stale comments.
62 Bison developers should use GNU M4 and should not use
63 POSIXLY_CORRECT when building the test suite, so do not
64 complicate the code by avoiding $10 and above.
65 Do not quote an empty string value for an optional argument, and
66 do not distinguish between a missing value and an empty string
67 value.
68
69 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
70
71 Revert unnecessary column realignment in --help output.
72 Reported by Akim Demaille at
73 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
74 * src/getargs.c (usage): Here.
75
76 2009-07-04 Alex Rozenman <rozenman@gmail.com>
77
78 Alphabetical order in src/local.mk.
79 * src/local.mk: Adjust.
80
81 2009-07-04 Alex Rozenman <rozenman@gmail.com>
82
83 Style changes and factoring.
84 * src/named-ref.h: Add comments.
85 * src/parse-gram.y: Readability and style changes.
86 * src/reader.c: Factoring: assign_named_ref function.
87 * src/scan-code.l: Factoring and style changes. Rename
88 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
89 Use "unsigned" type for variant index. Improve readablity.
90 * src/scan-gram.l: Change error messages and add comments.
91 * src/symlist.h: symbol_list_null: New function decl.
92 * src/symlist.c: symbol_list_null: Implement here.
93 * tests/named-refs.at: Adjust for new error messages.
94
95 2009-06-29 Eric Blake <ebb9@byu.net>
96
97 scan-code: avoid compiler warnings
98 * src/scan-code.l (parse_named_ref): Use correct specifiers.
99
100 2009-06-29 Akim Demaille <demaille@gostai.com>
101
102 build: avoid concurrent extraction of calc++.
103 * examples/calc++/Makefile.am (calc.stamp): New.
104 Depend on it to create the sources of calc++ so that concurrent
105 builds don't launch several "extexi" in parallel.
106 Not only this is inefficient, this also builds incorrect sources
107 with several extractions mixed together.
108
109 2009-06-29 Akim Demaille <demaille@gostai.com>
110
111 parse.error: fix.
112 * data/bison.m4: Move code related to specific variables after the
113 definition of the variable-maintaining macros so that we don't
114 "invoke" b4_percent_define_check_values before it is defined.
115
116 2009-06-29 Akim Demaille <demaille@gostai.com>
117
118 variables: parse.error
119
120 Implement, document, and test the replacement of %error-verbose
121 by %define parse.error "verbose".
122 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
123 values of the parse.error variable.
124 Make "simple" its default value.
125 Check the valid values.
126 * src/parse-gram.y: Use %define parse.error.
127 (PERCENT_ERROR_VERBOSE): New token.
128 Support it.
129 * src/scan-gram.l: Support %error-verbose.
130
131 * doc/bison.texinfo (Decl Summary): Replace the documentation of
132 %define error-verbose by that of %define parse.error.
133 * NEWS: Document it.
134
135 * tests/actions.at, tests/calc.at: Use parse.error instead of
136 %error-verbose.
137
138 2009-06-27 Alex Rozenman <rozenman@gmail.com>
139
140 Implement support for named symbol references.
141 * src/parse-gram.y: Add new syntax (named_ref.opt).
142 * src/reader.c: Store named refs in symbol lists.
143 * src/reader.h: New argument for symbol_append and
144 action_append functions.
145 * src/scan-code.h: Add new field (named_ref) into
146 code_props data structure. Keeps named ref of midrule
147 actions.
148 * src/scan-code.l: Support for named refs in semantic
149 action code. New function 'parse_named_ref'.
150 * src/scan-gram.l: Support bracketed id.
151 * src/symlist.c: Store named refs in symbol lists.
152 * src/symlist.h: New field in symbol list: named_ref.
153 * src/named-ref.h: New file, a struct for named_ref.
154 * src/named-ref.cp: New file, named_ref_new function.
155 * src/local.mk: Add two new files.
156 * tests/testsuite.at: Include new test group:
157 * tests/named-refs.at: this new file.
158
159 2009-06-25 Akim Demaille <demaille@gostai.com>
160
161 hash: check insertion for memory exhaustion.
162 * src/uniqstr.c (uniqstr_new): New.
163
164 2009-06-24 Akim Demaille <demaille@gostai.com>
165
166 variables: rename namespace as api.namespace.
167 Discussed in
168 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
169
170 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
171 New.
172 (b4_percent_define_use): New.
173 Use it where applicable.
174 * data/c++.m4: Replace uses of the variable "namespace" by
175 "api.namespace".
176 Default the latter to the former.
177 * doc/bison.texinfo (Decl Summary): Document "namespace" as
178 obsolete.
179 Document api.namespace.
180 Use @samp to document %define uses, keep @code for identifiers.
181 * NEWS: Likewise.
182 * tests/c++.at, tests/input.at: Test api.namespace instead of
183 namespace. (The tests passed with namespace.)
184
185 2009-06-11 Akim Demaille <demaille@gostai.com>
186
187 style changes.
188 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
189 * src/print-xml.c: Style changes.
190 * tests/conflicts.at: Comment changes.
191
192 2009-06-11 Akim Demaille <demaille@gostai.com>
193
194 xml: beware of user strings used to give a %prec to rules.
195 * tests/conflicts.at (%prec with user strings): New.
196 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
197 XML output.
198
199 2009-06-11 Akim Demaille <demaille@gostai.com>
200
201 hash: check insertion for memory exhaustion.
202 * src/muscle-tab.c (muscle_insert, muscle_grow)
203 * src/state.c (state_hash_insert): Check the return value of
204 hash_insert.
205
206 2009-06-11 Akim Demaille <demaille@gostai.com>
207
208 tests: honor TESTSUITEFLAGS in every check target.
209 * tests/local.mk (RUN_TESTSUITE): New.
210 (check-local, installcheck-local, maintainer-check-g++)
211 (maintainer-check-posix, maintainer-check-valgrind): Use it.
212
213 2009-06-10 Akim Demaille <demaille@gostai.com>
214
215 deterministic test suite.
216 Some consistency checks on symbols are performed after all the
217 symbols were read, by an iteration over the symbol table. This
218 traversal is nondeterministic, which can be a problem for test
219 cases.
220 Avoid this.
221 Addresses another form of nondeterminism reported by Joel E. Denny.
222 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
223
224 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
225 test in two.
226 Use different file names for the three tests to make the
227 maintenance easier.
228
229 2009-06-10 Akim Demaille <demaille@gostai.com>
230
231 gnulib: update.
232 * gnulib: Update to latest.
233 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
234 * m4/.gitignore: Regen.
235 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
236 Call xalloc_die on hash_insert failures.
237 Requested by the new __warn_unused_result__ attribute of
238 hash_insert.
239
240 2009-06-10 Akim Demaille <demaille@gostai.com>
241
242 deterministic user-token-number redeclaration errors.
243 Address nondeterminism reported by Joel E. Denny.
244 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
245
246 * src/uniqstr.h: Comment changes.
247 * src/location.h (boundary_cmp, location_cmp): New.
248 * src/symtab.c (user_token_number_redeclaration): New.
249 (symbol_translation): Use it.
250 * tests/input.at (Numbered tokens): Adjust the expected output.
251
252 2009-05-25 Akim Demaille <demaille@gostai.com>
253
254 build: avoid ignored errors.
255 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
256 errors, they pollute the output.
257
258 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
259
260 Convert multiple variable definition warnings to complaints.
261 * NEWS (2.5): Add a new entry for that change.
262 * doc/bison.texinfo (Decl Summary): Update %define entry.
263 (Bison Options): Update -D/--define/-F/--force-define entry.
264 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
265 * src/muscle-tab.h (muscle_percent_define_insert): Update
266 comments.
267 * tests/input.at (`%define errors'): Update.
268 (`%define, --define, --force-define'): Update.
269
270 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
271
272 -F/--force-define and relative %define/-D/--define priorities.
273 * NEWS (2.5): Add documentation to -D/--define entry.
274 * build-aux/cross-options.pl: Hard-code association of
275 --force-define with %define.
276 * doc/bison.texinfo (Decl Summary): In %define entry,
277 cross-reference command-line options.
278 (Bison Options): Add documentation to -D/--define entry.
279 (Option Cross Key): Widen column for --force-define row.
280 * src/getargs.c (usage): Document -F/--force-define. Realign
281 options in output.
282 (short_options, long_options, getargs): Parse -F/--force-define,
283 and update muscle_percent_define_insert invocations.
284 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
285 (muscle_percent_define_insert): Add argument with that type.
286 * src/muscle-tab.c (muscle_percent_define_insert): Implement
287 -F/--force-define behavior and priorities.
288 (muscle_percent_define_ensure): Update
289 muscle_percent_define_insert invocation.
290 * src/parse-gram.y (prologue_declaration): Update
291 muscle_percent_define_insert invocations.
292 * tests/input.at (`%define, --define'): Rename to...
293 (`%define, --define, --force-define'): ... this and extend.
294
295 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
296
297 Update some comments to make sense for -D.
298 * data/bison.m4 (b4_check_user_names): In header comments, say
299 "user occurrence" instead of "grammar occurrence".
300 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
301 (muscle_percent_code_grow): Likewise just for consistency.
302
303 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
304
305 * data/c++.m4 (b4_namespace_close): Simplify slightly.
306
307 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
308
309 Handle a trailing `:' in a user-supplied C++ namespace better.
310 * data/c++.m4 (b4_namespace_close): Don't let it be printed
311 among the closing braces here. This fix might make the
312 generated code easier to debug, but otherwise it should be
313 insignificant because a trailing `:' is a C++ error already.
314
315 2009-05-19 Akim Demaille <demaille@gostai.com>
316
317 remove useless variable.
318 * src/getargs.c (skeleton_arg): Remove now useless variable.
319 Should help the compiler see that this printf-like call is sane.
320
321 2009-05-15 Akim Demaille <demaille@gostai.com>
322
323 Rename token.prefix as api.tokens.prefix.
324 Discussed here.
325 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
326
327 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
328 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
329 (token.prefix): Rename as...
330 (api.tokens.prefix): this.
331
332 2009-05-11 Akim Demaille <demaille@gostai.com>
333
334 doc: use C++ headers.
335 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
336 headers.
337
338 2009-05-11 Akim Demaille <demaille@gostai.com>
339
340 doc: token.prefix
341 * doc/bison.simple (Decl Summary): Document token.prefix.
342 (Calc++ Parser): Various fixes.
343 Formatting changes.
344 Use token.prefix.
345 Introduce a macro TOKEN to shorten the code and make it more
346 readable.
347 (Calc++ Scanner): Adjust.
348 * NEWS (Variable token.prefix): New.
349
350 2009-05-04 Akim Demaille <demaille@gostai.com>
351
352 bison: catch bad symbol names.
353 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
354 * tests/input.at: Adjust.
355
356 2009-05-04 Akim Demaille <demaille@gostai.com>
357
358 identifiers: dashes are letters.
359 Dashes can now start identifiers (symbols and directives).
360
361 * src/scan-gram.l ({letter}): Add dash.
362 ({id}): Remove it.
363 * tests/input.at (Symbols): Adjust.
364 Remove stray comment.
365 * tests/regression.at (Invalid inputs): Adjust error message.
366 * doc/bison.texinfo (Symbols): Update.
367
368 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
369
370 Declare %code to be a permanent feature.
371 * NEWS (2.4.2): Here.
372 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
373 experimental.
374 (Decl Summary): Likewise.
375
376 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
377
378 Convert underscores to dashes in some %define variable names.
379 For now, just api.push-pull and lr.keep-unreachable-states.
380 Maintain old names for backward compatibility.
381 * NEWS (2.5): Document.
382 * data/c.m4 (b4_identification): Update comment.
383 * data/yacc.c: Update access.
384 * doc/bison.texinfo: Update.
385 * etc/bench.pl.in (bench_push_parser): Update use.
386 * src/files.c (tr): Move to...
387 * src/getargs.c, src/getargs.h (tr): ... here because I can't
388 think of a better place to expose it. My logic is that, for all
389 uses of tr so far, command-line arguments can be involved, and
390 getargs.h is already included.
391 * src/main.c (main): Update access.
392 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
393 variable names to new variable names before assigning value.
394 * src/reader.c (reader): Update setting default.
395 * tests/calc.at: Update uses.
396 * tests/conflicts.at (Unreachable States After Conflict
397 Resolution): Update use.
398 * tests/input.at (%define enum variables): Update use.
399 (%define backward compatibility): New test group.
400 * tests/push.at: Update uses.
401 * tests/reduce.at: Update uses.
402 * tests/torture.at: Update uses.
403
404 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
405
406 Set all front-end %define defaults in one place.
407 * src/main.c (main): Move lr.keep_unreachable_states default...
408 * src/reader.c (reader): ... to here.
409
410 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
411
412 Rename lr.default_reductions to lr.default-reductions.
413 * NEWS (2.5): Here.
414 * doc/bison.texinfo: Here.
415 * src/lalr.c (initialize_LA): Here.
416 * src/print.c (print_reductions): Here.
417 * src/reader.c (reader): Here.
418 * src/tables.c (action_row): Here.
419 * tests/input.at (%define enum variables): Here.
420 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
421
422 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
423
424 Pacify ./configure --enable-gcc-warnings.
425 * tests/input.at (Symbols): Prototype yyerror and yylex.
426
427 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
428
429 Document how `%define "var" "value"' is not M4-friendly.
430 * src/parse-gram.y (variable): In comments here.
431
432 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
433
434 Clean up recent patches a little.
435 Reported by Akim Demaille.
436 * doc/bison.texinfo (Understanding): Fix typos.
437 * src/print.c (print_reductions): Don't use negated variable.
438
439 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
440
441 List accepted values for a %define enum variable with an invalid value.
442 Suggested by Akim Demaille at
443 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
444 * data/bison.m4 (_b4_percent_define_check_values): Implement.
445 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
446 * tests/input.at (%define lr.default_reductions invalid values): Merge
447 into...
448 (%define enum variables): ... here, and update output.
449
450 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
451
452 Rename "default rule" to "default reduction".
453 This includes changing variable names in code, changing
454 comments, and renaming %define lr.default_rules to %define
455 lr.default_reductions.
456 * NEWS (2.5): Update IELR documentation.
457 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
458 documentation.
459 * data/glr.c, data/lalr1.java: Sync copyright dates.
460 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
461 and lr.type documentation. Make some other wording
462 improvements.
463 (Glossary): Adjust cross-references and Default Reduction
464 definition.
465 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
466 Remove a confusing comment pointed out by Akim Demaille.
467 (initialize_LA): Adjust code.
468 * src/print-xml.c (print_reductions): Adjust code.
469 * src/print.c (print_reductions): Adjust code.
470 * src/reader.c (reader): Adjust code.
471 * src/tables.c (action_row): Adjust code.
472 (token_actions): Adjust code.
473 * src/tables.h: Adjust YYDEFACT documentation.
474 * tests/input.at (%define lr.default_rules invalid values):
475 Rename test group to...
476 (%define lr.default_reductions invalid values): ... this, and
477 update grammar file and expected output.
478 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
479 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
480
481 2009-04-21 Akim Demaille <demaille@gostai.com>
482
483 tests: check the use of dashes and periods in symbols.
484 * tests/input.at (Symbol): New test group.
485
486 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
487
488 Document %define lr.type and lr.default_rules.
489 * NEWS (2.5): Add an entry.
490 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
491 besides just LALR(1) and GLR(1).
492 * doc/bison.texinfo (Introduction): Likewise.
493 (Language and Grammar): Bison is no longer limited to LALR(1)
494 restrictions.
495 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
496 when trying to distinguish from GLR. Talk about LR(1) grammars
497 rather than LALR(1) grammars.
498 (Decl Summary): In %define api.push_pull entry, say it applies
499 to deterministic parsers in C rather than LALR(1) parsers in C.
500 Add lr.default_rules entry.
501 Add lr.type entry.
502 (Mystery Conflicts): Bison is no longer limited to LALR(1)
503 restrictions.
504 (Generalized LR Parsing): Same changes as for the previous GLR
505 section.
506 (Memory Management): Say deterministic rather than LALR(1).
507 (Understanding): Correct some bison output.
508 Index discussion of "accepting state".
509 Say deterministic rather than LALR(1).
510 (Bison Options): In --yacc entry, say deterministic rather than
511 LALR(1).
512 In --report, --graph, and --xml entries, just don't mention
513 LALR(1).
514 (C++ Parsers): Say deterministic rather than LALR(1).
515 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
516 (Glossary): Add Accepting State, Consistent State, Default Rule,
517 and IELR(1) definitions.
518 In Generalized LR (GLR) definition, make same changes as in
519 previous GLR sections.
520 In LALR(1) definition, say Bison uses LALR(1) by default rather
521 than implying Bison is limited to LALR(1).
522 (LocalWords): Add IELR.
523
524 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
525
526 Finish implementing %define lr.type.
527 Its value can be "LALR", "IELR", or "canonical LR".
528 * lib/timevar.def (TV_IELR_PHASE1): New var.
529 (TV_IELR_PHASE2): New var.
530 (TV_IELR_PHASE3): New var.
531 (TV_IELR_PHASE4): New var.
532 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
533 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
534 Sbitset.h, ielr.h, and ielr.c.
535 * src/getargs.h, src/getargs.c (enum trace, trace_args,
536 trace_types): Add trace_ielr.
537 * src/lalr.h, src/lalr.c (ngotos): Export it.
538 (F): Rename to...
539 (goto_follows): ... this, update all uses, and export it.
540 (set_goto_map): Export it.
541 (map_goto): Export it.
542 (compute_lookahead_tokens): Don't free goto_follows yet. Now
543 handled in ielr.
544 (initialize_LA): Export it. Move lookback allocation to...
545 (lalr): ... here because, for canonical LR, initialize_LA must
546 be invoked but lookback and much of the rest of LALR isn't
547 needed.
548 * main.c (main): Instead of lalr, invoke ielr, which invokes
549 lalr.
550 * src/reader.c (reader): Default lr.type to "LALR".
551 Default lr.default_rules to "accepting" if lr.type is "canonical
552 LR". Leave the default as "all" otherwise.
553 Check for a valid lr.type value.
554 * src/state.h, src/state.c (struct state_list): Add state_list
555 member.
556 (state_new): Initialize state_list member to NULL.
557 (state_new_isocore): New function, exported.
558 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
559 exercises all values of lr.type.
560 (GNU AWK Grammar): Rename test group to...
561 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
562 AT_TEST_EXISTING_GRAMMAR.
563 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
564 (GNU pic Grammar): Rename test group to...
565 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
566 AT_TEST_EXISTING_GRAMMAR.
567 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
568 all values of lr.type.
569 (Single State Split): New test groups using AT_TEST_LR_TYPE.
570 (Lane Split): Likewise.
571 (Complex Lane Split): Likewise.
572 (Split During Added Lookahead Propagation): Likewise.
573
574 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
575
576 Add new files for IELR and canonical LR implementation.
577 * src/AnnotationList.c: New.
578 * src/AnnotationList.h: New.
579 * src/InadequacyList.c: New.
580 * src/InadequacyList.h: New.
581 * src/Sbitset.c: New.
582 * src/Sbitset.h: New.
583 * src/ielr.c: New.
584 * src/ielr.h: New.
585
586 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
587
588 Implement %define lr.default_rules.
589 Its value describes the states that are permitted to contain
590 default rules: "all", "consistent", or "accepting".
591 * src/reader.c (reader): Default lr.default_rules to "all".
592 Check for a valid lr.default_rules value.
593 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
594 is "accepting", then only mark the accepting state as
595 consistent.
596 (initialize_LA): Tell state_lookahead_tokens_count whether
597 lr.default_rules is "accepting".
598 * src/tables.c (action_row): If lr.default_rules is not "all",
599 then disable default rules in inconsistent states.
600 * src/print.c (print_reductions): Use this opportunity to
601 perform some assertions about whether lr.default_rules was
602 obeyed correctly.
603 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
604 helps with checking the parser tables for a grammar.
605 * tests/input.at (%define lr.default_rules invalid values): New
606 test group.
607 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
608 AT_TEST_TABLES_AND_PARSE.
609 (`no %define lr.default_rules'): New test group generated by
610 AT_TEST_LR_DEFAULT_RULES.
611 (`%define lr.default_rules "all"'): Likewise.
612 (`%define lr.default_rules "consistent"'): Likewise.
613 (`%define lr.default_rules "accepting"'): Likewise.
614
615 2009-04-20 Akim Demaille <demaille@gostai.com>
616
617 Formatting change.
618
619 2009-04-20 Akim Demaille <demaille@gostai.com>
620
621 bison: factoring.
622 * src/output.c (token_definitions_output): Use symbol_id_get
623 instead of duplicating its logic.
624 * TODO (YYERRCODE): Extend.
625
626 2009-04-20 Akim Demaille <demaille@gostai.com>
627
628 variables: prefer error-verbose to error_verbose.
629 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
630 instead of error_verbose.
631 * src/scan-gram.l (%error-verbose): Map to the error-verbose
632 variable.
633 * doc/bison.texinfo: Promote %define error-verbose instead of
634 %error-verbose.
635 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
636
637 2009-04-15 Akim Demaille <demaille@gostai.com>
638
639 variables: accept dashes.
640 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
641 underscores.
642 * src/scan-gram.l ({id}): Also accept dashes after the initial
643 letter.
644 ({directive}): Use {id}.
645 * src/parse-gram.y: Comment and formatting changes.
646 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
647 symbols.
648 * src/complain.h, src/complain.c (yacc_at): New.
649 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
650 symbol names.
651 * src/output.c (token_definitions_output): Do not #define token
652 names with dashes.
653
654 2009-04-20 Akim Demaille <demaille@gostai.com>
655
656 Consistently refer to Yacc, not YACC.
657 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
658
659 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
660
661 Pacify make maintainer-check-posix.
662 * tests/input.at (%define, --define): Move bison command-line
663 options before grammar file name.
664
665 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
666
667 Document semicolon warnings.
668 * NEWS (2.5): Here.
669
670 2009-04-14 Akim Demaille <demaille@gostai.com>
671
672 variables: use `parse.assert' instead of `assert'.
673 * TODO (assert): Remove.
674 * data/bison.m4 (b4_assert_if): Replace with...
675 (b4_parse_assert_if): this.
676 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
677 * doc/bison.texinfo (Decl Summary): Document parse.assert.
678
679 2009-04-14 Akim Demaille <demaille@gostai.com>
680
681 variables: use `parse.trace' instead of `debug'.
682 * src/getargs.c (getargs): Map -t to %define trace.parse.
683 * src/scan-gram.l (%debug): Map to %define trace.parse.
684 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
685 names to `_' in macro names.
686 (b4_debug_if): Replace with...
687 (b4_parse_trace_if): this.
688 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
689 * data/yacc.c: Adjust.
690 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
691 Use @code to label the variable list.
692 Document the variable parse.trace.
693 (Tracing): Promote the parse.trace variable.
694 * TODO: %printer is not documented.
695
696 2009-04-14 Akim Demaille <demaille@gostai.com>
697
698 doc: minor fixes.
699 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
700 (Table of Symbols): Remove duplicate entry for %debug.
701
702 2009-04-10 Eric Blake <ebb9@byu.net>
703
704 submodules: update to latest
705 * submodules/autoconf: Use latest upstream Autoconf.
706
707 2009-04-06 Eric Blake <ebb9@byu.net>
708
709 Work around autoconf 2.63b bug in testsuite.
710 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
711 autoconf bug related to # in test.
712
713 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
714
715 * NEWS (2.5): New section. Describe new -D/--define feature.
716
717 2009-04-06 Akim Demaille <demaille@gostai.com>
718
719 Regen.
720 * src/parse-gram.h, src/parse-gram.c: Regen.
721
722 2009-04-06 Akim Demaille <demaille@gostai.com>
723
724 rename muscle_tab.* as muscle-tab.* for consistency.
725 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
726 * src/muscle-tab.h, src/muscle-tab.c: these.
727 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
728 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
729
730 2009-04-06 Akim Demaille <demaille@gostai.com>
731
732 Makefile: introduce $(BISON).
733 * src/local.mk (BISON): New.
734 (YACC): Use it.
735
736 2009-04-06 Akim Demaille <demaille@gostai.com>
737
738 parser: handle %locations as %define locations.
739 * src/getargs.h, src/getargs.c (locations_flag): Remove.
740 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
741 to set "locations" to true.
742 * src/output.c (prepare): Don't output "locations".
743 * src/scan-gram.l (%locations): Handle it as a %<flag>.
744 * src/parse-gram.y: It's no longer a token.
745 Don't handle it.
746 * data/bison.m4 (b4_locations_if): Define it with
747 b4_percent_define_if_define.
748 * data/c.m4, data/glr.cc: Adjust.
749
750 2009-04-06 Akim Demaille <demaille@gostai.com>
751
752 Regen.
753 * src/parse-gram.c: Regen.
754
755 2009-04-06 Akim Demaille <demaille@gostai.com>
756
757 muscle: factor the handling of obsolete of obsolete directives.
758 Suggested by Joel E. Denny.
759
760 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
761 New, extracted from...
762 * src/parse-gram.y (prologue_declaration: pure-parser): here.
763 Remove it.
764 (prologue_declaration: "%<flag>"): Use
765 muscle_percent_define_ensure.
766 (%error-verbose, %pure-parser): No longer tokens.
767 * src/scan-gram.l (pure-parser): Return as a %<flag>.
768
769 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
770
771 Fix options documentation.
772 * build-aux/cross-options.pl: As in --help output, write optional
773 arguments as [=ARG] not =[ARG].
774 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
775
776 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
777
778 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
779 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
780 requirements for a correct m4 are stricter.
781 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
782 * configure.ac: Update to use AC_PROG_GNU_M4.
783 Reported by Eric Blake.
784
785 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
786
787 Help with updating web manual.
788 * HACKING: Incorporate instructions from gnulib/doc/README.
789 * bootstrap.conf (gnulib_modules): Add gendocs.
790
791 2009-04-03 Akim Demaille <demaille@gostai.com>
792
793 Regen.
794 * src/parse-gram.h, src/parse-gram.c: Regen.
795
796 2009-04-03 Akim Demaille <demaille@gostai.com>
797
798 Factor %FLAG at scan level.
799 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
800 definitions and associated rules, replaced by....
801 (PERCENT_FLAG): this new token type, and rule.
802 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
803 Use it for %debug and %error-verbose.
804
805 2009-04-03 Akim Demaille <demaille@gostai.com>
806
807 Regen.
808 * src/parse-gram.h, src/parse-gram.c: Regen.
809
810 2009-04-03 Akim Demaille <demaille@gostai.com>
811
812 Treat %debug as %define debug.
813 * data/bison.m4 (b4_debug_if): New.
814 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
815 * data/lalr1.java: Use it instead of b4_debug_flag.
816 * src/getargs.h, src/getargs.c (debug_flag): Remove.
817 * src/output.c (prepare): Don't output it.
818 * src/parse-gram.y: Treat %debug as %define debug.
819
820 2009-04-03 Akim Demaille <demaille@gostai.com>
821
822 Treat %error-verbose as %define error_verbose.
823 This allows to pass -Derror_verbose on the command line. Better
824 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
825 ERROR_VERBOSE being defined as false or true.
826 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
827 on b4_percent_define_ifdef, for does not check the defined value,
828 but only whether the symbol is defined, rely on
829 b4_percent_define_flag_if, so that a value of "false" is processed
830 as a false.
831 If not defined, define the flag to "false".
832 (b4_error_verbose_if): New.
833 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
834 b4_error_verbose_flag.
835 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
836 * src/output.c (prepare): Don't output it.
837 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
838
839 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
840
841 Fix strange %define locations for default values.
842 Reported by Akim Demaille at
843 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
844 and discussed again starting at
845 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
846 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
847 because location information is bogus.
848 Use angle brackets to delimit fake file name because square brackets
849 look like underexpanded m4. Choose a better fake file name.
850 Use negative line numbers.
851 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
852 * src/location.c (location_print): If line for a boundary is negative,
853 only print that boundary's file name.
854 * src/location.h: Document that.
855 * tests/skeletons.at (%define Boolean variables: invalid skeleton
856 defaults): Update output.
857
858 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
859
860 Pacify ./configure --enable-gcc-warnings.
861 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
862 in lib won't compile with it.
863 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
864
865 2009-03-31 Akim Demaille <demaille@gostai.com>
866
867 bootstrap: --help to stdout.
868 * bootstrap (usage): Don't send --help to stderr.
869 Use a here doc instead of a long string.
870
871 2009-03-31 Akim Demaille <demaille@gostai.com>
872
873 bootstrap: README-hacking no longer exists
874 * bootstrap (checkout_only_file): Set to HACKING.
875
876 2009-03-26 Akim Demaille <demaille@gostai.com>
877
878 doc: merge HACKING and README-hacking.
879 Two files is confusing.
880 Reported by Alexandre Duret-Lutz.
881
882 * README-hacking: Merge into...
883 * HACKING (Working from the repository): here.
884
885 2009-03-26 Akim Demaille <demaille@gostai.com>
886
887 doc: update README-hacking.
888 * README-hacking: We now use git and git submodules.
889 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
890
891 2009-03-26 Akim Demaille <demaille@gostai.com>
892
893 lalr1.cc: avoid GCC 4.3 warnings.
894 GCC 4.3 now warns about "a || b && c" and asks for explicit
895 parentheses.
896 Reported by Alexandre Duret-Lutz.
897 * data/location.cc: Update copyright years.
898 (Position::operator==): Use parens to make precedence explicit.
899 Compare lines and columns first, as they are more likely to be
900 different, and they are faster to compare.
901
902 2009-03-26 Akim Demaille <demaille@gostai.com>
903
904 gnulib: update.
905 * gnulib: Update to latest.
906 * src/local.mk (AM_CFLAGS): Move to...
907 * Makefile.am: here.
908 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
909 AM_CFLAGS.
910
911 2009-03-02 Akim Demaille <demaille@gostai.com>
912
913 Comment changes.
914
915 2009-03-02 Akim Demaille <demaille@gostai.com>
916
917 Share b4_yytranslate_define.
918 * data/lalr1.cc (b4_yytranslate_define): Move to...
919 * data/c++.m4: here.
920
921 2009-03-02 Akim Demaille <demaille@gostai.com>
922
923 Use locations in the variant example.
924 Yes, this obfuscates the point of this example, variants only.
925 But glr.cc cannot work (yet?) without locations. This change
926 makes it easier to use this example with glr.cc.
927
928 * examples/variant.yy (assert): %define it.
929 (locations): Request them.
930 (yylex): Bind the location to the stage.
931
932 2009-03-02 Akim Demaille <demaille@gostai.com>
933
934 Dub make_TOKEN as a public type interface.
935 * data/c++.m4 (b4_symbol_constructor_declare)
936 (b4_symbol_constructor_define): New empty stubs.
937 (b4_public_types_declare, b4_public_types_define): Use them.
938 * data/lalr1.cc (b4_symbol_constructor_declare)
939 (b4_symbol_constructor_declare_)
940 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
941 Move to...
942 * data/variant.hh: here.
943 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
944 needed.
945 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
946 b4_symbol_constructor_declare, as it is now done by
947 b4_public_types_define and b4_public_types_declare.
948
949 2009-03-02 Akim Demaille <demaille@gostai.com>
950
951 Coding style changes.
952 * data/lalr1.cc (b4_symbol_constructor_declaration_)
953 (b4_symbol_constructor_declarations)
954 (b4_symbol_constructor_definition_)
955 (b4_symbol_constructor_definitions)
956 (b4_yytranslate_definition): Rename as...
957 (b4_symbol_constructor_declare_)
958 (b4_symbol_constructor_declare)
959 (b4_symbol_constructor_define_)
960 (b4_symbol_constructor_define)
961 (b4_yytranslate_define): these.
962 * data/variant.hh (b4_variant_definition): Rename as...
963 (b4_variant_define): this.
964
965 2009-03-02 Akim Demaille <demaille@gostai.com>
966
967 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
968 * data/bison.m4 (b4_percent_define_if_define): New.
969 * data/c++.m4 (b4_variant_if): Move to...
970 * data/bison.m4: Here, using b4_percent_define_if_define.
971 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
972 * data/bison.m4: Here, using b4_percent_define_if_define.
973
974 2009-03-02 Akim Demaille <demaille@gostai.com>
975
976 Dub symbol_type_base as a public type.
977 * data/c++.m4 (b4_public_types_declare): Now define
978 symbol_type_base and symbol_type.
979 (b4_public_types_define): New.
980 In both cases, the definitions are taken verbatim from lalr1.cc.
981 * data/lalr1.cc: Adjust.
982
983 2009-03-02 Akim Demaille <demaille@gostai.com>
984
985 b4_public_types_declare.
986 * data/c++.m4 (b4_public_types_declare): New.
987 * data/glr.cc, data/lalr1.cc: Use it.
988
989 2009-03-02 Akim Demaille <demaille@gostai.com>
990
991 b4_semantic_type_declare.
992 * data/c++.m4 (b4_semantic_type_declare): New.
993 Factors and generalizes what was in glr.cc and lalr1.cc.
994 * data/variant.hh (b4_semantic_type_declare): Redefine it for
995 variants.
996 * data/lalr1.cc, data/glr.cc: Use it.
997
998 2009-02-26 Akim Demaille <demaille@gostai.com>
999
1000 Upgrade gnulib.
1001 * gnulib: Upgrade from master.
1002 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
1003 Regen.
1004
1005 2009-02-25 Akim Demaille <demaille@gostai.com>
1006
1007 Remove useless arguments.
1008 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
1009 relevant.
1010
1011 2009-02-25 Akim Demaille <demaille@gostai.com>
1012
1013 Comment changes.
1014 * data/lalr1.cc: here.
1015
1016 2009-02-25 Akim Demaille <demaille@gostai.com>
1017
1018 Fix glr.cc's debug level handling.
1019 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
1020 glr.c which is used.
1021 (debug_level, set_debug_level): Adjust.
1022
1023 2009-02-25 Akim Demaille <demaille@gostai.com>
1024
1025 Copyright years.
1026 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1027
1028 2009-02-25 Akim Demaille <demaille@gostai.com>
1029
1030 Style changes.
1031 * etc/bench.pl.in (generate_grammar_list): Consitently use
1032 location_type, not yy::location.
1033
1034 2009-02-25 Akim Demaille <demaille@gostai.com>
1035
1036 Comment change.
1037 * data/lalr1.cc: here.
1038
1039 2009-02-19 Akim Demaille <demaille@gostai.com>
1040
1041 Make yyparser::error public.
1042 * data/lalr1.cc: here.
1043 There is no good reason to keep it private (and it is convenient
1044 to use it from the scanner for instance). It is already public in
1045 glr.cc.
1046
1047 2009-02-19 Akim Demaille <demaille@gostai.com>
1048
1049 Comment changes.
1050 * data/glr.cc: here.
1051
1052 2009-02-19 Akim Demaille <demaille@gostai.com>
1053
1054 Remove trailing blanks.
1055 The epilogue has its own ending \n, no need to add another.
1056
1057 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1058 epilogue.
1059 * data/glr.cc: dnl when extending the epilogue.
1060 Remove stray "private:".
1061
1062 2009-02-19 Akim Demaille <demaille@gostai.com>
1063
1064 Use b4_c_modern.
1065 * data/c.m4 (b4_c_function_decl): Here.
1066
1067 2009-02-19 Akim Demaille <demaille@gostai.com>
1068
1069 Comment changes.
1070 * data/lalr1.cc: here.
1071
1072 2009-02-19 Akim Demaille <demaille@gostai.com>
1073
1074 Extract variant.hh
1075 * data/variant.hh: New, extracted from...
1076 * data/lalr1.cc: here.
1077 Adjust.
1078 * data/local.mk: Adjust.
1079
1080 2009-02-19 Akim Demaille <demaille@gostai.com>
1081
1082 Extract stack.hh from lalr1.cc.
1083 * data/stack.hh: New.
1084 * data/lalr1.cc: Extract from here.
1085 * data/local.mk: Adjust.
1086
1087 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1088
1089 Add reminder about uploading public key to keys.gnupg.net.
1090 * HACKING (Release Procedure): Here.
1091
1092 2009-01-28 Akim Demaille <demaille@gostai.com>
1093
1094 * NEWS: Update information about 2.4.1 and 2.4.2.
1095
1096 2008-11-04 Akim Demaille <demaille@gostai.com>
1097
1098 Reformat NEWS.
1099 * NEWS: Use more outline-mode markup.
1100 Suggested by Jim Meyering.
1101
1102 2009-01-08 Akim Demaille <demaille@gostai.com>
1103
1104 Fix grep portability issues.
1105 Grep on Solaris does not support -q.
1106 Reported by Summum Bonum.
1107
1108 * NEWS: Add a stub for 2.4.2.
1109 * THANKS: Add Summum Bonum.
1110 * tests/atlocal.in (EGREP): New.
1111 (CC, CXX, XSLTPROC): Make it possible to override them via
1112 envvars.
1113 * tests/java.at: Use $EGREP instead of egrep.
1114 Use AT_CHECK's ignore instead of grep's -q.
1115
1116 2008-12-11 Akim Demaille <demaille@gostai.com>
1117
1118 Pass the token type to yysyntax_error.
1119 * data/yacc.c (yysyntax_error): Take the transated token instead
1120 of the raw number.
1121 Adjust callers.
1122 * TODO: Update.
1123
1124 2008-12-11 Akim Demaille <demaille@gostai.com>
1125
1126 Formatting changes.
1127 * data/glr.c: Formatting changes.
1128
1129 2008-12-11 Akim Demaille <demaille@gostai.com>
1130
1131 Propagate i18n changes into glr.c.
1132 * TODO: Update.
1133 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1134 building the error message format dynamically.
1135 * data/lalr1.java: Formatting changes.
1136
1137 2008-12-11 Akim Demaille <demaille@gostai.com>
1138
1139 Use testsuite -C.
1140 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1141 Solves problems when top_srcdir is an absolute path.
1142 Suggested by Eric Blake.
1143 * configure.ac: Require Autoconf 2.62.
1144
1145 2008-12-11 Akim Demaille <demaille@gostai.com>
1146
1147 Simplify the i18n of the error messages.
1148 * data/lalr1.cc: Comment changes.
1149 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1150 lalr1.cc instead of building dynamically the format string.
1151
1152 2008-12-08 Akim Demaille <demaille@gostai.com>
1153
1154 Fix portability issue in the test suite.
1155 * tests/local.at (AT_MATCHES_CHECK): New.
1156 Based on Perl instead of Sed. Sed has too many portability
1157 pitfalls, not ever Sed is GNU Sed.
1158 * tests/actions.at (Fix user actions without a trailing semicolon):
1159 Use it.
1160
1161 2008-12-08 Akim Demaille <demaille@gostai.com>
1162
1163 Update data/README.
1164 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1165
1166 2008-12-08 Akim Demaille <demaille@gostai.com>
1167
1168 Install autoconf as a submodule to get m4sugar.
1169 * .gitmodules: Add submodules/autoconf.
1170 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1171 submodules/autoconf.
1172
1173 2008-12-08 Akim Demaille <demaille@gostai.com>
1174
1175 Test token.prefix in all the skeletons.
1176 * data/java.m4 (b4_token_enum): Use the token.prefix.
1177 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1178 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1179 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1180 * tests/java.at: Comment changes.
1181 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1182 (Java parser class and package names): Add token.prefix check.
1183
1184 2008-12-08 Akim Demaille <demaille@gostai.com>
1185
1186 Fix regeneration of atconfig.
1187 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1188 remove it: now that there is no tests/Makefile.am, the top-level
1189 Makefile properly updates atconfig when needed.
1190
1191 2008-12-07 Di-an Jan <dianj@freeshell.org>
1192
1193 Implement the FIXME that ends an user action with a semicolon
1194 if it seems necessary.
1195 * src/scan-code.l (flex rules section): Flag cpp directive from
1196 any `#' to the first unescaped end-of-line. Semicolon is not
1197 needed after `;', `{', '}', or cpp directives and is needed after
1198 any other token (whitespaces and comments have no effect).
1199 * tests/actions.at (Fix user actions without a trailing semicolon):
1200 New test.
1201 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1202 to make user actions complete statements.
1203 Adjust column numbers in error messages.
1204 * tests/regression.at (Fix user actions without a trailing semicolon):
1205 Remove. Covered by new test.
1206
1207 2008-12-07 Akim Demaille <demaille@gostai.com>
1208
1209 Update gnulib.
1210 * gnulib: Update from master.
1211
1212 2008-12-05 Eric Blake <ebb9@byu.net>
1213
1214 Avoid compiler warning.
1215 * src/output.c (muscle_insert_item_number_table): Delete unused
1216 function.
1217
1218 2008-12-02 Eric Blake <ebb9@byu.net>
1219
1220 Build testsuite with newer autoconf.
1221 * tests/output.at (m4_expand): Don't override in newer autoconf,
1222 where the underlying implementation changed.
1223 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1224 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1225 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1226 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1227 since some of them contain unbalanced ')'.
1228
1229 2008-12-01 Akim Demaille <demaille@gostai.com>
1230
1231 Use b4_symbol for printers and destructors everywhere.
1232 * data/bison.m4 (b4_symbol_action_location): New.
1233 * data/c.m4 (b4_symbol_actions): Remove.
1234 Adjust all callers to use by b4_symbol_foreach and the corresponding
1235 b4_symbol_printer/destructor macro.
1236 * data/glr.cc: Adjust.
1237 * data/lalr1.java: Adjust the %destructor sanity check.
1238 * src/output.c (symbol_code_props_output): Remove, we no longer
1239 need the b4_symbol_printers/destructors tables.
1240
1241 2008-12-01 Akim Demaille <demaille@gostai.com>
1242
1243 Use b4_symbol_case_.
1244 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1245 b4_symbol_case_.
1246
1247 2008-12-01 Akim Demaille <demaille@gostai.com>
1248
1249 Move b4_symbol based macro to bison.m4.
1250 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1251 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1252 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1253 (b4_type_foreach): Move to...
1254 * data/bison.m4: Here.
1255 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1256 b4_symbol_value_template instead of b4_symbol_value.
1257
1258 2008-12-01 Akim Demaille <demaille@gostai.com>
1259
1260 b4_symbol/type_foreach.
1261 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1262 Use them.
1263
1264 2008-12-01 Akim Demaille <demaille@gostai.com>
1265
1266 Use the symbol properties to output the printer/destructor for lalr1.cc.
1267 Instead of defining complex list of tuples to define various
1268 properties of the symbols, we now prefer to define symbols as
1269 "structs" in m4: using the symbol key (its number), and the
1270 property name, b4_symbol gives it value. Use this to handle
1271 destructors and printers.
1272
1273 * src/output.c (CODE_PROP): New.
1274 (prepare_symbol_definitions): Use it to define the printer and
1275 destructor related attributes of the symbols.
1276 * data/lalr1.cc (b4_symbol_actions): Rename as...
1277 (b4_symbol_action): this.
1278 Use b4_symbol instead of 6 arguments.
1279 (b4_symbol_printer, b4_symbol_destructor): New.
1280 Use them instead of b4_symbol_actions.
1281
1282 2008-12-01 Akim Demaille <demaille@gostai.com>
1283
1284 Avoid capturing variables too easily.
1285 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
1286 v__ and p__ instead of v and p.
1287
1288 2008-12-01 Akim Demaille <demaille@gostai.com>
1289
1290 Remove spurious empty line before syncline.
1291 * data/bison.m4 (b4_syncline): Don't output an empty line before
1292 the output.
1293
1294 2008-11-26 Akim Demaille <demaille@gostai.com>
1295
1296 Convert lib/Makefile.am into lib/local.mk.
1297 The real problem is rather gnulib.mk, which itself is extracted
1298 from a Makefile.am that gnulib expects to the "recursive". The
1299 tool prefix-gnulib-mk converts such a gnulib.mk to be
1300 non-recursive. Also, some AC_SUBST variables need to be adjusted.
1301
1302 * etc/prefix-gnulib-mk: New.
1303 * bootstrap (slurp): Use it to convert further gnulib.mk.
1304 No longer try to avoid re-creation of lib/gnulib.mk as the changes
1305 are deeper.
1306 * lib/Makefile.am: Rename as...
1307 * lib/local.mk: this.
1308 Adjust to be prefixed.
1309 * Makefile.am, configure.ac: Adjust.
1310 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
1311
1312 2008-11-26 Akim Demaille <demaille@gostai.com>
1313
1314 s/_FLAGS/FLAGS/.
1315 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1316 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1317 Reported by Eric Blake.
1318
1319 2008-11-26 Akim Demaille <demaille@gostai.com>
1320
1321 Use b4_parser_tables_define in glr.cc.
1322 * data/glr.c: Use b4_parser_tables_define instead of defining the
1323 (deterministic integral) tables by hand.
1324
1325 2008-11-26 Akim Demaille <demaille@gostai.com>
1326
1327 Use b4_parser_tables_define in Java.
1328 * data/java.m4 (b4_typed_parser_table): Rename as...
1329 (b4_typed_parser_table_define): this, for consistency.
1330 Accept a comment as $4.
1331 Move $2 into yy*_.
1332 (b4_integral_parser_table): Rename as...
1333 (b4_integral_parser_table_define): this.
1334 * data/lalr1.java: Adjust all uses.
1335 Use b4_parser_tables_define instead of generation by hand.
1336
1337 2008-11-26 Akim Demaille <demaille@gostai.com>
1338
1339 Prepare the convergence bw C style and Java table generation.
1340 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1341 (b4_tables_define): Rename as...
1342 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1343 (b4_parser_tables_define): these.
1344 * data/c.m4 (b4_table_define): Rename as...
1345 (b4_integral_parser_table_define): this.
1346 * data/lalr1.cc: Adjust.
1347 (b4_table_define, b4_table_declare): Rename as...
1348 (b4_integral_parser_table_define)
1349 (b4_integral_parser_table_declare): these.
1350 (yyrline_): Move the comment where it is actually used.
1351 * data/yacc.c: Adjust.
1352 (yyrline): Use b4_integral_parser_table_define.
1353
1354 2008-11-26 Akim Demaille <demaille@gostai.com>
1355
1356 Regen.
1357 * src/parse-gram.h, src/parse-gram.c: Regen.
1358
1359 2008-11-26 Akim Demaille <demaille@gostai.com>
1360
1361 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1362 * data/lalr1.cc (b4_tables_map): Move to...
1363 * data/bison.m4: here.
1364 Update the comment for yytable during the flight.
1365 (b4_tables_declare, b4_tables_define): New.
1366 * data/lalr1.cc: Use them.
1367 * data/c.m4 (b4_table_define): New.
1368 * data/yacc.c: Use b4_tables_define instead of output the tables
1369 by hand.
1370 * tests/regression.at (Web2c Actions): Adjust the expected output,
1371 the order of the tables changed.
1372
1373 2008-11-26 Akim Demaille <demaille@gostai.com>
1374
1375 Get rid of (yy)rhs and (yy)prhs.
1376 These tables are no longer needed in the parsers, and they don't seem to
1377 be useful. They are not documented either.
1378
1379 * src/output.c (prepare_rules): Get rid of rhs and prhs.
1380 Adjust the computation of (yy)r2.
1381
1382 2008-11-26 Akim Demaille <demaille@gostai.com>
1383
1384 Rule length is unsigned.
1385 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
1386
1387 2008-11-26 Akim Demaille <demaille@gostai.com>
1388
1389 Get rid of lalr1-split.cc.
1390 It was no longer maintainer.
1391
1392 * data/lalr1-split.cc: Remove.
1393 * etc/bench.pl.in (bench_fusion_parser): Remove.
1394 Adjust.
1395
1396 2008-11-26 Akim Demaille <demaille@gostai.com>
1397
1398 Use yy* consistently.
1399 * data/glr.c: Now that yyrhs no longer exists as a global
1400 variable, rename local "rhs" variables into "yyrhs" for
1401 consistency.
1402
1403 2008-11-25 Akim Demaille <demaille@gostai.com>
1404
1405 Get rid of yyrhs and yyprhs in glr.c.
1406 * data/glr.c (yyrhs, yyprhs): Remove.
1407 Instead, use the state stack and yystos.
1408
1409 2008-11-25 Akim Demaille <demaille@gostai.com>
1410
1411 Flag glr tests.
1412 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
1413 as an Autotest keyword.
1414
1415 2008-11-25 Akim Demaille <demaille@gostai.com>
1416
1417 Prefer TESTSUITE_FLAGS.
1418 TESTSUITEFLAGS is barely readable.
1419
1420 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
1421 for backward compatibility.
1422 Use the former instead of the latter.
1423
1424 2008-11-25 Akim Demaille <demaille@gostai.com>
1425
1426 Get rid of yyrhs and yyprhs in larl1.java.
1427 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
1428 (yy_reduce_print): Rather, use yystos_ and the state stack.
1429
1430 2008-11-25 Akim Demaille <demaille@gostai.com>
1431
1432 Formatting changes.
1433
1434 2008-11-25 Akim Demaille <demaille@gostai.com>
1435
1436 Get rid of yyrhs and yyprhs in yacc.c.
1437 They were used to get the symbol types, given a rule number, when
1438 displaying the top of the stack before a reduction. But the
1439 symbol type is available from the state stack. This has two be
1440 benefits: two tables less in the parser (making it smaller), and a
1441 more consistent use of the three stacks which will help to fuse
1442 them.
1443
1444 * data/yacc.c (yyprhs, yyrhs): Remove.
1445 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
1446 (yy_reduce_print): Take yyssp as argument.
1447 Use it, together with yystos, to get the symbol type.
1448 * tests/regression.at (Web2c Report): Remove these tables from the
1449 expected output.
1450
1451 2008-11-25 Akim Demaille <demaille@gostai.com>
1452
1453 b4_tables_map.
1454 The point is to factor the generation of the tables across skeletons.
1455 This is language dependant.
1456
1457 * data/c.m4 (b4_comment_): New.
1458 Should be usable to define how to generate tables independently of
1459 the language.
1460 (b4_c_comment): New.
1461 (b4_comment): Bounce to b4_c_comment.
1462 Now support $2 = [PREFIX] for indentation.
1463 * data/lalr1.cc (b4_table_declare): Don't output a comment if
1464 there is no comment.
1465 Indent it properly when there is one.
1466 Output the ending semicolon.
1467 (b4_table_define): Space changes.
1468 Output the ending semicolon.
1469 (b4_tables_map): New.
1470 Use it twice instead of declaring and defining the (integral)
1471 tables by hand.
1472
1473 2008-11-25 Akim Demaille <demaille@gostai.com>
1474
1475 b4_table_declare.
1476 * data/lalr1.cc (b4_table_declare): New.
1477 Use it to declare the tables defined with b4_table_define.
1478 (b4_table_define): Declare a third arg to match b4_table_declare
1479 signature.
1480 Move all the comments around invocations of b4_table_define into
1481 the invocations itselves.
1482 Move things around to have the order for declarations and
1483 definitions.
1484
1485 2008-11-25 Akim Demaille <demaille@gostai.com>
1486
1487 Formatting changes.
1488 * data/lalr1.java: here.
1489
1490 2008-11-25 Akim Demaille <demaille@gostai.com>
1491
1492 b4_args is more general than only C++.
1493 * data/lalr1.cc (b4_args, _b4_args): Move to...
1494 * data/bison.m4: here.
1495
1496 2008-11-21 Di-an Jan <dianj@freeshell.org>
1497
1498 Implement no-XXX arguments for --warnings, --report, --trace.
1499 * src/getargs.c (flags_argmatch): Handles no-XXX.
1500 Fix typo in doxygen comment.
1501
1502 2008-11-21 Akim Demaille <demaille@gostai.com>
1503
1504 Display the changes in cross-options.texi.
1505 * build-aux/cross-options.pl ($sep): New, to separate items.
1506 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
1507 changes.
1508
1509 2008-11-20 Di-an Jan <dianj@freeshell.org>
1510
1511 Improves options in the manual.
1512 * doc/bison.texinfo (-g, -x): Add space before argument.
1513 (Option Cross Key): Implement FIXME: listing directives also.
1514 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1515 (Short Option): Special case -d. Put arguments inside @option.
1516 (Bison Directive): Add column, automatically extracted from
1517 src/scan-gram.l (actual name passed as the first argument)
1518 with special case for %define.
1519 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
1520 to build-aux/cross-options.pl.
1521 * src/getargs.c (usage): Document limitations of cross-options.pl.
1522 * src/scan-gram.l: Likewise.
1523
1524 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1525
1526 Fix unexpanded macros in GLR defines file.
1527 Reported by Csaba Raduly at
1528 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1529 * THANKS (Csaba Raduly): Add.
1530 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1531 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1532 lexer in a separate module that includes the defines file.
1533 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
1534 source.
1535 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1536 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1537 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1538 (AT_DATA_SOURCE_PROLOGUE): New.
1539 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1540 (AT_DATA_SOURCE): New.
1541 (AT_FULL_COMPILE): Extend to support an additional source file.
1542
1543 2008-11-18 Akim Demaille <demaille@gostai.com>
1544
1545 More TODO.
1546 * TODO: More short term issues.
1547
1548 2008-11-18 Akim Demaille <demaille@gostai.com>
1549
1550 Regen.
1551 * src/parse-gram.h, src/parse-gram.c: Regen.
1552
1553 2008-11-18 Akim Demaille <demaille@gostai.com>
1554
1555 Use b4_subtract where possible.
1556 * data/lalr1.cc (b4_subtract): Move to...
1557 * data/bison.m4: here.
1558 * data/glr.c (b4_rhs_data): Use it.
1559 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
1560
1561 2008-11-18 Akim Demaille <demaille@gostai.com>
1562
1563 Remove incorrect mode specification.
1564 * data/glr.cc: Don't pretend it's C code.
1565
1566 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1567
1568 Simplify last patch slightly.
1569 * src/getargs.c (getargs): Here.
1570
1571 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1572
1573 Fix last warning from --enable-gcc-warnings.
1574 * src/getargs.c (getargs): Don't assign const address to non-const
1575 pointer.
1576
1577 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1578
1579 Don't let maintainer-*-check targets force a version update.
1580 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1581 handled.
1582
1583 2008-11-17 Di-an Jan <dianj@freeshell.org>
1584
1585 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1586 Align menus. Adjust word wrapping. Use node names for menu names.
1587 (Examples): Don't abbreviate node names.
1588 (LocalWords): Remove abbreviations.
1589 (Copying): Make description a sentence.
1590 (Java Action Features): Remove period to match the rest of menu.
1591
1592 2008-11-17 Di-an Jan <dianj@freeshell.org>
1593
1594 Handles several --enable-gcc-warnings.
1595 * src/getargs.c (command_line_location): Set parameters to void.
1596 * src/output.c (symbol_type_name_cmp): Make static.
1597 (symbols_by_type_name): Set parameters to void.
1598 (symbol_definitions_output): Remove unused parameter. Rename as...
1599 (prepare_symbol_definitions): this.
1600 (muscles_output): Move symbol_definitions_output to...
1601 (output): here as prepare_symbol_definitions.
1602 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
1603 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
1604
1605 2008-11-17 Di-an Jan <dianj@freeshell.org>
1606
1607 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
1608 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
1609
1610 2008-11-16 Akim Demaille <demaille@gostai.com>
1611
1612 Add missing $(EXEEXT).
1613 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
1614 "src/bison$(EXEEXT)".
1615 Reported by Di-an Jan.
1616
1617 2008-11-15 Akim Demaille <demaille@gostai.com>
1618
1619 * TODO: Update.
1620
1621 2008-11-15 Akim Demaille <demaille@gostai.com>
1622
1623 Formatting changes.
1624 * tests/input.at: here.
1625
1626 2008-11-15 Akim Demaille <demaille@gostai.com>
1627
1628 Remove duplicate header inclusion.
1629 * src/LR0.c: here.
1630
1631 2008-11-15 Akim Demaille <demaille@gostai.com>
1632
1633 * src/parse-gram.h, src/parse-gram.c: Regen.
1634
1635 2008-11-15 Akim Demaille <demaille@gostai.com>
1636
1637 Support parametric types.
1638
1639 There are two issues to handle: first scanning nested angle
1640 bracket pairs to support types such as std::pair< std::string,
1641 std::list<std::string> > >.
1642
1643 Another issue is to address idiosyncracies of C++: do not glue two
1644 closing angle brackets together (otherwise it's operator>>), and
1645 avoid sticking blindly a TYPE to the opening <, as it can result
1646 in '<:' which is a digraph for '['.
1647
1648 * src/scan-gram.l (brace_level): Rename as...
1649 (nesting): this.
1650 (SC_TAG): New.
1651 Implement support for complex tags.
1652 (tag): Accept
1653 , but not <.
1654 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
1655 (b4_symbol_variant): Leave space around types as parameters.
1656 * examples/variant.yy: Use nested template types and leading ::.
1657 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
1658 Rename as...
1659 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
1660 * tests/c++.at: Test parametric types.
1661
1662 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1663
1664 Test token.prefix.
1665 This is not sufficient, but we test at least that the make_SYMBOL
1666 interface is not affected by token.prefix. A more general test
1667 will be implemented when the support of token.prefix is generalized
1668 to more skeletons.
1669
1670 * tests/c++.at: One more variant test, using token.prefix.
1671
1672 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1673
1674 Test the make_TOKEN interface.
1675 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
1676 Factor the common code in yylex.
1677 Use it to test "%define lex_symbol".
1678
1679 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1680
1681 Formatting change.
1682
1683 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1684
1685 Simplify code for variants bench marks.
1686 * etc/bench.pl.in (&generate_grammar_list): Define and use
1687 location_type.
1688 Factor the common code in yylex.
1689
1690 2008-11-15 Akim Demaille <demaille@gostai.com>
1691
1692 Better error message.
1693 * bootstrap (find_tool): Fix the error message.
1694
1695 2008-11-15 Akim Demaille <demaille@gostai.com>
1696
1697 Update variant.yy to newest interface.
1698 * examples/variant.yy: Define lex_symbol.
1699 Adjust.
1700
1701 2008-11-15 Akim Demaille <demaille@gostai.com>
1702
1703 Don't use locations in variant.yy.
1704 * examples/variant.yy: Adjust to not using locations.
1705
1706 2008-11-15 Akim Demaille <demaille@gostai.com>
1707
1708 Comment changes.
1709 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
1710 comments for the license.
1711
1712 2008-11-15 Akim Demaille <demaille@gostai.com>
1713
1714 Remove tests/Makefile.am.
1715 * tests/Makefile.am: Rename as...
1716 * tests/local.mk: this.
1717 * Makefile.am, configure.ac: Adjust.
1718 * Makefile.am (DISTCLEANFILES): Define.
1719 (maintainer-check, maintainer-xml-check, maintainer-push-check):
1720 Remove, we no longer need to bounce to the real targets.
1721
1722 2008-11-15 Akim Demaille <demaille@gostai.com>
1723
1724 Comment changes.
1725
1726 2008-11-15 Akim Demaille <demaille@gostai.com>
1727
1728 djgpp/local.mk.
1729 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
1730 * djgpp/local.mk: this new file.
1731
1732 2008-11-15 Akim Demaille <demaille@gostai.com>
1733
1734 Remove doc/Makefile.am.
1735 * doc/Makefile.am: Rename as...
1736 * doc/local.mk: this.
1737 Adjust paths
1738 * Makefile.am, configure.ac: Adjust.
1739 * Makefile.am (MOSTLYCLEANFILES): New.
1740 * src/local.mk: Adjust.
1741
1742 2008-11-15 Akim Demaille <demaille@gostai.com>
1743
1744 Move sc_tight_scope into maint.mk.
1745 It does not work, and I don't know how it was supposed to work: it
1746 seems to be looking for sources in the build tree. I just moved
1747 it at a better place, fixing it is still required.
1748
1749 * src/local.mk (echo): Remove.
1750 (sc_tight_scope): Move to...
1751 * maint.mk: here.
1752
1753 2008-11-15 Akim Demaille <demaille@gostai.com>
1754
1755 Regen.
1756 * src/parse-gram.h, src/parse-gram.h: Regen.
1757
1758 2008-11-15 Akim Demaille <demaille@gostai.com>
1759
1760 Remove src/Makefile.am.
1761 * src/Makefile.am: Rename as...
1762 * src/local.mk: this.
1763 Prefix all the paths with src/.
1764 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
1765 (AM_CPPFLAGS): Find find in builddir/src.
1766 (YACC): Move the flags into...
1767 (AM_YFLAGS): here.
1768 * maint.mk (sc_tight_scope): Disable.
1769 It used to bounce to the version in src/Makefile.am which is now
1770 part of this very Makefile.
1771 * Makefile.am, configure.ac: Adjust.
1772 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
1773 include "..." to find files "here": we are no longer in src/, so
1774 qualify the includes with src/.
1775 * doc/Makefile.am (PREPATH): No longer include the top_builddir
1776 prefix.
1777 (.x.1): Adjust to be able to create src/foo from the top level
1778 Makefile, instead of going bounce to src/Makefile the creation of
1779 foo.
1780
1781 2008-11-15 Akim Demaille <demaille@gostai.com>
1782
1783 Remove useless variable.
1784 * doc/Makefile.am (srcsrcdir): Remove.
1785
1786 2008-11-15 Akim Demaille <demaille@gostai.com>
1787
1788 Remove data/Makefile.am.
1789 * data/Makefile.am: Rename as...
1790 * data/local.mk: this.
1791 Adjust paths.
1792 * Makefile.am, configure.ac: Adjust.
1793
1794 2008-11-15 Akim Demaille <demaille@gostai.com>
1795
1796 Remove etc/Makefile.am.
1797 * etc/Makefile.am: Rename as...
1798 * etc/local.mk: this.
1799 Adjust.
1800 * Makefile.am, configure.ac: Adjust.
1801
1802 2008-11-15 Akim Demaille <demaille@gostai.com>
1803
1804 Remove examples/local.mk.
1805 examples/calc++/Makefile.am might be interesting to keep as is, since
1806 it is an example in itself.
1807
1808 * examples/Makefile.am: Rename as...
1809 * examples/local.mk: this.
1810 Adjust.
1811 * Makefile.am, configure.ac: Adjust.
1812
1813 2008-11-15 Akim Demaille <demaille@gostai.com>
1814
1815 Remove build-aux/Makefile.am.
1816 Recursive Makefiles are really way too slow, let's get rid of some of
1817 them.
1818
1819 * build-aux/Makefile.am: Rename as...
1820 * build-aux/local.mk: this.
1821 Adjust paths.
1822 * Makefile.am, configure.ac: Adjust.
1823
1824 2008-11-15 Akim Demaille <demaille@gostai.com>
1825
1826 Provide convenience constructors for locations and positions.
1827 * data/location.cc (position::position): Accept file, line and
1828 column as arguments with default values.
1829 Always qualify initial line and column literals as unsigned.
1830 (location::location): Provide convenience constructors.
1831
1832 2008-11-15 Akim Demaille <demaille@gostai.com>
1833
1834 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
1835 token type.
1836 Using template buys us nothing, and makes it uselessly complex to
1837 construct a symbol. Besides, it could not be generalized to other
1838 languages, while make_FOO would work in C/Java etc.
1839
1840 * data/lalr1.cc (b4_symbol_): New.
1841 (b4_symbol): Use it.
1842 (b4_symbol_constructor_declaration_)
1843 (b4_symbol_constructor_definition_): Instead of generating
1844 specializations of an overloaded template function, just generate
1845 several functions whose names are forged from the token names
1846 without the token.prefix.
1847 (b4_symbol_constructor_declarations): Generate them for all the
1848 symbols, not just by class of symbol type, now that instead of
1849 specializing a function template by the token, we generate a
1850 function named after the token.
1851 (b4_symbol_constructor_specialization_)
1852 (b4_symbol_constructor_specializations): Remove.
1853 * etc/bench.pl.in: Adjust to this new API.
1854
1855 2008-11-13 Akim Demaille <demaille@gostai.com>
1856
1857 %define token.prefix.
1858 Provide a means to add a prefix to the name of the tokens as
1859 output in the generated files. Because of name clashes, it is
1860 good to have such a prefix such as TOK_ that protects from names
1861 such as EOF, FILE etc. But it clutters the grammar itself.
1862
1863 * data/bison.m4 (token.prefix): Empty by default.
1864 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
1865 * data/lalr1.cc (b4_symbol): Ditto.
1866
1867 2008-11-13 Akim Demaille <demaille@gostai.com>
1868
1869 Compute at M4 time some of the subtractions.
1870 * data/lalr1.cc (b4_subtract): New.
1871 (b4_rhs_data): Use it.
1872
1873 2008-11-13 Akim Demaille <demaille@gostai.com>
1874
1875 symbol::token.
1876 This allows the user to get the type of a token returned by yylex.
1877
1878 * data/lalr1.cc (symbol::token): New.
1879 (yytoknum_): Define when %define lex_symbol, independently of
1880 %debug.
1881 (yytoken_number_): Move into...
1882 (symbol::token): here, since that's the only use.
1883 The other one is YYPRINT which was not officially supported
1884 by lalr1.cc, and anyway it did not work since YYPRINT uses this
1885 array under a different name (yytoknum).
1886
1887 2008-11-13 Akim Demaille <demaille@gostai.com>
1888
1889 YYERRCODE.
1890 * TODO (YYERRCODE): Mention the case of $undef.
1891
1892 2008-11-13 Akim Demaille <demaille@gostai.com>
1893
1894 TODO: YYPRINT.
1895 * TODO (YYPRINT): New.
1896
1897 2008-11-13 Akim Demaille <demaille@gostai.com>
1898
1899 Comment changes.
1900 * data/lalr1.cc, data/yacc.c: Fix the description of the
1901 yytranslate and yytoknum tables.
1902
1903 2008-11-13 Akim Demaille <demaille@gostai.com>
1904
1905 Define make_symbol in the header.
1906 To reach good performances these functions should be inlined (yet
1907 this is to measure precisely). To this end they must be available
1908 to the caller.
1909
1910 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
1911 location_type with the class name.
1912 Since will now be output in the header, declare "inline".
1913 No longer use b4_symbol_constructor_specializations, but
1914 b4_symbol_constructor_definitions in the header.
1915 Don't call it in the *.cc file.
1916
1917 2008-11-13 Akim Demaille <demaille@gostai.com>
1918
1919 Define yytranslate in the header for lex_symbol.
1920 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
1921 into the header file when using %define lex_symbol.
1922 (yytranslate_): Declare inline.
1923
1924 2008-11-13 Akim Demaille <demaille@gostai.com>
1925
1926 Define the constructors of symbol_type in
1927 b4_symbol_constructor_definitions.
1928 The constructors are called by the make_symbol functions, which a
1929 forthcoming patch will move elsewhere. Hence the interest of
1930 putting them together.
1931
1932 The stack_symbol_type does not need to be moved, it is used only
1933 by the parser.
1934
1935 * data/lalr1.cc: Move symbol_type and symbol_base_type
1936 constructors into...
1937 (b4_symbol_constructor_definitions): here.
1938 Adjust.
1939
1940 2008-11-13 Akim Demaille <demaille@gostai.com>
1941
1942 Make it easier to move the definition of yytranslate_.
1943 Forthcoming changes will make it possible to use yytranslate_
1944 from outside the parser implementation file.
1945
1946 * data/lalr1.cc (b4_yytranslate_definition): New.
1947 Use it.
1948
1949 2008-11-13 Akim Demaille <demaille@gostai.com>
1950
1951 Remove useless class specification.
1952 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1953 to refer to the class name to use a type defined by the class for
1954 arguments of member functions.
1955
1956 2008-11-13 Akim Demaille <demaille@gostai.com>
1957
1958 Finer input type for yytranslate.
1959 This patch is debatable: the tradition expects yylex to return an int
1960 which happens to correspond to token_number (which is an enum). This
1961 allows for instance to return characters (such as '*' etc.). But this
1962 goes against the stronger typing I am trying to have with the new
1963 lex interface which return a symbol_type. So in this case, feed
1964 yytranslate_ with a token_type.
1965
1966 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1967 expect a token_type.
1968
1969 2008-11-13 Akim Demaille <demaille@gostai.com>
1970
1971 Honor lex-params in %define lex_symbol mode.
1972 * data/lalr1.cc: Use b4_lex_param.
1973
1974 2008-11-13 Akim Demaille <demaille@gostai.com>
1975
1976 Simplify names.
1977 * src/output.c (symbol_definitions_output): Rename symbol
1978 attributes type_name and has_type_name as type and has_type.
1979 * data/lalr1.cc: Adjust uses.
1980
1981 2008-11-13 Akim Demaille <demaille@gostai.com>
1982
1983 Use b4_type_names for the union type.
1984 The union used to compute the size of the variant used to iterate
1985 over the type of all the symbols, with a lot of redundancy. Now
1986 iterate over the lists of symbols having the same type-name.
1987
1988 * data/lalr1.cc (b4_char_sizeof_): New.
1989 (b4_char_sizeof): Use it.
1990 Adjust to be called with a list of numbers instead of a single
1991 number.
1992 Adjust its caller for new-line issues.
1993
1994 2008-11-13 Akim Demaille <demaille@gostai.com>
1995
1996 Define the "identifier" of a symbol.
1997 Symbols may have several string representations, for instance if
1998 they have an alias. What I call its "id" is a string that can be
1999 used as an identifier. May not exist.
2000
2001 Currently the symbols which have the "tag_is_id" flag set are
2002 those that don't have an alias. Look harder for the id.
2003
2004 * src/output.c (is_identifier): Move to...
2005 * src/symtab.c (is_identifier): here.
2006 * src/symtab.h, src/symtab.c (symbol_id_get): New.
2007 * src/output.c (symbol_definitions_output): Use it to define "id"
2008 and "has_id".
2009 Remove the definition of "tag_is_id".
2010 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
2011 "tag_is_id" were used to produce code.
2012 We still use "tag" for documentation.
2013
2014 2008-11-11 Akim Demaille <demaille@gostai.com>
2015
2016 Locations are no longer required by lalr1.cc.
2017 * data/lalr1.cc (_b4_args, b4_args): New.
2018 Adjust all uses of locations to make them optional.
2019 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
2020 (AT_CHECK_NAMESPACE): Check the use of locations.
2021 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
2022 without locations with lalr1.cc.
2023 Test these cases.
2024 * tests/output.at: Check lalr1.cc with and without location
2025 support.
2026 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2027 Don't use locations.
2028
2029 2008-11-11 Akim Demaille <demaille@gostai.com>
2030
2031 AT_FULL_COMPILE.
2032 * tests/local.at (AT_FULL_COMPILE): New.
2033 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2034
2035 2008-11-11 Akim Demaille <demaille@gostai.com>
2036
2037 Support parens in calc++.
2038 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2039 * examples/calc++/test (run): Check the expected output.
2040 Adjust callers.
2041 Check parens too.
2042
2043 2008-11-11 Akim Demaille <demaille@gostai.com>
2044
2045 Simplify lalr1.cc since %defines is mandatory.
2046 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2047
2048 2008-11-11 Akim Demaille <demaille@gostai.com>
2049
2050 TODO: yyfmt.
2051 * TODO (yysyntax_error): New item.
2052
2053 2008-11-11 Akim Demaille <demaille@gostai.com>
2054
2055 Prefer M4 to CPP.
2056 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2057 YYERROR_VERBOSE.
2058
2059 2008-11-11 Akim Demaille <demaille@gostai.com>
2060
2061 Support i18n of the parse error messages.
2062 * TODO (lalr1.cc/I18n): Remove.
2063 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2064 error messages, as done in yacc.c.
2065 Stay within the yy* pseudo namespace.
2066
2067 2008-11-11 Akim Demaille <demaille@gostai.com>
2068
2069 More TODO.
2070 * TODO (single stack, yysyntax_error): New.
2071
2072 2008-11-11 Akim Demaille <demaille@gostai.com>
2073
2074 Make it possible to return a symbol_type from yylex.
2075 * data/lalr1.cc (b4_lex_symbol_if): New.
2076 (parse): When lex_symbol is defined, expected yylex to return the
2077 complete lookahead.
2078 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2079 yylex interface.
2080 (bench_variant_parser): Exercise it.
2081
2082 2008-11-11 Akim Demaille <demaille@gostai.com>
2083
2084 Remove useless bench case.
2085 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2086 no longer used.
2087
2088 2008-11-11 Akim Demaille <demaille@gostai.com>
2089
2090 Improve display of directives.
2091 * etc/bench.pl.in (parse_term): Don't add useless eol.
2092
2093 2008-11-11 Akim Demaille <demaille@gostai.com>
2094
2095 Use string_cast in the bench.
2096 * etc/bench.pl.in (generate_grammar_list): Define and use
2097 string_cast.
2098
2099 2008-11-11 Akim Demaille <demaille@gostai.com>
2100
2101 Replace yychar with a Boolean.
2102 * data/lalr1.cc (parse::yychar): Replace by...
2103 (parse::yyempty): this.
2104
2105 2008-11-11 Akim Demaille <demaille@gostai.com>
2106
2107 Factor the tables.
2108 * TODO: New item.
2109
2110 2008-11-11 Akim Demaille <demaille@gostai.com>
2111
2112 Let yytranslate handle the eof case.
2113 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2114 Adjust callers.
2115 No longer expect yychar to be equal to yyeof_, rather, test the
2116 lookahead's (translated) kind.
2117
2118 2008-11-11 Akim Demaille <demaille@gostai.com>
2119
2120 yychar cannot be empty in yyerrlab.
2121 * TODO (yychar == yyempty_): New.
2122 * data/lalr1.cc: Remove the handling of this case.
2123 This eases forthcoming changes related to yychar and yytranslate.
2124
2125 2008-11-11 Akim Demaille <demaille@gostai.com>
2126
2127 Bench: syntactic sugar for %define/#define.
2128 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2129 (&bench_push_parser, bench_variant_parser): Use this feature.
2130 (&eat): New.
2131 Use it.
2132
2133 2008-11-11 Akim Demaille <demaille@gostai.com>
2134
2135 Less memory pressure on the "list" bench.
2136 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2137 the values, to limit memory pressure.
2138
2139 2008-11-11 Akim Demaille <demaille@gostai.com>
2140
2141 Introduce make_symbol.
2142 make_symbol provides a means to construct a full symbol (kind,
2143 value, location) in a single shot. It is meant to be a Symbol
2144 constructor, parameterized by the symbol kind so that overloading
2145 would prevent incorrect kind/value pairs. Unfortunately
2146 parameterized constructors do not work well in C++ (unless the
2147 parameter also appears as an argument, which is not acceptable),
2148 hence the use of a function instead of a constructor.
2149
2150 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2151 (b4_symbol_constructor_declarations)
2152 (b4_symbol_constructor_specialization_)
2153 (b4_symbol_constructor_specializations)
2154 (b4_symbol_constructor_definition_)
2155 (b4_symbol_constructor_definitions): New.
2156 Use them where appropriate to generate declaration, declaration of
2157 the specializations, and implementations of the templated
2158 overloaded function "make_symbol".
2159 (variant::variant): Always define a default ctor.
2160 Also provide a copy ctor.
2161 (symbol_base_type, symbol_type): New ctor overloads for value-less
2162 symbols.
2163 (symbol_type): Now public, so that functions such as yylex can use
2164 it.
2165
2166 2008-11-11 Akim Demaille <demaille@gostai.com>
2167
2168 Inform m4 whether a tag is a valid id.
2169 * src/output.c (is_identifier): New.
2170 (symbol_definitions_output): Use it to define tag_is_id.
2171 But maybe this should be done at m4 level?
2172
2173 2008-11-11 Akim Demaille <demaille@gostai.com>
2174
2175 Test 214 was failing: it greps with a pattern containing [ ]*
2176 which obviously meant to catch spaces and tabs, but contained only
2177 spaces. Tabulations in sources are a nuisance, so to simplify the
2178 matter, get rid of all the tabulations in the Java sources. The
2179 other skeletons will be treated equally later.
2180
2181 * data/java.m4, data/lalr1.java: Untabify.
2182 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2183 tabulations are no longer generated.
2184
2185 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
2186
2187 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2188 * configure.ac: Adjust usage.
2189 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2190 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2191 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2192
2193 2008-11-10 Di-an Jan <dianj@freeshell.org>
2194
2195 Workaround Java's ``code too large'' problem for parser tables
2196 in most cases, by using one function per initialization.
2197 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2198 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2199 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2200 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2201 (yytname_): Use b4_typed_parser_table.
2202 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2203 ``code too large'' error.
2204
2205 2008-11-10 Di-an Jan <dianj@freeshell.org>
2206
2207 * NEWS: Document them.
2208
2209 General Java skeleton improvements.
2210 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2211 using gcj < 4.3 in the testsuite, according to comments in
2212 gnulib/m4/javacomp.m4.
2213 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2214 location_type, position_type): Remove extraneous brackets from
2215 b4_percent_define_default.
2216 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2217 m4_define and m4_define_default.
2218 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2219 which marks the end of user code with appropriate syncline, like all
2220 the other skeletons.
2221 (b4_user_post_prologue): Add. Don't silently drop.
2222 (yylex): Remove.
2223 (parse): Inline yylex.
2224 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2225 (%{...%}): Fix typo of %code imports.
2226 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2227
2228 Support annotations on parser class with %define annotations.
2229 * data/lalr1.java (annotations): Add to parser class modifier.
2230 * doc/bison.texinfo (Java Parser Interface): Document
2231 %define annotations.
2232 (Java Declarations Summary): Document %define annotations.
2233 * tests/java.at (Java parser class modifiers): Test annotations.
2234
2235 Do not generate code for %error-verbose unless requested.
2236 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2237 Make private. Make conditional on %error-verbose.
2238 (getErrorVerbose, setErrorVerbose): New.
2239 (yytnamerr_): Make conditional on %error-verbose.
2240 (yysyntax_error): Make some code conditional on %error-verbose.
2241 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2242 about %error-verbose having no effect.
2243 (getErrorVerbose, setErrorVerbose): Document.
2244
2245 Move constants for token names to Lexer interface.
2246 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2247 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2248 (parse): Qualify EOF to Lexer.EOF.
2249 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2250 EOF and token names to Java Lexer Interface.
2251 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2252
2253 Make yyerror public.
2254 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2255 (yyerror): Change to public. Add Javadoc comments. Use longer
2256 parameter names. Make the body rather than the declarator
2257 conditional on %locations.
2258 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2259
2260 Allow user to add code to the constructor with %code init.
2261 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2262 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2263 Add %code init to the front of the constructor body.
2264 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2265 and %define init_throws.
2266 (Java Declarations Summary): Document %code init and
2267 %define init_throws.
2268 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2269 (Java constructor init and init_throws): Add tests.
2270
2271 2008-11-10 Akim Demaille <demaille@gostai.com>
2272
2273 Update TODO.
2274 * TODO (-D): is implemented.
2275 (associativity): Same precedence must have the same associativity.
2276 For instance, how can a * b / c be parsed if * is %left and / is
2277 %right?
2278 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2279
2280 2008-11-10 Akim Demaille <demaille@gostai.com>
2281
2282 Formatting changes.
2283
2284 2008-11-10 Akim Demaille <demaille@gostai.com>
2285
2286 More information about the symbols.
2287 * src/output.c (type_names_output): Document all the symbols,
2288 including those that don't have a type-name.
2289 (symbol_definitions_output): Define "is_token" and
2290 "has_type_name".
2291 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
2292 type-name, now that they are defined too in b4_type_names.
2293
2294 2008-11-10 Akim Demaille <demaille@gostai.com>
2295
2296 Regen.
2297
2298 2008-11-10 Akim Demaille <demaille@gostai.com>
2299
2300 Make parser::yytranslate static.
2301 Small speedup (1%) on the list grammar. And makes yytranslate_
2302 available in non member functions.
2303
2304 * data/lalr1.cc (yytranslate_): Does not need to be a instance
2305 function.
2306
2307 2008-11-10 Akim Demaille <demaille@gostai.com>
2308
2309 Avoid trailing spaces.
2310 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
2311 * data/lalr1.cc: Don't indent before rule and symbol actions, as
2312 they can be empty, and anyway this incorrectly indents the first
2313 action.
2314
2315 2008-11-10 Akim Demaille <demaille@gostai.com>
2316
2317 Comment changes.
2318
2319 2008-11-10 Akim Demaille <demaille@gostai.com>
2320
2321 Use "enum" for integral constants.
2322 This is just nicer to read, I observed no speedup.
2323
2324 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2325 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2326 (yyuser_token_number_max_, yyundef_token_): Move into...
2327 (yytranslate_): here.
2328
2329 2008-11-10 Akim Demaille <demaille@gostai.com>
2330
2331 Shortcuts in bench directives.
2332 * etc/bench.pl.in (parse_dirs): New.
2333 Use it.
2334 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2335 Create the benches in "benches/".
2336
2337 2008-11-10 Akim Demaille <demaille@gostai.com>
2338
2339 Formatting changes.
2340 * data/lalr1.cc: here.
2341
2342 2008-11-10 Akim Demaille <demaille@gostai.com>
2343
2344 Adjust verbose message to using emacs.
2345 * etc/bench.pl.in: Inform compilation-mode when we change the
2346 directory.
2347 (generate_grammar_list): Recognize %define "variant" in addition
2348 to %define variant.
2349
2350 2008-11-10 Akim Demaille <demaille@gostai.com>
2351
2352 Classify symbols by type-name.
2353 * src/uniqstr.h (UNIQSTR_CMP): New.
2354 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2355 (type_names_output): New.
2356 (muscles_output): Use it.
2357 * data/lalr1.cc (b4_symbol_action_): Remove.
2358 (b4_symbol_case_, b4_type_action_): New.
2359 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2360
2361 2008-11-10 Akim Demaille <demaille@gostai.com>
2362
2363 Change the handling of the symbols in the skeletons.
2364 Before we were using tables which lines were the symbols and which
2365 columns were things like number, tag, type-name etc. It is was
2366 difficult to extend: each time a column was added, all the numbers had
2367 to be updated (you asked for colon $2, not for "tag"). Also, it was
2368 hard to filter these tables when only a subset of the symbols (say the
2369 tokens, or the nterms, or the tokens that have and external number
2370 *and* a type-name) was of interest.
2371
2372 Now instead of monolithic tables, we define one macro per cell. For
2373 instance "b4_symbol(0, tag)" is a macro name which contents is
2374 self-decriptive. The macro "b4_symbol" provides easier access to
2375 these cells.
2376
2377 * src/output.c (type_names_output): Remove.
2378 (symbol_numbers_output, symbol_definitions_output): New.
2379 (muscles_output): Call them.
2380 (prepare_symbols): Define b4_symbols_number.
2381
2382 2008-11-10 Akim Demaille <demaille@gostai.com>
2383
2384 --trace=muscles
2385 * src/getargs.h, src/getargs.c (trace_muscle): New.
2386 (trace_types, trace_args): Support it.
2387 * src/output.c (output_skeleton): Use it.
2388
2389 2008-11-10 Akim Demaille <demaille@gostai.com>
2390
2391 muscles_output.
2392 * src/output.c (muscles_output): New, extracted from...
2393 (output_skeleton): here.
2394 Adjust.
2395
2396 2008-11-10 Akim Demaille <demaille@gostai.com>
2397
2398 Formatting changes.
2399
2400 2008-11-10 Akim Demaille <demaille@gostai.com>
2401
2402 Update the variant example.
2403 * examples/variant.yy: Formatting changes.
2404 One stage build.
2405
2406 2008-11-10 Akim Demaille <demaille@gostai.com>
2407
2408 Support constructor with an argument.
2409 This improves the "list" bench by 2%.
2410
2411 * data/lalr1.cc (variant::build): Add an overloaded version with
2412 an argument.
2413 * tests/c++.at (AT_CHECK_VARIANT): Check it.
2414
2415 2008-11-10 Akim Demaille <demaille@gostai.com>
2416
2417 Test variants.
2418 * tests/c++.at (AT_CHECK_VARIANTS): New.
2419 Use it with and without %define assert.
2420
2421 2008-11-10 Akim Demaille <demaille@gostai.com>
2422
2423 Add %precedence support.
2424 Unfortunately it is not possible to reuse the %prec directive. This
2425 is because to please POSIX, we do not require to end the rules with a
2426 semicolon. As a result,
2427
2428 foo: bar %prec baz
2429
2430 is ambiguous: either a rule which precedence is that of baz, or a rule,
2431 and then a declaration of the precedence of the token baz.
2432
2433 * doc/bison.texinfo: Document %precedence.
2434 (Precedence Only): New.
2435 * src/assoc.h, src/assoc.c (precedence_assoc): New.
2436 * src/conflicts.c (resolve_sr_conflict): Support it.
2437 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
2438 Parse it.
2439 * tests/calc.at: Use %precedence for NEG.
2440 * tests/conflicts.at (%precedence does not suffice)
2441 (%precedence suffices): New tests.
2442
2443 2008-11-09 Akim Demaille <demaille@gostai.com>
2444
2445 Make benches in a sub dirs.
2446 * etc/bench.pl.in ($dir): New.
2447 Use it.
2448 Check the use of constructors with an argument.
2449 (bench_variant_parser): Fix.
2450
2451 2008-11-09 Akim Demaille <demaille@gostai.com>
2452
2453 fix eof condition
2454
2455 2008-11-09 Akim Demaille <demaille@gostai.com>
2456
2457 Fix --help.
2458
2459 2008-11-09 Akim Demaille <demaille@gostai.com>
2460
2461 Require the generation of parse-gram.output.
2462 * src/Makefile.am (YACC): Pass --report=all.
2463
2464 2008-11-09 Akim Demaille <demaille@gostai.com>
2465
2466 Formatting changes.
2467
2468 2008-11-09 Akim Demaille <demaille@gostai.com>
2469
2470 Update TODO.
2471 * TODO: Remove obsolete items.
2472 Update others.
2473
2474 2008-11-09 Akim Demaille <demaille@gostai.com>
2475
2476 Enhance bench.pl.
2477 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
2478 (@token, $grammar, $bench): New.
2479 (generate_grammar_variant): Rename as...
2480 (generate_grammar_list): this.
2481 (generate_grammar): Adjust.
2482 (bench_grammar): Rename as...
2483 (bench): this.
2484 Use it in the various bench-marking routines.
2485 (-b, -g): New options.
2486
2487 2008-11-09 Akim Demaille <demaille@gostai.com>
2488
2489 Use a static hierarchy for symbols in the C++ parser.
2490 * data/lalr1.cc (symbol_base_type, symbol_type)
2491 (stack_symbol_type): Make it a static hierarchy.
2492 Adjust dependencies.
2493
2494 2008-11-09 Akim Demaille <demaille@gostai.com>
2495
2496 bench.pl -d, --directive.
2497 * etc/bench.pl.in (@directive): New.
2498 (&bench_grammar): Use it.
2499 (&bench_list_grammar): New, to provide access to the "variant"
2500 grammar.
2501 Use it.
2502 (getopts): Support -d, --directive.
2503
2504 2008-11-09 Akim Demaille <demaille@gostai.com>
2505
2506 Use inline for small operations.
2507 * data/lalr1.cc (symbol_base_type, symbol_type)
2508 (stack_symbol_type): Declare constructor and other operations as
2509 inline.
2510 (yy_destroy_): Inline.
2511
2512 2008-11-09 Akim Demaille <demaille@gostai.com>
2513
2514 Introduce a hierarchy for symbols.
2515 * data/lalr1.cc (symbol_base_type, symbol_type): New.
2516 (data_type): Rename as...
2517 (stack_symbol_type): this.
2518 Derive from symbol_base_type.
2519 (yy_symbol_value_print_): Merge into...
2520 (yy_symbol_print_): this.
2521 Rename as...
2522 (yy_print_): this.
2523 (yydestruct_): Rename as...
2524 (yy_destroy_): this.
2525 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
2526 (parser::parse): yyla is now of symbol_type.
2527 Use its type member instead of yytoken.
2528
2529 2008-11-09 Akim Demaille <demaille@gostai.com>
2530
2531 Rename data_type and stack_symbol_type.
2532 * data/lalr1.cc (data_type): Rename as...
2533 (stack_symbol_type): this.
2534
2535 2008-11-09 Akim Demaille <demaille@gostai.com>
2536
2537 Handle semantic value and location together.
2538 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
2539 yydata.value and yydata.location.
2540 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
2541 (YY_SYMBOL_PRINT): Now take semantic value and location as a
2542 single arg.
2543 Adjust all callers.
2544 (yydestruct_): New overload for a stack symbol.
2545
2546 2008-11-09 Akim Demaille <demaille@gostai.com>
2547
2548 Push a complete symbol, not connected parts.
2549 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
2550 state, value and location.
2551 Adjust callers.
2552
2553 2008-11-09 Akim Demaille <demaille@gostai.com>
2554
2555 Agregate yylval and yylloc.
2556 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
2557 (parser::yyla): this.
2558
2559 2008-11-09 Akim Demaille <demaille@gostai.com>
2560
2561 Rely on the state stack to display reduction traces.
2562 To display rhs symbols before a reduction, we used information
2563 about the rule reduced, which required the tables yyrhs and
2564 yyprhs. Now use rely only on the state stack to get the same
2565 information.
2566
2567 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
2568 Use them.
2569 (parser::yyrhs_, parser::yyprhs_): Remove.
2570 (parser::yy_reduce_print_): Use the state stack.
2571
2572 2008-11-09 Akim Demaille <demaille@gostai.com>
2573
2574 Fuse yyval and yyloc into yylhs.
2575 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
2576 yylhs.
2577 (parse): Replace yyval and yyloc with yylhs.value and
2578 yylhs.location.
2579 After a user action, compute yylhs.state earlier.
2580 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
2581 fresh error_token.
2582
2583 2008-11-09 Di-an Jan <dianj@freeshell.org>
2584
2585 Remove unused variable.
2586 * src/output.c (type_names_output): Remove unused variable sep.
2587
2588 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
2589
2590 Change tests/output.at quoting.
2591 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
2592 expanding arguments.
2593
2594 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2595
2596 Don't add a semicolon to actions for %skeleton or %language.
2597 It breaks Java test cases as reported by Akim Demaille.
2598 * src/scan-code.l: Implement.
2599
2600 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2601
2602 Clean up %skeleton and %language priority implementation.
2603 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2604 remove static qualifier because others will soon need to see it.
2605 (language_prio): Likewise.
2606 (getargs): Use command_line_prio rather than 0.
2607 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2608 enum fields.
2609 (skeleton_prio): Extern it.
2610 (language_prio): Extern it.
2611 * src/parse-gram.y: Use grammar_prio rather than 1.
2612
2613 2008-11-07 Akim Demaille <demaille@gostai.com>
2614
2615 Moving push traces into yypush_.
2616 * data/lalr1.cc (yypush_): Now takes a optional trace message.
2617 Adjust all uses.
2618
2619 2008-11-07 Akim Demaille <demaille@gostai.com>
2620
2621 The single-stack C++ parser is now the standard one.
2622 * data/lalr1.cc: Rename as...
2623 * data/lalr1-split.cc: this.
2624 * data/lalr1-fusion.cc: Rename as...
2625 * data/lalr1.cc: this.
2626 * etc/bench.pl.in: Adjust.
2627
2628 2008-11-07 Akim Demaille <demaille@gostai.com>
2629
2630 Avoid empty-if warnings.
2631 Reported by Quentin Hocquet.
2632
2633 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
2634 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
2635
2636 2008-11-07 Akim Demaille <demaille@gostai.com>
2637
2638 Pass command line location to skeleton_arg and language_argmatch.
2639 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2640 The location argument is now mandatory.
2641 Adjust all dependencies.
2642 (getargs): Use command_line_location.
2643
2644 2008-11-07 Akim Demaille <demaille@gostai.com>
2645
2646 -D, --define.
2647 * src/getargs.c (usage): Document -D.
2648 Fix help string for --locations.
2649 (command_line_location): New.
2650 (short_options, long_options, getargs): Support -D, --define.
2651 (getargs): Move -d support at the right place.
2652 * doc/bison.texinfo (Bison Options): Update.
2653 * tests/input.at (%define, --define): New.
2654
2655 2008-11-07 Akim Demaille <demaille@gostai.com>
2656
2657 Initialize the muscle table before parsing the command line.
2658 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2659 (getargs): Define file_name.
2660 * src/main.c (main): Initialize muscle_tab before calling
2661 getargs.
2662 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2663 its value is not available yet.
2664
2665 2008-11-07 Akim Demaille <demaille@gostai.com>
2666
2667 Locations without columns for command line arguments.
2668 * src/location.c (location_print): Don't display negative columns.
2669 * src/location.h: Document this.
2670
2671 2008-11-07 Akim Demaille <demaille@gostai.com>
2672
2673 Fix --help.
2674 * src/getargs.c (usage): Fix help string for -W.
2675
2676 2008-11-07 Akim Demaille <demaille@gostai.com>
2677
2678 Handle more general types of option arguments.
2679 * build-aux/cross-options.pl: The argument ends at the first
2680 space, not the first non-symbol character.
2681 Use @var for each word appearing the argument description.
2682
2683 2008-11-07 Akim Demaille <demaille@gostai.com>
2684
2685 Destroy the variants that remain on the stack in case of error.
2686 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
2687 destructor.
2688 Display the value only if yymsg is nonnull.
2689 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
2690
2691 2008-11-07 Akim Demaille <demaille@gostai.com>
2692
2693 Add "%define assert" to variants.
2694 This is used to help the user catch cases where some value gets
2695 ovewritten by a new one. This should not happen, as this will
2696 probably leak.
2697
2698 Unfortunately this uncovered a bug in the C++ parser itself: the
2699 lookahead value was not destroyed between two calls to yylex. For
2700 instance if the previous lookahead was a std::string, and then an int,
2701 then the value of the std::string was correctly taken (i.e., the
2702 lookahead was now an empty string), but std::string structure itself
2703 was not reclaimed.
2704
2705 This is now done in variant::build(other&) (which is used to take the
2706 value of the lookahead): other is not only stolen from its value, it
2707 is also destroyed. This incurs a new performance penalty of a few
2708 percent, and union becomes faster again.
2709
2710 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
2711 (b4_variant_if): New.
2712 (variant::built): New.
2713 Use it whereever the status of the variant changes.
2714 * etc/bench.pl.in: Check the penalty of %define assert.
2715
2716 2008-11-07 Akim Demaille <demaille@gostai.com>
2717
2718 Use "%define variant" in bench.pl.
2719 * etc/bench.pl.in: No longer use the pseudo directive %variants,
2720 just use %define variants.
2721
2722 2008-11-07 Akim Demaille <demaille@gostai.com>
2723
2724 Regen.
2725 * src/parse-gram.h, src/parse-gram.c: Regen.
2726
2727 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2728
2729 Fix user actions without a trailing semicolon.
2730 Reported by Sergei Steshenko at
2731 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2732 * THANKS (Sergei Steshenko): Add.
2733 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2734 * tests/regression.at (Fix user actions without a trailing semicolon):
2735 New test case.
2736
2737 2008-11-04 Akim Demaille <demaille@gostai.com>
2738
2739 Use b4_copyright_years.
2740 * data/yacc.c (b4_copyright_years): New.
2741 Fix its value according to the comments in the file.
2742 Use it and undefine it.
2743
2744 2008-11-04 Akim Demaille <demaille@gostai.com>
2745
2746 Formatting changes.
2747 * data/lalr1-fusion.cc, src/parse-gram.y: here.
2748
2749 2008-11-04 Akim Demaille <demaille@gostai.com>
2750
2751 Formatting changes.
2752 * data/lalr1-fusion.cc: here.
2753
2754 2008-11-04 Akim Demaille <demaille@gostai.com>
2755
2756 Use strict on bench.pl.
2757 * etc/bench.pl.in (&run, &generate_grammar): New.
2758 Rename the grammar generating functions for consistency.
2759 Change the interface so that the list of benches to run is passed
2760 as (optionless) arguments.
2761 (&compile): Use &run.
2762
2763 2008-11-04 Akim Demaille <demaille@gostai.com>
2764
2765 Remove spurious initial empty lines.
2766 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2767 * data/yacc.c: End the @output lines with an @.
2768
2769 2008-11-04 Akim Demaille <demaille@gostai.com>
2770
2771 Improve the display of sizes.
2772 * etc/bench.p.in: Higher precision.
2773 Sort by decreasing size.
2774
2775 2008-11-04 Akim Demaille <demaille@gostai.com>
2776
2777 Don't memcpy C++ structures.
2778 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
2779 arguments.
2780 (variant::build): New overload for
2781 copy-construction-that-destroys.
2782 (variant::swap): New.
2783 (parser::yypush_): Use it in variant mode.
2784
2785 2008-11-04 Akim Demaille <demaille@gostai.com>
2786
2787 Better defaults for bench.pl.
2788 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
2789 default values.
2790 Adjust &verbose uses.
2791 (-q, --quiet): New.
2792
2793 2008-11-04 Akim Demaille <demaille@gostai.com>
2794
2795 Make variant.yy more complex.
2796 std::list cannot be copied via memcpy, they are more demanding than
2797 std::string. Use one std::list to strengthen the test.
2798
2799 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
2800 Adjust.
2801 Create a list of strings, instead of a single large string.
2802
2803 2008-11-04 Akim Demaille <demaille@gostai.com>
2804
2805 bench.pl --bench.
2806 * etc/bench.pl.in (--bench, $bench): New.
2807
2808 2008-11-04 Akim Demaille <demaille@gostai.com>
2809
2810 Sort methods.
2811 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
2812 Define it after as().
2813
2814 2008-11-04 Akim Demaille <demaille@gostai.com>
2815
2816 Useless parens.
2817 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
2818
2819 2008-11-04 Akim Demaille <demaille@gostai.com>
2820
2821 Issue missing synclines after user actions.
2822 * data/c.m4 (b4_case): Issue synclines on the output file.
2823
2824 2008-11-04 Akim Demaille <demaille@gostai.com>
2825
2826 Remove trailing empty line.
2827 * data/lalr1-fusion.cc: Don't add an empty line after the user's
2828 epilogue.
2829
2830 2008-11-04 Akim Demaille <demaille@gostai.com>
2831
2832 Fix output of copyright years.
2833 * data/bison.m4 (b4_copyright): Fix the indentation of the
2834 copyright year paragraph.
2835 Use b4_copyright_years when no years are given.
2836 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
2837 (b4_copyright_years): New.
2838 Use it.
2839
2840 2008-11-04 Akim Demaille <demaille@gostai.com>
2841
2842 Avoid the spurious initial empty line.
2843 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
2844 the end of @output request to suppress the empty line that
2845 results.
2846
2847 2008-11-04 Akim Demaille <demaille@gostai.com>
2848
2849 Remove parser::rhs_number_type.
2850 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
2851 (yyrhs_): Use b4_table_define.
2852
2853 2008-11-04 Akim Demaille <demaille@gostai.com>
2854
2855 Fix iteration type.
2856 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
2857
2858 2008-11-04 Akim Demaille <demaille@gostai.com>
2859
2860 Factor the declaration of the integer tables.
2861 * data/lalr1-fusion.cc (b4_table_define): New.
2862 Use it.
2863
2864 2008-11-03 Akim Demaille <demaille@gostai.com>
2865
2866 Fix indentation of tables in lalr1.cc
2867 * data/lalr1-fusion.cc: Fix the indentation.
2868
2869 2008-11-03 Akim Demaille <demaille@gostai.com>
2870
2871 Destroy the lhs symbols after reduction.
2872 * data/lalr1-fusion.cc (parse): After the user action, when in
2873 variant mode, destroy the lhs symbols.
2874
2875 2008-11-03 Akim Demaille <demaille@gostai.com>
2876
2877 Simplify yysyntax_error_ use.
2878 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
2879 type, but make it unnamed in the declaration when it is not used.
2880
2881 2008-11-03 Akim Demaille <demaille@gostai.com>
2882
2883 Let yy::variant::build return an lvalue.
2884 * data/lalr1-fusion.cc (variant::build): Return a reference to the
2885 object.
2886
2887 2008-11-03 Akim Demaille <demaille@gostai.com>
2888
2889 Define yy::variant only when needed.
2890 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
2891 used.
2892
2893 2008-11-03 Akim Demaille <demaille@gostai.com>
2894
2895 Bench the three-stack lalr1.cc.
2896 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
2897 one-stack one.
2898
2899 2008-11-03 Akim Demaille <demaille@gostai.com>
2900
2901 Fail on parse error in calc++.
2902 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2903 status.
2904 * examples/calc++/test ($me, $number, $exit, run): New.
2905 Use them to propagate errors to the exit status.
2906
2907 2008-11-03 Akim Demaille <demaille@gostai.com>
2908
2909 Don't specify the skeleton twice in the example.
2910 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
2911 file does what is needed.
2912
2913 2008-11-03 Akim Demaille <demaille@gostai.com>
2914
2915 bench: Improve output.
2916 * etc/bench.pl.in (bench_grammar): Tune the printf format.
2917
2918 2008-11-03 Akim Demaille <demaille@gostai.com>
2919
2920 bench: check impact of %debug on variants.
2921 * etc/bench.pl.in (variant_grammar): Fix the computation of
2922 $variant.
2923 Generate a grammar file that can work with or without %debug.
2924 Do use the @directive.
2925 (bench_variant_parser): Check impact of %debug.
2926 (@directives): Rename all the occurrences to...
2927 (@directive): this, for consistency.
2928
2929 2008-11-03 Akim Demaille <demaille@gostai.com>
2930
2931 bench: report the size too.
2932 * etc/bench.pl.in ($iterations): Defaults to -3.
2933 (&bench_grammar): Require hireswallclock.
2934 Compute and display the size of the result.
2935 More comments.
2936
2937 2008-11-03 Akim Demaille <demaille@gostai.com>
2938
2939 bench: More use of the verbosity level.
2940 * etc/bench.pl.in ($verbose, &verbose): New.
2941 Use them.
2942 More POD documentation.
2943
2944 2008-11-03 Akim Demaille <demaille@gostai.com>
2945
2946 bench.pl: a command line interface
2947 * etc/bench.pl.in: More doc.
2948 Some fixes in the documentation.
2949 ($cflags, $iterations, &help, &getopt): New.
2950 Use them.
2951 (&variant_grammar): Let the number of stages be 10 times what is
2952 specified.
2953
2954 2008-11-03 Akim Demaille <demaille@gostai.com>
2955
2956 Bench the use of Boost.Variants.
2957 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2958 New.
2959 (&compile): Be ready to compile C++ parsers.
2960 (&bench_push_parser): Move debug information to the outermost
2961 level.
2962 * THANKS: Add Michiel De Wilde.
2963
2964 2008-11-03 Akim Demaille <demaille@gostai.com>
2965
2966 bench.pl: Pass directives as a list instead of as a string.
2967 * etc/bench.pl.in (&directives): New.
2968 (&triangular_grammar, &calc_grammar): Use it to format the Bison
2969 directives.
2970 (&triangular_grammar): Do use the directives (were ignored).
2971 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2972 directives.
2973
2974 2008-11-03 Akim Demaille <demaille@gostai.com>
2975
2976 Improve genericity of bench.pl.
2977 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2978 argument.
2979 (&bench_push_parser): New.
2980 Call it.
2981
2982 2008-11-03 Akim Demaille <demaille@gostai.com>
2983
2984 Add documentation to bench.pl.
2985 * etc/bench.pl.in: Comment changes.
2986
2987 2008-11-03 Akim Demaille <demaille@gostai.com>
2988
2989 Fuse the three stacks into a single one.
2990
2991 In order to make it easy to perform benchmarks to ensure that
2992 there are no performance loss, lalr1.cc is forked into
2993 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
2994 lalr1.cc.
2995
2996 Meanwhile, to make sure that lalr1-fusion.cc is correctly
2997 exercized by the test suite, the user must install a symbolic link
2998 from lalr1.cc to it.
2999
3000 Instead of having three stacks (state, value, location), use a
3001 stack of triples. This considerably simplifies the code (and it
3002 will be easier not to require locations as currently does the C++
3003 parser), and also gives a 10% speedup according to
3004 etc/bench (probably mainly since memory allocation is done once
3005 instead of three times).
3006
3007 Another motivation is to make it easier to destruct properly
3008 semantic values: now that they are bound to their state (hence
3009 symbol type) it will be easier to call the appropriate destructor.
3010
3011 These changes should probably benefit the C parser too.
3012
3013 * data/lalr1.cc: Copy as...
3014 * data/lalr1-fusion.cc: this new file.
3015 (b4_rhs_value, b4_rhs_location): New definitions overriding those
3016 from c++.m4.
3017 (state_stack_type, semantic_stack_type, location_stack_type)
3018 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
3019 (data_type, stack_type, yystack_): New.
3020 (YYLLOC_DEFAULT, yypush_): Adjust.
3021 (yyerror_range): Now based on data_type, not location_type.
3022
3023 2008-11-03 Akim Demaille <demaille@gostai.com>
3024
3025 Push the state, value, and location at the same time.
3026 This is needed to prepare a forthcoming patch that fuses the three
3027 stacks into one.
3028
3029 * data/lalr1.cc (parser::yypush_): New.
3030 (parser::yynewstate): Change the semantics: instead of arriving to
3031 this label when value and location have been pushed, but yystate
3032 is to be pushed on the state stack, now the three of them must
3033 have been pushed before. yystate still must be the new state.
3034 This allows to use yypush_ everywhere instead of individual
3035 handling of the stacks.
3036
3037 2008-11-03 Akim Demaille <demaille@gostai.com>
3038
3039 Prefer references to pointers.
3040 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3041 definition to use references instead of pointers.
3042 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3043 Take the value and location as references.
3044 Adjust callers.
3045
3046 2008-11-03 Akim Demaille <demaille@gostai.com>
3047
3048 stack::size instead of stack::height.
3049 * data/lalr1.cc (stack::height): Rename as...
3050 (stack::size): this.
3051 Fix the output type.
3052 Comment changes.
3053
3054 2008-11-03 Akim Demaille <demaille@gostai.com>
3055
3056 Use variants to support objects as semantic values.
3057 This patch was inspired by work by Michiel De Wilde. But he used
3058 Boost variants which (i) requires Boost on the user side, (ii) is
3059 slow, and (iii) has useless overhead (the parser knows the type of
3060 the semantic value there is no reason to duplicate this
3061 information as Boost.Variants do).
3062
3063 This implementation reserves a buffer large enough to store the
3064 largest objects. yy::variant implements this buffer. It was
3065 implemented with Quentin Hocquet.
3066
3067 * src/output.c (type_names_output): New.
3068 (output_skeleton): Invoke it.
3069 * data/c++.m4 (b4_variant_if): New.
3070 (b4_symbol_value): If needed, provide a definition for variants.
3071 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3072 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3073 (b4_char_sizeof, yy::variant): New.
3074 (parser::parse): If variants are requested, define
3075 parser::union_type, parser::variant, change the definition of
3076 semantic_type, construct $$ before running the user action instead
3077 of performing a default $$ = $1.
3078 * examples/variant.yy: New.
3079 Based on an example by Michiel De Wilde.
3080
3081 2008-11-03 Akim Demaille <demaille@gostai.com>
3082
3083 Parameterize the extraction of semantic values.
3084 To make future changes easier, no longer rely on ".TYPE" being the
3085 way to get a semantic value.
3086
3087 * data/c.m4 (b4_symbol_value): New.
3088 Use it.
3089 * data/c++.m4, data/yacc.c: Use it.
3090 * data/glr.c: Use b4_symbol_value.
3091 (b4_rhs_data): New.
3092 Use it.
3093
3094 2008-11-03 Akim Demaille <demaille@gostai.com>
3095
3096 Prepare easier M4 changes.
3097 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3098 future changes.
3099
3100 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3101
3102 Initiate further development.
3103 * NEWS: Create an empty section for new entries.
3104 * gnulib: Update submodule to HEAD.
3105
3106 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3107
3108 * NEWS: Version 2.4.
3109
3110 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3111
3112 Prepare for next release.
3113 * NEWS: Briefly mention changes since 2.3b.
3114 * README: Say GNU m4 1.4.6, which we've been requiring in release
3115 announcements already, not 1.4.3, which breaks the build.
3116
3117 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3118
3119 Say %language is experimental.
3120 We're thinking of extending it's effect on output file naming. See the
3121 thread at
3122 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3123 * NEWS: Say it's experimental.
3124 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3125 recommend it over %skeleton for now.
3126 (Bison Options): Likewise.
3127 (C++ Bison Interface): Use %skeleton not %language.
3128 (Calc++ Parser): Use %skeleton not %language.
3129 * src/getargs.c (usage): Say it's experimental.
3130
3131 2008-11-01 Di-an Jan <dianj@freeshell.org>
3132 Paolo Bonzini <bonzini@gnu.org>
3133
3134 Support all Java parser class modifiers.
3135 * data/java.m4 (b4_percent_define_get3): New.
3136 (b4_final_if, b4_strictfp_if): New.
3137 * data/lalr1.java (final, strictfp, extends, implements): Support.
3138 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3139 documentation.
3140 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3141 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3142 (AT_CHECK_JAVA_GREP): New.
3143 (Java parser class modifiers): New test.
3144 (Java parser class extends and implements): New test.
3145
3146 Model exception propagation better with throws and lex_throws.
3147 * data/java.m4 (b4_list2): New.
3148 (throws): Change default.
3149 * data/lalr1.java (yyaction): Add throws.
3150 (parse): Add lex_throws in addition to throws.
3151 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3152 * tests/java.at (Java throws specifications): New test.
3153
3154 Improve documentation for Java parsers.
3155 * doc/bison.texinfo (Java Parsers): Add subsections.
3156 Don't quote first argument of %define.
3157 (Java Bison Interface): Document output files. Move documentation
3158 of parser class and merge into Java Parser Interface. Document
3159 features that error out. Document directives with no effect.
3160 Move note about Javadoc higher.
3161 (Java Semantic Values): Explicitly mention stype.
3162 Document that generic types cannot be used.
3163 (Java Location Values): Use @deftypeivar. Document constructors.
3164 Correct return value for toString.
3165 (Java Parser Interface): List undocumented constants/fields.
3166 Move documentation of fields added by %parse-param closer to list
3167 of members. Document that token names are added as fields.
3168 Document constructors accurately. Remove error method.
3169 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3170 Interface. Describe %code lexer and yylex accutately.
3171 Remove documentation that does not match the code.
3172 (Java Action Features): New.
3173 (Java Differences): Add reference. Add item on semantic values.
3174 Add note about @{ ... @}. Clarify %% epilogue placement.
3175 (Java Declarations Summary): New.
3176
3177 Fix Java skeleton.
3178 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3179 (b4_remove_comma): Quote test argument.
3180 (b4_identification): Remove "bison" field.
3181 * tests/java.at (Java parser class and package names): New test.
3182 (Java %parse-param and %lex-param): New test.
3183 (Java stype, position_class and location_class): New test.
3184
3185 2008-10-31 Di-an Jan <dianj@freeshell.org>
3186
3187 * data/lalr1.jave: Update copyright years.
3188 (YYParser): Correct name of "generated from" file in Javadoc:
3189 use b4_file_name instead of @ofile@.
3190 (Location constructor): Correct Javadoc parameter name.
3191 (yylloc): Add missing opening m4 quote after b4_location_if.
3192 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3193 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3194 (YYParser constructor): Correct Javadoc parameter name.
3195
3196 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3197
3198 Always put auxiliary code files in the same dir as other output files.
3199 * src/files.c (compute_file_name_parts): When the user specifies
3200 --output but not --file-prefix, extract the directory prefix from the
3201 file prefix not from the grammar file name. This affects the location
3202 of files like location.hh generated by the C++ skeleton. The includes
3203 in the other output files require this fix.
3204 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3205 for expected output files.
3206 (Output files): Add a test for the above.
3207
3208 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3209
3210 * gnulib: Update submodule to HEAD.
3211
3212 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3213
3214 Update copyright year.
3215 * src/files.c: Here.
3216
3217 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3218
3219 Don't overwrite the input file.
3220 * src/files.c (output_file_name_check): Fatal error if using input file
3221 for output.
3222 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3223 argument.
3224 (Conflicting output files): Add test.
3225
3226 2008-10-28 Akim Demaille <demaille@gostai.com>
3227
3228 Space changes.
3229 * data/lalr1.cc: Formatting changes.
3230
3231 2008-10-28 Akim Demaille <demaille@gostai.com>
3232
3233 Don't define debugging functions when !YYDEBUG.
3234 * data/lalr1.cc (debug_stream, set_debug_stream)
3235 (debug_level_type, debug_level, set_debug_level): Don't
3236 declare them when YYDEBUG is not defined.
3237 The implementation are already YYDEBUG-aware.
3238
3239 2008-10-28 Akim Demaille <demaille@gostai.com>
3240
3241 Prefer "continue" for empty loop bodies.
3242 * etc/bench.pl.in: Use "continue" instead of {}.
3243
3244 2008-10-28 Akim Demaille <demaille@gostai.com>
3245
3246 Space and comments changes.
3247 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3248 * data/c.m4, data/lalr1.cc: Space changes.
3249
3250 2008-10-28 Akim Demaille <demaille@gostai.com>
3251
3252 Make gnulib a submodule.
3253 * gnulib: New.
3254 * .gitmodules (gnulib): New.
3255
3256 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3257
3258 Fix yyerror_range for user-defined location type in C++. Reported by
3259 Georg Sauthoff at
3260 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3261 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3262 * THANKS (Georg Sauthoff): Add.
3263
3264 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3265
3266 Update several administrative files mainly to facilitate releasing.
3267 * HACKING (Administrivia): Make the git-merge-changelog notes more
3268 helpful.
3269 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3270 (Release Procedure): Update for git and add numerous details that were
3271 previously missing.
3272 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3273 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3274 that announcements don't claim we bootstrapped with whatever bison
3275 happened to be in PATH. Add flex as a bootstrap tool.
3276 * Makefile.maint: Remove, previously replaced by maint.mk.
3277 * Makefile.cfg: Remove, and migrate settings to...
3278 * cfg.mk: ... here for the sake of `make announcement'.
3279 * bootstrap.conf (gnulib_modules): Add announce-gen.
3280 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3281 Berry.
3282
3283 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3284
3285 Small but important bugfixes for the Java skeleton.
3286 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3287 (yy_symbol_print): Call toString on yyvaluep.
3288
3289 2008-08-29 Akim Demaille <demaille@gostai.com>
3290
3291 Clarify UPDATED use.
3292 * doc/bison.texinfo: It refers to the last edition of this file,
3293 not to the release date of Bison.
3294 Reported by Joel E. Denny.
3295
3296 2008-08-29 Akim Demaille <demaille@gostai.com>
3297
3298 * README: Update FAQ pointer.
3299 Reported by Joel E. Denny.
3300
3301 2008-08-27 Eric Blake <ebb9@byu.net>
3302
3303 Resync m4sugar from autoconf.
3304 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3305 (m4_init): Adjust to latest m4.git changes.
3306 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3307 effects.
3308 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3309 (_m4_list_cmp): Reduce side effects.
3310
3311 2008-08-27 Akim Demaille <demaille@gostai.com>
3312
3313 Check yyerrok in calc.at.
3314 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3315 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3316 expected.
3317
3318 2008-08-27 Akim Demaille <demaille@gostai.com>
3319
3320 Support yyerrok in lalr1.cc.
3321 YYBACKUP is still to import back into lalr1.cc.
3322 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3323
3324 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3325
3326 For maintainer-check*, don't recompile for a $(VERSION) update.
3327 * cfg.mk: New file.
3328 (_is-dist-target): Override the one in GNUmakefile.
3329 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3330
3331 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3332
3333 Update for recent change to gnulib.
3334 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3335 string.h now.
3336
3337 2008-08-15 Eric Blake <ebb9@byu.net>
3338
3339 Remaining m4sugar merge from autoconf.
3340 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3341 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3342 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3343 * src/output.c (output_skeleton): Tell m4 how to find it.
3344
3345 Partial m4sugar merge from autoconf: m4_map.
3346 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3347 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3348 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3349 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3350 for empty list.
3351 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3352 Likewise.
3353 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3354 declares it.
3355
3356 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3357
3358 Keep .version and PACKAGE_VERSION in sync.
3359 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3360 dependency, and add comments justifying this in more detail. Discussed
3361 starting at
3362 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3363
3364 2008-08-06 Eric Blake <ebb9@byu.net>
3365
3366 Partial m4sugar merge from autoconf: m4_shiftn.
3367 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3368 (m4_shift2, m4_shift3): New macros.
3369 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3370 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3371 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3372 * data/java.m4 (b4_remove_comma): Likewise.
3373
3374 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3375 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3376 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3377 (m4_init): Consolidate wrapped text into single m4_wrap.
3378 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3379 in wrapped text.
3380
3381 2008-08-05 Eric Blake <ebb9@byu.net>
3382
3383 Partial m4sugar merge from autoconf: builtins, version.m4.
3384 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3385 (m4_prepend): Remove, as it is unused and inherently quadratic,
3386 whereas m4_append is linear in newer m4.
3387 (m4_mkstemp): New builtin.
3388 (m4_symbols): Make rename conditional.
3389 (m4_version_prereq): Ensure fatal error if used in bison, which
3390 intentionally lacks version.m4.
3391
3392 Fix comments in m4sugar.
3393 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3394
3395 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3396
3397 Update for recent .gitignore fix in Gnulib.
3398 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3399 anchored .gitignore entries.
3400
3401 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3402
3403 Set gnu or gnits strictness.
3404 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3405 development and gnits strictness for releases. Based on Eric Blake's
3406 suggestion at
3407 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3408
3409 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3410
3411 * NEWS: Clarify documentation of %language.
3412
3413 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3414
3415 Support usage of git-merge-changelog.
3416 * .gitattributes: New.
3417 * HACKING: Document usage of git-merge-changelog.
3418 * bootstrap: Install git-merge-changelog entries in .git/config
3419 if appropriate.
3420
3421 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3422
3423 Remove remaining dependence on CVS Id keyword.
3424 * ChangeLog: For the sake of people still using CVS, don't use dollars
3425 when mentioning Id.
3426 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3427 unusual anyway.
3428 * data/xslt/xml2dot.xsl: Likewise.
3429 * data/xslt/xml2text.xsl: Likewise.
3430 * data/xslt/xml2xhtml.xsl: Likewise.
3431 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3432 * doc/Makefile.am (neutralize): Remove, no longer needed.
3433 (.x.1): Don't use neutralize.
3434 (edit): Don't substitute for ID.
3435 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3436
3437 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3438
3439 Fix dependence on computed configure variables.
3440 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3441 $(top_srcdir)/configure.ac so that changes to computed variables, such
3442 as PACKAGE_VERSION, are seen.
3443 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3444
3445 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3446
3447 Update copyright dates for recent changes.
3448 * Makefile.am: Here.
3449 * src/Makefile.am: Here.
3450 * src/reduce.c: Here.
3451 * tests/reduce.at: Here.
3452
3453 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3454
3455 Use git-version-gen for version names between releases.
3456 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3457 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3458 * .prev-version: New.
3459 * .version.in: Remove.
3460 * ChangeLog: Remove the Id previously used for capturing the CVS
3461 revision.
3462 * GNUmakefile: Remove, now copied from Gnulib.
3463 * Makefile.am: Add code suggested by comments in
3464 build-aux/git-version-gen.
3465 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3466 .prev-version, and .version.
3467 * NEWS (2.3b+): Rename to...
3468 (?.?): ... this because we're dropping the "+" version naming scheme,
3469 but, in general, we still can't be sure of our next release name.
3470 * bootstrap: Add a quick hack to remove from .gitignore the
3471 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3472 entry. This should really be fixed in gnulib instead.
3473 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3474 * configure.ac (AC_INIT): Set version name by invoking
3475 build-aux/git-version-gen.
3476 (AC_CONFIG_FILES): Remove .version, now generated by
3477 build-aux/git-version-gen.
3478 * maint.mk: New, copied from coreutils.
3479 * doc/.cvsignore (bison.1): Add.
3480 * doc/.gitignore (/bison.1): Add.
3481 * doc/bison.1: Remove, generated.
3482 * src/.cvsignore (revision.c): Remove.
3483 * src/.gitignore (/revision.c): Remove.
3484 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3485 (BUILT_SOURCES): Remove revision.c.
3486 (revision.c): Remove.
3487 * src/getargs.c (version): Don't print revision after the VERSION.
3488 * src/revision.h: Remove.
3489
3490 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3491
3492 Fix untranslatable composition of sentences. Reported by Goran
3493 Uddeborg at
3494 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3495 * THANKS (Goran Uddeborg): Add.
3496 * src/reduce.c (reduce_print): Report the number of nonterminals and
3497 rules useless in the grammar in separate sentences.
3498 * tests/reduce.at (Useless Rules): Update output.
3499 (Reduced Automaton): Likewise.
3500 (Underivable Rules): Likewise.
3501 (Empty Language): Likewise.
3502
3503 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3504
3505 Fix some .gitignore and .cvsignore problems.
3506 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3507 (insert_vc_ignore): ... this new function, which prepends `/' to all
3508 .gitignore entries before passing them to insert_sorted_if_absent.
3509 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3510 .cvsignore files are maintained even though Bison developers run
3511 bootstrap while using Git.
3512 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3513 unneeded by Bison.
3514 (gnulib): Add.
3515 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3516 unneeded. Reported by Eric Blake.
3517 * lib/.gitignore (/*~): Add.
3518 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3519 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3520 Blake.
3521 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3522
3523 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3524
3525 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3526 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3527 * bootstrap.conf (gnulib_modules): Add unsetenv.
3528 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3529 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3530 (/setenv.m4): Add.
3531 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3532 the first argument because it may become position-dependent, and unset
3533 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3534 Add comments explaining these issues in more detail.
3535
3536 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3537
3538 Add .gitignore everywhere based on .cvsignore.
3539 * .gitignore: New.
3540 * build-aux/.gitignore: New.
3541 * data/.gitignore: New.
3542 * doc/.gitignore: New.
3543 * etc/.gitignore: New.
3544 * examples/.gitignore: New.
3545 * examples/calc++/.gitignore: New.
3546 * lib/.gitignore: New.
3547 * m4/.gitignore: New.
3548 * po/.gitignore: New.
3549 * runtime-po/.gitignore: New.
3550 * src/.gitignore: New.
3551 * tests/.gitignore: New.
3552
3553 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3554
3555 * NEWS (2.3b+): New section, empty for now.
3556 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3557
3558 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3559
3560 * NEWS (2.3b): Update release date since there has been a delay in
3561 getting the announcements and tarballs out.
3562
3563 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3564
3565 * NEWS: Version 2.3b.
3566 * configure.ac (AC_INIT): Likewise.
3567 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3568
3569 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3570
3571 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3572 been doing it for years.
3573 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3574 (Release Procedure): Add FIXME about make alpha being unmaintained.
3575
3576 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3577
3578 * data/yacc.c: Reformat m4 a little for readability.
3579 * src/lalr.c (build_relations): Correct comment.
3580
3581 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3582
3583 DJGPP specific issue.
3584 * djgpp/config.sed: Fixes required to run configure scripts generated
3585 by autoconf 2.62.
3586
3587 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3588
3589 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3590 coordinator@translationproject.org.
3591
3592 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3593
3594 * THANKS: Add Eric Blake.
3595
3596 2008-04-23 Eric Blake <ebb9@byu.net>
3597
3598 Revert prior patch, by working around autoconf regression.
3599 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3600 ("Output file name: ("): Uncomment test.
3601 ("Output file name: )"): Likewise.
3602 Based on an idea from Noah Misch.
3603
3604 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3605
3606 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3607 2.61. Reported by Juan Manuel Guerrero at
3608 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3609 * tests/output.at ("Output file name: ("): Comment out test case for
3610 now.
3611 ("Output file name: )"): Likewise.
3612
3613 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3614
3615 * GNUmakefile: Update git-version-gen invocation so make dist
3616 succeeds.
3617
3618 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3619
3620 Update to the current gnulib CVS repository, and fix trigraph handling
3621 in Bison.
3622 * bootstrap: Update gnulib CVS repository URL.
3623 (symlink_to_dir): Encapsulate the code that guarantees the destination
3624 directory exists into...
3625 (check_dst_dir): ... this new function, and...
3626 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3627 fail when copying files into lib/uniwidth/.
3628 * src/output.c (prepare_symbols): When writing yytname muscles, where
3629 symbol names will be encoded in C-string literals, tell quotearg to
3630 escape trigraphs. This used to be the default in gnulib.
3631 * tests/regression.at (Token definitions): Because of the change in
3632 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3633 escapes trigraphs in symbol names. Thus, yytname no longer has
3634 trigraphs unnecessarily doubly escaped. Update test case output.
3635 Extend test case to be sure Bison's own error messages will no longer
3636 have trigraphs in symbol names unnecessarily escaped once.
3637
3638 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3639
3640 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3641 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3642 * .cvsignore: Add .version.
3643 * .version.in: New.
3644 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3645 * configure.ac (AC_CONFIG_FILES): Add .version.
3646 * build-aux/.cvsignore: Add git-version-gen.
3647
3648 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3649
3650 * NEWS (2.3a+): Mention that -g now takes an argument.
3651 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3652 consistency. Update the -g and -x entries now that they take
3653 arguments. Use brackets to indicate optional arguments.
3654 * src/getargs.c (usage): Explain the relationship between arguments of
3655 long and short options more completely. Document --defines and -d
3656 separately since the former takes an argument but, for POSIX Yacc, the
3657 latter does not.
3658 (short_options): Let -W take an optional argument like --warnings.
3659 (getargs): Sort cases.
3660
3661 2008-02-28 Akim Demaille <demaille@gostai.com>
3662
3663 * doc/bison.texinfo: Fix a few typos.
3664
3665 2008-02-28 Akim Demaille <akim@epita.fr>
3666
3667 * doc/bison.texinfo (Bison Options): Document -W.
3668 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3669
3670 2008-02-28 Akim Demaille <akim@epita.fr>
3671
3672 * src/getargs.c (short_options): Split and sort for readability.
3673 -g and -x take optional arguments, just like their long options.
3674 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3675 understand.
3676 Fix the handling of $opt which resulted in all the argument to be
3677 considered as optional.
3678
3679 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3680
3681 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3682 say its interface is experimental.
3683 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3684 Java.
3685 (Bison Options): In the -L and --language entry, mention Java.
3686 (Java Bison Interface): Say the interface is experimental.
3687 * src/getargs.c (usage): Mention -L and --language.
3688
3689 * NEWS (2.3a+): Say the push parsing interface is experimental.
3690 * doc/bison.texinfo (Push Decl): Likewise.
3691 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3692 (Push Parser Function): Likewise.
3693 (Pull Parser Function): Likewise.
3694 (Parser Create Function): Likewise.
3695 (Parser Delete Function): Likewise.
3696 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3697 yypull_parse, and yypush_parse entries.
3698
3699 * NEWS (2.3a+): Mention XML support, and say the schema is
3700 experimental.
3701 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3702 * src/getargs.c (usage): Say the XML schema is experimental.
3703
3704 * NEWS (2.3a+): Say option instead of flag.
3705
3706 2008-02-21 Wojciech Polak <polak@gnu.org>
3707
3708 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3709 text.
3710
3711 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3712
3713 Fix impure push parser compile error reported by Bob Rossi at
3714 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3715 * data/yacc.c: Clean up whitespace in the output a little.
3716 (yypstate_allocated): Define for impure push parsers regardless of
3717 whether the pull interface is also requested.
3718 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3719 check impure push parsers without the pull interface.
3720
3721 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3722 yyerror takes arguments specified by %parse-param while yypstate_new
3723 does not.
3724 * doc/bison.texinfo (Parser Create Function): Document that
3725 yypstate_new returns 0 for multiple impure parser instances.
3726 * tests/push.at (Push Parsing: Multiple impure instances): Update
3727 expected stderr output.
3728
3729 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3730
3731 * runtime-po/POTFILES.in (push.c): Remove.
3732
3733 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3734
3735 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3736 * data/push.c: Rename to...
3737 * data/yacc.c: ... this, overwriting it.
3738 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3739 `%push-pull-parser' -> `%define api.push_pull "both"'.
3740 Remove old yacc.c tests, and update push.c tests to yacc.c.
3741
3742 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3743
3744 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3745 `"%code top" blocks' instead of `%code "top" blocks'.
3746 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3747 Clean up whitespace in the output a little.
3748
3749 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3750
3751 Fix documentation problems reported by Tim Josling at
3752 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3753 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3754 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3755 integers. Explain the effect of literal string aliases on error
3756 messages. Copy token 0 documentation from the C++ skeleton
3757 documentation.
3758
3759 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3760
3761 Accept a token number in a %left, %right, or %nonassoc for POSIX
3762 conformance. Reported by Tim Josling at
3763 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3764 * NEWS (2.3a+): Mention.
3765 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3766 and code numbers are treated by precedence declarations.
3767 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3768 of symbols.1.
3769 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3770 of symbol.
3771 (symbol.prec): New, just like symbol but allows INT.
3772 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3773 longer holds.
3774 * tests/regression.at (Token number in precedence declaration): New
3775 test case.
3776
3777 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3778
3779 DJGPP specific issues.
3780 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3781 be changed. Copyright timestamp adjusted.
3782 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3783 be changed. Copyright timestamp adjusted.
3784 * djgpp/config.site: Copyright timestamp adjusted.
3785 * djgpp/config_h.sed: Copyright timestamp adjusted.
3786 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3787 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3788 filename translation list.
3789 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3790 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3791 files shall be created. Before trying to use the temp dir where the
3792 environment variable points to check that the dir really exists. If
3793 not default to the cwd as temp dir. Copyright timestamp adjusted.
3794 * djgpp/subpipe.h: Copyright timestamp adjusted.
3795 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3796
3797 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3798
3799 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3800
3801 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3802
3803 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3804 Problem reported by Claudio Saavedra in
3805 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3806
3807 2008-01-05 Wojciech Polak <polak@gnu.org>
3808
3809 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3810 document's title with the input grammar file name.
3811
3812 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3813
3814 Automate regression testing of the XML/XSLT implementation. Discussed
3815 starting at
3816 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3817 * configure.ac (XSLTPROC): New substitution.
3818 * Makefile.am (maintainer-xml-check): New phony target invoking...
3819 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3820 invoking make maintainer-check with BISON_TEST_XML=1.
3821 * tests/atlocal.in (XSLTPROC): New.
3822 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3823 not to report reachable memory when Bison is expected to have a
3824 non-zero exit status and (2) to compare XML/XSLT output with --graph
3825 and --report=all output for every working grammar when
3826 BISON_TEST_XML=1.
3827 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3828 (AT_BISON_CHECK_XML): New.
3829 (AT_QUELL_VALGRIND): New.
3830 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3831 (AT_CHECK): ... don't redefine this since this was the old way to
3832 quell Valgrind.
3833 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3834 AT_BISON_CHECK invocations.
3835 * tests/c++.at: Likewise.
3836 * tests/calc.at: Likewise.
3837 * tests/conflicts.at: Likewise.
3838 * tests/cxx-type.at: Likewise.
3839 * tests/existing.at: Likewise.
3840 * tests/glr-regression.at: Likewise.
3841 * tests/headers.at: Likewise.
3842 * tests/input.at: Likewise.
3843 * tests/java.at: Likewise.
3844 * tests/output.at: Likewise.
3845 * tests/push.at: Likewise.
3846 * tests/reduce.at: Likewise.
3847 * tests/regression.at: Likewise.
3848 * tests/sets.at: Likewise.
3849 * tests/skeletons.at: Likewise.
3850 * tests/synclines.at: Likewise.
3851 * tests/torture.at: Likewise.
3852 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3853 tends to hang xsltproc.
3854 (Big horizontal): Likewise.
3855
3856 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3857
3858 In XML output, remove redundant class attribute on symbol element.
3859 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3860 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3861 look up a symbol to determine whether it's a nonterminal or terminal.
3862 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3863 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3864
3865 Add prec/assoc information to XML output.
3866 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3867 %prec, add a percent_prec attribute.
3868 * src/print-xml.c (print_grammar): For each terminal that has a
3869 precedence or associativity, add a prec or assoc attribute.
3870 (xml_indent): New.
3871 (xml_puts): Use xml_indent.
3872 (xml_printf): Use xml_indent.
3873 * src/print-xml.h (xml_indent): Prototype.
3874
3875 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3876 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3877
3878 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3879
3880 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3881 (bison:ruleByNumber): ... this for clarity.
3882 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3883 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3884 (xsl:template match="reduction"): Update.
3885 (xsl:template match="item"): Update.
3886 (xsl:template match="reduction"): Update.
3887
3888 In the XML output, don't print the list of rules where symbols appear.
3889 Compute it in XSLT instead. Discussed at
3890 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3891 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3892 (bison:ruleByRhs): New.
3893 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3894 bison:ruleByRhs.
3895 (xsl:template match="terminal/rule"): Remove.
3896 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3897 bison:ruleByRhs.
3898 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3899 Remove.
3900 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3901 bison:ruleByRhs and mode="number-link" for rule template.
3902 (xsl:template match="terminal/rule"): Remove.
3903 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3904 bison:ruleByRhs and mode="number-link" for rule template.
3905 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3906 Rewrite as...
3907 (xsl:template match="rule" mode="number-link"): ... this.
3908 * src/print-xml.c (print_grammar): Don't print the list of rules.
3909
3910 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3911
3912 Don't let --report affect XML output; always print all information.
3913 Discussed at
3914 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3915 * src/conflicts.c (log_resolution): Implement.
3916 * src/print-xml.c (print_core): Implement.
3917 (print_state): Implement.
3918 (print_xml): Implement.
3919
3920 * NEWS (2.3a+): Fix quotes.
3921 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3922 don't let %verbose clear the list specified by --report.
3923
3924 2007-11-26 Akim Demaille <akim@epita.fr>
3925
3926 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3927
3928 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3929
3930 In the XML output, list useless and unused symbols and rules with the
3931 useful ones and add a "usefulness" attribute. Discussed starting at
3932 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3933 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3934 (grammar_rules_print_xml): Print all rules instead of just those
3935 useful in the grammar, and add a "usefulness" attribute.
3936 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3937 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3938 (print_grammar): Print all nonterminals instead of just useful ones,
3939 and add a "usefulness" attribute to nonterminals and terminals.
3940 (print_xml): Don't print a separate "reductions" or
3941 "rules-useless-in-parser" element.
3942 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3943 (reduce_xml): Remove.
3944 (reduce_token_unused_in_grammar): New.
3945 (reduce_nonterminal_useless_in_grammar): New.
3946 * src/reduce.h (reduce_xml): Remove prototype.
3947 (reduce_token_unused_in_grammar): Add prototype.
3948 (reduce_nonterminal_useless_in_grammar): Add prototype.
3949 * data/xslt/xml2text.xsl: Update for XML changes.
3950 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3951 * tests/reduce.at (Useless Terminals): Update output.
3952 (Useless Rules): Update output.
3953 (Reduced Automaton): Update output.
3954
3955 Say "Terminals unused in grammar" instead of "Unused terminals".
3956 * NEWS (2.3a+): Update.
3957 * doc/bison.texinfo (Understanding): Update example output.
3958 * src/reduce.c (reduce_output): Implement.
3959 * data/xslt/xml2text.xsl: Implement.
3960 * data/xslt/xml2xhtml.xsl: Implement.
3961
3962 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3963
3964 Accept --report-file=FILE to override the default `.output' filename.
3965 * NEWS (2.3a+): Mention.
3966 * doc/bison.texinfo (Bison Options): Add an entry.
3967 * src/files.c (compute_output_file_names): Don't override
3968 spec_verbose_file if already set.
3969 * src/getargs.c (usage): Document --report-file.
3970 (REPORT_FILE_OPTION): New anonymous enum member.
3971 (long_options): Add entry for it.
3972 (getargs): Add case for it setting spec_verbose_file.
3973
3974 * build-aux/cross-options.pl: Don't record a short option just because
3975 there's an arg.
3976 * doc/.cvsignore: Add yacc.1.
3977
3978 2007-11-14 Akim Demaille <akim@epita.fr>
3979
3980 * doc/yacc.1.in: New.
3981 * configure.ac, doc/Makefile.am: Adjust.
3982 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3983 config.h symbol.
3984 Use AC_SUBST for assignments too.
3985 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3986
3987 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3988
3989 * src/gram.c: Remove comments that duplicate comments in gram.h.
3990
3991 When reporting useless rules and nonterminals, say "useless in grammar"
3992 instead of "useless", and say "useless in parser" instead of "never
3993 reduced". Discussed starting at
3994 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3995 * NEWS (2.3a+): Mention this change.
3996 * data/xslt/xml2text.xsl: Update output text and expected input XML
3997 element names to match changes below.
3998 * data/xslt/xml2xhtml.xsl: Likewise.
3999 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4000 Contents: "Rules useless in parser due to conflicts".
4001 * doc/bison.texinfo (Decl Summary): Reword a little.
4002 (Understanding): Update example output for changes below.
4003 * src/gram.c: (rule_useful_p): Rename to...
4004 (rule_useful_in_grammar_p): ... this.
4005 (rule_useless_p): Rename to...
4006 (rule_useless_in_grammar_p): ... this.
4007 (rule_never_reduced_p): Rename to...
4008 (rule_useless_in_parser_p): ... this.
4009 (grammar_rules_print): Update for renames.
4010 (grammar_rules_print_xml): Update for renames.
4011 (grammar_rules_never_reduced_report): Rename to...
4012 (grammar_rules_useless_report): ... this since it is used for either
4013 kind of useless rule.
4014 * src/gram.h: Reword comments and update function names in prototypes.
4015 * src/main.c (main): Say "rule useless in parser due to conflicts".
4016 * src/print-xml.c (print_rules_never_reduced): Rename to...
4017 (print_rules_useless_in_parser): ... this, and rename output XML
4018 element "rules-never-reduced" to "rules-useless-in-parser".
4019 (print_xml): Update for rename.
4020 * src/print.c (print_results): Say "Rules useless in parser due to
4021 conflicts".
4022 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4023 (nonterminals_reduce): Say "nonterminal useless in grammar".
4024 (reduce_output): Say "Nonterminals useless in grammar".
4025 Say "Rules useless in grammar".
4026 (reduce_xml): Rename output XML element "useless" to
4027 "useless-in-grammar".
4028 (reduce_print): Don't report the count of grammatically useless rules
4029 as "rules never reduced" just because %yacc is specified.
4030 In the correct report of this count, say nonterminal(s) and rule(s)
4031 "useless in grammar".
4032 * tests/conflicts.at (S/R in initial): Update expected output.
4033 (Defaulted Conflicted Reduction): Likewise.
4034 (Unreachable States After Conflict Resolution): Likewise.
4035 * tests/existing.at (GNU pic Grammar): Likewise.
4036 * tests/reduce.at (Useless Nonterminals): Likewise.
4037 (Useless Rules): Likewise.
4038 (Reduced Automaton): Likewise.
4039 (Underivable Rules): Likewise.
4040 (Empty Language): Likewise.
4041
4042 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4043
4044 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4045 here document and before the EOF so that BSD's implementation of Bourne
4046 shell doesn't parse the delimiter as part of the here document.
4047 * doc/.cvsignore: Add cross-options.texi.
4048 * src/getargs.c (usage): Add a blank line after the warning categories.
4049
4050 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4051
4052 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4053
4054 2007-11-05 Akim Demaille <akim@epita.fr>
4055
4056 Remove Id: from bison.1.
4057 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4058 (perl -0777 -pi -e 's/\.PP\nId): New.
4059 (.x.1): Use it to ignore the version control revision.
4060
4061 2007-11-05 Akim Demaille <demaille@gostai.com>
4062
4063 * build-aux/Makefile.am: Ship cross-options.pl.
4064 * doc/Makefile.am: Always refer to cross-options.texi with
4065 $(srcdir).
4066 (MAINTAINERCLEANFILES): Add it.
4067
4068 2007-11-04 Akim Demaille <demaille@gostai.com>
4069
4070 Generate the long/short option cross-table.
4071 * build-aux/cross-options.pl: New.
4072 * doc/Makefile.am (cross-options.texi): New.
4073 * doc/bison.texinfo: Use it.
4074
4075 2007-11-04 Akim Demaille <demaille@gostai.com>
4076
4077 Generate bison.1 using help2man.
4078 * doc/common.x, doc/bison.x: New.
4079 * doc/Makefile.am (bison.1, .x.1): New.
4080 The code is taken from autoconf-2.61/man/Makefile.am.
4081 * configure.ac: Look for help2man.
4082
4083 2007-11-04 Akim Demaille <demaille@gostai.com>
4084
4085 Complete --help.
4086 * src/getargs.c (usage): Document -W, make it clear that -d,
4087 -g and -x have optional arguments.
4088
4089 2007-11-04 Akim Demaille <demaille@gostai.com>
4090
4091 Find sha1sum when named gsha1sum.
4092 * bootstrap (find_tool): New.
4093 ($SHA1SUM): New.
4094
4095 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4096
4097 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4098 at
4099 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4100 * NEWS (2.3a+): Mention.
4101 * data/bison.m4 (b4_pure_if): Don't define it here.
4102 * data/c.m4 (b4_identification): Depend on individual skeletons to
4103 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4104 values of the %define variables api.pure or api.push_pull. Define
4105 YYPURE, YYPUSH, and YYPULL accordingly.
4106 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4107 glr.cc has already defined b4_pure_flag.
4108 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4109 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4110 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4111 * doc/bison.texinfo (Pure Decl): Update.
4112 (Push Decl): Update.
4113 (Decl Summary): Add api.pure to %define entry.
4114 In %pure-parser entry, say it's deprecated and reference %define.
4115 (Pure Calling): Update.
4116 (Error Reporting): Update.
4117 (C++ Scanner Interface): Update.
4118 (How Can I Reset the Parser): Update.
4119 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4120 reference %define.
4121 * src/getargs.c (pure_parser): Remove global variable.
4122 * src/getargs.h (pure_parser): Remove extern.
4123 * src/output.c (prepare): Don't define pure_flag muscle.
4124 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4125 wrapper around `%define api.pure'.
4126 * tests/calc.at (Simple LALR Calculator): Update.
4127 (Simple GLR Calculator): Update.
4128 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4129 Update.
4130 (GLR: Resolve ambiguity, pure, locations): Update.
4131 (GLR: Merge conflicting parses, pure, no locations): Update.
4132 (GLR: Merge conflicting parses, pure, locations): Update.
4133 * tests/glr-regression.at (Uninitialized location when reporting
4134 ambiguity): Update
4135 * tests/input.at (Unused %define api.pure): New test case.
4136 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4137 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4138 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4139
4140 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4141
4142 %define push_pull -> %define api.push_pull. Discussed starting at
4143 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4144 * data/push.c: Expect the new name.
4145 * data/yacc.c: Likewise.
4146 * doc/bison.texinfo (Push Decl): Update.
4147 (Decl Summary): Update %define entry.
4148 (Push Parser Function): Update.
4149 (Pull Parser Function): Update.
4150 (Parser Create Function): Update.
4151 (Parser Delete Function): Update.
4152 * tests/calc.at (Simple LALR Calculator): Update.
4153 * tests/input.at (%define enum variables): Update.
4154 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4155 (Push Parsing: Multiple impure instances): Update.
4156 (Push Parsing: Unsupported Skeletons): Update.
4157 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4158 (Exploding the Stack Size with Malloc): Update.
4159
4160 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4161 other entries some.
4162
4163 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4164
4165 For the XML output's terminal element, rename @number to @token-number,
4166 and add @symbol-number. In the nonterminal element, rename @number to
4167 @symbol-number. Discussed starting at
4168 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4169 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4170 renames.
4171 (xsl:template match="nonterminal"): Likewise.
4172 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4173 (xsl:template match="nonterminal"): Likewise.
4174 * src/print-xml.c (print_grammar): Implement.
4175
4176 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4177
4178 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4179 2007-10-11 change, the child elements here are items not rules.
4180 (xsl:template match="item"): New.
4181 (xsl:template match="rule"): Update for new reduced itemset.
4182 (xsl:template match="point"): Remove.
4183 (xsl:template match="empty"): For consistency with --graph, don't
4184 output "/* empty */".
4185 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4186 line-wrap, don't pass a negative value as first-line-length since this
4187 won't work with the following changes.
4188 (xsl:template name="line-wrap"): Simplify slightly.
4189 (xsl:template name="ws-search"): Eliminate recursion.
4190 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4191 set next to an item whose dot is not at the end of the RHS even if it
4192 happens to be associated with the same rule.
4193
4194 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4195
4196 Add %define lr.keep_unreachable_states.
4197 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4198 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4199 * src/main.c (main): Implement it.
4200 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4201 Extend to test it, and fix a typo.
4202
4203 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4204
4205 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4206 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4207 the example .output text.
4208 * tests/regression.at (Extra lookahead sets in report): Improve wording
4209 of comments.
4210
4211 2007-10-17 Wojciech Polak <polak@gnu.org>
4212
4213 * src/print-xml.c (print_grammar): Renamed
4214 <terminal> and <nonterminal> attributes:
4215 "type" to "number" and "symbol" to "name".
4216 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4217 Use new attribute names.
4218 (xsl:template match="nonterminal"): Likewise.
4219 * data/xslt/xml2xhtml.xsl: Likewise.
4220
4221 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4222
4223 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4224 (Option Cross Key): Likewise.
4225
4226 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4227 next to an item whose dot is not at the end of the RHS even if it
4228 happens to be associated with the same rule.
4229 * src/print.c (print_core): Likewise.
4230 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4231 (Resolved SR Conflicts): Update output.
4232 * tests/regression.at (Extra lookahead sets in report): New test case.
4233
4234 2007-10-11 Wojciech Polak <polak@gnu.org>
4235
4236 * src/print-xml.c (print_core): Remove item set
4237 redundancy.
4238 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4239 Improve processing time. Suggested by Joel E. Denny.
4240 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4241 Write xsl:param "required" attribute as comment.
4242 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4243 (xsl:template match="rule"): Support new reduced itemset.
4244 (xsl:template match="point"): Remove.
4245 * data/xslt/xml2xhtml.xsl: Likewise.
4246
4247 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4248
4249 * src/getargs.c (version): Update copyright year.
4250
4251 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4252
4253 Make xml2dot.xsl and --graph produce the same output.
4254 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4255 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4256 escaped later.
4257 (xsl:template name="output-node"): Use the new escape template instead
4258 of the string-replace template directly.
4259 (xsl:template name="output-edge"): Likewise.
4260 (xsl:template name="escape"): New, escapes backslashes and newlines in
4261 addition to quotation marks.
4262 * src/graphviz.c (start_graph, output_node, output_edge): Add
4263 whitespace to output for legibility.
4264
4265 Make xml2text.xsl and --report produce the same output, and remove the
4266 XML "conflicts" element since a conflict summary is easily extracted
4267 from the automaton.
4268 * data/xslt/bison.xsl: New.
4269 (xsl:template match="state" mode="bison:count-conflicts): New.
4270 * data/xslt/xml2text.xsl: Import bison.xsl.
4271 (xsl:template match="bison-xml-report"): Instead of styling the
4272 "conflicts" element, style the "automaton" element with mode
4273 "conflicts". Unlike the former, the latter lists S/R and R/R
4274 conflicts for a state on the same line.
4275 (xsl:template match="conflicts"): Remove.
4276 (xsl:template match="conflict"): Remove.
4277 (xsl:template match="terminal"): Line-wrap the list of rules in which
4278 the terminal is used.
4279 (xsl:template match="nonterminal"): Likewise for nonterminals.
4280 (xsl:template match="automaton" mode="conflicts"): New.
4281 (xsl:template match="state" mode="conflicts"): New.
4282 (xsl:template name="line-wrap"): New.
4283 (xsl:template name="ws-search"): New.
4284 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4285 (xsl:template match="bison-xml-report"): Instead of styling the
4286 "conflicts" element, style the "automaton" element with mode
4287 "conflicts."
4288 (xsl:template match="conflicts"): Remove.
4289 (xsl:template match="conflict"): Remove.
4290 (xsl:template match="automaton" mode="conflicts"): New.
4291 (xsl:template match="state" mode="conflicts): New.
4292 * src/conflicts.c (conflicts_output_xml): Remove.
4293 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4294 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4295 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4296 the corresponding XSLT is easier. Also, never wrap between a word and
4297 the comma that follows it.
4298
4299 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4300
4301 Improve C++ namespace support. Discussed starting at
4302 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4303 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4304 b4_namespace_close): New macros that interpret the %define variable
4305 "namespace" so its value can contain "::" to indicate nested
4306 namespaces.
4307 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4308 the above macros.
4309 * data/lalr1.cc (b4_namespace): Likewise.
4310 * data/location.cc (b4_namespace): Likewise.
4311 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4312 inside a new table in the general %define entry. Document `%define
4313 namespace' there as well. Point the %name-prefix entry to it since it
4314 explains it more completely in the case of C++.
4315 (C++ Bison Interface): Mention `%define namespace' instead of
4316 %name-prefix.
4317 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4318 entry suffices.
4319 * tests/c++.at (Relative namespace references): New test case.
4320 (Absolute namespace references): New test case.
4321 (Syntactically invalid namespace references): New test case.
4322 * tests/input.at (C++ namespace reference errors): New test case.
4323
4324 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4325
4326 Add syncline support and location accessor to internal %define
4327 interfaces.
4328 * data/bison.m4 (b4_percent_define_get_loc): New.
4329 (b4_percent_define_get_syncline): New.
4330 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4331 (b4_percent_define_default): Record defining location as line 1 rather
4332 than 0 for the sake of synchronizing #line's, and define
4333 b4_percent_define_syncline(VARIABLE).
4334 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4335 * src/muscle_tab.c (muscle_syncline_grow): New.
4336 (muscle_code_grow): Use muscle_syncline_grow.
4337 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4338 define b4_percent_define_syncline(VARIABLE).
4339 (muscle_percent_define_get_loc): New.
4340 (muscle_percent_define_get_syncline): New.
4341 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4342 remove some unused variables.
4343 (muscle_percent_define_default): Record defining location as line 1
4344 rather than 0 for the sake of synchronizing #line's, and define
4345 b4_percent_define_syncline(VARIABLE).
4346 (muscle_percent_define_check_values): Use
4347 muscle_percent_define_get_loc.
4348 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4349 (muscle_percent_define_get_syncline): Prototype.
4350 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4351 defaults): Update output for location change.
4352 (Complaining during macro argument expansion): Extend to test
4353 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4354
4355 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4356
4357 Fix some error-reporting macro bugs.
4358 * data/bison.m4 (b4_cat): New.
4359 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4360 to stdout so they don't become arguments to other macros. Update
4361 comments and add examples.
4362 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4363 add examples.
4364 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4365 after printing the error directive so that M4 doesn't report subsequent
4366 problems that are induced by this problem.
4367 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4368 instead of just in them. Recognize @\n in both places. Both expand to
4369 the empty string. Needed by b4_cat.
4370 * tests/skeletons.at (Complaining during macro argument expansion):
4371 New test case.
4372 (Fatal errors make M4 exit immediately): New test case.
4373
4374 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4375
4376 Implement --print-datadir.
4377 * src/getargs.c (usage): Mention.
4378 (PRINT_DATADIR_OPTION): New anonymous enum member.
4379 (long_options): Add entry for it.
4380 (getargs): Add case for it calling compute_pkgdatadir.
4381 * src/output.c (output_skeleton): Encapsulate data directory
4382 computation from here...
4383 (prepare): ... and from here...
4384 (compute_pkgdatadir): ... into this new function.
4385 * src/output.h (compute_pkgdatadir): Prototype.
4386
4387 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4388
4389 * src/print-xml.c (escape_bufs): New static global variable
4390 replacing...
4391 (xml_escape_n): ... the static local variable buf here.
4392 (print_xml): Free memory for escape_bufs.
4393 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4394
4395 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4396
4397 Replace `%push-parser' and `%push-pull-parser' with
4398 `%define push_pull "push"' and `%define push_pull "both"'.
4399 `%define push_pull "pull"' is the default.
4400 * doc/bison.texinfo (Push Decl, Push Parser Function,
4401 Pull Parser Function, Parser Create Function, Parser Delete Function):
4402 Update declarations.
4403 (Decl Summary, Table of Symbols): Replace %push-parser and
4404 %push-pull-parser entries with a %define push_pull entry.
4405 * data/bison.m4 (b4_percent_define_check_values): New macro.
4406 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4407 definitions...
4408 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4409 definitions...
4410 * data/push.c: ... to here and compute them from the value of the
4411 %define variable push_pull.
4412 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4413 parsing requests here...
4414 * data/yacc.c: ... hack this to switch to push.c any time
4415 b4_use_push_pull_flag or the %define variable push_pull is set. This
4416 will go away when we mv push.c yacc.c.
4417 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4418 push parsing is not supported since unused %define variables are
4419 reported anyway.
4420 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4421 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4422 comments for consistency with b4_percent_define_check_values.
4423 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4424 muscles.
4425 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4426 Remove.
4427 (prologue_declaration): Remove %push-parser and %push-pull-parser
4428 rules.
4429 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4430 * tests/calc.at: Update declarations.
4431 * tests/input.at (%define enum variables): New test case.
4432 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4433 declaration.
4434 (Push Parsing: Multiple impure instances): Update declaration.
4435 (Push Parsing: Unsupported Skeletons): New test case.
4436 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4437 declaration.
4438 (Exploding the Stack Size with Malloc): Update declaration.
4439
4440 2007-09-24 Wojciech Polak <polak@gnu.org>
4441
4442 Add XSLT transformations.
4443
4444 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4445 * data/xslt/xml2text.xsl: Transform XML into plain text.
4446 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4447 * data/Makefile.am (xsltdir): New variable.
4448 (dist_xslt_DATA): Add xslt/*.xsl files.
4449
4450 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4451
4452 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4453 Problem reported by Wojciech Polak.
4454 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4455 (xml_printf): Undo change I made on 21 September; that is,
4456 indent 2 spaces, not 1.
4457
4458 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4459
4460 Pacify ./configure --enable-gcc-warnings.
4461 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4462 `char const *' instead of `char *'.
4463 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4464 local variable `sep'.
4465
4466 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4467
4468 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4469 elsewhere.
4470 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4471 (xml_printf): Indent just 1 space for level.
4472 (e_char, xlate_char): Remove.
4473 (xml_escape_string): Rewrite to avoid undefined behavior (used
4474 storage that was freed from the stack).
4475 (xml_escape_n): Don't bother checking for subscript error.
4476
4477 2007-09-21 Wojciech Polak <polak@gnu.org>
4478
4479 Add Bison XML Automaton Report.
4480
4481 Add support for an -x option to generate an XML report.
4482 It is not documented yet.
4483 * src/print-xml.c: New file.
4484 * src/print-xml.h: Likewise.
4485 * lib/timevar.def (TV_XML): New var.
4486 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4487 * src/conflicts.c: Include print-xml.h.
4488 (solved_conflicts_xml_obstack): New var.
4489 (log_resolution, conflicts_solve, conflicts_free):
4490 Add support for XML report.
4491 (conflicts_output_val): New function.
4492 * src/conflicts.h (conflicts_output_val): New decl.
4493 * src/files.c (spec_xml_file): New var.
4494 (compute_output_file_names, output_file_names_free): Add XML support.
4495 * src/files.h (spec_xml_file): New decl.
4496 * src/getargs.c (xml_flag): New var.
4497 (usage, short_options, long_options, getargs): Add XML support.
4498 * src/getargs.h (xml_flag): New decl.
4499 * src/gram.c: Include print-xml.h.
4500 (rule_lhs_print_xml, rule_rhs_print_xml):
4501 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4502 New functions.
4503 * src/gram.h: Declare external ones.
4504 * src/main.c: Include print-xml.h.
4505 (main): Add XML support.
4506 * src/reduce.c: Include print-xml.h.
4507 (reduce_xml): New function.
4508 * src/reduce.h: Declare it.
4509 * src/state.c: Include print-xml.h.
4510 (state_new): Add XML support.
4511 (state_rule_lookahead_tokens_print_xml): New function.
4512 * src/state.h: Declare it.
4513 (struct state): New member solved_conflicts_xml.
4514 * src/symtab.c (symbol_class_get_string): New function.
4515 * src/symtab.h: Declare it.
4516
4517 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4518
4519 * GNUmakefile: Switch to coreutils's version.
4520 * bootstrap: Likewise.
4521 * Makefile.cfg: Adjust to new GNUmakefile.
4522 * README-hacking: Likewise.
4523
4524 Import from gnulib:
4525
4526 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4527 Bruno Haible <bruno@clisp.org>
4528
4529 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4530 and is a script that invokes bison. Tighten the code. Add comments.
4531
4532 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4533
4534 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4535 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4536 * doc/bison.texinfo (Decl Summary): Fix.
4537 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4538 * tests/input.at (Boolean %define variables): Update output.
4539 * tests/skeletons.at (%define boolean variables: invalid skeleton
4540 defaults): Rename to...
4541 (%define Boolean variables: invalid skeleton defaults): ... this and
4542 update output.
4543
4544 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4545
4546 In impure push mode, don't allow more than one yypstate to be allocated
4547 since multiple impure parsers would corrupt yynerrs.
4548 * data/push.c (yypstate_allocated): New static global variable
4549 initialized to 0.
4550 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4551 exhaustion if yypstate_allocated is 1, but still return 2.
4552 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4553 already 1. Otherwise, set it to 1.
4554 (yypstate_delete): Set it to 0.
4555 * tests/push.at (Push Parsing: Multiple impure instances): New test
4556 case.
4557
4558 2007-08-17 Bob Rossi <bob@brasko.net>
4559
4560 * doc/bison.texinfo (Push Decl): Document the push parser.
4561 (Table of Symbols): Ditto.
4562 (Pure Decl): Ditto.
4563 (Decl Summary): Ditto.
4564 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4565 Parser Create Function, Parser Delete Function):
4566 Add new push parser symbols.
4567 (Table of Symbols): Document push-parser, push-pull-parser,
4568 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4569
4570 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4571
4572 Update to GPLv3.
4573 * doc/gpl-3.0.texi: New file.
4574 * doc/gpl.texi: Remove.
4575 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4576 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4577 * README-hacking, TODO, bootstrap, bootstrap.conf:
4578 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4579 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4580 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4581 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4582 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4583 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4584 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4585 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4586 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4587 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4588 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4589 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4590 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4591 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4592 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4593 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4594 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4595 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4596 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4597 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4598 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4599 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4600 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4601 * src/complain.c, src/complain.h, src/conflicts.c:
4602 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4603 * src/files.h, src/flex-scanner.h, src/getargs.c:
4604 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4605 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4606 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4607 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4608 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4609 * src/print.c, src/print.h, src/print_graph.c:
4610 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4611 * src/reduce.h, src/relation.c, src/relation.h:
4612 * src/revision.h, src/scan-code.h, src/scan-code.l:
4613 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4614 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4615 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4616 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4617 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4618 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4619 * tests/existing.at, tests/glr-regression.at:
4620 * tests/headers.at, tests/input.at, tests/java.at:
4621 * tests/local.at, tests/output.at, tests/push.at:
4622 * tests/reduce.at, tests/regression.at, tests/sets.at:
4623 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4624 * tests/torture.at:
4625 Update to GPLv3.
4626
4627 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4628
4629 Get rid of broken %no-parser, -n, and --no-parser implementation and
4630 documentation.
4631 * TODO: Don't mention them.
4632 * doc/bison.1: Likewise.
4633 * doc/bison.texinfo (Decl Summary): Likewise.
4634 (Bison Options): Likewise.
4635 (Option Cross Key): Likewise.
4636 * src/getargs.c (no_parser_flag): Remove global variable.
4637 (usage): Don't print description of -n and --no-parser.
4638 (long_options): Remove --no-parser entry here.
4639 (getargs): Remove -n case in the switch here.
4640 * src/getargs.h (no_parser_flag): Remove extern.
4641 * tests/regression.at (Web2c Actions): Remove comment that mentions
4642 --no-parser.
4643
4644 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4645
4646 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4647 name user variables starting with `yy'. Just pass NULL instead of a
4648 dummy local &yylval to yypush_parse.
4649 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4650 starting with `yy'.
4651
4652 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4653
4654 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4655 true since it's then always used regardless of whether yyoverflow is
4656 defined. Reported by Christian Burger at
4657 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4658 * THANKS: Add Christian Burger.
4659
4660 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4661 node names: say "Decl Summary" not "Bison Declaration Summary".
4662
4663 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4664
4665 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4666 determine whether this function has already complained about an invalid
4667 value for a %define boolean variable, don't check whether Bison has
4668 ever examined the value. As written, the check was a tautology.
4669 Instead, record and check for this complaint using a separate muscle.
4670
4671 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4672
4673 Fix push parsing memory leak reported by Brandon Lucia at
4674 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4675 * THANKS: Add Brandon Lucia.
4676 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4677 but the parse never completed and thus freed it.
4678 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4679 * tests/testsuite.at: Include push.at.
4680 * test/push.at: New.
4681 (Push Parsing: Memory Leak for Early Deletion): New test case.
4682
4683 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4684
4685 Improve handling of multiple S/R conflicts in the same state and of S/R
4686 conflicts involving multiple reductions.
4687 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4688 set for a state here or Bison will abort if it is reassigned on a
4689 later conflicted reduction in the same state.
4690 Similarly, don't finalize and assign the solved conflicts report here
4691 or it will be lost if it is reassigned on a later conflicted reduction
4692 in the same state.
4693 (set_conflicts): Instead, assign them both here after all S/R conflicts
4694 in the state have been fully examined.
4695 * src/print.c (shift_set): Rename to...
4696 (no_reduce_set): ... this.
4697 (print_reductions): Update for rename, and add %nonassoc error action
4698 tokens to no_reduce_set so that, when printing the first remaining
4699 reduction on an error action token, the reduction is enclosed in
4700 brackets.
4701 (print_results): Update for rename.
4702 * tests/conflicts.at (Solved conflicts report for multiple reductions
4703 in a state): New test case.
4704 (%nonassoc error actions for multiple reductions in a state): New test
4705 case.
4706
4707 * src/main.c (main): Don't depend on C99 features.
4708
4709 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4710
4711 * build-aux/.cvsignore: Add compile.
4712 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4713 uniwidth.
4714
4715 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4716
4717 * bootstrap (slurp): Create target directories that don't exist.
4718 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4719
4720 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4721
4722 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4723 than item number.
4724 * closure.c (closure): Likewise.
4725 * state.h (reductions): Comment sorting of rules.
4726 (state): Comment sorting of items.
4727
4728 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4729
4730 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4731 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4732 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4733 definition in order to avoid Gnulib headers since we don't use config.h
4734 here.
4735 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4736 rather than AT_DATA so that config.h is included.
4737
4738 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4739
4740 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4741 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4742 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4743 and so that YYFPRINTF is guaranteed to be defined here.
4744
4745 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4746
4747 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4748 with...
4749 (muscle_percent_define_check_values): ... this more helpful function.
4750 Again, it's not used yet, but it will be.
4751 * src/muscle_tab.h: Likewise.
4752
4753 Improve some comments in parser table construction.
4754 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4755 (generate_states): Don't mention ruleset, which is internal to closure.
4756 * src/closure.c (closure): Explain sorting of core and itemset, which
4757 is required for this function to behave correctly.
4758 * src/closure.h (closure): Mention sorting.
4759
4760 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4761
4762 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4763 move the check for disabled transitions to an aver since conflict
4764 resolution hasn't happened yet.
4765
4766 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4767 labels a state as inconsistent just because it has error transitions.
4768 The original form of this check appeared in revision 1.1 of lalr.c,
4769 which was committed on 1991-12-21. Now (at least), changing the
4770 consistency label on such a state appears to have no useful effect in
4771 any of the places it is examined, which I enumerate below. The key
4772 point to understanding each item in this enumeration is that a state
4773 with an error transition is labelled consistent in the first place only
4774 if it has no rules, so the check cannot matter for states that have
4775 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4776 to try to identify its conflicts, and a state must have *rules* to have
4777 conflicts. (2) Labelling a state as inconsistent will affect how
4778 action_row sets the default *rule* for the state. (3) Labelling a
4779 state as inconsistent will cause build_relations to add lookback edges
4780 to *rules* in that state.
4781 * src/state.h (struct state): Word the comment for member consistent
4782 more carefully.
4783
4784 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4785
4786 Don't depend on C99 features.
4787 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4788 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4789 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4790 * src/state.c (state_mark_reachable_states): Fix for-loop.
4791 (state_remove_unreachable_states): Fix for-loop.
4792
4793 Don't widen struct state with member reachable just to temporarily
4794 record reachability. Instead, use a local bitset.
4795 * src/state.h (struct state): Remove member.
4796 * src/state.c (state_new): Don't initialize it.
4797 (state_mark_reachable_states): Rename to...
4798 (state_record_reachable_states): ... this, and use bitset.
4799 (state_remove_unreachable_states): Use bitset.
4800
4801 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4802
4803 * src/Makefile.am (yacc): Quote target action commands properly so
4804 that the yacc script isn't corrupt. Reported by Hans Aberg at
4805 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4806
4807 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4808 the case of pure parsers. Reported by Frans Englich at
4809 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4810 * THANKS: Add Frans Englich.
4811
4812 * NEWS (2.3a+): In the %code entry, reference section `Bison
4813 Declaration Summary' from the manual now since the %code summary has
4814 moved there.
4815 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4816 in the rules section must be terminated by semicolons.
4817
4818 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4819
4820 Extend the front-end API for %define variables to more completely
4821 mirror the back-end. This will be useful in the future.
4822 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4823 Update comments to mention the new front-end counterparts of these
4824 macros.
4825 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4826 for muscle_string_decode and muscle_location_decode.
4827 (muscle_string_decode): New static function.
4828 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4829 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4830 functions.
4831 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4832 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4833 implementation more closely.
4834 (muscle_percent_define_invalid_value): New function.
4835 * src/muscle_tab.h (muscle_percent_define_get,
4836 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4837 Prototype.
4838
4839 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4840
4841 * NEWS (2.3a+): Mention yesterday's state-removal change.
4842 (2.3a): Remove the %language entry, which was added after 2.3a.
4843 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4844 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4845 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4846 tests/existing.at: Update copyright date.
4847
4848 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4849
4850 If conflict resolution makes states unreachable, remove those states,
4851 report rules that are then unused, and don't report conflicts in those
4852 states.
4853 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4854 New global function.
4855 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4856 function.
4857 * src/main.c (main): After conflict resolution, remove the unreachable
4858 states and update all data structures that reference states by number.
4859 * src/state.c (state_new): Initialize each state's reachable member to
4860 false.
4861 (state_mark_reachable_states): New static function.
4862 (state_remove_unreachable_states): New global function.
4863 * src/state.h (struct state): Add member bool reachable.
4864 (state_remove_unreachable_states): Prototype.
4865 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4866 New test case.
4867 * tests/existing.at (GNU pic Grammar): Update test case output now that
4868 an unused rule is discovered.
4869
4870 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4871
4872 Minor code cleanup in parser table construction.
4873 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4874 (new_itemsets, save_reductions): Update for rename to nitemset.
4875 * src/closure.c (nritemset): Rename to...
4876 (nitemset): ... this since the "r" appears to meaningless and isn't
4877 used in the comments.
4878 (closure): Update for rename.
4879 * src/closure.h (nritemset): Update extern to...
4880 (nitemset): ... this.
4881 * src/lalr.c (LA): Fix a typo in comments.
4882 * src/print.c (print_core): Update for rename to nitemset.
4883 * src/print_graph.c (print_graph): Likewise.
4884 * src/state.h: Fix some typos in header comments.
4885
4886 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4887
4888 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4889 still sticks to ASCII. Sorry!
4890
4891 * README-hacking: New file, taken mostly from coreutils, with changes
4892 for Bison. Contains much of the contents of:
4893 * README-cvs: Remove.
4894 * bootstrap: Sync from gnulib.
4895 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4896 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4897
4898 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4899
4900 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4901 Setzer.
4902 (Java Differences): Fix some typos.
4903 * THANKS: Add Sebastian Setzer.
4904
4905 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4906
4907 * data/java.m4 (b4_single_class_if): Remove.
4908 (b4_abstract_if): Look at "%define abstract".
4909 (b4_lexer_if): New.
4910 (b4_union_name): Rename...
4911 (b4_yystype): ... to this. Map to "%define stype".
4912 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4913 b4_maybe_throws): Fix quoting.
4914 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4915 * data/lalr1.java (Lexer interface): Always define.
4916 (Lexer interface within parser class): Remove.
4917 (YYLexer class): New, used when "%code lexer" is present.
4918 (constructor): When "%code lexer" is used, pass %lex-param
4919 to the lexer constructor.
4920 (yylex, yyparse): Remove %lex-param from method invocations
4921 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4922
4923 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4924 abstract". Rename "%define union_name" to "%define stype".
4925 Rename method names according to previous patch.
4926 (Java Scanner Interface): Describe "%code lexer" instead of
4927 "%pure-parser" and "%define single_class".
4928 (Java Differences): Mention "%code lexer".
4929
4930 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4931 Include scanner here, using macros from tests/local.at.
4932 (AT_DATA_CALC_Y): Remove final argument.
4933 (_AT_CHECK_JAVA_CALC): Likewise.
4934 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4935 of %locations and %error-verbose.
4936 (main): Test with and without %lex-param.
4937 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4938 (AT_BISON_OPTION_POPDEFS): Pop it.
4939
4940 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4941
4942 DJGPP spefic issue. Inhibit the use of disallowed characters for
4943 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4944 and concern testsuite case 46.
4945 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4946 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4947 * djgpp/config.bat: Inhibit the use of disallowed characters.
4948
4949 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4950
4951 Miscellaneous %define and %code cleanup.
4952 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4953 values are interpreted.
4954 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4955 documentation a little more.
4956 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4957 muscle_percent_define_insert, muscle_percent_code_grow): New
4958 functions/macros.
4959 * src/muscle_tab.h (muscle_percent_define_insert,
4960 muscle_percent_code_grow): Prototype.
4961 * src/parse-gram.y (prologue_declaration): Use
4962 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4963 %define and %code directives.
4964
4965 Make it easy to share %define boolean variables between the front-end
4966 and back-end. Though not used yet, this will be useful in the future.
4967 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4968 Bison uses of names rather than just skeleton uses of names.
4969 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4970 b4_percent_define_skeleton_variables(VARIABLE) to
4971 b4_percent_define_bison_variables(VARIABLE).
4972 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4973 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4974 b4_percent_code_bison_qualifiers(QUALIFIER).
4975 (b4_check_user_names_wrap): Update for renames.
4976 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4977 muscle_percent_define_default): New functions mimicking
4978 b4_percent_define_flag_if and b4_percent_define_default.
4979
4980 For %define variables, report locations for invalid values and
4981 redefinitions.
4982 * data/bison.m4 (b4_percent_define_flag_if): Read
4983 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4984 value for VARIABLE.
4985 (b4_percent_define_default): Save a special location in
4986 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4987 must later be reported as invalid.
4988 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4989 functions.
4990 (muscle_percent_define_insert): Record the location of VARIABLE in
4991 muscle percent_define_loc(VARIABLE), and use it to report the previous
4992 location for a redefinition.
4993 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4994 (muscle_percent_define_default): Update like b4_percent_define_default.
4995 (muscle_grow_user_name_list): Rename to...
4996 (muscle_user_name_list_grow): ... this for consistency and use
4997 muscle_location_grow.
4998 * src/muscle_tab.h (muscle_location_grow): Prototype.
4999 * tests/input.at (%define errors): Update expected output.
5000 * tests/skeletons.at (%define boolean variables: invalid skeleton
5001 defaults): New test case.
5002
5003 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5004
5005 * src/print.c (lookahead_set, state_default_rule): Remove.
5006 (print_reductions): Replace state_default_rule invocation with
5007 equivalent use of yydefact, which was computed in token_actions in
5008 tables.c.
5009 (print_results): Don't allocate lookahead_set.
5010
5011 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
5012
5013 * data/lalr1.java: Prefix all private members with yy.
5014
5015 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5016
5017 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5018 Sebastien Fricker at
5019 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5020 * THANKS: Add Sebastien Fricker.
5021 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5022 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5023 accept a variable number of arguments.
5024
5025 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5026
5027 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5028
5029 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5030
5031 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5032 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5033 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5034
5035 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5036
5037 Undo my 2007-02-07 change, switching back to the c-strcase module
5038 introduced in the 2007-02-03 change. Bruno Haible reported that
5039 the 2007-02-07 change would be dangerous in Turkish if we add a
5040 language whose name contains "i", since "i" is not lowercase "I"
5041 in Turkish.
5042 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5043 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5044 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5045 * m4/.cvsignore: Remove strcase.m4.
5046 * src/getargs.c: Revert 2007-02-07 change, as follows.
5047 Include c-strcase.h.
5048 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5049
5050 2007-02-11 Bruno Haible <bruno@clisp.org>
5051
5052 Enable the Java related testsuite tests when the only Java compiler
5053 found is a gcj < 4.3. Discussed at
5054 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5055 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5056
5057 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5058
5059 * data/Makefile.am: Update copyright date.
5060 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5061 yypstate_new returns NULL.
5062 (yypstate_new): Return NULL if malloc does.
5063 * src/reader.c (packgram): Move translation of rule actions from the
5064 beginning of packgram to...
5065 (check_and_convert_grammar): ... here right before packgram is invoked
5066 so it's easier to write more complete comments, and remove redundant
5067 code.
5068
5069 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5070
5071 As in semantic actions, make @$ in %initial-action, %destructor, and
5072 %printer imply %locations.
5073 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5074 scanning @$.
5075 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5076 (@$ in %initial-action implies %locations,
5077 @$ in %destructor implies %locations,
5078 @$ in %printer implies %locations): ... these new test cases.
5079
5080 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5081
5082 Undo most of the 2007-02-03 change, switching to the strcase module
5083 now that gnulib strcase has been fixed.
5084 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5085 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5086 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5087 * m4/.cvsignore: Add strcase.m4.
5088 * src/getargs.c: Revert 2007-02-03 change, as follows.
5089 Don't include c-strcase.h.
5090 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5091 strcasecmp has "unspecified behavior" outside the POSIX locale,
5092 but it works fine in practice if at least one argument is ASCII,
5093 as is the case in Bison.
5094
5095 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5096
5097 * tests/java.at: Skip tests if only one of javac/java is present.
5098 Reported by Joel E. Denny.
5099 * tests/atlocal.in: Adjust copyright years.
5100
5101 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5102
5103 * data/lalr1.java (Stack): Work around old verifiers that disallow
5104 access to the private fields of an inner class, from the outer class.
5105 We can make Stack's fields public because user code doesn't have access
5106 to the instance of Stack used by parse(). Reported by Paul Eggert.
5107
5108 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5109
5110 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5111 the right spot for these files?
5112 * bootstrap.conf (gnulib_modules): Add c-strcase.
5113 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5114 c-strncasecmp.c.
5115 * src/getargs.c: Include c-strcase.h.
5116 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5117 to avoid unspecified behavior.
5118
5119 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5120
5121 * doc/bison.texinfo (Decl Summary): Correct typo.
5122
5123 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5124
5125 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5126 Complain if the value does not match empty, "true" or "false".
5127 * data/c++.m4: Adjust default definitions of %define variables.
5128 * data/java.m4: Adjust default definitions of %define variables.
5129 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5130 to above behavior.
5131 * tests/input.at (Boolean %define variables): Test new behavior.
5132
5133 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5134
5135 * NEWS: Mention java.
5136 * TODO: Remove things that are done.
5137 * bootstrap.conf: Add javacomp-script and javaexec-script.
5138 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5139
5140 * data/Makefile.am: Add new files.
5141 * data/java-skel.m4: New.
5142 * data/java.m4: New.
5143 * data/lalr1.java: New.
5144
5145 * doc/bison.texinfo: Put "A Complete C++ Example" under
5146 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5147 under Other Languages.
5148
5149 * src/getargs.c (valid_languages): Add Java.
5150 * src/getargs.h (struct bison_language): Update size of string fields.
5151
5152 * tests/Makefile.am: Add java.at.
5153 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5154 * tests/java.at: New.
5155 * tests/testsuite.at: Include it.
5156
5157 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5158
5159 Clean up.
5160 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5161 at_directive_argv arguments so these no longer have to be global
5162 variables. Also, update the implementation for the following changes.
5163 (fail_for_at_directive_too_many_args,
5164 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5165 (at_directive_name): Remove as at_directive_argv[0] will be used for
5166 this now.
5167 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5168 for the directive name.
5169 (at_directive_argc, at_directive_argv): Make these local within
5170 skel_lex instead of global.
5171 (INITIAL): Update directive start action for above changes.
5172 (SC_AT_DIRECTIVE_ARG): Rename to...
5173 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5174 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5175 (scan_skel): Move yylex_destroy to...
5176 (skel_scanner_free): ... here.
5177 * tests/skeletons.at (installed skeleton file name): Rename to...
5178 (installed skeleton file names): ... this.
5179
5180 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5181
5182 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5183 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5184 Summary" not "Directives".
5185 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5186 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5187 since the former is now the more complete one.
5188 (Prologue Alternatives): Likewise and do the same for %defines.
5189 (Table of Symbols): Add summary of %code, add summary of %define, and
5190 move full %code documentation to...
5191 (Decl Summary): ... here for consistency with other entries in these
5192 sections.
5193 Move %define entry in order to keep this list alphabetized.
5194 Reword %define entry a little to put less emphasis on the skeleton
5195 concept, which most users shouldn't have to think about.
5196
5197 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5198
5199 Adjust to recent gnulib changes.
5200 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5201 Add string.h, string_.h, unistd_.h, wchar_.h.
5202 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5203 * src/system.h: Don't include <stpcpy.h>; this is now done by
5204 <string.h>.
5205
5206 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5207
5208 Simplify implementation of unqualified %code, implement macros for
5209 uniform treatment of boolean %define flags. Document %define.
5210 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5211 b4_percent_code_ifdef): New.
5212 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5213 * data/c++.m4: Define default value for global_tokens_and_yystype.
5214 * data/glr.cc: Likewise.
5215 * data/location.cc: Use b4_percent_define_flag_if.
5216
5217 * doc/bison.texinfo (Decl Summary): Document %define.
5218
5219 * src/parse-gram.y (Unqualified %code): Change muscle name to
5220 b4_percent_code().
5221 (content.opt): Default to empty.
5222
5223 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5224
5225 Implement support for relative and absolute skeleton file names.
5226 Discussed starting at
5227 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5228 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5229 (Bison Options): Document in --skeleton entry.
5230 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5231 full_skeleton can't necessarily hold all of pkgdatadir.
5232 If the specified skeleton file name contains a `/', don't prepend
5233 pkgdatadir.
5234 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5235 file name contains a `/', prepend the grammar file directory.
5236 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5237 * skeletons.at: New file.
5238 (relative skeleton file names): New test case.
5239 (installed skeleton file names): New test case.
5240 * tests/testsuite.at: Include skeletons.at.
5241
5242 * bootstrap: Update copyright to 2007.
5243
5244 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5245
5246 * bootstrap: Remove occurrences of .#bootmp from the files.
5247
5248 2007-01-17 Akim Demaille <akim@epita.fr>
5249
5250 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5251 nonterminals.
5252 Use per-type %printer.
5253
5254 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5255
5256 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5257 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5258 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5259 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5260 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5261 tests/glr-regression.at, tests/input.at, tests/local.at,
5262 tests/output.at, tests/torture.at: Update copyright to 2007.
5263
5264 2007-01-16 Akim Demaille <akim@epita.fr>
5265
5266 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5267 error code.
5268 (Calc++ Scanner): Exit with failure if we can't open the input
5269 file.
5270 Accept "-" standing for stdin.
5271 (Calc++ Top Level): Print the result only if the parsing was
5272 successful.
5273
5274 2007-01-16 Akim Demaille <akim@epita.fr>
5275
5276 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5277
5278 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5279 and Joel E. Denny <jdenny@ces.clemson.edu>
5280
5281 Clean up %define and %code implementation in M4 some. Most
5282 importantly, rename all related macros to be in the b4_percent_define
5283 and b4_percent_code namespaces. Also, complete support for `.' in
5284 %define variable names and %code qualifiers.
5285 * data/bison.m4 (b4_check_user_names): Check for special
5286 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5287 m4_foreach loops.
5288 (b4_get_percent_define, b4_get_percent_code): Rename to...
5289 (b4_percent_define_get, b4_percent_code_get): ... these.
5290 Extend documentation with examples.
5291 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5292 b4_percent_define_skeleton_variables and
5293 b4_percent_code_skeleton_qualifiers.
5294 Expect any value for the %define variable `foo' to be stored in the
5295 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5296 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5297 expect any unqualified %code blocks to be stored in a macro named
5298 `b4_percent_code_unqualified'.
5299 Use m4_indir so that %define variable names and %code qualifiers can
5300 contain `.', which is allowed by the grammar parser.
5301 (b4_percent_define_default): New macro to set a default value for a
5302 %define variable.
5303 (m4_wrap): Update wrapped code, and fix some underquoting.
5304 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5305 Expect grammar uses of %define variables and %code qualifiers to be
5306 defined in b4_percent_define_user_variables and
5307 b4_percent_code_user_qualifiers.
5308 * data/c++.m4: Use b4_percent_define_default rather than
5309 m4_define_default. Fix some underquoting. Skeleton usage of %define
5310 variable define_location_comparison now implies skeleton usage of
5311 %define variable filename_type.
5312 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5313 data/push.c, data/yacc.c: Update macro names.
5314 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5315 muscle names.
5316
5317 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5318
5319 DJGPP specific issues.
5320
5321 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5322 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5323
5324 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5325
5326 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5327 run parsers in all tests so that Valgrind is invoked during
5328 maintainer-check-valgrind.
5329 (Duplicate representation of merged trees): Free all semantic values.
5330 (Duplicated user destructor for lookahead): Likewise.
5331
5332 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5333
5334 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5335 command-line prefix.
5336 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5337 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5338 miss Valgrind messages.
5339 (Exploding the Stack Size with Malloc): Likewise.
5340
5341 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5342
5343 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5344 locals. Reported by Juan Manuel Guerrero at
5345 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5346 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5347 Fix some indentation also.
5348 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5349 explaining this issue.
5350
5351 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5352 and Joel E. Denny <jdenny@ces.clemson.edu>
5353
5354 Simplify union and prologue handling, and escape union and lex/parse
5355 params with digraphs.
5356 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5357 values to the empty string since these are no longer guaranteed
5358 initialized by the front-end.
5359 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5360 braces around b4_user_stype since this is no longer done by the
5361 front-end.
5362 * src/files.c, src/files.h (pre_prologue_obstack,
5363 post_prologue_obstack): Remove.
5364 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5365 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5366 with digraphs. This fixes lex params and parse params.
5367 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5368 * src/output.c (prepare): Remove muscle insertion of the prologues.
5369 (output): Remove freeing of pre_prologue_obstack and
5370 post_prologue_obstack.
5371 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5372 than prologue_augment for prologue parsing so you don't need prologue
5373 obstacks.
5374 (grammar_declaration): For %union RHS, use `braceless' instead of
5375 "{...}" so that braces are already stripped and code is escaped with
5376 digraphs.
5377 * src/reader.c (prologue_augment): Remove.
5378 (reader): Remove initialization of pre_prologue_obstack and
5379 post_prologue_obstack.
5380 * src/reader.h (prologue_augment): Remove.
5381
5382 * data/c.m4: Remove stray parenthesis.
5383
5384 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5385
5386 Remove quotes from variables names in %define directives and from
5387 qualifiers in %code directives, and restrict the characters that are
5388 allowed in them to M4-friendly ones. For %define, continue to support
5389 the quoted form as a deprecated feature. Discussed starting at
5390 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5391 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5392 %code.
5393 * doc/bison.texinfo (Prologue Alternatives): Update.
5394 (Decl Summary): In %defines entry, update mention of `%code requires'
5395 and `%code provides'.
5396 (C++ Location Values): Update %define uses.
5397 (Calc++ Parser Interface): Likewise.
5398 (Calc++ Parser): Likewise, and update `%code requires' uses.
5399 (Table of Symbols): Update %code documentation.
5400 * src/parse-gram.y (prologue_declaration): For %define variables, use
5401 `variable' instead of `STRING'.
5402 (grammar_declaration): For %code qualifiers, use `ID' instead of
5403 `STRING'.
5404 (variable): New nonterminal that takes an `ID' or a `STRING'.
5405 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5406 and %define uses.
5407 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5408 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5409 (%define errors): Update %define uses.
5410
5411 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5412
5413 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5414 instead of muscle_insert for %define values so that M4-special
5415 characters are replaced with digraphs.
5416 * tests/input.at (%define errors): Extend to check weird values.
5417
5418 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5419
5420 Instead of having skeletons declare all valid %define variables and
5421 %code qualifiers, provide macros that retrieve the associated values
5422 and build these lists automatically. Thus Bison will now warn when a
5423 variable or qualifier is not used by the skeleton in the current
5424 invocation regardless of whether it might sometimes be used by that
5425 skeleton in other invocations. Also, move all %define value macros to
5426 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5427 form, which is replaced by %code.
5428 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5429 (b4_check_user_names): ... this, and change the series of valid name
5430 arguments to a single list argument for names used in the skeleton
5431 similar to the existing list argument for names used in the grammar.
5432 Warn instead of complaining.
5433 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5434 values and %code code, to format %code code properly, and to build
5435 lists of all %define variables and %code qualifiers used in the
5436 skeleton: b4_skeleton_percent_define_variables and
5437 b4_skeleton_percent_code_qualifiers.
5438 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5439 Remove, and...
5440 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5441 the skeleton names lists can finish building first. In place of
5442 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5443 expect the lists b4_user_percent_define_variables and
5444 b4_user_percent_code_qualifiers.
5445 * data/c++.m4: Where setting default values for b4_parser_class_name,
5446 b4_location_type, b4_filename_type, b4_namespace, and
5447 b4_define_location_comparison, update their names to the
5448 b4_percent_define_ namespace.
5449 * data/glr.c: Don't use b4_check_percent_define_variables and
5450 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5451 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5452 (b4_parser_class_name, b4_namespace): Define these using
5453 b4_get_percent_define for parser_class_name and namespace.
5454 * data/location.cc: Use b4_get_percent_define.
5455 * data/push.c: Don't use b4_check_percent_define_variables and
5456 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5457 * data/yacc.c: Likewise, and don't call m4_exit in
5458 b4_use_push_for_pull_if or m4_wrap code will never execute.
5459 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5460 Rename to...
5461 (muscle_grow_user_name_list): ... this for consistency with the
5462 terminology used in bison.m4.
5463 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5464 %define variable names, and rename muscle used_percent_define_variables
5465 to user_percent_define_variables.
5466 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5467 user_percent_code_qualifiers.
5468 (content): Remove.
5469 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5470 {CODE} form is no longer accepted.
5471 * tests/input.at (Reject bad %code qualifiers): Rename to...
5472 (Reject unused %code qualifiers): ... this, and update test output.
5473 (%define error): Update test output.
5474
5475 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5476
5477 Check for unrecognized %define variables similar to checking for
5478 unrecognized %code qualifiers. Check for redefined %define variables.
5479 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5480 generalizes...
5481 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5482 (b4_check_percent_define_variables): New, also wraps it.
5483 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5484 variables using b4_check_percent_define_variables.
5485 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5486 all those exercised in the test suite and all those listed in the
5487 `Default values' section of c++.m4. Are there others?
5488 * data/push.c, data/yacc.c: Declare no valid %define variables.
5489 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5490 similar to muscle_find, but it works even when the muscle stores a
5491 const value.
5492 (muscle_grow_used_name_list): New function for constructing the used
5493 name list muscles that b4_check_for_unrecognized_names requires.
5494 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5495 %define'd more than once. Define the b4_used_percent_define_variables
5496 muscle with muscle_grow_used_name_list.
5497 (grammar_declaration): Abbreviate %code code with
5498 muscle_grow_used_name_list.
5499 * tests/input.at (%define errors): New.
5500
5501 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5502
5503 Provide warn_at, complain_at, and fatal_at function callbacks to the
5504 skeletons, and use this for %code qualifier complaints.
5505 * data/bison.m4 (b4_error_at): New, invoked by...
5506 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5507 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5508 @fatal_at(...@) directives.
5509 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5510 qualifiers in b4_used_percent_code_qualifiers and to use
5511 b4_complain_at.
5512 * src/location.c, src/location.h (boundary_set_from_string): New global
5513 function.
5514 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5515 function.
5516 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5517 to b4_used_percent_code_qualifiers.
5518 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5519 function.
5520 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5521 (lineno): Rename to...
5522 (out_lineno): ... this so I don't misunderstand it again.
5523 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5524 here; these newlines are in the input but not the output file.
5525 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5526 (at_directive_perform): ... this new static function, and add handling
5527 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5528 directives.
5529 * tests/input.at (Reject bad %code qualifiers): Update test output with
5530 locations and extend.
5531
5532 * tests/output.at (Output file name: [, Output file name: ]): Remove
5533 bogus comment about these tests failing.
5534
5535 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5536
5537 Clean up b4_check_percent_code_qualifiers a little.
5538 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5539 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5540 documentation and add examples.
5541 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5542 qualifiers here.
5543
5544 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5545
5546 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5547 unreliable -- especially when they're hidden inside another macro.
5548 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5549 data/c.m4: Remove m4_divert(-1).
5550 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5551 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5552 m4_divert_push(0) and m4_divert_pop(0).
5553 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5554 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5555 pushed and popped by m4sugar, should be first on the stack.
5556
5557 Provide warn, complain, and fatal function callbacks to the skeletons.
5558 This provides more flexibility than m4_fatal, improves the error
5559 message format, and captures messages for translation. Discussed
5560 starting at
5561 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5562 * data/bison.m4 (b4_error): New, invoked by...
5563 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5564 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5565 directives. Because these M4 macros might be called when the current
5566 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5567 the previous removal of uses of m4_divert, which caused trouble.
5568 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5569 m4_fatal to report unrecognized %code qualifiers.
5570 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5571 push parser requests.
5572 * data/glr.c: Use b4_complain instead of m4_fatal to report
5573 non-deterministic push parser requests.
5574 Update @output usage to @output(...@) form.
5575 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5576 report missing %defines. Update @output usage to @output(...@) form.
5577 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5578 @output(...@) form.
5579 * src/main.c (main): Invoke skel_scanner_free.
5580 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5581 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5582 obstack_for_string from flex-scanner.h.
5583 (YY_DECL): Use to declare skel_lex static.
5584 (decode_at_digraphs): Remove; now handled in the new
5585 SC_AT_DIRECTIVE_ARG start condition.
5586 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5587 functions.
5588 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5589 at_directive_argv): New static globals.
5590 (INITIAL): Use fail_for_invalid_at.
5591 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5592 recognize the start of a generalized `@directive(...@)' form and
5593 start...
5594 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5595 directive args (using the new obstack_for_string), to decode the
5596 contained @ diagraphs, and to perform the directive. It recognizes
5597 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5598 @output(...@).
5599 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5600 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5601 `@,'.
5602 (scan_skel): Initialize obstack_for_string on the first call.
5603 (skel_scanner_free): New function to free obstack_for_string.
5604 * tests/input.at (Reject bad %code qualifiers): Update test output.
5605
5606 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5607
5608 Consolidate the 4 prologue alternative directives (%code, %requires,
5609 %provides, and %code-top) into a single %code directive with an
5610 optional qualifier field. Discussed at
5611 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5612 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5613 alternatives.
5614 * doc/bison.texinfo (Prologue Alternatives): Update.
5615 (Decl Summary): Update to %code "requires" and %code "provides".
5616 (Calc++ Parser): Update to %code "requires".
5617 (Table of Symbols): Remove entries for %requires, %provides, and
5618 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5619 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5620 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5621 which are skeleton-specific.
5622 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5623 declare what %code qualifiers it supports and to complain if any other
5624 qualifiers were used in the grammar.
5625 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5626 and b4_user_code([b4_percent_code_provides]) in place of
5627 b4_user_requires and b4_user_provides.
5628 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5629 Add b4_user_code([b4_percent_code_top]) and
5630 b4_user_code([b4_percent_code]).
5631 Invoke b4_check_percent_code_qualifiers.
5632 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5633 PERCENT_REQUIRES): Remove.
5634 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5635 %requires. Rewrite the %code RHS as the unqualified form defining the
5636 muscle b4_percent_code. Add another RHS for the qualified %code form,
5637 which defines muscles of the form b4_percent_code_QUALIFIER and the
5638 b4_used_percent_code_qualifiers muscle.
5639 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5640 PERCENT_REQUIRES): Remove.
5641 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5642 %code "requires" and %code "provides".
5643 * tests/input.at (Reject bad %code qualifiers): New.
5644
5645 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5646
5647 Use the new code_props interface for destructors and printers.
5648 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5649 printer_location members, and change the type of the destructor and
5650 printer members to code_props.
5651 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5652 symbol_printer_get, semantic_type_destructor_set,
5653 semantic_type_printer_set, default_tagged_destructor_set,
5654 default_tagless_destructor_set, default_tagged_printer_set,
5655 default_tagless_printer_set): Use code_props in arguments and return
5656 types in place of char const * and location.
5657 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5658 since the locations are now contained in the return of
5659 symbol_destructor_get and symbol_printer_get.
5660 * src/output.c (symbol_destructors_output, symbol_printers_output):
5661 Replace with...
5662 (symbol_code_props_output): ... this to eliminate duplicate code.
5663 (output_skeleton): Update to use symbol_code_props_output.
5664 * src/reader.c (symbol_should_be_used): Update use of
5665 symbol_destructor_get.
5666 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5667 Update uses of the various _destructor_set and _printer_set functions.
5668 * src/symtab.c: (default_tagged_destructor_location,
5669 default_tagless_destructor_location, default_tagged_printer_location,
5670 default_tagless_printer_location): Remove since we...
5671 (default_tagged_destructor, default_tagless_destructor,
5672 default_tagged_printer, default_tagless_printer): ... change the type
5673 of these to code_props.
5674 (symbol_new, semantic_type_new, symbol_destructor_set,
5675 semantic_type_destructor_set, symbol_destructor_get,
5676 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5677 symbol_check_alias_consistency, default_tagged_destructor_set,
5678 default_tagless_destructor_set, default_tagged_printer_set,
5679 default_tagless_printer_set): Update.
5680 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5681 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5682 code_props members.
5683 (symbol_print): Use SYMBOL_CODE_PRINT.
5684
5685 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5686
5687 Use the new code_props interface for rule actions.
5688 * src/symlist.h (symbol_list): Replace action, action_location, and
5689 used members with a code_props action_props member.
5690 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5691 grammar_midrule_action, grammar_current_rule_merge_set,
5692 grammar_current_rule_symbol_append, packgram): Update.
5693 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5694 * src/scan-code.l (handle_action_dollar): Update.
5695 (translate_rule_action): Remove, no longer used.
5696 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5697
5698 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5699
5700 Use the new code_props interface in parse-gram.y.
5701 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5702 Update all uses of translate_* functions to use the new code_props
5703 interface and to use gram_scanner_last_string_free and
5704 code_scanner_last_string_free where possible.
5705 (grammar_declaration): symbol_list_destructor_set and
5706 symbol_list_printer_set now perform the translation, so don't do it
5707 here. Use gram_scanner_last_string_free where possible.
5708 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5709 translate_code): Remove, no longer used.
5710 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5711 symbol_list_printer_set): Perform code translation here rather than
5712 depending on the caller to do so.
5713
5714 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5715 * src/scan-gram.h (gram_last_string): Remove declaration.
5716 * src/scan-gram.l (last_string): Declare it static.
5717
5718 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5719
5720 Encapsulate code properties and related functionality for the various
5721 destructors, printers, and actions into a code_props structure and
5722 interface. This patch merely implements code_props in scan-code.h and
5723 scan-code.l. Future patches will rewrite other modules to use it.
5724 Discussed starting at
5725 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5726 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5727 consistently initialize const structs that have an empty location
5728 field.
5729 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5730 to ensure consistency.
5731 * src/scan-code.h (code_props): New structure.
5732 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5733 function, macro, and const global variable for initializing a
5734 code_props with no code.
5735 (code_props_plain_init, code_props_symbol_action_init,
5736 code_props_rule_action_init, code_props_translate_code): The rest of
5737 the new code_props functional interface. Among other things, the init
5738 functions set the code_props kind field so that
5739 code_props_translate_code will know whether to behave like
5740 translate_symbol_action, translate_rule_action, or translate_code.
5741 These old translate functions must remain until all other modules are
5742 updated to use the new code_props interface.
5743 (code_scanner_last_string_free): New function similar to
5744 gram_scanner_last_string_free.
5745 (code_scanner_free): Add documentation.
5746 * src/scan-code.l: Implement the new interface.
5747 (code_lex): Make it static, add a code_props* argument, and remove the
5748 rule argument.
5749 (last_string): New static global similar to the one in scan-gram.l.
5750 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5751 instead of rule.
5752 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5753 code_props since Bison may one day use this information for destructors
5754 and printers.
5755 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5756 (handle_action_dollar): Use symbol_list_n_get and set used flag
5757 directly since symbol_list_n_used_set is removed.
5758 (translate_action): Add a code_props* argument and remove the rule,
5759 action, and location arguments. Pass the code_props* on to code_lex.
5760 (translate_rule_action, translate_symbol_action, translate_code):
5761 Rewrite as wrappers around the new code_props interface.
5762 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5763 it would eventually need to break the encapsulation of code_props.
5764
5765 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5766
5767 * etc/.cvsignore: New.
5768
5769 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5770
5771 Add maintainer-push-check to run maintainer-check using push parsing in
5772 place of pull parsing where available.
5773 * Makefile.am (maintainer-push-check): New.
5774 * data/bison.m4 (b4_use_push_for_pull_if): New.
5775 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5776 appropriately based on their existing values.
5777 (yypush_parse): Don't print push-parser-specific diagnostics if push
5778 parsing is being used in place of pull parsing.
5779 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5780 push.c.
5781 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5782 variable, and insert b4_use_push_for_pull_flag into muscles.
5783 * tests/Makefile.am (maintainer-push-check): New.
5784
5785 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5786
5787 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5788 (whether successful or failed) so that yypush_parse can be invoked
5789 again to start a new parse using the same yypstate.
5790 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5791 check multiple yypull_parse invocations on the same yypstate. For pull
5792 mode, extend to check multiple yyparse invocations.
5793 (Exploding the Stack Size with Alloca): Extend to try with
5794 %push-pull-parser.
5795 (Exploding the Stack Size with Malloc): Likewise.
5796
5797 * tests/calc.at (Simple LALR Calculator): Don't specify
5798 %skeleton "push.c" since %push-pull-parser implies that now.
5799 * tests/headers.at (export YYLTYPE): Don't check for the push
5800 declarations. Otherwise, this test case can't be used to see if push
5801 mode can truly emulate pull mode.
5802 * tests/input.at (Torturing the Scanner): Likewise.
5803 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5804 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5805 AT_YACC_IF, which now includes the case of push mode since %skeleton
5806 need not be used for push mode. This will be more intuitive once
5807 push.c is renamed to yacc.c.
5808
5809 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5810
5811 For push mode, convert yyparse from a macro to a function, invoke yylex
5812 instead of passing a yylexp argument to yypull_parse, and don't
5813 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5814 Discussed starting at
5815 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5816 * data/bison.m4 (b4_pull_if): New.
5817 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5818 * data/push.c: Improve M4 quoting a little.
5819 (b4_generate_macro_args, b4_parenthesize): Remove.
5820 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5821 any time a pull parser is requested.
5822 Don't #define this as a wrapper around yypull_parse. Instead, when
5823 both push and pull are requested, make it a function that does that
5824 same thing.
5825 (yypull_parse): If there's a b4_prefix, #define this to
5826 b4_prefix[pull_parse] when both push and pull are requested.
5827 Don't define this as a function unless both push and pull are
5828 requested.
5829 Remove the yylexp argument and hard-code yylex invocation instead.
5830 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5831 %push-parser.
5832 * src/getargs.c (pull_parser): New global initialized to true.
5833 * getargs.h (pull_parser): extern it.
5834 * src/output.c (prepare): Insert pull_flag muscle.
5835 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5836 (prologue_declaration): Set both push_parser and pull_parser = true for
5837 %push-pull-parser. Set push_parser = true and pull_parser = false for
5838 %push-parser.
5839 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5840 %push-parser since there's no backward-compatibility concern here.
5841 Scan %push-pull-parser.
5842 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5843 instead of %push-parser.
5844 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5845 prototype it in the module that calls yyparse.
5846 * tests/input.at (Torturing the Scanner): Likewise.
5847 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5848
5849 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5850
5851 Update etc/bench.pl. Optimize push mode a little (the yyn change
5852 deserves most of the credit).
5853 * Makefile.am (SUBDIRS): Add etc subdirectory.
5854 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5855 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5856 yytoken, yyval, and yyloc declarations to...
5857 (yyparse or yypush_parse): ... here to improve performance. For
5858 yypush_parse invocations after the first, be sure to assign yyn its old
5859 value again.
5860 (yypstate_new): Don't bother initializing the yyresult field since the
5861 initial value isn't used.
5862 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5863 remove the #define that, in push mode, set it to yyps->NAME.
5864 * etc/Makefile.am: New.
5865 * etc/bench.pl: Remove and build it instead from...
5866 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5867 "tests/bison" from the build directory by default rather than just
5868 invoking "bison" from $PATH.
5869 (calc_grammar): Update push parser code: don't declare yylval globally,
5870 don't define yyparse_wrapper, and don't #define yyparse.
5871 (bench_grammar): Update to check all working combinations of yacc.c,
5872 push.c, impure, pure, pull, and push.
5873
5874 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5875
5876 For push mode, add pull wrappers around yypush_parse.
5877 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5878 (yypull_parse): New function wrapping yypush_parse.
5879 (yyparse): New #define wrapping yypull_parse.
5880 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5881 is declared.
5882 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5883 prototype yylex in the module that calls yyparse, and don't prototype
5884 yyparse there. Otherwise, the yyparse expansion won't compile.
5885 * tests/input.at (Torturing the Scanner): Likewise.
5886
5887 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5888
5889 Enable push parsers to operate in impure mode. Thus, %push-parser no
5890 longer implies %pure-parser. The point of this change is to move
5891 towards being able to test the push parser code by running the entire
5892 test suite as if %push-parser had been declared.
5893 * data/push.c (yypush_parse): For impure mode, remove the
5894 yypushed_char, yypushed_val, and yypushed_loc arguments.
5895 Instead, declare these as local variables initialized to the global
5896 yychar, yylval, and yylloc.
5897 For the first yypush_parse invocation only, restore the initial values
5898 of these global variables when it's time to read a token since they
5899 have been overwritten.
5900 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5901 %push-parser.
5902 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5903 %pure-parser along with %push-parser since this test case was designed
5904 for pure push parsers.
5905 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5906 (AT_YACC_OR_PUSH_IF): New.
5907 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5908 add a note that it's still wrong for some cases (as it has been for a
5909 while).
5910 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5911 %push-parser no longer implies %pure-parser.
5912
5913 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5914
5915 Remove some unnecessary differences between the pull parser code and
5916 the push parser code. This patch enables yynerrs in push mode.
5917 * data/push.c: Reformat M4 a little.
5918 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5919 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5920 because push mode is on. Instead, if pure mode is on, move yynerrs
5921 to...
5922 (b4_declare_parser_state_variables): ... here.
5923 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5924 to yyps->NAME so it can be used in yypush_parse.
5925 (yypush_parse): Don't omit uses of yynerrs in push mode.
5926
5927 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5928
5929 Fix bug such that the first pushed token's value and location are
5930 sometimes overwritten (sometimes by %initial-action) before being used.
5931 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5932 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5933 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5934 more closely mimic the pull parser logic.
5935 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5936 time to read a token, which is after any initialization of yylval and
5937 yylloc.
5938 (gottoken): Rename label to...
5939 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5940 user namespace.
5941
5942 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5943
5944 Rearrange initialization of the parser state variables so that the
5945 skeleton doesn't have to have a copy for pull mode and another for push
5946 mode. This patch also fixes at least a bug such that yylloc was not
5947 initialized (with b4_location_initial_line and
5948 b4_location_initial_column) upon calling yypush_parse. However, that
5949 initialization now overwrites the first token's location;
5950 %initial-action assigning @$ already did the same thing, and both bugs
5951 will be fixed in a later patch.
5952 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5953 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5954 yyss, yyvs, yyls, and yystacksize.
5955 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5956 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5957 yylsp.
5958 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5959 yyps->NAME so it can be used in yypush_parse.
5960 (yyparse or yypush_parse): For yypush_parse, don't print the
5961 "Starting parse" diagnostic for invocations after the first.
5962 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5963 yypush_parse, only do it for the first invocation.
5964 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5965 initialization to occur in yypush_parse but only on the first
5966 invocation.
5967
5968 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5969
5970 * data/push.c: Add CPP guards around push parser declarations in both
5971 the header and the code file.
5972 In the code file, move the push parser declarations to the same place
5973 they appear in the header file.
5974 Clean up the M4 some, especially the inconsistent underquoting in
5975 some b4_c_function_def and b4_c_function_decl uses.
5976
5977 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5978
5979 Encapsulate the push parser state variables into an M4 macro so the
5980 push skeleton doesn't have to list them again for pull mode's yyparse.
5981 For push mode, remove yypush_parse's local equivalents of these
5982 variables to eliminate unnecessary copying between the two sets at
5983 run-time. This patch also fixes at least a bug related to multiple
5984 %initial-action invocations in push mode.
5985 * data/push.c (b4_declare_parser_variables): Rename to...
5986 (b4_declare_scanner_communication_variables): ... this for clarity and
5987 update both uses.
5988 (b4_declare_yyparse_variables): Remove and move its contents to the one
5989 spot where it was invoked.
5990 (b4_declare_parser_state_variables): New macro containing the parser
5991 state variables required by push mode.
5992 (struct yypstate): Replace all fields but yynew with
5993 b4_declare_parser_state_variables.
5994 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5995 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5996 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5997 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5998 parser state variable declarations with
5999 b4_declare_parser_state_variables.
6000 Don't initialize parser state variables when calling yypush_parse since
6001 yypstate_new already does that.
6002 Invoke the user's initial action only upon the first yypush_parse
6003 invocation.
6004 Remove all code that copies between the local parser state variables
6005 and the yypstate.
6006
6007 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6008
6009 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6010 prevent a name collision in a future patch where these names will
6011 sometimes be #define'd.
6012 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6013 since it no longer has the same name as the existing argument.
6014 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6015
6016 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6017 and Joel E. Denny <jdenny@ces.clemson.edu>
6018
6019 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6020 that the argument is case-insensitive, and there's no `=' here.
6021 For the %skeleton entry, mention that %language is better.
6022 (Bison Options): Likewise for --language and --skeleton. Move the
6023 --skeleton entry so that the `Tuning the parser' section is sorted
6024 alphabetically on long options.
6025 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6026 %language directive in detail here; cross-reference the %language
6027 documentation instead.
6028 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6029 `%require "2.3b"' so that the example is always up-to-date.
6030 (Table of Symbols): Add entries for %language and %skeleton.
6031 * examples/extexi (normalize): Instead of replacing every %require
6032 argument with the current Bison version, just substitute for
6033 `@value{VERSION}'. This guarantees that we're testing what actually
6034 appears in the documentation.
6035 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6036 rather than `@VERSION@'.
6037
6038 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6039
6040 * NEWS: Reword the %language news a bit, and put it earlier.
6041
6042 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6043 Rewrite to simplify the logic.
6044 (language_argmatch): Likewise.
6045 (program_name): We now own this var.
6046 * src/getargs.h (struct bison_language): Use char[] rather than
6047 const char *.
6048
6049 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6050 Java is supported.
6051 * src/complain.c (program_name): Remove decl; no longer needed.
6052 * src/main.c (program_name): Remove; now belongs to getargs.
6053
6054 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6055
6056 * NEWS: Document %language.
6057
6058 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6059
6060 * data/c-skel.m4, data/c++-skel.m4: New files.
6061 * data/glr.c: Complain on push parsers.
6062
6063 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6064 over %skeleton.
6065 (Decl Summary): Document %language and %skeleton.
6066 (Command line): Document -L.
6067
6068 * examples/extexi: Rewrite %require directive.
6069 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6070
6071 * src/files.c (compute_exts_from_gc): Look in language structure
6072 for .y extension.
6073 (compute_file_name_parts): Check whether .tab should be added.
6074 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6075 (language, skeleton_arg, language_argmatch): New.
6076 (long_options): Add --language.
6077 (getargs): Use skeleton_arg, add -L/--language.
6078 * src/getargs.h: Include location.h.
6079 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6080 * src/output.c (prepare): Pick default skeleton from struct language.
6081 Don't dispatch C skeletons here.
6082 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6083 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6084 * src/scan-gram.l ("%language"): New rule.
6085
6086 * tests/calc.at: Test %skeleton and %language.
6087 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6088 (AT_GLR_IF): Look for %skeleton "glr.cc".
6089 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6090 (AT_YACC_IF): Reject %language.
6091
6092 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6093
6094 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6095 since it wasn't used; only the typedef name 'semantic_type' is needed.
6096 Also, omit trailing white space.
6097
6098 * bootstrap: Sync from coreutils.
6099 (gnulib_extra_files): Add build-aux/announce.gen.
6100 (slurp): Adjust .gitignore files like .cvsignore files.
6101 * build-aux/announce-gen: Remove from CVS, since bootstrap
6102 now creates this.
6103
6104 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6105
6106 Make %push-parser imply %pure-parser. This fixes several bugs; see
6107 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6108 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6109 pure_parser = true.
6110 * data/push.c: Don't bother testing b4_push_if when deciding whether
6111 to expand b4_declare_parser_variables globally.
6112 (yypush_parse): Likewise in here.
6113
6114 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6115 (yy_reduce_print): Reformat M4 for readability.
6116
6117 2006-12-15 Bob Rossi <bob@brasko.net>
6118 and Joel Denny <jdenny@ces.clemson.edu>
6119
6120 * data/push.c (yypstate): Add typedef, and update all uses of
6121 struct yypstate to just yypstate.
6122 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6123
6124 2006-12-14 Bob Rossi <bob@brasko.net>
6125
6126 * data/push.c (yypush_parse): Declare prototype regardless of
6127 %locations option.
6128
6129 2006-12-14 Bob Rossi <bob@brasko.net>
6130
6131 * data/push.c (yyparse): Remove the prototype and the #define when in
6132 push-parser mode.
6133
6134 2006-12-13 Bob Rossi <bob@brasko.net>
6135
6136 * data/push.c (yypstate_init): Rename to...
6137 (yypstate_new): ... this and use b4_c_function_def.
6138 (yypstate_delete): New.
6139 (yypush_parse): Change parameters yynval and yynlloc to be const.
6140 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6141 yypstate_delete functions.
6142
6143 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6144
6145 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6146 strange test case titles. Reported by Bob Rossi.
6147
6148 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6149
6150 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6151 of potential ambiguities in GLR grammers.
6152
6153 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6154
6155 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6156 `bison ', use m4_index instead of m4_substr since chopping up a string
6157 containing M4-special characters causes problems here.
6158
6159 Fix a couple of bugs related to special characters in user-specified
6160 file names, and make it easier for skeletons to compute output file
6161 names with the same file name prefix as Bison-computed output file
6162 names.
6163 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6164 b4_parser_file_name and b4_spec_defines_file instead of
6165 @output_parser_name@ and @output_header_name@, which are now redundant.
6166 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6167 b4_parser_file_name, b4_spec_defines_file, and the new
6168 @basename(FILENAME@) instead of @output_parser_name@ and
6169 @output_header_name@, which inappropriately escaped the file names as
6170 C string literals.
6171 * src/files.c (all_but_ext): Remove static qualifier.
6172 (compute_output_file_names): Move `free (all_but_ext)' to...
6173 (output_file_names_free): ... here since all_but_ext is needed later.
6174 * src/files.h (all_but_ext): Extern.
6175 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6176 exactly what MUSCLE_INSERT_STRING used to do.
6177 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6178 characters are escaped properly.
6179 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6180 all_but_ext.
6181 For pkgdatadir muscle, maintain previous functionality by using
6182 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6183 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6184 digraphs would never be expanded. Hopefully no one has M4-special
6185 characters in his Bison installation path.
6186 * src/scan-skel.l: Don't parse @output_header_name@ and
6187 @output_parser_name@ anymore since they're now redundant.
6188 In @output, use decode_at_digraphs.
6189 Parse a new @basename command that invokes last_component.
6190 (decode_at_digraphs): New.
6191 (BASE_QPUTS): Remove unused.
6192 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6193 (Output file name): New tests.
6194
6195 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6196
6197 Warn about output files that are generated by the skeletons and that
6198 conflict with other output files.
6199 * data/glr.c: Don't generate the header file here when glr.cc does.
6200 * src/files.c (file_names, file_names_count): New static globals.
6201 (compute_output_file_names): Invoke output_file_name_check for files
6202 not generated by the skeletons and remove existing checks.
6203 (output_file_name_check): New function that warns about conflicting
6204 output file names.
6205 (output_file_names_free): Free file_names.
6206 * src/files.h (output_file_name_check): Declare.
6207 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6208 the skeletons.
6209 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6210 (Conflicting output files): New tests.
6211
6212 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6213
6214 * doc/bison.texinfo: Fix a couple of typos.
6215
6216 2006-12-08 Bob Rossi <bob@brasko.net>
6217
6218 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6219 Rename to...
6220 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6221 update all uses.
6222 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6223 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6224 local pv.
6225 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6226 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6227
6228 2006-12-07 Bob Rossi <bob@brasko.net>
6229 and Joel Denny <jdenny@ces.clemson.edu>
6230
6231 * data/push.c (yypvarsinit): Change return type from void* to struct
6232 yypvars*. No longer cast to void* on return.
6233 (struct yypvars): Remove yylen since it need not be remembered between
6234 yypushparse invocations.
6235 (yypushparse): Don't copy between yylen and pv->yylen.
6236
6237 2006-12-05 Bob Rossi <bob@brasko.net>
6238
6239 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6240 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6241 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6242 (struct yypvars): Remove b4_declare_parser_variables.
6243 (yypvarsinit): Remove init code for removed variables.
6244 (global scope): Do not declare b4_declare_parser_variables if
6245 push or pure mode.
6246 (yypushparse): Add b4_declare_parser_variables.
6247 Init new local variables, and remove init code for removed
6248 yypvars variables.
6249 (yyparse): Delete.
6250 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6251 and yyparse for other modes.
6252 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6253 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6254 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6255 (AT_PURE_LEX_IF): True if pure or push parser.
6256
6257 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6258
6259 Document Yacc prologue alternatives and default %destructor's and
6260 %printer's as experimental. Don't mention Java yet. Discussed at
6261 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6262 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6263 (2.3a): Annotate this entry to say the old forms of these features were
6264 also experimental.
6265 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6266 Table of Symbols): Say they're experimental. Comment out any mention
6267 of Java (we'll want this back eventually).
6268
6269 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6270
6271 Support a file name argument to %defines. Deprecate `=' in
6272 %file-prefix, %name-prefix, and %output. Discussed at
6273 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6274 * NEWS (2.3a+): Mention.
6275 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6276 form of %defines, and remove `=' from entries for %file-prefix,
6277 %name-prefix, and %output.
6278 * src/parse-gram.y (prologue_declaration): Implement.
6279 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6280 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6281 all but one occurrence of %name-prefix.
6282 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6283 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6284 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6285 occurrence of each of %file-prefix and %output. Add check for %defines
6286 with argument.
6287 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6288 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6289 Remove the `=' from %output.
6290
6291 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6292
6293 Don't escape $ in test case titles since Autoconf 2.61 now does that
6294 correctly.
6295 * tests/actions.at (Default %printer and %destructor are not for error
6296 or $undefined): Here.
6297 (Default %printer and %destructor are not for $accept): Here.
6298 * tests/input.at (Invalid $n and @n): Here.
6299
6300 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6301
6302 Rename <!> to <>. Discussed starting at
6303 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6304 * NEWS (2.3a+): Update.
6305 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6306 Update.
6307 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6308 * src/scan-gram.l (INITIAL): Implement.
6309 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6310 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6311 comment.
6312 * tests/actions.at (Default tagless %printer and %destructor,
6313 Default tagged and per-type %printer and %destructor,
6314 Default %printer and %destructor are not for error or $undefined,
6315 Default %printer and %destructor are not for $accept,
6316 Default %printer and %destructor for mid-rule values): Update.
6317 * tests/input.at (Default %printer and %destructor redeclared,
6318 Unused values with default %destructor): Update.
6319
6320 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6321
6322 Don't let %prec take a nonterminal.
6323 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6324 token.
6325 * tests/input.at (%prec takes a token): New test checking that %prec
6326 won't take a nonterminal.
6327
6328 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6329
6330 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6331 it was double-quoted.
6332 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6333 grammar is maintained with Bison's highest standards.
6334 * src/getargs.c: Fix some typos in Doxygen comments.
6335
6336 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6337
6338 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6339 later. Reported by Paul Eggert in
6340 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6341 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6342 * src/scan-code.l (translate_action): Don't bother invoking
6343 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6344 (code_scanner_free): Instead of invoking
6345 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6346 which frees more.
6347 * src/scan-gram.l (gram_scanner_free): Likewise.
6348 * src/scan-skel.l (scan_skel): Likewise.
6349
6350 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6351
6352 * src/files.c (tr): Change return type to void.
6353 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6354 has been called previously for the same key.
6355 (muscle_find): Return storage instead of value so that
6356 --enable-gcc-warnings doesn't produce warnings that the return discards
6357 const. aver that the value and storage are the same since storage
6358 could potentially be NULL when value is not.
6359 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6360 same as 0.
6361
6362 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6363
6364 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6365 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6366 us a slightly cleaner distribution, and also works.
6367 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6368 gnulib changes.
6369
6370 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6371 and Paul Eggert <eggert@cs.ucla.edu>
6372
6373 Don't let Bison leak memory except when it complains.
6374 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6375 (spec_defines_file, dir_prefix): Now char *, not const char *,
6376 since they are freed.
6377 * src/files.c: Likewise.
6378 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6379 Likewise.
6380 (tr): Now operates in-place. All uses changed.
6381 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6382 values.
6383 (compute_file_name_parts, compute_output_file_names): Don't store
6384 read-only data in variables that will be freed.
6385 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6386 src_extension, and header_extension.
6387 (output_file_names_free): New public function to free
6388 spec_verbose_file, spec_graph_file, spec_defines_file,
6389 parser_file_name, and dir_prefix.
6390 * src/getargs.c (getargs): Don't store read-only data in variables that
6391 will be freed.
6392 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6393 (which previously existed but was unused), and quotearg_free.
6394 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6395 * src/muscle_tab.c: Likewise.
6396 (muscle_entry): Make the value char const *,
6397 and add a new storage member that is char * and can be freed.
6398 (muscle_entry_free): New private function.
6399 (muscle_init): Use it instead of free.
6400 (muscle_insert, muscle_grow): Update and use new storage member.
6401 (muscle_code_grow): Free the string passed to muscle_grow
6402 since it's not needed anymore.
6403 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6404 add a new `char *code' member.
6405 ("{...}"): Declare semantic type as code.
6406 * src/scan-code.h (translate_rule_action):
6407 (translate_symbol_action, translate_code, translate_action): Return
6408 `char const *' rather than `char *' since external code should not free
6409 these strings.
6410 * src/scan-code.l: Likewise.
6411 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6412 which is "{...}" in the parser.
6413 * tests/Makefile.am (maintainer-check-valgrind): Set
6414 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6415 Valgrind.
6416 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6417 complain.
6418 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6419 expecting a non-zero exit status sets --leak-check=summary and
6420 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6421 this case, and we don't want to hear about it.
6422
6423 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6424
6425 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6426 instead of from the template, to simplify configuration a bit.
6427 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6428 and m4/wint_t.m4, as they are needed with the latest gnulib.
6429
6430 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6431
6432 Disable unset/unused mid-rule value warnings by default, and recognize
6433 --warnings=midrule-values to enable them. Discussed starting at
6434 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6435 * NEWS (2.3a+): Mention.
6436 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6437 warnings): Add entry for midrule-values subargument.
6438 * src/reader.c (symbol_should_be_used): Don't return true just because
6439 the value is a set/used mid-rule value unless
6440 --warnings=midrule-values was specified.
6441 * tests/input.at (Unused values, Unused values before symbol
6442 declarations): Run tests with and without --warnings=midrule-values.
6443
6444 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6445 than LIST_FREE directly.
6446
6447 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6448
6449 Finish implementing --warnings=error, which should not be implied by
6450 --warnings=all (or by its synonyms -W and --warnings without
6451 subarguments).
6452 * src/complain.c (set_warning_issued): New function to report that
6453 warnings are being treated as errors and to record an error if so.
6454 Invoke...
6455 (warn_at, warn): ... here.
6456 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6457 "error - warnings are errors" does not appear above "all - all of the
6458 above".
6459 (getargs): For -W and --warnings without subarguments, don't let
6460 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6461 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6462
6463 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6464
6465 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6466 empty subargument list. For example: `bison --warnings= parser.y'.
6467
6468 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6469
6470 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6471 the parser header file so that gcc doesn't warn.
6472
6473 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6474
6475 Split the default %destructor/%printer into two kinds: <*> and <!>.
6476 Discussed starting at
6477 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6478 * NEWS (2.3a+): Mention.
6479 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6480 previous change today related to mid-rules.
6481 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6482 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6483 (TYPE_TAG_ANY): Add as <*>.
6484 (TYPE_TAG_NONE): Add as <!>.
6485 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6486 for <*> and <!>.
6487 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6488 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6489 * src/symlist.c (symbol_list_default_new): Split into tagged and
6490 tagless versions.
6491 (symbol_list_destructor_set, symbol_list_printer_set): Split
6492 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6493 SYMLIST_DEFAULT_TAGLESS.
6494 * src/symlist.h: Update symbol_list_default*_new prototypes.
6495 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6496 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6497 * src/symtab.c (default_destructor, default_destructor_location,
6498 default_printer, default_printer_location): Split each into tagged and
6499 tagless versions.
6500 (symbol_destructor_get, symbol_destructor_location_get,
6501 symbol_printer_get, symbol_printer_location_get): Implement tagged
6502 default and tagless default cases.
6503 (default_destructor_set, default_printer_set): Split each into tagged
6504 and tagless versions.
6505 * src/symtab.h: Update prototypes.
6506 * tests/actions.at (Default %printer and %destructor): Rename to...
6507 (Default tagless %printer and %destructor): ... this, and extend.
6508 (Per-type %printer and %destructor): Rename to...
6509 (Default tagged and per-type %printer and %destructor): ... this, and
6510 extend.
6511 (Default %printer and %destructor for user-defined end token): Extend.
6512 (Default %printer and %destructor are not for error or $undefined):
6513 Update.
6514 (Default %printer and %destructor are not for $accept): Update.
6515 (Default %printer and %destructor for mid-rule values): Extend.
6516 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6517 (Unused values with default %destructor): Extend.
6518
6519 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6520
6521 Don't apply the default %destructor/%printer to an unreferenced midrule
6522 value. Mentioned at
6523 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6524 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6525 like $@n instead of just @n so that the default %destructor/%printer
6526 logic doesn't see them as user-defined symbols.
6527 (symbol_is_dummy): Check for both forms of the name.
6528 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6529 name for which the midrule value is referenced in any action.
6530 * tests/actions.at (Default %printer and %destructor for mid-rule
6531 values): New test.
6532 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6533 for change to dummy symbol names.
6534
6535 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6536
6537 Warn about unset midrule $$ if the corresponding $n is used.
6538 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6539 $n usage.
6540 (packgram): Before invoking grammar_rule_check on any rule, make sure
6541 all actions have already been scanned in order to set `used' flags.
6542 Otherwise, checking that a midrule's $$ is set will not always work
6543 properly because the midrule check must forward-reference the midrule's
6544 parent rule.
6545 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6546 warning.
6547
6548 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6549
6550 More improvements to the documentation of the prologue alternatives:
6551 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6552 Bison manual.
6553 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6554 some text to clarify the relative importance of the new directives and
6555 to show how these directives may be viewed as code labels.
6556
6557 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6558
6559 Similar to the recently removed %before-header, add %code-top as the
6560 alternative to the pre-prologue. Mentioned at
6561 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6562 Also, let the prologue alternatives appear in the grammar section.
6563 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6564 (prologue_declaration): Move the existing prologue alternatives to...
6565 (grammar_declaration): ... here and add %code-top.
6566 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6567
6568 Clean up and extend documentation for the prologue alternatives.
6569 * NEWS (2.3a+): Describe prologue alternatives.
6570 * doc/bison.texinfo (Prologue): Move discussion of prologue
6571 alternatives to...
6572 (Prologue Alternatives): ... this new section, and extend it to discuss
6573 all 4 directives in detail.
6574 (Table of Symbols): Clean up discussion of prologue alternatives and
6575 add %code-top.
6576
6577 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6578
6579 DJGPP specific issues.
6580
6581 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6582 config.bat accordingly.
6583 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6584 * djgpp/config.site: Likewise.
6585
6586 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6587
6588 Replace %*-header with %provides, %requires, %code. See discussion at
6589 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6590
6591 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6592 (b4_user_start_header): Remove.
6593 * data/glr.c: Use new macros instead of b4_*start_header
6594 and b4_*end_header.
6595 * data/glr.cc: Likewise.
6596 * data/lalr1.cc: Likewise.
6597 * data/push.c: Likewise.
6598 * data/yacc.c: Likewise.
6599
6600 * doc/bison.texinfo: Remove %before-header, rename
6601 %{start,end,after}-header to %requires, %provides, %code.
6602
6603 * src/parse-gram.y: Likewise (also rename token names accordingly).
6604 * src/scan-gram.l: Likewise.
6605 * tests/actions.at: Likewise.
6606
6607 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6608
6609 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6610 Problem reported by Joel E. Denny.
6611
6612 2006-10-14 Jim Meyering <jim@meyering.net>
6613
6614 (Sync from coreutils.)
6615 Work also when the working directory (with e.g. coreutils sources)
6616 is version controlled with git, rather than CVS.
6617 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6618 rather than CVS.
6619 In messages and comments, say e.g., "checked-out sources",
6620 rather than "CVS sources".
6621 (version_controlled_file): New function. Work for git as well as
6622 for CVS. Don't use grep's -q option.
6623 (slurp): Call it here, in place of CVS-specific code.
6624
6625 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6626
6627 Fix testsuite for ./configure --enable-gcc-warnings:
6628 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6629 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6630 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6631 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6632 * test/regression.at (Diagnostic that expects two alternatives):
6633 Likewise.
6634
6635 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6636
6637 * bootstrap.conf (gnulib_modules): Add config-h.
6638 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6639 worry about HAVE_CONFIG_H.
6640 * lib/abitset.c: Likewise.
6641 * lib/bitset.c: Likewise.
6642 * lib/bitset_stats.c: Likewise.
6643 * lib/bitsetv-print.c: Likewise.
6644 * lib/bitsetv.c: Likewise.
6645 * lib/ebitset.c: Likewise.
6646 * lib/get-errno.c: Likewise.
6647 * lib/lbitset.c: Likewise.
6648 * lib/subpipe.c: Likewise.
6649 * lib/timevar.c: Likewise.
6650 * lib/vbitset.c: Likewise.
6651 * lib/bitset.c: Include "bitset.h" first, to test interface.
6652 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6653 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6654 * lib/bitsetv.c: Include "bitsetv.h" first.
6655 * lib/get-errno.c: Include "get-errno.h" first.
6656 * m4/.cvsignore: Add config-h.m4.
6657 * tests/actions.at (Default %printer and %destructor for ...):
6658 Adjust expected line numbers in output to reflect removal of #if
6659 HAVE_CONFIG_H lines.
6660 * tests/glr-regression.at (Missed %merge type warnings when ...):
6661 Likewise.
6662 * tests/regression.at (Braced code in declaration in rules section):
6663 Likewise.
6664 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6665 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6666 Include <config.h> unconditionally.
6667
6668 * bootstrap: Sync from coreutils, as follows:
6669
6670 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6671
6672 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6673 variable was sometimes used without being initialized. This
6674 messed up the installation of the INSTALL file in some cases.
6675
6676 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6677
6678 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6679 --copy. Inspired by a suggestion from Bruno Haible.
6680
6681 2006-10-03 Jim Meyering <jim@meyering.net>
6682
6683 * bootstrap: Undo last change to this file, since now gnulib-tool
6684 sticks with the automake default in generating dependencies.
6685
6686 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6687
6688 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6689 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6690
6691 * doc/bison.1: Add copyright notice.
6692
6693 * data/glr.c: Don't include <stdarg.h>; not used.
6694
6695 * NEWS: The -g and --graph options now output graphs in Graphviz
6696 DOT format, not VCG format.
6697 * doc/bison.1: Likewise.
6698 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6699 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6700 of this change in
6701 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6702 * TODO: Remove Graphviz entry.
6703 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6704 remove vcg.c, vcg.h, vcg_defaults.h.
6705 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6706 * src/graphviz.c, src/graphviz.h: New files.
6707 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6708 * src/files.h: Make comment more generic.
6709 * src/main.c (main): Likewise.
6710 * src/print_graph.h: Likewise.
6711 * src/getargs.c (usage): Make usage description more generic.
6712 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6713 (static_graph, fgraph): Remove. All uses changed to pass
6714 arguments instead of sharing a static var.
6715 (print_core, print_actions, print_state, print_graph):
6716 Output graphviz format rather than VCG format.
6717 * tests/.cvsignore: Remove *.vcg; add *.dot.
6718 * tests/output.at: Expect *.dot files, not *.vcg files.
6719
6720 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6721 accommodates the 2006-10-08 change.
6722
6723 2006-10-11 Bob Rossi <bob@brasko.net>
6724
6725 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6726 (b4_yyssa, b4_yyerror_range): New macros.
6727 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6728 (yypvarsinit): Remove init of removed fields.
6729 (yypushparse): Remove use of removed fields; use new macros instead.
6730
6731 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6732
6733 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6734 in a push parser. Reindent slightly to match yacc.c better.
6735
6736 2006-10-11 Bob Rossi <bob@brasko.net>
6737
6738 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6739 yymsg_alloc fields.
6740 (yypvarsinit, yypushparse): Remove init of removed fields.
6741 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6742
6743 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6744
6745 * THANKS: Add Paolo Bonzini and Bob Rossi.
6746
6747 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6748
6749 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6750 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6751 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6752 b4_define_user_cde and uses): Remove.
6753 (b4_comment, b4_prefix, b4_sync_start): New.
6754 * data/bison.m4: New file, with most of the content removed from c.m4.
6755 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6756 * src/output.c (output_skeleton): Pass bison.m4.
6757 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6758 only if specified.
6759
6760 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6761
6762 Fix test failure reported by Tom Lane in
6763 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6764 and try to make such failures easier to catch in the future.
6765 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6766 that's now the caller's responsibility.
6767 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6768 Set yychar = YYEOF if it's negative.
6769 * tests/actions.at (yylex): Abort if asked to read past EOF.
6770 * tests/conflicts.at (yylex): Likewise.
6771 * tests/cxx-type.at (yylex): Likewise.
6772 * tests/glr-regression.at (yylex): Likewise.
6773 * tests/input.at (yylex): Likewise.
6774 * tests/regression.at (yylex): Likewise.
6775 * tests/torture.at (yylex): Likewise.
6776
6777 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6778
6779 Fix problems with translating English-language diagnostics.
6780 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6781 respect to bison-runtime pot generation. The YY_ stuff
6782 wasn't being captured.
6783 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6784 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6785 * runtime-po/POTFILES.in: Add data/push.c.
6786
6787 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6788
6789 Merge bootstrap changes from coreutils.
6790
6791 2006-09-28 Jim Meyering <jim@meyering.net>
6792
6793 Automatically generated dependencies are important even
6794 when all of the sources in a directory come from gnulib.
6795 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6796 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6797
6798 2006-09-23 Jim Meyering <jim@meyering.net>
6799
6800 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6801
6802 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6803
6804 * bootstrap: Add support for --force.
6805 (usage): New function. Describe usage less tersely.
6806 (CVS_only_file): New var.
6807
6808 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6809
6810 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6811 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6812 Adjust white space and comments to match GNU style better.
6813
6814 2006-09-20 Bob Rossi <bob@brasko.net>
6815
6816 * data/push.c (yyresult_get): Remove function.
6817 (YYPUSH_MORE): Add #define.
6818 (yypushparse): Modify return value.
6819
6820 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6821
6822 * stamp-h.in: Remove; no longer needed.
6823 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6824 Remove config.h, config.hin, intl (no longer created).
6825 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6826 stamp-h1.
6827
6828 Sync bootstrap from coreutils, as follows:
6829
6830 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6831
6832 * bootstrap (symlink_to_gnulib): New function.
6833 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6834 to copies-of-gnulib.
6835 (cp_mark_as_generated, slurp, gnulib_files):
6836 Avoid making a copy if it's the same as the old version.
6837 (gnulib_files): Add support for this variable (used by Bison).
6838
6839 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6840
6841 * src/getargs.c (usage): Rework to use conventions similar to
6842 coreutils, to make translation a bit easier and the code a bit
6843 smaller. Problem reported by Tim Van Holder.
6844
6845 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6846
6847 Use some of gnulib's new modules, taken from coreutils.
6848
6849 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6850 * bootstrap.conf: New file.
6851 (gnulib_modules): Add configmake, inttypes, unistd.
6852 (XGETTEXT_OPTIONS): Add complain, complain_at,
6853 fatal, fatal_at, warn, warn_at, unexpected_end.
6854 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6855 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6856 (gl_EARLY): Add.
6857 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6858 (gl_INIT): Add
6859 (GNULIB_AUTOCONF_SNIPPET): Remove.
6860 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6861 the pickiest.
6862 * lib/.cvsignore: Add inttypes_.h.
6863 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6864 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6865 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6866 no-longer-necessary initializations.
6867 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6868 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6869 use the unistd module.
6870 * src/system.h: Likewise.
6871 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6872 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6873 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6874 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6875 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6876 * src/system.h: Include inttypes.h unconditionally, now that we
6877 use the inttypes module. Don't bother to include stdint.h, since
6878 inttypes.h now does that for us.
6879 (LOCALEDIR): Remove, now that we use the configmake module.
6880 * src/getargs.c: Include configmake.h.
6881 * src/main.c: Likewise.
6882 * src/output.c: Likewise.
6883 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6884 not from $abs_top_builddir, since config.h moved.
6885
6886
6887 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6888 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6889
6890 * src/parse-gram.y (symbol_declaration): Don't put statements
6891 before declarations; it's not portable to C89.
6892 * src/scan-code.l (handle_action_at): Likewise.
6893
6894 * src/scan-code.l: Always initialize braces_level; the old code
6895 left it uninitialized and therefore had undefined behavior.
6896
6897 Don't attempt to redefine 'assert', since it runs afoul of
6898 systems where standard headers (mistakenly) include <assert.h>.
6899 Instead, define and use our own alternative, called 'aver'.
6900 * src/reader.c: Don't include assert.h, since we no longer
6901 use assert.
6902 * src/scan-code.l: Likewise.
6903 * src/system.h (assert): Remove, replacing with....
6904 (aver): New function, taking a bool arg. All uses changed.
6905 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6906 not merely an integer.
6907
6908 2006-09-15 Bob Rossi <bob@brasko.net>
6909
6910 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6911 * data/c.m4 (YYPUSH): New.
6912 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6913 * src/getargs.c (push_parser): New var.
6914 * src/getargs.h (push_parser): New declaration.
6915 * src/output.c (prepare): Add macro insertion of `push_flag'.
6916 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6917 (prologue_declaration): Parse %push-parser.
6918 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6919 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6920 list of removed lines from the traces observed.
6921 (AT_CHECK_CALC_LALR): Added push parser tests.
6922
6923 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6924
6925 * NEWS: Version 2.3a.
6926 * configure.ac (AC_INIT): Likewise.
6927
6928 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6929 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6930 due to header ordering dependencies. I don't know why the #define
6931 was there.
6932
6933 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6934 runtime cost when YYDEBUG is not defined, and so that some tests
6935 that used to fail now work. Problem and initial suggestion by
6936 Paolo Bonzini.
6937 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6938 * data/glr.cc (b4_parser_class_name):
6939 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6940 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6941 (yydebug_) [YYDEBUG]: New member.
6942 (yycdebug_): Now defined only if YYDEBUG.
6943 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6944 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6945 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6946 if YYYDEBUG.
6947 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6948 Define only if YYDEBUG.
6949 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6950 set_debug_level.
6951 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6952 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6953 AT_CHECK_CALC_GLR_CC that are working now.
6954
6955 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6956
6957 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6958 We don't need them in glr.cc, and glr.c defines them.
6959 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6960 assumes that defining it to anything is the same as defining
6961 it to 1. Problem reported by Paolo Bonzini.
6962
6963 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6964
6965 * data/c.m4 (b4_null, b4_case): Define.
6966 * src/output.c (prepare_symbols): Use b4_null.
6967 (user_actions_output): Use b4_case.
6968
6969 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6970
6971 * data/glr.c (b4_shared_declarations): Put start-header first,
6972 before any #includes that we generate, so that feature-test
6973 macros work. Problem reported by Michael Deutschmann in
6974 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6975 * data/lalr1.cc: Likewise.
6976 * doc/bison.texinfo (Prologue): Document that feature-test macros
6977 should be defined before any Bison declarations.
6978 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6979 that depend on location.hh after, not before, Bison decls, since
6980 we now include location.hh after the first user prologue.
6981
6982 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6983 Sander Brandenburg in
6984 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6985 Also, fix minor white space and comment issues.
6986 (Prologue): Mention that it's better to define feature-test macros
6987 before Bison declarations. Problem reported by Michael Deutschmann.
6988
6989 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6990 by Jim Meyering.
6991 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6992 This adjusts to recent gnulib changes.
6993
6994 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6995
6996 Finish implementation of per-type %destructor/%printer. Discussed
6997 starting at
6998 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6999 and
7000 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7001 * NEWS (2.3+): Add a description of this feature to the default
7002 %destructor/%printer description.
7003 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7004 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7005 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7006 list node contains a semantic type.
7007 * src/symtab.c, src/symtab.h: Extend with a table that associates
7008 semantic types with their %destructor's and %printer's.
7009 (semantic_type_from_uniqstr, semantic_type_get,
7010 semantic_type_destructor_set, semantic_type_printer_set): New functions
7011 composing the public interface of that table.
7012 (symbol_destructor_get, symbol_destructor_location_get,
7013 symbol_printer_get, symbol_printer_location_get): If there's no
7014 per-symbol %destructor/%printer, look up the per-type before trying
7015 the default.
7016 * tests/actions.at (Per-type %printer and %destructor): New test case.
7017 * tests/input.at (Default %printer and %destructor redeclared):
7018 Extend to check that multiple occurrences of %symbol-default in a
7019 single %destructor/%printer declaration is an error.
7020 (Per-type %printer and %destructor redeclared, Unused values with
7021 per-type %destructor): New test cases.
7022
7023 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7024
7025 Require default %destructor/%printer to be declared using
7026 %symbol-default instead of an empty symbol list, and start working on
7027 new per-type %destructor/%printer. Discussed at
7028 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7029 * NEWS (2.3+): Add %symbol-default to example.
7030 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7031 (Table of Symbols): Add entry for %symbol-default.
7032 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7033 (generic_symlist, generic_symlist_item): New nonterminals for creating
7034 a list in which each item is a symbol, semantic type, or
7035 %symbol-default.
7036 (grammar_declaration): Use generic_symlist in %destructor and %printer
7037 declarations instead of symbols.1 or an empty list.
7038 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7039 for changes to symbol_list.
7040 * src/reader.c: Update for changes to symbol_list.
7041 * src/scan-code.l: Likewise.
7042 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7043 * src/symlist.c, src/symlist.h: Extend such that a list node may
7044 represent a semantic type or a %symbol-default in addition to just an
7045 ordinary symbol. Add switched functions for setting %destructor's and
7046 %printer's.
7047 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7048 %destructor/%printer declarations.
7049
7050 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7051
7052 Whether the default %destructor/%printer applies to a particular symbol
7053 isn't a question of whether the user *declares* that symbol (in %token,
7054 for example). It's a question of whether the user by any means
7055 *defines* the symbol at all (by simply using a char token, for
7056 example). $end is defined by Bison whereas any other token with token
7057 number 0 is defined by the user. The error token is always defined by
7058 Bison regardless of whether the user declares it with %token, but we
7059 may one day let the user define error as a nonterminal instead.
7060 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7061 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7062 the meaning of "user-defined".
7063 * tests/actions.at (Default %printer and %destructor for user-declared
7064 end token): Rename to...
7065 (Default %printer and %destructor for user-defined end token): ...
7066 this.
7067
7068 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7069 computation of whether to apply the default, don't maintain a list of
7070 every Bison-defined symbol. Instead, just check for a first character
7071 of '$', which a user symbol cannot have, and check for the error token.
7072
7073 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7074
7075 Don't apply the default %destructor or %printer to the error token,
7076 $undefined, or $accept. This change fits the general rule that the
7077 default %destructor and %printer are only for user-declared symbols,
7078 and it solves several difficulties that are described in the new test
7079 cases listed below.
7080 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7081 * tests/actions.at (Default %printer and %destructor are not for error
7082 or $undefined, Default %printer and %destructor are not for $accept):
7083 New test cases.
7084
7085 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7086
7087 Allow %start after the first rule.
7088 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7089 when parsing the first rule.
7090 (check_and_convert_grammar): Search for it here after all grammar
7091 declarations have been parsed. Skip midrules, which have dummy LHS
7092 nonterminals.
7093 * src/symtab.c (symbol_is_dummy): New function.
7094 * src/symtab.h (symbol_is_dummy): Declare it.
7095 * tests/input.at (%start after first rule): New test.
7096
7097 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7098
7099 Redo some of the previous commit: add back the ability to use
7100 non-aliased/undeclared string literals since it might be useful to
7101 those declaring %token-table.
7102 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7103 commit: don't worry about complaints from symbols_pack.
7104 * src/symtab.c (symbol_new, symbol_class_set,
7105 symbol_check_alias_consistency): Undo changes in previous commit: count
7106 each string literal as a new symbol and token, assign it a symbol
7107 number, and don't complain about non-aliased string literals.
7108 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7109 and token counts but does still set aliased tokens to the same number,
7110 symbol_pack_processor now leaves empty slots in the symbols array.
7111 Remove those slots.
7112 * tests/regression.at (Undeclared string literal): Remove test case
7113 added in previous commit since non-aliased string literals are allowed
7114 again.
7115 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7116 remove unnecessary string literal declarations.
7117 * tests/sets.at (Firsts): Likewise.
7118
7119 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7120
7121 Don't allow an undeclared string literal, but allow a string literal to
7122 be used before its declaration.
7123 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7124 symbols_pack complained.
7125 * src/symtab.c (symbol_new): Don't count a string literal as a new
7126 symbol.
7127 (symbol_class_set): Don't count a string literal as a new token, and
7128 don't assign it a symbol number since symbol_make_alias does that.
7129 (symbol_make_alias): It's not necessary to decrement the symbol and
7130 token counts anymore. Don't assume that an alias declaration occurs
7131 before any uses of the identifier or string, and thus don't assert that
7132 one of them has the highest symbol number so far.
7133 (symbol_check_alias_consistency): Complain if there's a string literal
7134 that wasn't declared as an alias.
7135 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7136 symbol_pack asserts that every token has been assigned a symbol number
7137 although undeclared string literals have not.
7138 * tests/regression.at (String alias declared after use, Undeclared
7139 string literal): New test cases.
7140 (Characters Escapes, Web2c Actions): Declare string literals as
7141 aliases.
7142 * tests/sets.at (Firsts): Likewise.
7143
7144 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7145
7146 In the grammar scanner, STRING_FINISH unclosed constructs and return
7147 them to the parser in order to improve error messages.
7148 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7149 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7150 * tests/input.at (Unclosed constructs): New test case.
7151 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7152 seen.
7153
7154 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7155 unused global.
7156
7157 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7158
7159 Handle string aliases for character tokens correctly.
7160 * src/symtab.c (symbol_user_token_number_set): If the token has an
7161 alias, check and set its alias's user token number instead of its own,
7162 which is set to indicate the alias. Previously, every occurrence of
7163 the character token in the grammar overwrote that alias indicator with
7164 the character code.
7165 * tests/input.at (String aliases for character tokens): New test.
7166
7167 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7168
7169 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7170
7171 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7172
7173 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7174 to prevent failures when building on older platforms.
7175 Check for autopoint failure.
7176 Set XGETTEXT_OPTIONS to values that check for C format strings,
7177 so that translators are warned about them (this also helps
7178 prevent core dumps).
7179
7180 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7181 function, since it simplifies our code a bit.
7182
7183 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7184 rather than -W, so we don't get bogus warnings about sign comparisons.
7185 Add -Wpointer-arith, since that warning is useful (it reports code
7186 that does not conform to C89 and that some compilers reject).
7187 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7188 since it's no longer needed.
7189
7190 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7191
7192 Clean up scanners a bit.
7193 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7194 definitions so gcc won't warn when obstack_for_string is unused.
7195 * src/scan-code.l: config.h and system.h are already #include'd by
7196 scan-code-c.c, so get rid of them here.
7197 * src/scan-gram.l: Likewise.
7198 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7199 definitions rather than duplicating the rest of it.
7200 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7201
7202 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7203
7204 Suppress signed/unsigned comparison warnings for yycheck.
7205 * data/c.m4 (b4_safest_int_type): New macro.
7206 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7207 a signed int type, cast it to b4_safest_int_type first.
7208 * data/yacc.c: Likewise.
7209 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7210 also overwritten.
7211
7212 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7213
7214 * doc/bison.texinfo: Fix some typos.
7215
7216 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7217
7218 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7219 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7220
7221 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7222 the latest gnulib does this a different way.
7223 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7224 translation was patched, so stop omitting it.
7225
7226 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7227
7228 Enable declaration of default %printer/%destructor. Make the parser
7229 use these for all user-declared grammar symbols for which the user does
7230 not declare a specific %printer/%destructor. Thus, the parser uses it
7231 for token 0 if the user declares it but not if Bison generates it as
7232 $end. Discussed starting at
7233 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7234 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7235 and
7236 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7237 * NEWS (2.3+): Mention.
7238 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7239 declare a %destructor for a mid-rule's semantic value. It's just
7240 impossible to declare one specific to it.
7241 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7242 code. Describe default %destructor form.
7243 * src/parse-gram.y (grammar_declaration): Parse default
7244 %printer/%destructor declarations.
7245 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7246 and symbol_destructor_location_get rather than accessing the destructor
7247 and destructor_location members of struct symbol.
7248 (symbol_printers_output): Likewise but for %printer's.
7249 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7250 again.
7251 * src/symtab.c (default_destructor, default_destructor_location,
7252 default_printer, default_printer_location): New static global
7253 variables to record the default %destructor and %printer.
7254 (symbol_destructor_get, symbol_destructor_location_get,
7255 symbol_printer_get, symbol_printer_location_get): New functions to
7256 compute the appropriate %destructor and %printer for a symbol.
7257 (default_destructor_set, default_printer_set): New functions to set the
7258 default %destructor and %printer.
7259 * src/symtab.h: Prototype all those new functions.
7260 * tests/actions.at (Default %printer and %destructor): New test to
7261 check that the right %printer and %destructor are called, that they're
7262 not called for $end, and that $$ and @$ work correctly.
7263 (Default %printer and %destructor for user-declared end token): New
7264 test to check that the default %printer and %destructor are called for
7265 a user-declared end token.
7266 * tests/input.at (Default %printer and %destructor redeclared, Unused
7267 values with default %destructor): New tests to check related grammar
7268 warnings and errors.
7269
7270 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7271
7272 Clean up handling of %destructor for the end token (token 0).
7273 Discussed starting at
7274 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7275 and
7276 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7277
7278 Make the skeletons consistent in how they pop the end token and invoke
7279 its %destructor.
7280 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7281 state, which has token number 0, since this would invoke the
7282 %destructor for the end token.
7283 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7284 until after shifting the end token, or else it won't be popped.
7285 * data/yacc.c (yyparse): Likewise.
7286
7287 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7288 it's the end token. Upon termination, destroy an unshifted lookahead
7289 even when it's the end token.
7290 * data/lalr1.cc (yy::parser::parse): Likewise.
7291 * data/yacc.c (yyparse): Likewise.
7292
7293 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7294 value warnings for the end token when the user gives the end token a
7295 %destructor.
7296
7297 * tests/actions.at (Printers and Destructors): Test all the above.
7298
7299 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7300
7301 Update to latest gnulib and gettext versions.
7302 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7303 Add fopen-safer.
7304 (gnulib_files): Add m4/warning.m4. Don't worry about files
7305 overwritten by autopoint.
7306 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7307 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7308 rejects them.
7309 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7310 so that we can remove the intl files at a better time.
7311 (intl_files_to_remove): Remove aclocal.m4, since it gets
7312 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7313 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7314 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7315 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7316 Remove datarootdir hack; no longer needed.
7317 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7318 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7319 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7320 strdup.h.
7321 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7322 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7323
7324 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7325
7326 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7327 it with --assume-autoconf='latest-stable'.
7328
7329 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7330
7331 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7332 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7333 YYSTYPE' and `{'.
7334 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7335 those from muscle_tab.c since the old ones are misleading.
7336
7337 2006-07-13 Akim Demaille <akim@epita.fr>
7338
7339 Support %define "KEY" {VALUE}.
7340 * src/scan-code.h, src/scan-code.l (translate_action)
7341 (translate_rule_action, translate_symbol_action, translate_code):
7342 Return char *, not const char *.
7343 * src/parse-gram.y (declaration): Rename as...
7344 (prologue_declaration): this.
7345 (string_content): Remove this nonterminal, use STRING.
7346 (braceless, content, content.opt): New nonterminal.
7347 Use them.
7348 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7349 as value.
7350 * src/scan-gram.l (getargs.h): Don't include it.
7351
7352 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7353
7354 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7355 rather than a for-loop that declares a local bool variable. This
7356 should work around a compatibility problem with a Cray x1e C++
7357 compiler reported by Hung Nguyen in
7358 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7359 The for-loop was introduced in the 2004-11-17 change but I don't
7360 know why it was needed.
7361
7362 2006-07-12 Akim Demaille <akim@epita.fr>
7363
7364 * data/c.m4: Comment changes.
7365
7366 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7367
7368 * src/complain.c (error_message, ERROR_MESSAGE): New.
7369 To factor...
7370 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7371 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7372
7373 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7374
7375 * NEWS: Instead of %union, you can define and use your own union type
7376 YYSTYPE if your grammar contains at least one <type> tag.
7377 Your YYSTYPE need not be a macro; it can be a typedef.
7378 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7379 (Union Decl, Decl Summary): Document this.
7380 * data/glr.c (YYSTYPE): Implement this.
7381 * data/glr.cc (YYSTYPE): Likewise.
7382 * data/lalr1.cc (YYSTYPE): Likewise.
7383 * data/yacc.c (YYSTYPE): Likewise.
7384 * src/output.c (prepare): Output tag_seen_flag.
7385 * src/parse-gram.y (declaration, grammar_declaration):
7386 Use 'union_seen' rather than 'typed' to determine whether
7387 %union has been seen, since grammars can now be typed without
7388 %union.
7389 (symbol_declaration, type.opt, symbol_def):
7390 Keep track of whether a tag has been seen.
7391 * src/reader.c (union_seen, tag_seen): New vars.
7392 (typed): remove.
7393 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7394 * src/scan-code.l (untyped_var_seen): New variable.
7395 (handle_action_dollar): Adjust to above changes.
7396 (handle_action_dollar, handle_action_at):
7397 Improve overflow checking for outlandish numbers.
7398 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7399 avoid new diagnostics generated by above changes.
7400 * tests/regression.at (YYSTYPE typedef): Add test to check
7401 for type tags without %union.
7402
7403 * src/symlist.c (symbol_list_length): Return int, not unsigned
7404 int, since callers expect int. This may need to get revisited
7405 once we have proper integer overflow checking.
7406
7407 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7408 object is now static.
7409
7410 * src/getargs.c (flags_argmatch): Return void, not int,
7411 to pacify ./configure --enable-gcc-warnings.
7412
7413 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7414 since last_string is already defined to FLEX_PREFIX (last_string).
7415
7416 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7417
7418 Implement --warnings/-W.
7419 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7420 replaced by...
7421 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7422 Adjust callers.
7423 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7424 (warnings_args, warnings_types): New.
7425 (getargs, short_options, long_options): Accept -W/--warnings.
7426 Sort the options by alphabetical order, upper case letter right
7427 before its lower case.
7428
7429 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7430
7431 Change %merge result type clash warnings to errors. Discussed at
7432 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7433 * src/reader.c (record_merge_function_type): Use complain_at.
7434 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7435 declared later): Update test case results.
7436
7437 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7438
7439 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7440 to be in alphabetical order.
7441 (trace_args): Spelling fixes.
7442
7443 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7444
7445 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7446 so they don't collide with user-defined macros.
7447 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7448 this was never guaranteed, and now that we're using gnulib stdint,
7449 which defines int_fast16_t to long int, the problem is exposed.
7450
7451 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7452
7453 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7454 need the full POSIX semantics (and weren't implementing them
7455 anyway).
7456
7457 Adjust to Autoconf 2.60 and today's gnulib.
7458 * bootstrap (gnulib_modules): Add stdint.
7459 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7460 no longer copies it.
7461 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7462 since stdint needs the former and wcwidth (which is now required
7463 by mbswidth) needs the latter.
7464 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7465 work around a compatibility glitch between gettext 0.14.6 and
7466 Autoconf 2.60.
7467 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7468 Do not check for uintptr_t, since new stdint module does the right
7469 thing.
7470 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7471 Add stdint.h, stdint_.h, wcwidth.h.
7472 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7473 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7474 stdint.m4, wchar_t.m4, wcwidth.m4.
7475 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7476 usual order for ../lib/*.h files.
7477 (file_name_split): Use last_component, not base_name, to adjust
7478 to gnulib changes.
7479 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7480 for ../lib/*.h files.
7481 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7482 Define unconditionally, since we now assume the stdint module.
7483 * src/scan-skel.l: Include <dirname.h>.
7484 (BASE_QPUTS): Use last_component, not base_name.
7485 * src/system.h: Include <unlocked-io.h> in the usual order
7486 for ../lib/*.h files. Include <stdint.h> unconditionally,
7487 since we now use the stdint module.
7488 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7489 HAVE_UINTPTR_T, since we now use the stdint module.
7490 (base_name): Remove decl, since files now include <dirname.h>
7491 to get the decl.
7492
7493 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7494
7495 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7496 New, default to 1.
7497 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7498 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7499 default.
7500 * tests/calc.at: Adjust.
7501
7502 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7503
7504 * data/c.m4 (b4_basename): New.
7505 (b4_syncline): Also output the location of its invocation (from
7506 the skeleton).
7507 (b4_user_action, b4_define_user_action, b4_user_actions)
7508 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7509 (b4_user_stype): New.
7510 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7511
7512 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7513
7514 In the grammar file, the first column is 1 not 0 on the first line as
7515 on every other line.
7516 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7517 * tests/input.at (Torturing the Scanner): Update output.
7518
7519 * src/scan-gram.l (scanner_cursor): Declare it static.
7520
7521 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7522
7523 In warnings, say "previous declaration" rather than "first
7524 declaration".
7525 * src/symtab.c (redeclaration): Do that here.
7526 * src/reader.c (record_merge_function_type): In the case of a result
7527 type clash, report the previous declaration rather than the very first
7528 one in the grammar file.
7529 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7530 declared later): Add a third declaration to check this behavior.
7531 * tests/input.at (Incompatible Aliases): Update output.
7532
7533 2006-06-27 Akim Demaille <akim@epita.fr>
7534
7535 * doc/Doxyfile.in: New.
7536 * doc/Makefile.am: Use it.
7537 * src/lalr.h, src/symtab.h: Initial doxygenation.
7538
7539 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7540
7541 Don't miss %merge result type warnings just because the LHS types are
7542 declared after the %merge. This continues the effort of the previous
7543 patch.
7544 * src/reader.c (get_merge_function): Don't set the merger type yet.
7545 (record_merge_function_type): New function for setting the merger type
7546 and checking for clashes.
7547 (grammar_current_rule_merge_set): Set the location of the %merge for
7548 the current rule.
7549 (packgram): Invoke record_merge_function_type for each rule now that
7550 all symbol type declarations have been parsed.
7551 * src/reader.h (merger_list.type_declaration_location): New member
7552 storing the location of the first %merge from which the type for this
7553 merging function was derived.
7554 * src/symlist.h (symbol_list.merger_declaration_location): New member
7555 storing the location of a rule's %merge, if any.
7556 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7557 declared later): New test to catch the error fixed by the above patch.
7558
7559 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7560
7561 Get action warnings (grammar_rule_check) right even when symbol
7562 declarations appear after the rules. Discussed at
7563 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7564 and
7565 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7566 Don't mistake the type of $$ in a midrule to be that of its parent
7567 rule's $$.
7568 * src/reader.c (grammar_current_rule_end): Don't invoke
7569 grammar_rule_check yet since not all symbol declarations may have been
7570 parsed yet.
7571 (grammar_midrule_action): Likewise.
7572 Don't record whether the midrule's $$ has been used yet since actions
7573 haven't been translated yet.
7574 Record the midrule's parent rule and its RHS index within the parent
7575 rule.
7576 (grammar_current_rule_action_append): Don't translate the action yet
7577 since not all symbol declarations may have been parsed yet and, thus,
7578 warnings about types for $$, $n, @$, and @n can't be reported yet.
7579 (packgram): Translate the action and invoke grammar_rule_check now that
7580 all symbol declarations have been parsed.
7581 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7582 after parsing the entire grammar file, the symbol list here in the case
7583 of a midrule is actually the midrule's empty RHS, so reference its
7584 parent rule's RHS where necessary.
7585 On the other hand, now that you can already know it's a midrule, you
7586 aren't forced to think $$ has the same type as its parent rule's $$.
7587 (handle_action_at): In the case of a midrule, reference the parent rule
7588 where necessary.
7589 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7590 members.
7591 (symbol_list_length): Now that this is invoked after all rules have
7592 been parsed, a NULL symbol (rather than a NULL symbol list node)
7593 terminates a rule. symbol_list_print already does this correctly.
7594 * src/symlist.h (symbol_list.midrule_parent_rule,
7595 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7596 remember their relationships with their parents.
7597 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7598 fixed by the above patch.
7599 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7600 implementing...
7601 (Unused values): ... this old test case and...
7602 (Unused values before symbol declarations): ... this new test case.
7603 This one is the same as `Unused values' except that all symbol
7604 declarations appear after the rules in order to catch the rest of the
7605 errors fixed by the above patch.
7606
7607 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7608
7609 More cleanup.
7610 * src/reader.c (current_rule): Declare it static since it's no longer
7611 used outside this file.
7612 (grammar_current_rule_action_append): Remove redundant arguments from
7613 translate_rule_action invocation.
7614 * src/reader.h (current_rule): Remove this unused extern.
7615 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7616 * src/scan-code.l (translate_rule_action): Likewise.
7617
7618 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7619
7620 Clean up yesterday's patch.
7621 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7622 to...
7623 * src/reader.c (grammar_current_rule_action_append): ... here for
7624 consistency with grammar_current_rule_symbol_append.
7625 * tests/regression.at (Braced code in declaration in rules section):
7626 Make yyerror and yylex static as usual.
7627
7628 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7629
7630 Fix bug that mistakes braced code in a declaration in the rules section
7631 to be a rule action. Mentioned at
7632 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7633 * src/scan-gram.l: Move midrule action detection from the start of the
7634 scanning of any braced code to...
7635 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7636 action. For readability, use $2 and @2 rather than the equivalent
7637 global variables.
7638 * tests/regression.at (Braced code in declaration in rules section):
7639 New test to catch the error fixed by the above patch.
7640
7641 Work on code readability some.
7642 * src/scan-code.l (current_rule): Get rid of this misleading and
7643 redundant declaration: it's actually extern'ed in reader.h.
7644 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7645 translate_action): Add a rule argument and use it instead of the global
7646 current_rule.
7647 (translate_rule_action): This already receives current_rule through an
7648 argument, so pass it on to translate_action instead of assigning
7649 current_rule to current_rule.
7650 (translate_symbol_action, translate_code): Pass rule = NULL to
7651 translate_action.
7652
7653 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7654
7655 Rename %before-definitions to %start-header and %after-definitions to
7656 %end-header. Don't use these declarations to separate pre-prologue
7657 blocks from post-prologue blocks. Add new order-independent
7658 declarations %before-header and %after-header as alternatives to the
7659 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7660 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7661 * NEWS (2.3+): Update for these changes.
7662 * data/glr.c (b4_before_definitions): Update to...
7663 (b4_start_header): ... this.
7664 (b4_after_definitions): Update to...
7665 (b4_end_header): ... this.
7666 * data/glr.cc: Likewise.
7667 * data/lalr1.cc: Likewise.
7668 * data/yacc.c: Likewise.
7669 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7670 prologue blocks with %*-header declarations.
7671 (Calc++ Parser): Likewise.
7672 (Decl Summary): Update names.
7673 (Table of Symbols): Update description.
7674 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7675 (PERCENT_END_HEADER): ... this.
7676 (PERCENT_BEFORE_DEFINITIONS): Update to...
7677 (PERCENT_START_HEADER): ... this.
7678 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7679 (declaration): Update token names and m4 macro names.
7680 When parsing %end-header and %start-header, invoke translate_code
7681 before muscle_code_grow, and no longer set global booleans to remember
7682 whether these declarations have been seen.
7683 Parse new %after-header and %before-header.
7684 * src/reader.c (before_definitions, after_definitions): Remove.
7685 (prologue_augment): Accept a new bool argument to specify whether to
7686 augment the pre-prologue or post-prologue.
7687 * src/reader.h (before_definitions, after_definitions): Remove these
7688 extern's.
7689 (prologue_augment): Add new bool argument.
7690 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7691 (PERCENT_END_HEADER): ... this.
7692 (PERCENT_BEFORE_DEFINITIONS): Update to...
7693 (PERCENT_START_HEADER): ... this.
7694 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7695 * tests/actions.at (Printers and Destructors): Update names.
7696
7697 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7698
7699 Add comparison operators for C++ location classes. Discussed at
7700 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7701 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7702 declaration indicating whether filename_type has an operator==. If
7703 filename_type is `std::string', it defaults to `1', `0' otherwise.
7704 * data/location.cc: Iff b4_define_location_comparison is `1', add
7705 operator== and operator!= for class position and for class location.
7706
7707 Some minor fixes.
7708 * src/scan-action.l: Remove unused file.
7709 * src/symtab.c (symbol_printer_set): Use printer_location not
7710 destructor_location.
7711 * src/symtab.h (struct symbol): Replace incorrect source comment for
7712 printer members.
7713 * tests/input.at (Incompatible Aliases): Update output with correct
7714 printer location.
7715
7716 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7717
7718 Don't put the pre-prologue in the header file. For the yacc.c code
7719 file and the glr.c header and code files, move the pre-prologue before
7720 the token definitions. Add new %before-definitions and
7721 %after-definitions to declare code that will go in both the header file
7722 and code file. Discussed at
7723 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7724 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7725 and
7726 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7727 * NEWS (2.3+): Describe these changes.
7728 * data/glr.c (b4_pre_prologue): Move from within to before...
7729 (b4_shared_declarations): ... this.
7730 Add new b4_before_definitions before b4_token_enums.
7731 Add new b4_after_definitions at the end.
7732 * data/glr.cc (b4_pre_prologue): Replace with...
7733 (b4_before_definitions): ... this in the header file.
7734 (b4_after_definitions): New near the end of the header file.
7735 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7736 code file right before including the header file.
7737 (b4_before_definitions): New in the previous position of
7738 b4_pre_prologue in the header file.
7739 (b4_after_definitions): New near the end of the header file.
7740 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7741 (b4_token_enums_defines): In the code file, move to right before
7742 YYSTYPE for consistency with the header file.
7743 (b4_before_definitions): New right before b4_token_enums_defines in
7744 both the header and code file.
7745 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7746 header and code file.
7747 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7748 of prologues for %union dependencies.
7749 (Decl Summary): In %defines description, mention the effect of
7750 %before-definitions and %after-definitions on the header file.
7751 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7752 than in the pre-prologue so that make check succeeds.
7753 (Table of Symbols): Add entries for %before-definitions and
7754 %after-definitions.
7755 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7756 %before-definitions.
7757 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7758 (declaration): Parse those declarations and append to
7759 b4_before_definitions and b4_after_definitions, respectively.
7760 * src/reader.c (before_definitions, after_definitions): New bools to
7761 track whether those declarations have been seen.
7762 (prologue_augment): Add to the post-prologue if %union,
7763 %before-definitions, or %after-definitions has been seen.
7764 * src/reader.h (before_definitions, after_definitions): New extern's.
7765 * src/scan-gram.l: Scan the new declarations.
7766 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7767 prologue block in a %before-definitions or a %after-definitions based
7768 on whether the %union is declared.
7769 * tests/regression.at (Early token definitions with --yacc, Early token
7770 definitions without --yacc): Move tests for token definitions into the
7771 post-prologue since token names are no longer defined in the
7772 pre-prologue.
7773
7774 2006-06-20 Akim Demaille <akim@epita.fr>
7775
7776 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7777 (symbol_get): Use it.
7778 * src/parse-gram.y: Use it.
7779
7780 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7781
7782 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7783 build succeeds when configured with --enable-gcc-warnings.
7784
7785 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7786
7787 * src/parse-gram.y (char_name): New function.
7788 (CHAR, STRING, string_content): For %printer, properly escape.
7789 (ID): Prefer fputs to fprintf.
7790 (id): Reindent to be consistent with other rules.
7791 Properly quote char.
7792
7793 The Translation Project changed its way of publishing translations
7794 to maintainers. I haven't received any responses to my request
7795 for supporting the old way, or for documenting the new way. I
7796 have modified 'bootstrap' to use screen scraping
7797 (in this case, HTML scraping). This is unreliable and inelegant,
7798 but I don't see any better way. Yuck.
7799 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7800 (get_translations): New function, which uses HTML scraping to
7801 deduce locations of latest translations.
7802 Use this function to grab both bison and bison-runtime .po files.
7803 Don't bother priming the pump for the runtime-po domain any more,
7804 as it's now translated better than bison is.
7805
7806 2006-06-19 Akim Demaille <akim@epita.fr>
7807
7808 * src/scan-gram.l: No longer "parse" things after `%union' until
7809 `{'. Rather, return a single "%union" token.
7810 No longer make symbols: return strings, and leave the conversion
7811 to symbols to the parser.
7812 (SC_PRE_CODE, token_type): Remove.
7813 * src/parse-gram.y (%union): New field `character'.
7814 Sort tokens.
7815 (CHAR): New token.
7816 (ID, ID_COLON): Now that the scanner no longer makes them
7817 identifiers, adjust all uses to invoke symbol_get.
7818 (id_colon): New, wraps the conversion from string to symbol.
7819 (%union): Accept a possible union_name.
7820 (symbol): Now can be a char.
7821 * data/c.m4 (b4_union_name): Leave a default value.
7822 * data/glr.c, data/yacc.c: Use it.
7823
7824 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7825
7826 For associating token numbers with token names for "yacc.c", don't use
7827 #define statements unless `--yacc' is specified; always use enum
7828 yytokentype. Most important discussions start at:
7829 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7830 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7831 and
7832 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7833 * NEWS (2.3+): Mention.
7834 * data/c.m4 (b4_yacc_if): New.
7835 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7836 token #define's.
7837 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7838 on token name definitions.
7839 * src/getargs.c (usage): Capitalize `Yacc' in English.
7840 * src/output.c (prepare): Define b4_yacc_flag.
7841 * tests/regression.at (Early token definitions): Test that tokens names
7842 are defined before the pre-prologue not just before the post-prologue.
7843 Remove this test case and copy to...
7844 (Early token definitions with --yacc): ... this to test #define's.
7845 (Early token definitions without --yacc): ... and this to test enums.
7846
7847 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7848
7849 * NEWS: Reword the post-2.3 change to not be so optimistic about
7850 removing the old "look-ahead" spelling.
7851 Update previous look-ahead/lookahead change reports.
7852 * REFERENCES: look-ahead -> lookahead (since that's
7853 what he actually wrote).
7854 * doc/refcard.tex: look ahead -> lookahead,
7855 look-ahead -> lookahead
7856
7857 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7858
7859 For consistency, use `lookahead' instead of `look-ahead' or
7860 `look_ahead'. Discussed starting at
7861 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7862 and then at
7863 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7864 * NEWS: For the next release, note the change to `--report'.
7865 * TODO, doc/bison.1: Update English.
7866 * doc/bison.texinfo: Update English.
7867 (Understanding Your Parser, Bison Options): Document as
7868 `--report=lookahead' rather than `--report=look-ahead'.
7869 * src/conflicts.c: Update English in comments.
7870 (lookahead_set): Rename from look_ahead_set.
7871 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7872 (resolve_sr_conflict): Rename local look_ahead_tokens to
7873 lookahead_tokens, and update other uses.
7874 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7875 count_rr_conflicts, conflicts_free): Update uses.
7876 * src/getargs.c (report_args): Move "lookahead" before alternate
7877 spellings.
7878 (report_types): Update uses.
7879 (usage): For `--report' usage description, state `lookahead' spelling
7880 rather than `look-ahead'.
7881 * src/getargs.h (report.report_lookahead_tokens): Rename from
7882 report_look_ahead_tokens.
7883 * src/lalr.c: Update English in comments.
7884 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7885 (state_lookahead_tokens_count): Rename from
7886 state_look_ahead_tokens_count.
7887 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7888 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7889 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7890 Update other uses.
7891 Update English in output.
7892 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7893 * src/print.c: Update English in comments.
7894 (lookahead_set): Rename from look_ahead_set.
7895 (print_reduction): Rename argument lookahead_token from
7896 look_ahead_token.
7897 (print_core, state_default_rule, print_reductions, print_results):
7898 Update uses.
7899 * src/print_graph.c: Update English in comments.
7900 (print_core): Update uses.
7901 * src/state.c: Update English in comments.
7902 (reductions_new): Update uses.
7903 (state_rule_lookahead_tokens_print): Rename from
7904 state_rule_look_ahead_tokens_print, and update other uses.
7905 * src/state.h: Update English in comments.
7906 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7907 (state_rule_lookahead_tokens_print): Rename from
7908 state_rule_look_ahead_tokens_print.
7909 * src/tables.c: Update English in comments.
7910 (conflict_row, action_row): Update uses.
7911 * tests/glr-regression.at
7912 (Incorrect lookahead during deterministic GLR,
7913 Incorrect lookahead during nondeterministic GLR): Rename
7914 print_look_ahead to print_lookahead.
7915 * tests/torture.at: Update English in comments.
7916 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7917 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7918 (Many lookahead tokens): Update uses.
7919 * data/glr.c: Update English in comments.
7920 * lalr1.cc: Likewise.
7921 * yacc.c: Likewise.
7922 * src/conflicts.h: Likewise.
7923 * src/lalr.h: Likewise.
7924 * src/main.c: Likewise.
7925 * src/output.c: Likewise.
7926 * src/parse-gram.c: Likewise.
7927 * src/tables.h: Likewise.
7928 * tests/calc.at: Likewise.
7929
7930 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7931
7932 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7933
7934 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7935
7936 * TODO: Add request from Nelson H. F. Beebe to be able to install
7937 Bison without installing the yacc script.
7938
7939 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7940
7941 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7942 and yytext if they're already #define'd.
7943 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7944 * src/scan-code-c.c: ... here.
7945 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7946 <config.h>.
7947
7948 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7949
7950 Get Bison to build again when configured with --enable-gcc-warnings.
7951 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7952 missing #include's.
7953 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7954 loc argument as it shadows a global.
7955 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7956 invocation.
7957
7958 * src/.cvsignore: Add scan-code.c.
7959
7960 2006-06-07 Akim Demaille <akim@epita.fr>
7961
7962 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7963 to...
7964 * src/scan-code.l: here.
7965 * tests/input.at (Torturing the Scanner): Fix another location
7966 error.
7967
7968 2006-06-07 Akim Demaille <akim@epita.fr>
7969
7970 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7971
7972 2006-06-06 Akim Demaille <akim@epita.fr>
7973
7974 Extract the parsing of user actions from the grammar scanner.
7975 As a consequence, the relation between the grammar scanner and
7976 parser is much simpler. We can also split "composite tokens" back
7977 into simple tokens.
7978 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7979 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7980 rename as...
7981 * src/location.h, src/location.c (add_column_width)
7982 (location_compute): these.
7983 Fix the column count: the initial column is 0.
7984 (location_print): Be robust to ending column being 0.
7985 * src/location.h (boundary_set): New.
7986 * src/main.c: Adjust to scanner_free being renamed as
7987 gram_scanner_free.
7988 * src/output.c: Include scan-code.h.
7989 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7990 Use boundary_set.
7991 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7992 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7993 which is now, again, a separate token.
7994 Adjust all dependencies.
7995 Whereever actions with $ and @ are used, use translate_code.
7996 (action): Remove this nonterminal which is now useless.
7997 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7998 (grammar_current_rule_action_append): Use translate_code.
7999 (packgram): Bound check ruleno, itemno, and rule_length.
8000 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8001 (last_string, last_braced_code_loc, max_left_semantic_context)
8002 (scanner_initialize, scanner_free, scanner_last_string_free)
8003 (gram_out, gram_lineno, YY_DECL_): Move to...
8004 * src/scan-gram.h: this new file.
8005 (YY_DECL): Rename as...
8006 (GRAM_DECL): this.
8007 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8008 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8009 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8010 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8011 Move these declarations, and...
8012 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8013 these to...
8014 * src/flex-scanner.h: this new file.
8015 * src/scan-gram.l (rule_length, rule_length_overflow)
8016 (increment_rule_length): Remove.
8017 (last_braced_code_loc): Rename as...
8018 (gram_last_braced_code_loc): this.
8019 Adjust to the changes of the parser.
8020 Move all the handling of $ and @ into...
8021 * src/scan-code.l: here.
8022 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8023 (handle_action_dollar, handle_action_at): Move to...
8024 * src/scan-code.l: here.
8025 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8026 scan-code.h, scan-code-c.c, scan-gram.h.
8027 (EXTRA_bison_SOURCES): Add scan-code.l.
8028 (BUILT_SOURCES): Add scan-code.c.
8029 (yacc): Be robust to white spaces.
8030
8031 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8032 * tests/regression.at: Adjust the column numbers.
8033 * tests/regression.at: Adjust the error message.
8034
8035 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8036
8037 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8038 Use Akim's wording from
8039 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8040
8041 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8042
8043 Between Bison releases, manually append `+' to the previous Bison
8044 release number, and use that as a signal to automatically print the
8045 ChangeLog's CVS Id keyword from --version. Discussed starting at
8046 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8047 * ChangeLog: Add Id header.
8048 * configure.ac (AC_INIT): Append `+' to `2.3'.
8049 * src/.cvsignore: Add revision.c.
8050 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8051 (BUILT_SOURCES): Add revision.c.
8052 (revision.c): New target rule. This file defines a new global variable
8053 named revision. It initializes it with either the Id from ChangeLog
8054 or, if VERSION doesn't contain `+', with the empty string.
8055 * src/getargs.c (version): Print the value of revision.
8056 * src/revision.h: Extern revision.
8057
8058 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8059
8060 * NEWS: Version 2.3.
8061 * configure.ac (AC_INIT): Likewise.
8062
8063 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8064
8065 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8066 with no arguments, not as an object-like macro. This is for
8067 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8068 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8069 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8070 Document this.
8071
8072 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8073
8074 * src/getargs.c (usage): Back out yesterday's modification of the
8075 --help output so that we don't have to wait for translation before
8076 releasing 2.3.
8077
8078 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8079
8080 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8081 Problem reported by Akim Demaille.
8082
8083 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8084
8085 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8086
8087 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8088
8089 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8090 generated source code. Problem reported by Frans Englich in
8091 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8092
8093 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8094
8095 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8096 shell, not within 'make', so that 'make' by an ordinary builder
8097 (using GNU make) does not worry about configuring gzip. This also
8098 works around a bug reported independently by Keith Thompson and by
8099 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8100 stderr rather than stdout, messing up the build logs.
8101
8102 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8103
8104 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8105 to make sure that YYID will never be unused. This fixes a 'make
8106 maintainer-check' failure caused by the recent changes to the 'Trivial
8107 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8108 not used.
8109 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8110
8111 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8112
8113 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8114 state before an empty RHS is always resolved here. Only the location
8115 of that state is guaranteed to be resolved, and that's enough. This
8116 fixes the remaining bug reported by Derek M. Jones in
8117 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8118 * tests/glr-regression.at (Uninitialized location when reporting
8119 ambiguity): Test the above case.
8120 Also, the embedded comments in this test case claim it checks the case
8121 of an empty RHS that has inherited the initial location. However, the
8122 corresponding LHS was already resolved, so yyresolveLocations didn't
8123 actually have reason to modify it. Fix this by forcing
8124 nondeterministic operation at the beginning of the parse.
8125
8126 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8127
8128 * data/c.m4 (b4_yy_symbol_print_generate):
8129 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8130 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8131 of the bugs reported today by Derek M Jones in
8132 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8133 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8134 defined to be a type name without parens or brackets.
8135 (Location Type): Similarly for YYLTYPE.
8136 * tests/regression.at (Trivial grammars): Put in a test for this
8137 bug that will be caught by 'make maintainer-check' (though not,
8138 alas, by 'make check' unless your compiler is picky).
8139
8140 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8141
8142 * NEWS: Version 2.2.
8143 * configure.ac (AC_INIT): Likewise.
8144
8145 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8146
8147 * data/glr.c (yyreportTree): Make room in yystates for the state
8148 preceding the RHS. This fixes the segmentation fault reported by Derek
8149 M. Jones in
8150 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8151 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8152 to the user. Reported for yyreportTree by Derek M. Jones later in the
8153 same thread.
8154 * THANKS: Add Derek M. Jones.
8155 Update my email address.
8156 Fix typo in Steve Murphy's name.
8157
8158 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8159
8160 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8161 checking against YYLAST that caused the parser to miss a potential
8162 alternative in its diagnostic.
8163 Problem reported by Maria Jose Moron Fernandez in
8164 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8165 * data/lalr1.cc (yysyntax_error_): Likewise.
8166 * data/yacc.c (yysyntax_error): Likewise.
8167 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8168 tokens, in case we run into an older C compiler.
8169 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8170 Use them to check for the off-by-one error fixed above.
8171
8172 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8173 YYSIZE_T, not size_t.
8174 * tests/regression.at (Trivial grammars): New test, to catch
8175 the error fixed by the above patch.
8176
8177 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8178
8179 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8180 scheme.
8181 Reported by Steve Murphy.
8182
8183 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8184
8185 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8186 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8187
8188 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8189
8190 Implement --trace=m4.
8191 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8192 * src/output.c (output_skeleton): When set, pass -dV to m4.
8193
8194 Factor the handling of flags in m4.
8195 * src/output.c (prepare): Rename the muscle names debug, defines,
8196 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8197 * data/c.m4: Adjust.
8198 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8199 Use b4_define_flag_if to define other b4_FLAG_if macros.
8200 (b4_location_if): As a consequence, rename as...
8201 (b4_locations_if): this, for consistency.
8202 Adjust all the skeletons.
8203
8204 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8205
8206 * etc/bench.pm: Shorten bench names.
8207
8208 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8209
8210 * src/output.h, src/output.c (error_verbose): Move to...
8211 * src/getargs.h, src/getargs.c: here.
8212 Sort the flags.
8213 Adjust dependencies.
8214
8215 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8216
8217 * data/c.m4 (b4_copyright): Put the special exception for Bison
8218 skeletons here, so we don't have to put it in each skeleton. All
8219 uses changed. Suggested by Akim Demaille. Also, wrap the
8220 copyright notice, in case it is longer than 80 columns. Replace
8221 comma by newline after title.
8222
8223 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8224
8225 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8226 incompatibility, not a bug. Mention that it wasn't fixed as of
8227 flex 2.5.33.
8228
8229 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8230
8231 * examples/extexi: Enforce the precedence of concatenation over
8232 >>.
8233 Reported by Tommy Nordgren.
8234
8235 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8236
8237 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8238 with the member "token".
8239 Reported by Martin Nylin.
8240
8241 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8242
8243 * data/glr.c: Switch to Bison 2.2 special-exception language in
8244 the copyright notice. Use more-regular format for titles and
8245 copyright notices.
8246 * data/glr.cc: Likewise.
8247 * data/location.cc: Likewise.
8248 * data/yacc.cc: Likewise.
8249 * doc/bison.texinfo (Conditions): Document this.
8250 * NEWS: likewise. Upgrade version to 2.2.
8251
8252 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8253
8254 * data/glr.cc: Remove dead code.
8255
8256 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8257
8258 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8259 that variable and the line breaks the bootstrap. Problem reported
8260 by Juan M. Guerrero.
8261
8262 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8263
8264 * doc/bison.texinfo (Multiple start-symbols): New.
8265
8266 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8267
8268 * etc/README, etc/bench.pl: New.
8269
8270 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8271
8272 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8273 rule.
8274 Reported by Mickael Labau.
8275 * tests/input.at (Torturing the Scanner): Test it.
8276
8277 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8278
8279 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8280 Problem reported by Bob Rossi.
8281
8282 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8283
8284 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8285 and didn't really work.
8286 For the index, use @ifnotinfo, not @iftex.
8287 Minor cleanups of spacing and terminology.
8288
8289 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8290
8291 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8292 of AT_NAME_PREFIX when %name-prefix is not used.
8293
8294 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8295
8296 Apply --prefix to C++ skeletons too: they change the namespace.
8297 The test suite already exercize these cases.
8298 * data/c++.m4 (b4_namespace): New.
8299 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8300 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8301 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8302 * doc/bison.texinfo: Document it.
8303 (Option Cross Key): Use @multitable in all formats. It looks
8304 nicer, even in TeX outputs.
8305 (Rules): Use the same code whatever the output type is.
8306 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8307 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8308 * tests/calc.at: Use it, instead of hard coding `yy'.
8309
8310 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8311
8312 * TODO: Remove dead items.
8313
8314 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8315
8316 * doc/FAQ: Remove, merged into...
8317 * doc/bison.texinfo (FAQ): this.
8318 * doc/Makefile.am (EXTRA_DIST): Adjust.
8319
8320 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8321
8322 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8323 even if empty.
8324 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8325 * doc/bison.texinfo (Calc++ Scanner): Use it.
8326
8327 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8328
8329 Fix two nits reported by twlevo, plus one more that I discovered.
8330
8331 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8332 this is the usual Bison style.
8333 * src/location.h (location_print): Likewise.
8334
8335 * src/reader.h (token_name): Likewise.
8336
8337 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8338
8339 Fix some nits reported by twlevo.
8340 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8341 and "POSIX". Use more-modern syntax for URLs. Mention C++
8342 and ask for Java. Don't hardwire OS version numbers. Add
8343 copyright notice.
8344 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8345 * src/conflicts.c (solved_conflicts_obstack): Now static.
8346
8347 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8348
8349 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8350 page. Say "you can use it" not "you may use it" as on the web page;
8351 we're describing capabilities not granting permission.
8352
8353 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8354
8355 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8356 shadowing warnings. Use usual patter for iterating through RHS.
8357 * tests/glr-regression.at
8358 (Uninitialized location when reporting ambiguity):
8359 Modify yylex so that it uses its argument, rather than trying
8360 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8361 const char -> char const.
8362
8363 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8364 Don't use tabs inside commands; it messes up 'ps'.
8365 Problem reported by twlevo.
8366
8367 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8368
8369 * tests/glr-regression.at (Uninitialized location when reporting
8370 ambiguity): New test case.
8371 * data/glr.c (yyresolveLocations): New function, which uses
8372 YYLLOC_DEFAULT.
8373 (yyresolveValue): Invoke yyresolveLocations before reporting an
8374 ambiguity.
8375 * doc/bison.texinfo (Default Action for Locations): Note
8376 YYLLOC_DEFAULT's usage for ambiguity locations.
8377 (GLR Semantic Actions): Cross-reference those notes.
8378
8379 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8380
8381 * tests/glr-regression.at (Leaked semantic values when reporting
8382 ambiguity): Remove unnecessary union and type declarations.
8383 (Leaked lookahead after nondeterministic parse syntax error): New test
8384 case.
8385 * data/glr.c (yyparse): Check for zero stacks remaining before
8386 attempting to shift the lookahead so that you don't lose it.
8387
8388 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8389
8390 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8391 * tests/glr-regression.at (Leaked semantic values when reporting
8392 ambiguity): New test case.
8393 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8394 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8395 now unnecessary yystackp parameter.
8396 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8397 destructors can be called.
8398
8399 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8400 in existing testcases.
8401
8402 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8403
8404 Don't leak semantic values for parent RHS when a user action cuts the
8405 parser, and clean up related code a bit.
8406 * tests/glr-regression.at (Leaked merged semantic value if user action
8407 cuts parse): Rename to...
8408 (Leaked semantic values if user action cuts parse): ... this. Add check
8409 for leaked parent RHS values.
8410 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8411 between an unresolved state (non-empty chain of semantic options) and
8412 an incomplete one (signaled by an empty chain).
8413 (yyresolveStates): Document the interface. Move all manipulation of a
8414 successfully or unsuccessfully resolved yyGLRState to...
8415 (yyresolveValue): ... here so that yyresolveValue always leaves a
8416 yyGLRState with consistent data and thus is easier to understand.
8417 Remove the yyvalp and yylocp parameters since they are always just
8418 taken from the yys parameter. When reporting a discarded merged value
8419 in debugging output, note that it is incompletely merged. Document the
8420 interface.
8421 (yyresolveAction): If resolving any of the RHS states fails, destroy
8422 them all rather than leaking them. Thus, as long as user actions are
8423 written to clean up the RHS correctly, yyresolveAction always cleans up
8424 the RHS of a semantic option. Document the interface.
8425
8426 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8427
8428 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8429 led to a segmentation fault in GNU Pascal. Problem reported
8430 by Waldek Hebisch.
8431
8432 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8433
8434 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8435 mid-rule action inside a nonterminal symbol in order to declare a
8436 destructor for its semantic value.
8437
8438 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8439
8440 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8441 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8442 __cplusplus && ! defined _STDLIB_H && !
8443 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8444 defined free))]: Include <stdlib.h> rather than rolling our own
8445 declarations of malloc and free, to avoid problems with
8446 incompatible declarations (using 'throw') C++'s stdlib.h. This
8447 should fix Debian bug 340012
8448 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8449 reported by Guillaume Melquiond.
8450
8451 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8452
8453 * NEWS: Clarify symbols versus types in unused-value warnings.
8454
8455 * configure.ac (AC_INIT): Bump version number.
8456
8457 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8458
8459 * NEWS: Version 2.1a.
8460 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8461 since C99 requires this.
8462
8463 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8464
8465 * m4/c-working.m4: New file.
8466 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8467
8468 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8469
8470 * Makefile.maint: Merge from coreutils.
8471
8472 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8473
8474 More portability fixes for problems summarized by Nelson H. F. Beebe.
8475
8476 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8477 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8478 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8479 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8480 messes up because C++ code is compiled in 32-bit mode but linked
8481 in 64-bit mode.
8482
8483 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8484
8485 More portability fixes for problems summarized by Nelson H. F. Beebe.
8486
8487 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8488 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8489
8490 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8491 nodist_PROGRAMS, since we don't need to actually compile the
8492 example if we're just doing a plain 'make'. This avoids bothering
8493 the installer unnecessarily about problems due to weird C++
8494 compilers.
8495
8496 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8497
8498 More portability fixes for problems summarized by Nelson H. F. Beebe.
8499
8500 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8501 than #include "...", and compile with -I'.'. The old method was
8502 not portable, according to Posix and the C standard, and it does
8503 not work with Sun C 5.7, where previous #line directives affect
8504 the working directory used in later #include "..." directives.
8505
8506 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8507
8508 Various DJGGP specific issues in /djgpp
8509
8510 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8511
8512 More portability fixes for problems summarized by Nelson H. F. Beebe.
8513
8514 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8515 '#include <map>' works and that you can apply ++ to iterators.
8516
8517 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8518
8519 Work around portability problems summarized by Nelson H. F. Beebe in
8520 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8521
8522 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8523 that '#include <string>' works.
8524
8525 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8526 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8527 "warning: sorry: semantics of inline function static data `const
8528 unsigned char translate_table[262]' are wrong (you'll wind up with
8529 multiple copies)".
8530
8531 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8532 or, xor to not_, and_, or_, and xor_, respectively. This works
8533 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8534 random system header somewhere that includes the equivalent of
8535 <iso646.h>.
8536
8537 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8538 -E" works; it apparently doesn't work with PathScale EKO Compiler
8539 Suite Version 2.0.
8540
8541 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8542
8543 During deterministic GLR operation, user actions should be able to
8544 influence the parse by changing yychar. To make this easier to fix and
8545 to make glr.c easier to evolve in general, don't maintain yytoken in
8546 parallel with yychar; just compute yytoken when needed.
8547 * tests/glr-regression.at (Incorrect lookahead during deterministic
8548 GLR): Check that setting yychar in a user action has the intended
8549 effect.
8550 * data/glr.c (yyGLRStack): Remove yytokenp member.
8551 (yyclearin): Don't set *yytokenp.
8552 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8553 yychar rather than *yytokenp to determine the current lookahead.
8554 Compute yytoken locally when needed.
8555 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8556 point to.
8557
8558 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8559 after `--report' documentation.
8560
8561 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8562
8563 * src/parse-gram.y (grammar_declaration): Location of printer
8564 symbol is @1, not list->location. Bug reported by twlevo.
8565 * tests/input.at (Incompatible Aliases): Adjust to above change.
8566
8567 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8568
8569 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8570 all the test at once. This makes the output easier to read in the
8571 normal case.
8572
8573 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8574 got from <http://bro-ids.org/download.html>. The bug is that
8575 when two actions appeared in succession, the second one was
8576 scanned before the first one was added to the grammar rule
8577 as a midrule action. Bison then output the incorrect warning
8578 "parse.y:905.17-906.36: warning: unused value: $3".
8579 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8580 associated with a value.
8581 (rhs): Don't invoke grammar_current_rule_action_append.
8582 (action): Invoke it here instead.
8583 * src/reader.c (grammar_midrule_action): Now extern.
8584 (grammar_current_rule_action_append): Don't invoke
8585 grammar_midrule_action; that is now the scanner's job.
8586 * src/reader.h (last_string, last_braced_code_loc):
8587 (grammar_midrule_action): New decls.
8588 * src/scan-gram.l (last_string): Now extern, sigh.
8589 (last_braced_code_loc): New extern variable.
8590 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8591 rule already has an action.
8592 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8593 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8594 Add some tests to check that the above changes fixed the bug.
8595
8596 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8597
8598 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8599 All used changed. Check whether the symbol has a destructor,
8600 not whether it is typed.
8601 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8602 that the values are still reported as unused. All line numbers
8603 adjusted.
8604
8605 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8606
8607 Work around a bug in bro 0.8, which underparenthesizes its
8608 definition of YYLLOC_DEFAULT.
8609 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8610 their arguments.
8611 * data/lalr1.cc: Likewise.
8612 * data/yacc.cc: Likewise.
8613
8614 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8615
8616 Work around a bug in Pike 7.0, and give the Pike folks a
8617 better way to override the usual int widths.
8618 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8619 user can override the types.
8620 (short): #undef, to work around a bug in Pike 7.0.
8621 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8622 (union yyalloc.yyss): Use yytype_int16 rather than short.
8623 All uses changed.
8624 (yysigned_char): Remove.
8625 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8626 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8627 * tests/regression.at (Web2c Actions): Adjust to above changes.
8628
8629 * src/reader.c (check_and_convert_grammar): New function.
8630 (reader): Close the input file even if something went wrong during
8631 parsing. Minor file descriptor leak reported by twlevo.
8632
8633 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8634 to pacify gcc -Wswitch-default.
8635 * src/scan-gram.l (adjust_location): Use a default: break; case
8636 to pacify gcc -Wswitch-default.
8637 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8638 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8639 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8640 Move these decls to scan-skel.l, since they don't need to be
8641 visible elsewhere.
8642 * src/scan-skel.l: Accept the above decls.
8643 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8644 is used.
8645
8646 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8647
8648 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8649 since we don't want to insist on a version number at the start
8650 of the changelog every time.
8651 * Makefile.maint: Sync from coreutils a bit better.
8652 (sc_trailing_blank): Renamed from sc_trailing_space.
8653 All uses changed.
8654 (sc_no_if_have_config_h, sc_require_config_h):
8655 (sc_prohibit_assert_without_use): New rules.
8656 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8657 (sc_dd_max_sym_length): Fix leading spaces in rule.
8658 (sc_system_h_headers): Prefix with @.
8659 (sc_useless_cpp_parens, m4-check): Output line numbers.
8660 (changelog-check): Allow version only in head.
8661 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8662 satisfy new Makefile.maint rule.
8663 * data/glr.c: Likewise.
8664 * data/glr.cc: Likewise.
8665 * data/lalr1.cc: Likewise.
8666 * data/yacc.c: Likewise.
8667 * lib/ebitsetv.c: Likewise.
8668 * lib/lbitset.c: Likewise.
8669 * lib/subpipe.c: Likewise.
8670 * lib/timevar.c: Likewise.
8671 * src/system.h: Likewise.
8672 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8673 * djgpp/Makefile.maint: Add copyright notice.
8674 * djgpp/README.in: Likewise.
8675 * djgpp/config.bat: Likewise.
8676 * djgpp/config.site: Likewise.
8677 * djgpp/config_h.sed: Likewise.
8678 * djgpp/djunpack.bat: Likewise.
8679 * djgpp/config.sed: Fix copyright notice to match standard format.
8680 * djgpp/subpipe.h: Likewise.
8681 * lib/bitsetv-print.c: Likewise.
8682 * lib/bitsetv.c: Likewise.
8683 * lib/subpipe.h: Likewise.
8684 * lib/timevar.c: Likewise.
8685 * lib/timevar.h: Likewise.
8686 * djgpp/subpipe.c: Use standard recipe for config.h.
8687 * lib/abitset.c: Likewise.
8688 * lib/bitset.c: Likewise.
8689 * lib/bitset_stats.c: Likewise.
8690 * lib/bitsetv-print.c: Likewise.
8691 * lib/bitsetv.c: Likewise.
8692 * lib/ebitsetv.c: Likewise.
8693 * lib/get-errno.c: Likewise.
8694 * lib/lbitset.c: Likewise.
8695 * lib/subpipe.c: Likewise.
8696 * lib/timevar.c: Likewise.
8697 * lib/vbitset.c: Likewise.
8698 * tests/local.at: Likewise.
8699 * src/scan-gram.l: Don't include verify.h, since system.h does
8700 that for us.
8701 * .x-sc_require_config_h: New file.
8702 * .x-sc_unmarked_diagnostics: New file.
8703
8704 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8705
8706 Be a bit more systematic about using 'abort'.
8707 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8708 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8709 Put 'default: abort ();' before some other case, to satisfy older
8710 pedantic compilers.
8711 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8712 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8713 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8714 * src/conflicts.c (resolve_sr_conflict): Likewise.
8715 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8716 (get_decision_str, get_orientation_str, get_node_alignment_str):
8717 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8718 (get_linestyle_str, get_arrowstyle_str): Likewise.
8719 * src/conflicts.c (resolve_sr_conflict):
8720 Use a default case rather than one for the one remaining enum
8721 value, to catch invalid enum values as well.
8722 * src/lalr.c (set_goto_map, map_goto):
8723 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8724 * src/nullable.c (nullable_compute, token_definitions_output):
8725 Likewise.
8726 * src/reader.c (packgram, reader): Likewise.
8727 * src/state.c (transitions_to, state_new, state_reduction_find):
8728 Likewise.
8729 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8730 (symbol_pack): Likewise.
8731 * src/tables.c (conflict_row, pack_vector): Likewise.
8732 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8733 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8734 * src/system.h: Don't include <assert.h>.
8735 (assert): New macro.
8736
8737 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8738 (Destructor Decl, Parser Function, Pure Calling):
8739 Describe rules for braces inside C code more carefully.
8740
8741 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8742
8743 Fix some porting glitches found by Nelson H. F. Beebe.
8744 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8745 compilers that don't understand that abort () does not return.
8746 * src/state.c (transitions_to): Likewise.
8747 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8748 that '#include <cstdlib>' works.
8749 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8750 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8751 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8752 for the benefit of some pre-C99 compilers.
8753
8754 * bootstrap: Undo changes to gnulib files that autoreconf made.
8755
8756 Minor fixups to get 'make maintainer-check' to work.
8757 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8758 with the new verify.h implementation.
8759 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8760 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8761 * data/yacc.c (YYUSE): Likewise.
8762 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8763 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8764 * src/parse-gram.y (declaration): Don't pass a string constant
8765 to a function that expects char *, since GCC might complain
8766 about the constant value.
8767 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8768 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8769 before #defining them.
8770 * tests/glr-regression.at
8771 (Incorrectly initialized location for empty right-hand side in GLR):
8772 In yyerror, use the msg arg.
8773 (Corrupted semantic options if user action cuts parse):
8774 (Incorrect lookahead during deterministic GLR):
8775 (Incorrect lookahead during nondeterministic GLR):
8776 Don't name a local var 'index'; it shadows string.h's 'index'.
8777
8778 2006-01-19 Akim Demaille <akim@epita.fr>
8779
8780 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8781 location, not just parts of it.
8782
8783 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8784
8785 * NEWS: Document the fact that multiple %unions are now allowed.
8786 * doc/bison.texinfo (Union Decl): Likewise.
8787 * TODO: This feature is now implemented, so remove it from
8788 the wishlist.
8789
8790 * Makefile.maint: Merge with coreutils Makefile.maint.
8791 (CVS_LIST): Use build-aux version if available.
8792 (VERSION_REGEXP): New macro.
8793 (syntax-check-rules): Add sc_no_if_have_config_h,
8794 sc_prohibit_assert_without_use, sc_require_config_h,
8795 sc_useless_cpp_parens.
8796 (sc_obsolete_symbols): Check for O_NDELAY.
8797 (sc_dd_max_sym_length): Track coreutils.
8798 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8799 (sc_useless_cpp_parens): New rule.
8800 (news-date-check): Look for version or today's date.
8801 (changelog-check): Don't require version number near head.
8802 (copyright-check): Use current year instead of hardwiring 2005.
8803 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8804 (announcement): Add --gpg-key-ID.
8805
8806 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8807 with "file system".
8808
8809 Avoid undefined behavior that addressed just before the start of an
8810 array. Problem reported by twlevo.
8811 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8812 * src/lalr.c (build_relations): Rely on new sentinel.
8813 * src/gram.c (gram_free): Adjust to new sentinel.
8814
8815 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8816
8817 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8818 yylookaheadNeeds. All uses updated.
8819 (yysplitStack): Rename local yynewLookaheadStatuses to
8820 yynewLookaheadNeeds.
8821 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8822 GLR): In comments, change `lookahead status' to `lookahead need'.
8823
8824 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8825
8826 * data/glr.c (yysplitStack): A little stylistic rewrite.
8827
8828 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8829
8830 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8831
8832 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8833
8834 * doc/bison.texinfo: Fix some typos.
8835 (GLR Semantic Actions): New subsection discussing special
8836 considerations because GLR semantic actions might be deferred.
8837 (Actions): Mention look-ahead usage of yylval.
8838 (Actions and Locations): Mention look-ahead usage of yylloc.
8839 (Special Features for Use in Actions): Add YYEOF entry and mention it
8840 in the yychar entry.
8841 In the yychar entry, remove mention of the local yychar case (pure
8842 parser) since this is irrelevant information when writing semantic
8843 actions and since it's already discussed in `Table of Symbols' where
8844 yychar is otherwise described as an external variable.
8845 In the yychar entry, don't call it the `current' look-ahead since it
8846 isn't when semantic actions are deferred.
8847 In the yychar and yyclearin entries, add note about deferred semantic
8848 actions.
8849 Add yylloc and yylval entries discussing look-ahead usage.
8850 (Look-Ahead Tokens): When discussing yychar, don't call it the
8851 `current' look-ahead, and do mention yylval and yylloc.
8852 (Error Recovery): Cross-reference `Action Features' when mentioning
8853 yyclearin.
8854 (Table of Symbols): In the yychar entry, don't call it the `current'
8855 look-ahead.
8856 In the yylloc and yylval entries, mention look-ahead usage.
8857
8858 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8859
8860 * tests/glr-regression.at: Update copyright year to 2006.
8861
8862 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8863
8864 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8865 use during nondeterministic operation to track which stacks have
8866 actually needed the current lookahead.
8867 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8868 Allocate, deallocate, resize, and otherwise shuffle space for
8869 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8870 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8871 appropriately during nondeterministic operation.
8872 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8873 members to store the current lookahead to be used by the deferred
8874 user action.
8875 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8876 from which the RHS is taken. Set the lookahead members of the new
8877 yySemanticOption according to the lookahead status for stack yyk.
8878 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8879 yyaddDeferredAction.
8880 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8881 members of yySemanticOption before invoking yyuserAction, and then set
8882 them back to their current values afterward.
8883 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8884 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8885 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8886 titles for consistency.
8887 (Leaked merged semantic value if user action cuts parse): In order to
8888 suppress lint warnings, use arguments in merge function, and assign
8889 char value < 128 in main.
8890 (Incorrect lookahead during deterministic GLR): New test case.
8891 (Incorrect lookahead during nondeterministic GLR): New test case.
8892
8893 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8894
8895 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8896 !yyvaluep as signal that no semantic value is available to print.
8897 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8898 to print a semantic value.
8899
8900 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8901
8902 * tests/glr-regression.at: For consistency with my newer test cases,
8903 don't thank myself.
8904
8905 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8906
8907 * data/glr.c (yyresolveValue): When merging semantic options, if at
8908 least one user action succeeds but a later one cuts the parse, then
8909 destroy the semantic value before returning rather than leaking it.
8910 (yyresolveStates): If a user action cuts the parse and thus
8911 yyresolveValue fails, ignore the (unset) semantic value rather than
8912 corrupting the yyGLRState, and empty the semantic options list since
8913 the user actions should have called all necessary destructors.
8914 Simplify code with YYCHK.
8915 * tests/glr-regression.at (Corrupted semantic options if user action
8916 cuts parse): New test case.
8917 (Undesirable destructors if user action cuts parse): New test case.
8918 Before applying any of this patch, this test case never actually failed
8919 for me... but only because the corrupted semantic options usually
8920 masked this bug.
8921 (Leaked merged semantic value if user action cuts parse): New test
8922 case.
8923
8924 2006-01-05 Akim Demaille <akim@epita.fr>
8925
8926 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8927
8928 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8929
8930 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8931 _MSC_VER. Problem reported by Cenzato Marco.
8932 (b4_c_function_def): Use it.
8933 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8934 b4_c_modern.
8935 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8936 than rolling our own.
8937
8938 2006-01-04 Akim Demaille <akim@epita.fr>
8939
8940 Also warn about non-used mid-rule values.
8941 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8942 member.
8943 (symbol_list_new): Adjust.
8944 * src/reader.c (symbol_typed_p): New.
8945 (grammar_rule_check): Use it.
8946 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8947 Check its rule.
8948 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8949 Use it.
8950 * tests/actions.at (Exotic Dollars): Adjust.
8951
8952 2006-01-04 Akim Demaille <akim@epita.fr>
8953
8954 * src/reader.c (grammar_midrule_action): If $$ is set in a
8955 mid-rule, move the `used' bit to its lhs.
8956 * tests/input.at (Unused values): New.
8957 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8958
8959 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8960
8961 * doc/bison.texinfo (Bison Options): Say more accurately what
8962 --yacc does.
8963 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8964 about declarations in the grammar when in Yacc mode, as POSIX does
8965 not require a diagnostic when the grammar uses extensions.
8966
8967 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8968
8969 Warn about dubious constructions like "%token T T".
8970 Reported by twlevo.
8971 * src/symtab.h (struct symbol.declared): New member.
8972 * src/symtab.c (symbol_new): Initialize it to false.
8973 (symbol_class_set): New arg DECLARING, specifying whether
8974 this is a declaration that we want to warn about, if there
8975 is more than one of them. All uses changed.
8976
8977 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8978 Allow multiple %union directives, whose contents concatenate.
8979 * src/parse-gram.y (grammar_declaration): Likewise.
8980 Use muscle_code_grow, so that we don't need stype_line any more.
8981 All uses changed.
8982
8983 * src/muscle_tab.c (muscle_grow): Fix comment.
8984
8985 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8986 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8987 Update copyright year to 2006.
8988
8989 2006-01-03 Akim Demaille <akim@epita.fr>
8990
8991 Have glr.cc pass (some of) the calc.at tests.
8992 * data/glr.cc (b4_parse_param_orig): New.
8993 (b4_parse_param): Improve its definition, and bound it more
8994 clearly in the skeleton.
8995 (b4_epilogue): Append, instead of prepending, in order to keep
8996 #line consistency.
8997 Simplify the generation of auxiliary functions: locations and
8998 purity are mandated.
8999 (b4_global_tokens_and_yystype): Honor it.
9000 * data/location.cc (c++.m4): Don't include it.
9001 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9002 and AT_SKEL_CC_IF.
9003 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9004 AT_LALR1_CC_IF.
9005 Be sure to initialize the first position's filename.
9006 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9007 mandated anyway.
9008 (AT_CHECK_CALC_GLR_CC): New.
9009 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9010
9011 2006-01-02 Akim Demaille <akim@epita.fr>
9012
9013 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9014 c.m4.
9015 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9016 * data/glr.cc: Do not include stack.hh.
9017
9018 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9019
9020 * data/glr.c: Reformat whitespace with tabs.
9021 (b4_lpure_formals): Remove this unused m4 macro.
9022 * tests/cxx-type.at: Reformat whitespace with tabs.
9023 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9024 since it's a member. Rename type to isNterm for clarity.
9025
9026 2005-12-29 Akim <akim@sulaco.local>
9027
9028 Let glr.cc catch up with symbol_value_print.
9029 * data/glr.cc (b4_yysymprint_generate): Replace by...
9030 (b4_yy_symbol_print_generate): this.
9031 (yy_symbol_print, yy_symbol_value_print): Declare them.
9032
9033 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9034
9035 * src/location.h (boundary): Note that a line or column equal
9036 to INT_MAX indicates an overflow.
9037 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9038 (rule_length_overflow, increment_rule_length, add_column_width):
9039 New functions.
9040 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9041 (<SC_BRACED_CODE>"}"):
9042 Use increment_rule_length rather than incrementing it by hand.
9043 (adjust_location, handle_syncline): Diagnose overflow.
9044 (handle_action_dollar, handle_action_at):
9045 Fix bug with monstrosities like $-2147483648.
9046 Remove now-unnecessary checks.
9047 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9048 (convert_ucn_to_byte): Verify assumptions.
9049 (handle_syncline): New arg LOC. All callers changed.
9050 Don't store through a value derived from char const * pointer.
9051
9052 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9053 GCC warnings.
9054
9055 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9056
9057 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9058 Remove unnecessary forward static decls.
9059
9060 2005-12-27 Akim Demaille <akim@epita.fr>
9061
9062 * src/reader.c (grammar_current_rule_check): Also check that $$
9063 is used.
9064 Take the rule to check as argument, hence rename as...
9065 (grammar_rule_check): this.
9066 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9067 Rename as...
9068 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9069 (grammar_midrule_action, grammar_symbol_append): Now static.
9070 * tests/torture.at (input): Don't rely on the default action
9071 being always performed.
9072 * tests/calc.at: "Set" $$ even when the action is "cut" with
9073 YYERROR or other.
9074 * tests/actions.at (Exotic Dollars): Instead of using unused
9075 values, check that the warning is issued.
9076
9077 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9078
9079 * NEWS: Improve wording for unused-value warnings.
9080
9081 2005-12-22 Akim Demaille <akim@epita.fr>
9082
9083 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9084 (b4_yysymprint_generate): Rename as...
9085 (b4_yy_symbol_print_generate): this.
9086 Generate yy_symbol_print instead of yysymprint.
9087 Generate also yy_symbol_value_print, and use it.
9088
9089 2005-12-22 Akim Demaille <akim@epita.fr>
9090
9091 * NEWS: Warn about unused values.
9092 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9093 a `used' member.
9094 (symbol_list_n_get, symbol_list_n_used_set): New.
9095 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9096 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9097 * src/reader.c (grammar_current_rule_check): Check that values are
9098 used.
9099 * src/symtab.c (symbol_print): Accept 0.
9100 * tests/existing.at: Remove the type information.
9101 Empty the actions.
9102 Remove useless actions (beware of mid-rule actions: perl -000
9103 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9104 * tests/actions.at (Exotic Dollars): Use unused values.
9105 * tests/calc.at: Likewise.
9106 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9107 Likewise.
9108
9109 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9110 rule_useful_p.
9111
9112 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9113
9114 Undo 2005-12-01 tentative license wording change. The wording is
9115 still being reviewed by the lawyers, and we don't want to wait for
9116 them before publishing a test release. For now, revert to the
9117 previous wording.
9118 * NEWS: Undo 2005-12-01 change.
9119 * data/glr.c: Revert to previous license wording.
9120 * data/glr.cc: Likewise.
9121 * data/lalr1.cc: Likewise.
9122 * data/location.cc: Likewise.
9123 * data/yacc.c: Likewise.
9124
9125 * NEWS: Reword %destructor vs YYABORT etc.
9126 * data/glr.c: Use American spacing, for consistency.
9127 * data/glr.cc: Likewise.
9128 * data/lalr1.cc: Likewise.
9129 * data/yacc.c: Likewise.
9130 * data/yacc.c: Reformat comments slightly.
9131 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9132 for consistency. Fix some spelling errors and reword recently-included
9133 text slightly.
9134 * tests/cxx-type.at: Cast results of malloc, for C++.
9135
9136 2005-12-21 Joel E. Denny <address@hidden>
9137
9138 * tests/cxx-type.at: Construct a tree, count the parents of shared
9139 nodes, and free each node once and only once. Previously, the memory
9140 for semantic values was leaked instead.
9141
9142 2005-12-21 Joel E. Denny <address@hidden>
9143
9144 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9145 (yylval, yylloc): If pure, #define to yystackp->yyval and
9146 yystackp->yyloc similar to yychar and yynerrs.
9147 (yyparse): If pure, remove local yylval and yylloc. Add local
9148 yystackp to accommodate pure definitions of yylval and yylloc.
9149 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9150 yylvalp and yyllocp to &yylval and &yylloc.
9151 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9152 namespace. Previously, nerrs and char were missing, but lval and lloc
9153 weren't necessary.
9154 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9155 yylvalp and yyllocp parameters since, if pure, these are now always
9156 accessible through yystackp. If not pure, they are still accessible
9157 globally.
9158 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9159 `if (YYID (N))' to pacify lint.
9160
9161 2005-12-21 Akim Demaille <akim@epita.fr>
9162
9163 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9164 destroy the RHS symbols of a rule.
9165 * data/yacc.c (yylen): Initialize to 0.
9166 Keep its value to the number of items to possibly shift.
9167 In particular, a regular successful parse that ends on YYFINAL by
9168 a (internal) YYACCEPT must not have yylen != 0.
9169 (yyerrorlab, yyreturn): Pop the RHS.
9170 Reorder a bit to emphasize the `shifting' bits of code.
9171 (YYPOPSTACK): Now accept a number of items to pop.
9172 * data/lalr1.cc: Likewise.
9173 * data/glr.c: Formatting changes.
9174 Use goto instead of fall through.
9175 * doc/bison.texinfo (Destructor Decl): Complete.
9176
9177 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9178
9179 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9180 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9181 * djgpp/config.bat: Replace every occurence of the file name
9182 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9183 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9184 * djgpp/config.sed: Replace every occurence of the file name
9185 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9186 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9187 * djgpp/djunpack.bat: DJGPP specific file.
9188 * djgpp/fnchange.lst: DJGPP specific file.
9189 * djgpp/README.in: Add new information about how to unpack the bison
9190 source on MSDOS and other systems which have 8.3 file name restrictions
9191 using djunpack.bat and fnchange.lst.
9192
9193 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9194
9195 * bootstrap (build_cvs_prefix): Remove; unused.
9196 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9197 when getting gnulib.
9198
9199 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9200
9201 * data/glr.c: Reorder typedef declarations for structs to match order
9202 of struct declarations.
9203 Rename yystack everywhere to yystackp except in yyparse where it's not
9204 a pointer.
9205 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9206 consistency.
9207 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9208 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9209 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9210 lint.
9211
9212 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9213
9214 * tests/sets.at (Accept): Fix typos in regular expression used to
9215 sed out the final state number.
9216
9217 Work around portability problem on Solaris 10: flex-generated
9218 files include <stdio.h> before <config.h>, which messes up
9219 because the latter defines __EXTENSIONS__. Address the problem
9220 by creating two new little files that include <config.h> first,
9221 then include the flex-generated files. Rewrite everyone else
9222 to include <config.h> first, as well.
9223 * lib/timevar.c: Always include "config.h".
9224 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9225 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9226 (EXTRA_bison_SOURCES): New macro.
9227 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9228 * src/system.h: Don't include config.h.
9229 * src/LR0.c: Include <config.h> first.
9230 * src/assoc.c: Likewise.
9231 * src/closure.c: Likewise.
9232 * src/complain.c: Likewise.
9233 * src/conflicts.c: Likewise.
9234 * src/derives.c: Likewise.
9235 * src/files.c: Likewise.
9236 * src/getargs.c: Likewise.
9237 * src/gram.c: Likewise.
9238 * src/lalr.c: Likewise.
9239 * src/location.c: Likewise.
9240 * src/main.c: Likewise.
9241 * src/muscle_tab.c: Likewise.
9242 * src/nullable.c: Likewise.
9243 * src/output.c: Likewise.
9244 * src/parse-gram.y: Likewise.
9245 * src/print.c: Likewise.
9246 * src/print_graph.c: Likewise.
9247 * src/reader.c: Likewise.
9248 * src/reduce.c: Likewise.
9249 * src/relation.c: Likewise.
9250 * src/state.c: Likewise.
9251 * src/symlist.c: Likewise.
9252 * src/symtab.c: Likewise.
9253 * src/tables.c: Likewise.
9254 * src/uniqstr.c: Likewise.
9255 * src/vcg.c: Likewise.
9256
9257 * src/parse-gram.y: Fix minor problems uncovered by lint.
9258 (current_lhs, current_lhs_location): Now static.
9259 (current_assoc): Remove unused variable.
9260
9261 Cleanups so that Bison-generated parsers have less lint.
9262 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9263 Prepend /*ARGSUSED*/, for lint's sake.
9264 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9265 definition if 'lint' is defined.
9266 (YYID): New macro (or function, if lint).
9267 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9268 * data/yacc.c: Likewise.
9269 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9270 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9271 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9272 is C++ only.
9273 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9274 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9275 Use YYID(0) rather than 0, for lint.
9276 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9277 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9278
9279 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9280
9281 * tests/glr-regression.at
9282 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9283 Close memory leak reported by twlevo.
9284
9285 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9286
9287 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9288 all stacks.
9289 (yyparse): Iterate another stack in order to call user destructors.
9290 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9291 New test case.
9292 (Duplicated user destructor for lookahead): This test now is expected
9293 to succeed.
9294
9295 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9296
9297 * NEWS: Document the following change.
9298 * data/yacc.c: Say "parser skeleton" rather than "file", since
9299 it's no longer just a file.
9300 * data/glr.c: Grant a special exception for C GLR parsers, that
9301 reads like the already-existing exception for C LALR(1) parsers.
9302 * data/glr.cc: Likewise.
9303 * data/lalr1.cc: Likewise.
9304 * data/location.cc: Likewise.
9305 * data/yacc.c: Reword the "written by" statement to clarify that
9306 it was the parser skeleton, not the entire output file.
9307 * data/glr.c: Written by Paul Hilfinger.
9308 * data/glr.cc: Written by Akim Demaille.
9309 * data/lalr1.cc: Likewise.
9310
9311 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9312
9313 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9314 Fix typos in previous change that broke 'make check'.
9315 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9316 supported in C.
9317 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9318 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9319 We can revert this once things settle down.
9320
9321 * src/conflicts.c (conflicts_print): Don't print file name twice
9322 when %expect fails because there were no conflicts.
9323 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9324 change.
9325 * tests/conflicts.at (%expect not enough, %expect too much):
9326 (%expect with reduce conflicts): Adjust to new behavior.
9327
9328 2005-11-18 Akim Demaille <akim@epita.fr>
9329
9330 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9331 errors.
9332 * NEWS: Document this.
9333 * doc/bison.texinfo (Expect Decl): Likewise.
9334
9335 2005-11-16 Akim Demaille <akim@epita.fr>
9336
9337 Generalize the display of semantic values and locations in traces.
9338 * data/glr.c (yy_reduce_print): Fix indices (again).
9339 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9340 literal integers.
9341 * data/lalr1.cc (yyreduce_print): Rename as...
9342 (yy_reduce_print): this.
9343 Display values and locations.
9344 * data/yacc.c (yy_reduce_print): Likewise.
9345 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9346 (yysymprint): Move higher to be visible from yy_reduce_print).
9347 (yyparse): Adjust.
9348 * tests/calc.at: Adjust the expected length of the traces.
9349
9350 2005-11-14 Akim Demaille <akim@epita.fr>
9351
9352 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9353 from 1 to N, while values and location start at 0.
9354 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9355
9356 2005-11-14 Akim Demaille <akim@epita.fr>
9357
9358 * data/glr.c (yy_reduce_print): Fix the $ number.
9359
9360 2005-11-14 Akim Demaille <akim@epita.fr>
9361
9362 "Use" parse parameters.
9363 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9364 * data/glr.c, data/glr.cc: Use them.
9365 * data/glr.c (YYUSE): Have a C++ definition that supports
9366 non-pointer types.
9367
9368 2005-11-14 Akim Demaille <akim@epita.fr>
9369
9370 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9371
9372 2005-11-14 Akim Demaille <akim@epita.fr>
9373
9374 * data/glr.cc: New.
9375 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9376
9377 2005-11-12 Akim Demaille <akim@epita.fr>
9378
9379 Let position and location be PODs.
9380 * data/location.cc (position::initialize, location::initialize): New.
9381 (position::position, location::location): Define only if
9382 b4_location_constructors is defined.
9383 * data/lalr1.cc (b4_location_constructors): Define it for backward
9384 compatibility.
9385 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9386
9387 2005-11-12 Akim Demaille <akim@epita.fr>
9388
9389 * data/lalr1.cc: Move the body of the ctor and dtor into the
9390 parser file (instead of the header).
9391 Wrap the implementations in a "namespace yy".
9392
9393 2005-11-12 Akim Demaille <akim@epita.fr>
9394
9395 Have glr.c include its header file when created.
9396 * data/glr.c (b4_shared_declarations): New.
9397 Output them verbatim in the parser if !%defines, otherwise
9398 output then in the header file, and include it instead.
9399
9400 2005-11-11 Akim Demaille <akim@epita.fr>
9401
9402 * data/glr.c: Comment changes.
9403
9404 2005-11-11 Akim Demaille <akim@epita.fr>
9405
9406 When yydebug, report semantic and location values for reductions.
9407 * data/glr.c (yy_reduce_print): Report the semantic values and the
9408 locations.
9409 (YY_REDUCE_PRINT): Adjust.
9410 (yyglrReduce): Use them.
9411 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9412 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9413 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9414 traces.
9415
9416 2005-11-10 Akim Demaille <akim@epita.fr>
9417
9418 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9419 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9420 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9421
9422 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9423
9424 * m4/cxx.m4, examples/Makefile.am: Don't build
9425 examples/calc++ if no C++ compiler is available. (trivial change)
9426
9427 2005-11-09 Akim Demaille <akim@epita.fr>
9428
9429 * src/scan-skel.l: Use a couple of asserts.
9430
9431 2005-11-03 Akim Demaille <akim@epita.fr>
9432
9433 In some (weird) cases, the final state number is incorrect.
9434 Reported by Alexandre Duret-Lutz.
9435 * src/LR0.c (state_list_append): Remove the computation of
9436 final_state.
9437 (save_reductions): Do it here.
9438 (get_state): Alpha conversion.
9439 (generate_states): Use a for loop.
9440 * src/gram.h (item_number_is_rule_number)
9441 (item_number_is_symbol_number): New.
9442 * src/state.c: Use assert.
9443 * src/system.h: Include assert.h.
9444 * tests/sets.at (Accept): New.
9445
9446 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9447
9448 * data/glr.c (yyfill): Adjust comment.
9449 (yyresolveAction): Initialize default location properly
9450 for empty right-hand sides.
9451 (yydoAction): Ditto.
9452 Add comment explaining apparently dead code.
9453 * tests/glr-regression.at
9454 (Incorrectly initialized location for empty right-hand side in GLR):
9455 New test.
9456
9457 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9458
9459 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9460 gnulib when interrupted. This fixes some race conditions and
9461 works around some portability problems (one noted by Paul
9462 Hilfinger).
9463
9464 2005-10-22 Akim <akim@epita.fr>
9465
9466 * Makefile.cfg: Adjust to config -> build-aux.
9467 Reported by twledo.
9468
9469 2005-10-21 Akim Demaille <akim@epita.fr>
9470
9471 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9472 the %parse-params.
9473 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9474 * data/yacc.c (b4_Pure_if): Rename as...
9475 (b4_yacc_pure_if): this.
9476 (YY_SYMBOL_PRINT, yyparse): Adjust.
9477 * doc/bison.texinfo: Formatting changes.
9478
9479 2005-10-21 Akim Demaille <akim@epita.fr>
9480
9481 Finish the transition config -> build-aux.
9482 * configure.ac, Makefile.am: Use build-aux.
9483 * config/prev-version, config/announce-gen, config/Makefile.am:
9484 Move to...
9485 * build-aux/prev-version, build-aux/announce-gen,
9486 * build-aux/Makefile.am: here.
9487
9488 2005-10-14 Akim Demaille <akim@epita.fr>
9489
9490 * examples/calc++/test: Use set -x only when VERBOSE.
9491
9492 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9493
9494 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9495 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9496
9497 2005-10-13 Akim Demaille <akim@epita.fr>
9498
9499 * src/scan-skel.l: Output the base name parts of the parser and
9500 header file names.
9501 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9502 additional checks.
9503 Use this to exercise C++ outputs in subdirs.
9504 Reported by Oleg Smolsky.
9505
9506 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9507
9508 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9509 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9510 Problem reported by John P. Hartmann.
9511 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9512 already defined it.
9513
9514 2005-10-12 Akim Demaille <akim@epita.fr>
9515
9516 * src/parse-gram.y (version_check): Exit 63 to please missing
9517 (stands for "version mismatch).
9518 * tests/input.at, doc/bison.texinfo: Adjust.
9519
9520 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9521
9522 Work around portability problems with Visual Age C compiler
9523 (xlc and xlC_r) reported by John P. Hartmann.
9524 * data/location.cc (initial_column, initial_line): Remove.
9525 All uses replaced by 0 and 1.
9526 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9527 that xlc complains about.
9528 * src/scan-skel.l (skel_wrap): Likewise.
9529 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9530 as __STDC__.
9531 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9532 __STDC_VERSION__. Use it everywhere instead of looking at
9533 __STDC__ and __cplusplus.
9534
9535 2005-10-10 Akim Demaille <akim@epita.fr>
9536
9537 * examples/calc++/test: Be quiet unless VERBOSE.
9538
9539 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9540
9541 * data/c.m4 (yydestruct, yysymprint):
9542 Use YYUSE instead of casting to void.
9543 * data/glr.c (YYUSE): New macro.
9544 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9545 Use it instead of rolling our own.
9546 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9547 (YYCHK1):
9548 Use /*CONSTCOND*/ to suppress lint warnings.
9549 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9550 (YY_STACK_PRINT): Use 'false' not '0'.
9551 (YYUSE): New macro.
9552 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9553 * data/yacc.c (YYUSE): New macro.
9554 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9555 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9556 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9557
9558
9559 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9560 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9561
9562 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9563
9564 Undo the parts of the unlocked-I/O change that substituted
9565 putc or puts for printf. This might hurt performance a bit,
9566 but some people prefer the printf style.
9567 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9568 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9569 All uses replaced by YYFPRINTF and YYDPRINTF.
9570 * data/yacc.c: Likewise.
9571 * lib/bitset.c (bitset_print): Likewise.
9572 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9573 putc and puts.
9574 * lib/lbitset.c (debug_lbitset): Likewise.
9575 * src/closure.c (print_firsts, print_fderives): Likewise.
9576 * src/gram.c (grammar_dump): Likewise.
9577 * src/lalr.c (look_ahead_tokens_print): Likewise.
9578 * src/output.c (escaped_output): Likewise.
9579 (user_actions_output): Break apart two printfs.
9580 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9581 * src/reduce.c (reduce_print): Likewise.
9582 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9583 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9584
9585 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9586 Use assignments rather than casts-to-void to suppress
9587 unused-variable warnings. This pacifies 'lint'.
9588 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9589 unused-variable warnings.
9590
9591 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9592
9593 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9594
9595 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9596
9597 Use unlocked I/O for a minor performance improvement on hosts like
9598 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9599 is to use the gnlib unlocked-io module, and to prefer putc and
9600 puts to printf when either will work (since the latter doesn't
9601 come in an unlocked flavor).
9602 * bootstrap (gnulib_modules): Add unlocked-io.
9603 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9604 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9605 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9606 and similarly for puts and putc and printf.
9607 * data/yacc.c: Likewise.
9608 * lib/bitset.c (bitset_print): Likewise.
9609 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9610 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9611 to printf.
9612 * lib/lbitset.c (debug_lbitset): Likewise.
9613 * src/closure.c (print_firsts, print_fderives): Likewise.
9614 * src/gram.c (grammar_dump): Likewise.
9615 * src/lalr.c (look_ahead_tokens_print): Likewise.
9616 * src/output.c (escaped_output): Likewise.
9617 (user_actions_output): Coalesce two printfs.
9618 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9619 * src/reduce.c (reduce_print): Likewise.
9620 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9621 * src/system.h: Include unlocked-io.h rather than stdio.h.
9622
9623 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9624 this confuses xgettext.
9625
9626 2005-10-02 Akim Demaille <akim@epita.fr>
9627
9628 * bootstrap (gnulib_modules): Add strverscmp.
9629 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9630 * m4/.cvsignore: Add strverscmp.m4.
9631 * src/parse-gram.y (%require): New token, new rule.
9632 (version_check): New.
9633 * src/scan-gram.l (%require): Adjust.
9634 * tests/input.at (AT_REQUIRE): New.
9635 Use it.
9636 * doc/bison.texinfo (Require Decl): New.
9637 (Calc++ Parser): Use %require.
9638
9639 2005-10-02 Akim Demaille <akim@epita.fr>
9640
9641 * data/location.cc: New.
9642
9643 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9644 Akim Demaille <akim@epita.fr>
9645
9646 Make sure -odir/foo.cc creates dir/location.hh etc.
9647 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9648 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9649 (spec_defines_file): Now const.
9650 (dir_prefix): New.
9651 (short_base_name): Remove.
9652 * src/files.c: Adjust.
9653 (dirname.h): Include.
9654 (base_name): Don't prototype it.
9655 (finput): Remove, duplicates gram_in.
9656 (full_base_name, short_base_name): Replace by...
9657 (all_but_ext, all_but_tab_ext): these.
9658 (compute_base_names): Rename as...
9659 (compute_file_name_parts): this.
9660 Update to compute the new variables, including dir_prefix.
9661 Adjust dependencies.
9662 * src/output.c (prepare): Output them.
9663 * src/reader.c: Adjust to use gram_in, not finput.
9664 * src/scan-skel.l (@dir_prefix@): New.
9665
9666 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9667
9668 * lib/subpipe.c: New function end_of_output_subpipe() added
9669 to allow support for non-posix systems. This is a no-op function
9670 for posix systems.
9671
9672 * lib/subpipe.h: New function end_of_output_subpipe() added
9673 to allow support for non-posix systems. This is a no-op function
9674 for posix systems.
9675
9676 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9677 handle the lack of pipe/fork functionality on non-posix systems.
9678
9679 * djgpp/Makefile.maint: DJGPP specific file.
9680
9681 * djgpp/README.in: DJGPP specific file.
9682
9683 * djgpp/config.bat: DJGPP specific configuration file.
9684
9685 * djgpp/config.sed: DJGPP specific configuration file.
9686
9687 * djgpp/config.site: DJGPP specific configuration file.
9688
9689 * djgpp/config_h.sed: DJGPP specific configuration file.
9690
9691 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9692
9693 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9694
9695 2005-10-02 Akim Demaille <akim@epita.fr>
9696
9697 * data/location.cc: New, extract from...
9698 * data/lalr1.cc: here.
9699 (location.hh): Include it after the user prologue, in case the
9700 filename type is defined by the user.
9701 Forward declation location and position before the pre-prologue.
9702 (yyresult_): Rename as...
9703 (yyresult): this, it's a local variable, not an attribute.
9704 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9705
9706 2005-10-01 Akim Demaille <akim@epita.fr>
9707
9708 * examples/extexi: Restore the #line generation.
9709
9710 2005-09-30 Akim Demaille <akim@epita.fr>,
9711 Alexandre Duret-Lutz <adl@gnu.org>
9712
9713 Move the token type and YYSTYPE in the parser class.
9714 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9715 (parser::token): New, from the moved free definition of tokens.
9716 (parser::semantic_value): Now a full definition instead of an
9717 indirection to YYSTYPE.
9718 (b4_post_prologue): No longer included in the header file, but
9719 in the implementation file.
9720 * doc/bison.texi (C+ Language Interface): Update.
9721 * src/parse-gram.y: Support unary %define.
9722 * tests/actions.at: Define global_tokens_and_yystype for backward
9723 compatibility until we update the tests.
9724 * tests/calc.at: Idem.
9725 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9726 to simplify the code.
9727
9728 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9729
9730 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9731 Ah, the good old days! Problem reported by Peter Klein.
9732 * bootstrap (gnulib_modules): Add strerror, strtoul.
9733 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9734 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9735
9736 2005-09-29 Akim Demaille <akim@epita.fr>
9737
9738 * data/c.m4 (b4_error_verbose_if): New.
9739 * data/lalr1.cc: Use it.
9740 (YYERROR_VERBOSE_IF): Remove.
9741 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9742 parser members, replaced by...
9743 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9744 local variables.
9745 (yysyntax_error_): Takes the state number as argument.
9746 (yyreduce_print_): Use the argument yyrule, not the former
9747 attribute yyn_.
9748
9749 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9750
9751 * bootstrap (gnulib_modules): Add verify.
9752 * lib/.cvsignore: Add verify.h.
9753 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9754 * src/system.h (verify): Remove.
9755 Include verify.h instead.
9756 * src/tables.c (tables_generate): Use new API for 'verify'.
9757
9758 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9759
9760 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9761 local variables whose names begin with 'yy'.
9762 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9763 Trivial changes from Joel E. Denny.
9764
9765 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9766 it itself.
9767 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9768 don't use alloca any more.
9769
9770 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9771 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9772 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9773 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9774 to match yacc.c, to test more hosts.
9775
9776 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9777
9778 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9779 doesn't affect behavior.
9780 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9781 Solaris, AIX, MSC.
9782 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9783 This works a bit better with glibc, if user code has already included
9784 stdlib.h.
9785 * doc/bison.texinfo (Bison Parser): Document that users can't
9786 arbitrarily use malloc and free for other purposes. Document
9787 that <alloca.h> and <malloc.h> might be included.
9788 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9789 user must declare alloca.
9790
9791 * HACKING (release): Forwarn the Translation Project about
9792 stable releses.
9793
9794 2005-09-20 Akim Demaille <akim@epita.fr>
9795
9796 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9797
9798 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9799
9800 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9801 (YYSTACK_ALLOC_MAXIMUM): Use it.
9802 (yysyntax_error): New function.
9803 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9804 multiple syntax errors are reported, and alloca is being used.
9805 Instead, reallocate buffers twice as big each time, so that
9806 we waste at most half the allocated memory. Start with a small
9807 (128-byte) buffer that will suffice in most cases anyway.
9808 Use yysyntax_error to do most of the work.
9809
9810 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9811 yynerrs is the number of errors reported, not the number of
9812 errors encountered.
9813
9814 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9815 Mark it as expected to fail.
9816 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9817 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9818 Don't start user-code symbols with "yy", to avoid name space problems.
9819
9820 2005-09-19 Akim Demaille <akim@epita.fr>
9821
9822 Remove the traits, failed experiment.
9823 It never proved useful, and anyway because of the current
9824 definition, it was not possible to have several specialization of
9825 this traits, making it useless.
9826 * data/lalr1.cc (yy:traits): Remove.
9827 Inline its definitions in the parser class.
9828
9829 2005-09-19 Akim Demaille <akim@epita.fr>
9830
9831 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9832 least Mac OSX with a /usr/local install of gettext.
9833
9834 2005-09-19 Akim Demaille <akim@epita.fr>
9835
9836 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9837 and yytoken for similarity with the other skeletons.
9838
9839 2005-09-19 Akim Demaille <akim@epita.fr>
9840
9841 * NEWS, configure.ac: update version number to 2.1a.
9842
9843 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9844
9845 * NEWS: Version 2.1.
9846
9847 * NEWS: Remove notice of yytname change, since it was never in an
9848 official release.
9849 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9850 diagnostic.
9851 * src/output.c (prepare): Likewise.
9852 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9853 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9854 is not defined. This is an awful hack, but it's enough for now.
9855 All callers changed.
9856 * tests/glr-regression-at (make_value): Args are const pointers now,
9857 to avoid GCC warning.
9858 (Duplicated user destructor for lookahead): New test. Currently
9859 skipped. It fails on my host but I'm not sure it'll always fail.
9860
9861 2005-09-16 Akim Demaille <akim@epita.fr>
9862
9863 * src/symtab.h (struct symbol): Declare the printer and destructor
9864 as const, to avoid accidental calls to free.
9865 (symbol_destructor_set, symbol_printer_set): Adjust.
9866 * src/symtab.c: Adjust.
9867
9868 2005-09-16 Akim Demaille <akim@epita.fr>
9869
9870 * data/c.m4 (b4_token_enums): New.
9871 (b4_token_defines): Rename as...
9872 (b4_token_enums_defines): this.
9873 (b4_token_defines): New, output only the #defines.
9874 * data/yacc.c, data/glr.c: Adjust.
9875 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9876 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9877 as default values.
9878
9879 2005-09-16 Akim Demaille <akim@epita.fr>
9880
9881 * data/lalr1.cc (yylex_): Remove, inline its code.
9882 (yyreport_syntax_error_): Remove, replaced by...
9883 (yysyntax_error_): this which returns a string and leaves to the
9884 caller the call to the users' error function.
9885 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9886 Move from members of the parser object...
9887 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9888 to local variables of the parse function.
9889
9890 2005-09-16 Akim Demaille <akim@epita.fr>
9891
9892 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9893 since it's in Bison's name space.
9894
9895 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9896
9897 * data/glr.c (yyresolveValue): Add default case to pacify
9898 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9899
9900 * NEWS: Document when yyparse started to return 2.
9901 * doc/bison.texinfo (Parser Function): Document when yyparse
9902 returns 2.
9903
9904 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9905 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9906 changed.
9907 (class position): file_name -> filename (reverting). All uses changed.
9908
9909 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9910
9911 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9912 do anything if $@ exists. This reverts part of the 2005-07-07
9913 patch.
9914
9915 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9916
9917 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9918 contains obsolete information and isn't worth distributing as a
9919 separate file anyway.
9920 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9921 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9922 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9923 (yyparse): Abort if user code uses longjmp to throw an unexpected
9924 value.
9925
9926 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9927
9928 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9929 Suggested by twlevo@xs4all.nl.
9930
9931 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9932 This avoids a diagnostic from gcc -Wswitch-enum.
9933 Problem reported by twlevo@xs4all.nl.
9934
9935 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9936 standards. Use "file name" or "file" or "name", depending on
9937 the context.
9938 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9939 not to hack/foo.tab.c.
9940 (Calc++ Top Level): 2nd arg of main is not const.
9941 * data/glr.c: b4_filename -> b4_file_name.
9942 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9943 All uses changed.
9944 (class position): filename -> file_name. All uses changed.
9945 * data/yacc.c: b4_filename -> b4_file_name.
9946 * lib/bitset.h: filename -> file_name in local vars.
9947 * lib/bitset_stats.c: Likewise.
9948 * src/files.c: Likewise.
9949 * src/scan-skel.l ("@output ".*\n): Likewise.
9950 * src/files.c (file_name_split): Renamed from filename_split.
9951 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9952
9953 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9954
9955 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9956 to accommodate latest gnulib.
9957
9958 * tests/glr-regression.at (Duplicate representation of merged trees):
9959 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9960
9961 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9962 needed.
9963
9964 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9965
9966 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9967 All uses changed. Invoke user destructor after an error during a
9968 split parse (trivial change from Joel E. Denny).
9969
9970 * tests/glr-regression.at
9971 (User destructor after an error during a split parse): New test case.
9972 Problem reported by Joel E. Denny in:
9973 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9974
9975 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9976
9977 * README-cvs: Give URLs for recommended tools.
9978 Mention Gzip version problem, and bootstrapping issues.
9979 Remove troubleshooting section, as it's somewhat obsolete.
9980
9981 * bootstrap (no_cache): New var, to accommodate different wget
9982 variants. Use it instead of '-C off'. Problem reported by
9983 twlevo@xs4all.nl.
9984
9985 * data/glr.c (yydestroyStackItem): New function.
9986 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9987 debugging information. Problem reported by Joel E. Denny.
9988
9989 2005-08-25 Akim Demaille <akim@epita.fr>
9990
9991 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9992
9993 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9994
9995 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9996 Don't invoke destructor on unresolved entries.
9997 * tests/glr-regression.at
9998 (User destructor for unresolved GLR semantic value): New test case.
9999 Problem reported by Joel E. Denny in:
10000 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10001
10002 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10003
10004 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10005 Add strnlen.c.
10006 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10007 lib-prefix.m4, po.m4.
10008
10009 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10010 in yydestruct diagnostic, since it might not be an error.
10011 Problem reported by Joel Denny near end of
10012 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10013 * data/lalr1.cc (yyerturn): Likewise.
10014 * data/yacc.c (yyreturn): Likewise.
10015 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10016
10017 * src/files.c: Remove obsolete FIXME comment.
10018
10019 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10020 with the other templates, and to fix bogus run-on messages such
10021 as the one reported at the end of
10022 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10023 All callers changed to avoid the newline.
10024 (yyprocessOneStack): Output two lines rather than one, to accommodate
10025 the above change. This changes the debug output format slightly.
10026
10027 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10028 reported by Joel E. Denny in
10029 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10030 (trivial change).
10031 * tests/glr-regression.at (Duplicate representation of merged trees):
10032 New test, from Joel E. Denny in:
10033 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10034 * THANKS: Add Joel E. Denny.
10035
10036 * configure.ac (AC_INIT): Bump to 2.0c.
10037
10038 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10039
10040 * NEWS: Version 2.0b.
10041
10042 * Makefile.am (SUBDIRS): Put examples before tests, so that
10043 "make check" doesn't finish with "All 1 tests passed".
10044
10045 * tests/regression.at (Token definitions): Don't rely on
10046 AT_PARSER_CHECK for data that contains backslashes. It currently
10047 uses 'echo', and 'echo' isn't portable if its argument contains
10048 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10049 that the byte '\0xff' is not printable in the C locale; it is,
10050 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10051 not printable, so use '\0x81' to test.
10052
10053 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10054 version of GCC, since the macro is used with non-GCC compilers.
10055
10056 Fix core dump reported by Pablo De Napoli in
10057 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10058 * tests/regression.at (Invalid inputs with {}): New test.
10059 * src/parse-gram.y (token_name): Translate type before using
10060 it as an index.
10061
10062 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10063 the user's name space. All uses changed to __attribute__
10064 ((__unused__)).
10065 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10066 Add __attribute__ ((__noreturn__)).
10067
10068 * etc/clcommit: Remove. We weren't using it, and it failed
10069 "make maintainer-distcheck".
10070 * Makefile.maint: Merge from coreutils.
10071 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10072 (syntax-check-rules): Change list of rules as described below.
10073 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10074 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10075 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10076 (sc_trailing_space): New rules.
10077 (sc_xalloc_h_in_src): Remove.
10078 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10079 (sc_space_tab, sc_error_exit_success, sc_changelog):
10080 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10081 (makefile-check, po-check, author_mark_check):
10082 (makefile_path_separator_check, copyright-check):
10083 Use grep -n, to make it easier to find violations.
10084 Use CVS_LIST and CVS_LIST_EXCEPT.
10085 (header_regexp, h_re): Remove.
10086 (dd_c): New macro.
10087 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10088 (my-distcheck): Use more-modern GCC flags.
10089 (signatures, %.asc): Remove.
10090 (rel-files, announcement): Remove signatures.
10091 Restore old updating code, even though we don't use it, so
10092 that we're the same as coreutils.
10093 (alpha, beta, major): Depend on news-date-check.
10094 Make the upload commands.
10095
10096 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10097 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10098 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10099 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10100 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10101 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10102 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10103 * tests/sets.at: Likewise.
10104
10105 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10106 we comment out the Autoconf version number.
10107 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10108 it's error-prone and "make maintainer-distcheck" rejects it.
10109
10110 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10111 Indent calls to "error" to pacify "make maintainer-distcheck",
10112 when the calls are not intended to be translated.
10113 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10114
10115 * src/Makefile.am (DEFS): Use +=, to pacify
10116 "make maintainer-distcheck".
10117 (bison_SOURCES): Add scan-skel.h.
10118 (sc_tight_scope): New rule, from coreutils.
10119
10120 * src/files.c (src_extension, header_extension):
10121 Now static, not extern.
10122 * src/getargs.c (short_options): Likewise.
10123 * src/muscle_tab.c (muscle_table): Likewise.
10124 * src/parse-gram.y (current_class, current_type, current_prec):
10125 Likewise.
10126 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10127 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10128 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10129 void, to avoid warning when NLS is disabled.
10130 * src/output.c: Include scan-skel.h.
10131 (scan_skel): Remove decl, since scan-skel.h does this.
10132 (output_skeleton):
10133 Indent calls to "error" to pacify "make maintainer-distcheck".
10134 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10135 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10136 "make maintainer-distcheck".
10137 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10138 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10139 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10140 (skel_lex_destroy, scan_skel): Move these decls to...
10141 * src/scan-skel.h: New file.
10142 * src/uniqstr.c (uniqstr_assert):
10143 Indent calls to "error" to pacify "make maintainer-distcheck".
10144
10145 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10146 not @VAR@.
10147
10148 * tests/torture.at: Revamp to avoid misuse of atoi that
10149 "make maintainer-distcheck" complained about.
10150
10151 * examples/extexi (message): Don't print a message more than once,
10152 and omit line-number decoration that makes Emacs compile think
10153 that informative messages are worth worrying about.
10154
10155 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10156
10157 * configure.ac: Update version number.
10158
10159 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10160 accidentally.
10161 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10162 autogenerated by the maintainer.
10163 * examples/calc++/.cvsignore: Add *.yy.
10164
10165 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10166 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10167 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10168
10169 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10170
10171 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10172 from maintainer-distcheck about casting the argument of 'free'.
10173
10174 * NEWS: Mention recent yytname changes.
10175 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10176
10177 * bootstrap: For translations that have not yet been upgraded to
10178 the new runtime-po domain, prime the pump by extracting the
10179 relevant strings from the obsolete translations. This code can be
10180 removed once the bison-runtime domain has been translated by each
10181 team.
10182
10183 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10184 now that token names are already quoted.
10185
10186 Fix problem reported by Anthony Heading.
10187 * data/glr.c (YYTOKEN_TABLE): New macro.
10188 (yytname): Define if YYTOKEN_TABLE.
10189 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10190 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10191 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10192 * src/output.c (prepare_symbols): Output token_table_flag.
10193
10194 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10195
10196 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10197 again if the first call fails.
10198
10199 * data/glr.c (yytnamerr): New function.
10200 (yyreportSyntaxError): Use it to dequote most string literals.
10201 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10202 with other skeletons. All uses changed.
10203 (yytnameerr_): New function.
10204 (yyreport_syntax_error): Use it to dequote most string literals.
10205 * data/yacc.c (yytnamerr): New function.
10206 (yyerrlab): Use it to decode most string literals.
10207 * doc/bison.texinfo (Decl Summary, Calling Convention):
10208 Clarify quoting convention of yytname.
10209 * src/output.c (prepare_symbols): Quote all names. This undoes
10210 the 2005-04-17 change, which is now accomplished (mostly) via
10211 changes in the parsers as described above.
10212 * tests/regression.at (Token definitions, Web2c Actions):
10213 Undo most 2005-04-17 change here, too.
10214
10215 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10216
10217 Fix more problems reported by twlevo@xs4all.nl.
10218 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10219 remove trailing spaces. This loses the exit status of ./types,
10220 and isn't needed since ./types shouldn't be emitting trailing
10221 spaces.
10222 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10223 as the stack isn't valid in that case.
10224
10225 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10226 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10227 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10228 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10229 is used.
10230 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10231 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10232 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10233 Likewise.
10234
10235 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10236 overly-picky compilers that reject 'char *foo = "bar";'.
10237
10238 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10239 to FILE * parameter, not to stderr. This fixes a typo introduced
10240 in the 2005-07-12 change.
10241
10242 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10243 warnings from GCC 4.
10244
10245 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10246 (yyglrShiftDefer, yysplitStack):
10247 Remove unused parameters b4_pure_formals. All uses changed.
10248 (yyglrShift): Remove unused parameters b4_user_formals.
10249 All uses changed.
10250 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10251
10252 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10253
10254 Destructor cleanups and regularization among the three skeletons.
10255 * NEWS: Document the behavior changes.
10256 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10257 stack before failing, as the cleanup code will do it for us now.
10258 * data/lalr1.cc (yyerrlab): Likewise.
10259 * data/glr.c (yyparse): Pop everything off the stack before
10260 freeing it, so that destructors get called properly.
10261 * data/lalr1.cc (yyreturn): Likewise.
10262 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10263 This is more consistent.
10264 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10265 why destructors might be called. 1.875 -> 2.1.
10266 (Destructor Decl, Decl Summary, Table of Symbols):
10267 Some English-language cleanups for %destructor.
10268 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10269 Add output line for destructor of start symbol.
10270 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10271 because of that same extra output line.
10272
10273 * NEWS: Document minor wording changes in diagnostics of
10274 Bison-generated parsers.
10275 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10276 Remove unused formals. All uses changed.
10277 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10278 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10279 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10280 Rename yyoverflowab to yyexhaustedlab.
10281 When memory exhaustion occurs during syntax-error reporting,
10282 report it separately rather than in a single diagnostic; this
10283 eases translation.
10284 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10285 (Memory Exhausted): Renamed from Parser Stack Overflow.
10286 Revamp wording slightly to prefer "memory exhaustion".
10287 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10288
10289 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10290
10291 Add i18n support to the GLR skeleton. Partially fix the C++
10292 skeleton; a C++ expert needs to finish this. Remove debugging
10293 msgids; there's little point to having them translated, since they
10294 can be understood only by someone who can read the
10295 (English-language) source code.
10296
10297 Generate runtime-po/bison-runtime.pot automatically, so that we
10298 don't have to worry about garbage getting in that file. We'll
10299 make sure after the next official release that old msgids don't
10300 get lost. See
10301 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10302
10303 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10304 Now auto-generated.
10305 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10306 Fix typos in explanations of the runtime file.
10307 * bootstrap: Change gettext keyword from YYI18N to YY_.
10308 Use standard Makefile.in.in in runtime-po, since we'll arrange
10309 for backward-compatible bison-runtime.po files in a different way.
10310 * data/glr.c (YY_): New macro, from yacc.c.
10311 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10312 Translate messages intended for users.
10313 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10314 the wording in the other skeletons. We don't know that the memory
10315 is virtual.
10316 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10317 Use same method that yacc.c uses.
10318 Don't translate debugging messages.
10319 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10320 it doesn't work (yet), and requires C++ expertise to fix.
10321 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10322 Move defn to a more logical place, to be consistent with other
10323 skeletons.
10324 Don't translate debugging messages.
10325 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10326 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10327 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10328 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10329
10330 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10331 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10332 void, not int.
10333 * tests/glr-regression.at (Badly Collapsed GLR States):
10334 Likewise.
10335 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10336 yylex should return 0 at EOF rather than aborting.
10337
10338 Improve tests for stack overflow in GLR parser.
10339 Problem reported by twlevo@xs4all.nl.
10340 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10341 All uses removed.
10342 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10343 can handle the problem.
10344 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10345 (yyparse): New local variable yyresult to record the result.
10346 Use result of setjmp to set it, rather than storing itinto
10347 struct.
10348 (yyDone): Remove label.
10349 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10350 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10351 if YYABORT is used).
10352 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10353 yyparse status; put status > 1 into diagnostic.
10354 Check that status==2 works.
10355 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10356 Use exit status 3 for failure to open (which shouldn't happen).
10357
10358 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10359
10360 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10361 1 on syntax error; just let yyparse do its thing.
10362 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10363 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10364 (Exploding the Stack Size with Alloca):
10365 (Exploding the Stack Size with Malloc):
10366 Expect exit status 2, not 1, since the parser is supposed to blow
10367 its stack. Problem reported by twlevo@xs4all.nl.
10368
10369 * data/glr.c (yyparse): Don't assume that the initial calls
10370 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10371 Print a stack-overflow message and fail instead.
10372 Initialize the line-number information before creating the stack,
10373 so that the stack-overflow message can report line zero safely.
10374
10375 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10376
10377 Fix problems reported by twlevo@xs4all.nl.
10378 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10379 (yyuserMerge): Provide a default case if b4_mergers is empty.
10380 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10381 * tests/glr-regression.at
10382 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10383 Add casts to pacify C++ compilers.
10384 * tests/glr-regression.at (Improper merging of GLR delayed action
10385 sets): Declare yylex before using it.
10386 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10387 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10388 test for valgrind; valgrind is independent of g++.
10389 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10390 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10391 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10392 Use a destructor, so that we can expand the stack. Change
10393 YYSTYPE to char * so that we can free it. Cast result of malloc.
10394
10395 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10396
10397 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10398 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10399
10400 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10401
10402 * PACKAGING: New file, suggested by Bruno Haible and taken from
10403 similar wording in gettext's PACKAGING file.
10404 * NEWS: Mention PACKAGING.
10405 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10406
10407 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10408
10409 * NEWS: Document recent i18n improvements.
10410 * bootstrap: Get runtime translations into runtime-po.
10411 Create runtime-po files automatically, if possible.
10412 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10413 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10414 does not infringe on the user's name space.
10415 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10416 * doc/bison.texinfo (Internationalization): Revamp the English
10417 and Texinfo syntax a bit, to try to make it clearer.
10418 (Bison Options, Option Cross Key): Mention --print-localedir.
10419 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10420 YYENABLE_NLS. Quote a bit more.
10421 * runtime-po/.cvsignore: New file.
10422 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10423 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10424 * runtime-po/quot.sed: Likewise.
10425 * runtime-po/boldquot.sed: Likewise.
10426 * runtime-po/en@quot.header: Likewise.
10427 * runtime-po/en@boldquot.header: Likewise.
10428 * runtime-po/insert-header.sin: Likewise.
10429 * runtime-po/remove-potcdate.sin: Likewise.
10430 * runtime-po/Makevars: Likewise.
10431 * runtime-po/LINGUAS: Likewise.
10432 * runtime-po/de.po: Likewise; we will rely on the translation project
10433 to maintain this, so "bootstrap" should get it.
10434 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10435 its value.
10436 * src/main.c (main): Bind the bison-runtime domain, too.
10437
10438 2005-07-12 Bruno Haible <bruno@clisp.org>
10439
10440 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10441 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10442 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10443 * runtime-po: New directory.
10444 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10445 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10446 * runtime-po/Rules-quot: New file, copied from po/.
10447 * runtime-po/quot.sed: Likewise.
10448 * runtime-po/boldquot.sed: Likewise.
10449 * runtime-po/en@quot.header: Likewise.
10450 * runtime-po/en@boldquot.header: Likewise.
10451 * runtime-po/insert-header.sin: Likewise.
10452 * runtime-po/remove-potcdate.sin: Likewise.
10453 * runtime-po/Makevars: New file.
10454 * runtime-po/POTFILES.in: New file.
10455 * runtime-po/LINGUAS: New file.
10456 * runtime-po/bison-runtime.pot: New file.
10457 * runtime-po/de.po: New file.
10458 * m4/bison.m4: New file.
10459 * Makefile.am (SUBDIRS): Add runtime-po.
10460 (aclocaldir, aclocal_DATA): New variables.
10461 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10462 Define aclocaldir.
10463 * src/getargs.c (usage): Document --print-localedir option.
10464 (PRINT_LOCALEDIR_OPTION): New enum item.
10465 (long_options): Add --print-localedir option.
10466 (getargs): Handle --print-localedir option.
10467 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10468 (Internationalization): New section.
10469
10470 2005-07-12 Akim Demaille <akim@epita.fr>
10471
10472 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10473 for consistency with the rest of the code.
10474 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10475 Add separators.
10476
10477 2005-07-12 Akim Demaille <akim@epita.fr>
10478
10479 * src/parse-gram.y: Use %printer instead of YYPRINT.
10480
10481 2005-07-12 Akim Demaille <akim@epita.fr>
10482
10483 * src/symtab.h, src/symtab.c (symbol_print): New.
10484 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10485 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10486
10487 2005-07-12 Akim Demaille <akim@epita.fr>
10488
10489 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10490 b4_at_dollar and b4_dollar_dollar.
10491
10492 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10493
10494 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10495 and Pennello's paper.
10496
10497 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10498
10499 * data/yacc.c (yyparse): Undo previous patch. Instead,
10500 set yylsp[0] and yyvsp[0] only if the initial action
10501 sets yylloc and yylval, respectively.
10502
10503 * data/yacc.c (yyparse): In the initial action, set
10504 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10505 This avoids the use of undefined variables if the initial
10506 action does not set yylloc and/or yylval.
10507
10508 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10509
10510 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10511 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10512 Remove from CVS. These files are automatically generated.
10513 * examples/extexi: Clarify that this file is now part of Bison,
10514 not GNU M4, and that it works with any POSIX-compatible Awk.
10515 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10516 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10517 so that we also get calc++-parser.yy. Geneate it.
10518 Use $(AWK), not gawk, since any conforming Awk will do.
10519 Put comment before action, since older 'make' can't handle comment
10520 in action.
10521 $(BUILT_SOURCES): List all built sources, not just some of them.
10522 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10523 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10524 $($(calc_sources_generated)): Remove unnecessary test for existence
10525 of target. (This had a shell syntax error anyway; a stray "x".)
10526 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10527 calc++-parser.yy.
10528 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10529
10530 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10531 implied by the other modules.
10532
10533 2005-07-06 Akim Demaille <akim@epita.fr>
10534
10535 Bind examples/calc++ to the package.
10536 * examples/calc++/Makefile: Remove, replaced by...
10537 * examples/calc++/Makefile.am: ... this new file.
10538 * examples/calc++/test: Remove input.
10539 * examples/calc++/compile: Remove.
10540 * examples/Makefile.am: New.
10541 * configure.ac, Makefile.am: Adjust.
10542 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10543
10544 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10545
10546 * data/glr.c (yyFail): Drastically simplify; since the format argument
10547 never had any % directives, we can simply pass it to yyerror.
10548 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10549 be modified later, as that is the usual style in glr.c.
10550 Problems reported by Paul Hilfinger.
10551
10552 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10553 and size overflow errors.
10554 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10555 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10556 (YYSIZEMAX): New macro.
10557 (yystpcpy): New function, taken from yacc.c.
10558 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10559 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10560 so that we don't have to maintain their signatures.
10561 (yyFail): Check for buffer overflow, by using vsnprintf rather
10562 than vsprintf. Allocate a bigger buffer if possible.
10563 Report an error if buffer allocation fails.
10564 (yyStackOverflow): New function.
10565 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10566 the initialization was successful. It might fail if storage was
10567 exhausted.
10568 (yyexpandGLRStack): Add more checks for storage allocation failure.
10569 Use yyStackOverflow to report failures.
10570 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10571 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10572 Don't assume stack number fits in int.
10573 (yysplitStack): Check for storage allocation failure.
10574 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10575 can print diagnostics on storage allocation failure. All callers
10576 changed.
10577 (yyresolveValue): Use yybool for boolean.
10578 (yyreportSyntaxError): Check for size-calculation overflow.
10579 This code is taken from yacc.c.
10580 (yyparse): Check for storage allocation errors when allocating
10581 the initial stack.
10582
10583 2005-07-05 Akim Demaille <akim@epita.fr>
10584
10585 Extract calc++ from the documentation.
10586 * doc/bison.texinfo (Calc++): Add the extraction marks.
10587 * examples/extexi: New, from the aborted GNU Programming 2E.
10588 Separate the different paragraph of a file with empty lines.
10589 * examples/Makefile: Use it to extract the whole calc++ example.
10590
10591 2005-06-24 Akim Demaille <akim@epita.fr>
10592
10593 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10594 class typedefs.
10595
10596 2005-06-22 Akim Demaille <akim@epita.fr>
10597
10598 * doc/bison.texinfo (C++ Language Interface): First stab.
10599 (C++ Parsers): Remove.
10600
10601 2005-06-22 Akim Demaille <akim@epita.fr>
10602
10603 * data/lalr1.cc (yylex_): Honor %lex-param.
10604
10605 2005-06-22 Akim Demaille <akim@epita.fr>
10606
10607 Start a set of simple examples.
10608 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10609 * examples/calc++/calc++-driver.hh,
10610 * examples/calc++/calc++-parser.yy,
10611 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10612 * examples/calc++/compile, examples/calc++/test: New.
10613
10614 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10615
10616 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10617 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10618 which stems from the 2005-05-27 patch.
10619
10620 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10621
10622 * data/glr.c: Modify treatment of unused parameters to permit use
10623 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10624
10625 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10626
10627 Fix infringement on user name space reported by Janos Zoltan Szabo.
10628 * data/yacc.c (yyparse): strlen -> yystrlen.
10629
10630 2005-05-30 Akim Demaille <akim@epita.fr>
10631
10632 * data/lalr1.cc (_): New.
10633 Translate the various messages.
10634
10635 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10636
10637 Fix infringement on user name space reported by Bruno Haible.
10638 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10639 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10640 the user's name space.
10641 (alloca): Include <stdlib.h> to get it, if it's not built in.
10642 (YYMALLOC, YYFREE): Define only if needed.
10643 (malloc, free): Declare, but only if needed, as this infringes on
10644 the user name space.
10645
10646 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10647
10648 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10649 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10650 with %d format.
10651 * lib/ebitset.c (min, max): Undef before defining.
10652 * lib/vbitset.c (min, max): Likewise.
10653 * lib/subpipe.c (create_subpipe): Save local variables in case
10654 vfork clobbers them.
10655
10656 2005-05-24 Bruno Haible <bruno@clisp.org>
10657
10658 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10659 error message syntax used by gcc-4.0.
10660
10661 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10662
10663 * README: Mention m4 1.4.3. Remove obsolete advice about
10664 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10665
10666 * bootstrap: Remove workaround for problem I encountered with
10667 gettext 0.14.1; it seems to be fixed now.
10668
10669 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10670
10671 * NEWS: Version 2.0a.
10672
10673 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10674 the previous change.
10675
10676 Various maintainer cleanups.
10677 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10678 conftest*, for benefit of CVS commands run at the same time as
10679 "configure". Add build-aux, since "bootstrap" now creates it and
10680 its subfiles.
10681 * Makefile.cfg (move_if_change): Remove.
10682 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10683 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10684 (po_repo, do-po-update, po-update, wget_files, get-targets):
10685 (config.guess-url_prefix, config.sub-url_prefix):
10686 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10687 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10688 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10689 Remove.
10690 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10691 this is now the recommended name.
10692 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10693 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10694 ylwrap. These files now go into build-aux.
10695 * config/move-if-change: Remove.
10696 * config/prev-version.txt: Bump from 1.75 to 2.0.
10697
10698 * bootstrap: Add stdio-safer, unistd-safer modules.
10699 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10700 we don't need it).
10701 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10702 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10703 * lib/subpipe.c: Include "unistd-safer.h".
10704 (create_subpipe): Make sure all the newly-created
10705 file descriptors are > 2, so that diagnostics don't
10706 get sent down them (which might cause Bison to hang, in theory).
10707 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10708 * src/files.c (xfopen): Use fopen_safer, not fopen.
10709
10710 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10711 yesterday's yacc.c fix.
10712
10713 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10714
10715 * data/glr.c, data/lalr1.cc: Update copyright date.
10716
10717 Fix a destructor bug reported by Wolfgang Spraul in
10718 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10719 * data/yacc.c (yyabortlab): Don't call destructor, and
10720 don't set yychar to EMPTY.
10721 (yyoverflowlab): Don't call destructor.
10722 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10723 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10724 since we no longer output the message "discarding lookahead token
10725 end of input ()".
10726
10727 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10728
10729 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10730 fix a small glitch in debugging output.
10731 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10732 after YY_SYMBOL_PRINT where needed.
10733
10734 (struct yyGLRState): Add some comments.
10735 (struct yySemanticOption): Add some comments.
10736 (union yyGLRStackItem): Add comment.
10737
10738 (yymergeOptionSets): Correct this to properly perform the union,
10739 avoiding infinite reported by Michael Rosien.
10740 Update comment.
10741
10742 * tests/glr-regression.at: Add test for GLR merging error reported
10743 by M. Rosien.
10744
10745 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10746
10747 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10748 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10749 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10750 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10751 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10752 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10753 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10754 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10755 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10756 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10757 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10758 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10759 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10760 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10761 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10762 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10763 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10764 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10765 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10766 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10767 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10768 src/output.h, src/parse-gram.c, src/parse-gram.h,
10769 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10770 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10771 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10772 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10773 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10774 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10775 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10776 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10777 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10778 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10779 tests/reduce.at, tests/regression.at, tests/sets.at,
10780 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10781 Update FSF postal mail address.
10782
10783 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10784
10785 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10786 Problem reported by Ralf Menzel.
10787
10788 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10789
10790 * tests/actions.at: Test that stack overflow invokes destructors.
10791 From Marcus Holland-Moritz.
10792 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10793 from here....
10794 (yyreturn): to here. That way, destructors are called properly
10795 even if the stack overflows, or the user calls YYACCEPT or
10796 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10797 (yyoverflowlab): Destroy the lookahead.
10798
10799 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10800
10801 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10802
10803 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10804
10805 * NEWS: Bison-generated C parsers no longer quote literal strings
10806 associated with tokens.
10807 * src/output.c (prepare_symbols): Don't escape strings,
10808 since users don't want to see C escapes.
10809 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10810 in diagnostics.
10811 * tests/input.at (Torturing the Scanner): Likewise.
10812 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10813
10814 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10815
10816 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10817 the data size is known to be too small and we can't increase it.
10818 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10819
10820 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10821
10822 * src/parse-gram.y: Include quotearg.h.
10823 (string_as_id): Quote $1 before using it as a key, since the
10824 lexer no longer quotes it for us.
10825 (string_content): Don't strip quotes, since lexer no longer
10826 quotes it for us.
10827 * src/scan-gram.l: Include quotearg.h.
10828 ("\""): Omit quote.
10829 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10830 a key, since the rest of the lexer doesn't quote it.
10831 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10832 * tests/regression.at (Token definitions): Check for backslashes
10833 in token strings.
10834
10835 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10836 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10837 (yyparse): Revamp code to generate long syntax error message, to
10838 make it easier to translate, and to avoid problems with arithmetic
10839 overflow. Change "virtual memory" to "memory" in diagnostic, since
10840 we don't know whether the memory is virtual.
10841
10842 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10843
10844 * NEWS: Bison-generated C parsers now use the _ macro to
10845 translate strings.
10846 * data/yacc.c (_) [!defined _]: New macro.
10847 All English strings wrapped inside this macro.
10848 * doc/bison.texinfo (Bison Parser): Document _.
10849 * po/POTFILES.in: Include src/parse-gram.c, since it now
10850 includes translateable strings that parse-gram.y doesn't.
10851
10852 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10853
10854 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10855 reverting the 2004-10-11 change to this function.
10856 (symbol_check_alias_consistency): Don't call symbol_type_set
10857 if the type name is already correct.
10858 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10859
10860 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10861
10862 * tests/regression.at (Token definitions): Don't use a token named
10863 c, as that generates a "#define c ..." that runs afoul of buggy
10864 stdlib.h that uses the identifier c as a member of struct
10865 drand48_data. Problem reported by Horst Wente.
10866
10867 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10868
10869 * bootstrap: Change translation URL from
10870 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10871 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10872 redirection glitches. Problem reported by twlevo@xs4all.nl.
10873
10874 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10875
10876 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10877 after operands; POSIX says this isn't portable for the c99 command.
10878
10879 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10880
10881 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10882 immediately if a data overrun has occurred; this may help us track
10883 down what may be a spurious failure on MacOS.
10884
10885 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10886
10887 Respond to problems reported by twlevo@xs4all.nl.
10888
10889 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10890
10891 * src/vcg.h: Comment fix.
10892 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10893 (G_CMAX): Change to -1 instead of INT_MAX.
10894
10895 * data/yacc.c (yyparse): Omit spaces before #line.
10896
10897 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10898
10899 * src/tables.c (state_number_to_vector_number): Put it inside an
10900 "#if 0", since it's not currently used. Problem reported by
10901 Roland McGrath.
10902
10903 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10904
10905 * src/output.c (escaped_output): Renamed from
10906 escaped_file_name_output, since we now use it for symbol tags as
10907 well. All uses changed.
10908 (symbol_destructors_output, symbol_printers_output):
10909 Escape symbol tags too.
10910 Problem reported by Matyas Forstner in
10911 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10912
10913 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10914 not needed.
10915 * src/output.c (user_actions_output, token_definitions_output,
10916 symbol_destructors_output, symbol_printers_output): Likewise.
10917 * src/reader.c (prologue_augment): Likewise.
10918 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10919
10920 * src/vcg.c (output_edge): Don't quote linestyle arg.
10921 Problem reported by twlevo@xs4all.nl.
10922
10923 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10924
10925 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10926 example, reported by Derek M Jones. Also, make the example even
10927 more outrageous, to better illustrate how bad the problem is.
10928
10929 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10930
10931 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10932 putsym. Typo reported by Sebastian Piping.
10933
10934 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10935
10936 * doc/bison.texinfo (Language and Grammar): some -> same
10937 (Epilogue): int he -> in the
10938 Typos reported by Sebastian Piping via Justin Pence.
10939
10940 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10941
10942 * tests/glr-regression.at (Improper handling of embedded actions
10943 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10944 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10945 with dollar signs in test names.
10946 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10947 for a similar reason.
10948
10949 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10950
10951 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10952 wants to redefine G_VIEW.
10953
10954 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10955
10956 * src/vcg.c (get_view_str): Remove case for normal_view.
10957 Problem reported by twlevo@xs4all.nl.
10958
10959 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10960
10961 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10962 Problem reported by twlevo@xs4all.nl.
10963
10964 * doc/bison.texinfo: Change @dircategory from "GNU programming
10965 tools" to "Software development". Requested by Richard Stallman
10966 via Karl Berry.
10967
10968 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10969
10970 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10971 Problem reported by twlevo@xs4all.nl.
10972
10973 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10974
10975 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10976 keyword; it's not needed with modern compilers, and it doesn't
10977 affect correctness with older compilers. Suggested by
10978 twlevo@xs4all.nl.
10979
10980 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10981
10982 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10983 gcc -Wswitch-default.
10984 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10985 * data/yacc.c (yyparse): Likewise.
10986
10987 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10988
10989 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10990 already. Let config.h define any nonstandard values.
10991
10992 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10993
10994 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10995 for the benefit of slower hosts. Problem reported by
10996 Nelson H. F. Beebe.
10997
10998 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10999
11000 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11001 being defined and not used.
11002 * data/lalr1.cc (yyparse): Likewise.
11003 Use "if (false)" rather than "if (0)".
11004
11005 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11006
11007 * TODO: Mention that we should allow NUL bytes in tokens.
11008
11009 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11010
11011 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11012 Problem reported by Hans Aberg.
11013
11014 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11015
11016 * src/getargs.c (version): Happy new year; update overall
11017 program copyright date from 2004 to 2005.
11018
11019 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11020 Problem reported by Hans Aberg.
11021 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11022 (Output file names.): Add a test for the case when standard output
11023 is closed.
11024
11025 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11026
11027 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11028 to fix an oversight in the Bison 2.0 manual.
11029
11030 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11031
11032 * NEWS: Version 2.0. Reformat the existing news items since
11033 1.875, so that related items are grouped together.
11034 * configure.ac (AC_INIT): Bump version to 2.0.
11035 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11036
11037 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11038 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11039 otherwise, we're not testing alloca. Unfortunately there's no
11040 simple way to consult HAVE_ALLOCA here.
11041
11042 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11043 for yymsg, too.
11044
11045 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11046 hand. This avoids a warning about comparing int to size_t when
11047 GCC warnings are enabled.
11048
11049 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11050
11051 * NEWS: Bison-generated parsers no longer default to using the
11052 alloca function (when available) to extend the parser stack, due
11053 to widespread problems in unchecked stack-overflow detection.
11054 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11055 responsibility to set it to a positive value. This lets the user
11056 specify a value that is not a preprocessor constant.
11057 * data/yacc.c (YYMAXDEPTH): Likewise.
11058 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11059 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11060 to be a compile-time constant. However, explain the constraints on it.
11061 Also, explain the constraints on YYINITDEPTH.
11062 (Table of Symbols): Explain that alloca is no longer the default.
11063 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11064 to 1.
11065
11066 * doc/bison.texinfo (Location Default Action): Mention that n must
11067 be zero when k is zero. Suggested by Frank Heckenbach.
11068
11069 2004-12-22 Akim Demaille <akim@epita.fr>
11070
11071 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11072 (parser::state_type, parser::semantic_type, parser::location_type):
11073 Private, not public.
11074 (parser::parse): Return ints, not bool.
11075 Returning a bool introduces a problem: 0 corresponds to false, and
11076 it seems weird to return false on success. Returning true changes
11077 the conventions for yyparse.
11078 Alternatively we could return void and send an exception.
11079 There is no clear consensus (yet?).
11080 (state_stack, semantic_stack, location_stack): Rename as...
11081 (state_stack_type, semantic_stack_type, location_stack_type): these.
11082 Private, not public.
11083 * tests/c++.at: New.
11084 * tests/testsuite.at, tests/Makefile.am: Adjust.
11085
11086 2004-12-21 Akim Demaille <akim@epita.fr>
11087
11088 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11089
11090 2004-12-21 Akim Demaille <akim@epita.fr>
11091
11092 Don't impose std::string for filenames.
11093
11094 * data/lalr1.cc (b4_filename_type): New.
11095 (position::filename): Use it.
11096 (parser.hh): Move the inclusion of stack.hh and location.hh below
11097 the user code, so that needed headers for the filename type can be
11098 included first.
11099 Forward declare them before the user code.
11100 * tests/Makefile.am (check-local, installcheck-local): Pass
11101 TESTSUITEFLAGS to the TESTSUITE.
11102
11103 2004-12-20 Akim Demaille <akim@epita.fr>
11104
11105 Use more STL like names: my_class instead of MyClass.
11106
11107 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11108 (SemanticStack, SemanticType, StateStack, StateType)
11109 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11110 (Parser::value): Rename as...
11111 (location_stack, location_type, rhs_number_type, semantic_stack)
11112 (semantic_type, state_stack, state_type, token_number_type, stack)
11113 (slice, traits, parser::yylloc, parser::yylval): these.
11114
11115 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11116
11117 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11118
11119 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11120 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11121
11122 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11123
11124 Remove uses of 'short int' and 'unsigned short int'. This raises
11125 some arbitrary limits. It uses more memory but nowadays that's
11126 not much of an issue.
11127
11128 This change does not affect the generated parsers; that's a different
11129 task, as some users will want to conserve memory there.
11130
11131 Ideally we should use size_t to represent all object counts, and
11132 something like ptrdiff_t to represent signed differences of object
11133 counts; but that will require more code-cleanup than I have the
11134 time to do right now.
11135
11136 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11137 Use size_t, not int or short int, to count objects.
11138 * src/closure.c (nritemset, closure): Likewise.
11139 * src/closure.h (nritemset, closure): Likewise.
11140 * src/nullable.c (nullable_compute): Likewise.
11141 * src/print.c (print_core): Likewise.
11142 * src/print_graph.c (print_core): Likewise.
11143 * src/state.c (state_compare, state_hash): Likewise.
11144 * src/state.h (struct state): Likewise.
11145 * src/tables.c (default_goto, goto_actions): Likewise.
11146
11147 * src/gram.h (rule_number, rule): Use int, not short int.
11148 * src/output.c (prepare_rules): Likewise.
11149 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11150 errs, reductions): Likewise.
11151 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11152 Likewise.
11153 * src/tables.c (vector_number, tally, action_number,
11154 ACTION_NUMBER_MINIMUM): Likewise.
11155 * src/output.c (muscle_insert_short_int_table): Remove.
11156
11157 2004-12-17 Akim Demaille <akim@epita.fr>
11158
11159 * data/lalr1.cc: Extensive Doxygenation.
11160 (error_): Rename as...
11161 (error): this, since it is visible to the user.
11162 Adjust callers.
11163 (Parser::message): Now an automatic variable from...
11164 (Parser::yyreport_syntax_error_): here.
11165 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11166 Parser::error.
11167 * tests/input.at: Escape $.
11168
11169 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11170
11171 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11172 Parenthesize rhs to avoid obscure problems with mistakes like
11173 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11174 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11175 b4_rhs_location): Likewise.
11176 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11177 b4_rhs_location): Likewise.
11178
11179 2004-12-16 Akim Demaille <akim@epita.fr>
11180
11181 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11182 yacc.c: be sure to stay within yycheck_.
11183 * tests/actions.at: Re-enable C++ tests.
11184
11185 2004-12-16 Akim Demaille <akim@epita.fr>
11186
11187 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11188 real.
11189
11190 2004-12-16 Akim Demaille <akim@epita.fr>
11191
11192 Use #define to handle the %name-prefix.
11193
11194 * data/glr.c, data/yacc.c: Comment changes.
11195 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11196 so that one can refer to yylex in the parser file, and have it
11197 renamed, as is the case with other skeletons.
11198
11199 2004-12-16 Akim Demaille <akim@epita.fr>
11200
11201 Move lalr1.cc internals into yy*.
11202
11203 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11204 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11205 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11206 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11207 (empty_, final_, terror_, errcode_, ntokens_)
11208 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11209 (looka_, ilooka_, error_range_, nerrs_):
11210 Rename as...
11211 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11212 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11213 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11214 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11215 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11216 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11217 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11218 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11219 these.
11220
11221 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11222
11223 Fix some problems reported by twlevo at xs4all.
11224 * src/symtab.c (symbol_new): Report an error if the input grammar
11225 contains too many symbols. This is better than calling abort() later.
11226 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11227 (struct node, struct graph):
11228 Rename member expand to stretch. All uses changed.
11229 (struct graph): Remove member layoutalgorithm. All uses removed.
11230 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11231 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11232 All uses changed.
11233 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11234
11235 2004-12-15 Akim Demaille <akim@epita.fr>
11236
11237 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11238 Add more Doxygen comments.
11239 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11240 (report_syntax_error_, translate_): Rename as...
11241 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11242 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11243
11244 2004-12-15 Akim Demaille <akim@epita.fr>
11245
11246 * data/lalr1.cc (lex_): Rename as...
11247 (yylex_): this.
11248 Move the trace here.
11249 Take the %name-prefix into account.
11250 Reported by Alexandre Duret-Lutz.
11251
11252 2004-12-15 Akim Demaille <akim@epita.fr>
11253
11254 Simplify the C++ parser constructor.
11255
11256 * data/lalr1.cc (debug_): Rename as...
11257 (yydebug_): so that the parser's internals are always in the yy*
11258 pseudo namespace.
11259 Adjust uses.
11260 (b4_parse_param_decl): Remove the leading comma as it is now only
11261 called as unique argument list.
11262 (Parser::Parser): Remove the constructor accepting a location and
11263 an initial debugging level.
11264 Remove from the other ctor the argument for the debugging level.
11265 (debug_level_type, debug_level, set_debug_level): New.
11266
11267 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11268 constructor calls.
11269
11270 2004-12-15 Akim Demaille <akim@epita.fr>
11271
11272 Remove b4_root related material: failure experiment
11273 (which goal was to allow to derive from a class).
11274
11275 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11276 definitions and uses.
11277
11278 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11279
11280 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11281 not 2, since it's not portable to subtract 1 from the start of an
11282 array. The new item 0 is never set or used. All uses changed.
11283
11284 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11285 the default definition of YYLLOC_DEFAULT. Problem reported
11286 by Frank Heckenbach.
11287
11288 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11289
11290 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11291 the normal case and one for the error case. Just use the
11292 first one uniformly. Problem reported by Frank Heckenbach.
11293 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11294 use exactly the same macro in both places.
11295 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11296 so that the normal-case YYRHSLOC works for the error case too.
11297 All uses changed.
11298 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11299 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11300 * doc/bison.texinfo (Location Default Action): Don't claim that
11301 we have an array of locations. Use the same macro for both glr
11302 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11303 the index is 0.
11304
11305 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11306
11307 * HACKING: Update email addresses to send announcements to.
11308
11309 * configure.ac (AC_INIT): Bump version to 1.875f.
11310
11311 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11312
11313 * NEWS: Version 1.875e.
11314 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11315
11316 * src/scan-skel.l: Include "complain.h", for "fatal".
11317
11318 * src/relation.h (relation_print, relation_digraph):
11319 Relation sizes are of type relation_node, not size_t (this is
11320 merely a doc fix, since the two types are equivalent).
11321 (relation_transpose): Relation sizes are of type relation_node,
11322 not int.
11323 * src/relation.c: Likewise.
11324 (top, infinity): Now of type relation_node, not int.
11325 (traverse, relation_transpose): Use relation_node, not int.
11326
11327 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11328 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11329 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11330
11331 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11332 specifying whether the test should be skipped. Use it tp
11333 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11334 fail on some hosts, and should be skipped.
11335
11336 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11337
11338 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11339 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11340 unless otherwise specified below.
11341
11342 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11343 to allocate kernel_base, kernel_items, kernel_size, since
11344 they needn't be initialized to 0.
11345 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11346 * src/closure.c (new_closure): Likewise, for itemset.
11347 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11348 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11349 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11350 (build_relations): Likewise for edge, states1, includes.
11351 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11352 * src/reader.c (packgram): Likewise, for ritem, rules.
11353 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11354 * src/relation.c (relation_digraph): Likewise for VERTICES.
11355 (relation_transpose): Likewise for new_R, end_R.
11356 * src/symtab.c (symbols_token_translations_init): Likewise for
11357 token_translations.
11358 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11359 (token_actions): Likewise for yydefact, actrow, conflrow,
11360 conflict_list.
11361 (save_column): Likewise for froms[symno], tos[symno].
11362 (goto_actions): Likewise for state_count.
11363 (pack_table): Likewise for base, pos, check.
11364 (tables_generate): Likewise for width.
11365
11366 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11367 for initial core. Just have a separate core, so we needn't worry
11368 about whether kernel_size and kernel_base are initialized.
11369
11370 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11371 kernel_size, kernel_items): Remove unnecessary initialization.
11372 * src/conflicts.c (conflicts): Likewise.
11373 * src/derives.c (derives): Likewise.
11374 * src/muscle_tablc (muscle_insert): Likewise.
11375 * src/relation.c (relation_digraph): Likewise.
11376 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11377 conflrow, conflict_table, conflict_list, table, check):
11378 Likewise.
11379
11380 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11381 This is because all callers pass unsigned int.
11382 * src/closure.h (new_closure): Likewise.
11383
11384 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11385 (build_relations): Initialize includes[i] in all cases.
11386 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11387 and rules[ruleno].precsym. Initialize members in order.
11388 * src/relation.c (relation_transpose): Always initialize new_R[i]
11389 and end_R[i].
11390 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11391
11392 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11393 conflict_list[0] was always 0, but now it isn't initialized.
11394
11395 * src/table.c (table_grow): When conflict_table grew, the grown
11396 area wasn't cleared. Fix this.
11397
11398 * lib/.cvsignore: Add strdup.c, strdup.h.
11399 * m4/.cvsignore: Add strdup.m4.
11400
11401 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11402
11403 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11404 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11405 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11406 ngotos + 1 without checking for overflow.
11407 (build_relations): Use END_NODE, not -1, to denote end of edges.
11408 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11409 build_relations): Use goto_number, not int, for goto numbers.
11410 * src/tables.c (save_column, default_goto): Likewise.
11411
11412 2004-11-23 Akim Demaille <akim@epita.fr>
11413
11414 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11415 of #defining from yystype.
11416 Don't typedef yystype, C++ does not need it.
11417 This lets it possible to forward declare it as union.
11418
11419 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11420
11421 * bootstrap (gnulib_modules): Add extensions.
11422 Problem reported by Jim Meyering.
11423
11424 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11425
11426 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11427 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11428 src/system.h, src/tables.c: XFREE -> free, to accommodate
11429 recent change to gnulib xalloc.h.
11430 Problem reported by Jim Meyering.
11431
11432 2004-11-17 Akim Demaille <akim@epita.fr>
11433
11434 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11435
11436 2004-11-17 Akim Demaille <akim@epita.fr>,
11437 Alexandre Duret-Lutz <adl@gnu.org>
11438
11439 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11440 changes.
11441 (YYCDEBUG): Adjust.
11442 Use it instead of cdebug_.
11443 (Parser::debug_stream, Parser::set_debug_stream): New.
11444 (Parser::symprint_): Define cdebug_ for temporary backward
11445 compatibility.
11446 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11447 debug_stream ().
11448
11449 2004-11-17 Akim Demaille <akim@epita.fr>
11450
11451 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11452 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11453 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11454 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11455
11456 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11457
11458 * data/glr.c (yyloc_default): Remove; not used.
11459 Problem reported by Frank Heckenbach.
11460
11461 2004-10-25 Akim Demaille <akim@epita.fr>
11462
11463 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11464 Introduce another definition to address simple location arrays.
11465 (yyGLRStack): New member: yyerror_range.
11466 (yyrecoverSyntaxError, yyparse): Update it.
11467 (yyrecoverSyntaxError): Use it when shifting the error token to
11468 have an accurate range, equivalent to the one computed by both
11469 yacc.c and lalr1.cc.
11470 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11471 that column numbers start at column 0, as per GNU Coding
11472 Standards, the others tests, and the doc.
11473 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11474 Adjust to the above change (first column is 0).
11475 And adjust the location of the "<error>", now covering the whole
11476 line.
11477
11478 2004-10-22 Akim Demaille <akim@epita.fr>
11479 and Paul Eggert <eggert@cs.ucla.edu>
11480
11481 Remove some arbitrary limits on goto numbers and relations.
11482 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11483 initial values, since they're never used.
11484 (set_goto_map): ngotos is now unsigned, so test for overflow
11485 by seeing whether it wraps around to zero.
11486 * src/lalr.h (goto_number): Now size_t, not short int.
11487 (GOTO_NUMBER_MAXIMUM): Remove.
11488 * src/relation.c (relation_print, traverse, relation_transpose):
11489 Check for END_NODE rather than looking at sign.
11490 * src/relation.h (END_NODE): New macro.
11491 (relation_node): Now size_t, not short int.
11492
11493 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11494
11495 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11496 keyword, not an identifier. Problem reported by Baron Schwartz in
11497 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11498
11499 2004-10-11 Akim Demaille <akim@epita.fr>
11500
11501 * src/symtab.c (symbol_check_alias_consistency): Also check
11502 type names, destructors, and printers.
11503 Reported by Alexandre Duret-Lutz.
11504 Recode the handling of associativity and precedence in terms
11505 of symbol_precedence_set.
11506 Accept no redeclaration at all, not even equal to the previous
11507 value.
11508 (redeclaration): New.
11509 Use it to factor redeclaration complaints.
11510 (symbol_make_alias): Don't set the type of the alias, let
11511 symbol_check_alias_consistency do it as for other features.
11512 * src/symtab.h (symbol): Add new member prec_location, and
11513 type_location.
11514 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11515 * tests/input.at (Incompatible Aliases): New.
11516
11517 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11518
11519 .cvsignore fixes to accommodate gnulib changes,
11520 and the practice of naming build directories "_build".
11521 * .cvsignore: Add "_*". Sort.
11522 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11523 * m4/.cvsignore: Add "*_gl.m4".
11524
11525 2004-10-06 Akim Demaille <akim@epita.fr>
11526
11527 * src/parse-gram.y (add_param): Fix the truncation of trailing
11528 spaces.
11529
11530 2004-10-05 Akim Demaille <akim@epita.fr>
11531
11532 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11533 whether the reducion was empty or not. This leaves room to
11534 improve the use of YYLLOC_DEFAULT in such a case.
11535 lalr1.cc is still experimental, so changing this is acceptable.
11536 And finally, there are probably not many users who changed the
11537 handling of locations in GLR, so changing is admissible too.
11538
11539 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11540 empty reduction, set @$ to an empty location ending the previously
11541 stacked symbol.
11542 Adjust uses to make sure the code is triggered on empty
11543 reductions.
11544 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11545 expected output: empty reductions have empty locations.
11546
11547 2004-09-29 Akim Demaille <akim@epita.fr>
11548
11549 * data/lalr1.cc: Move towards a more standard C++ coding style
11550 for templates: Class < T > -> Class<T>.
11551
11552 2004-09-29 Akim Demaille <akim@epita.fr>
11553
11554 * data/lalr1.cc: Reinstall the former ctor, for sake of
11555 compatibility, but warn it will be removed.
11556 Move towards a more standard C++ coding style (i.e., type *var ->
11557 type* var).
11558
11559 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11560
11561 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11562 since it's less likely to work if NULs are involved in the future.
11563
11564 2004-09-27 Akim Demaille <akim@epita.fr>
11565
11566 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11567
11568 2004-09-27 Akim Demaille <akim@epita.fr>
11569
11570 * data/lalr1.cc (b4_parse_param_decl_1): New.
11571 (b4_parse_param_decl): Use it to have different names between attribute
11572 and argument names.
11573 (b4_cc_constructor_call): Likewise.
11574
11575 2004-09-24 Akim Demaille <akim@epita.fr>
11576
11577 * src/parse-gram.y (add_param): Strip the leading and trailing
11578 blanks from a formal argument declaration.
11579 (YY_LOCATION_PRINT): New.
11580
11581 2004-09-24 Akim Demaille <akim@epita.fr>
11582
11583 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11584 after the location.
11585
11586 2004-09-24 Akim Demaille <akim@epita.fr>
11587
11588 * doc/bison.texinfo (Table of Symbols): Sort.
11589
11590 2004-09-21 Akim Demaille <akim@epita.fr>
11591
11592 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11593 the useless parentheses.
11594 Suggested by Paul Eggert.
11595
11596 2004-09-20 Akim Demaille <akim@epita.fr>
11597
11598 Let the initial-action act on the look-ahead, and use it for the
11599 "initial push" (corresponding to an hypothetical beginning-of-file).
11600 And let lalr1.cc honor %initial-action.
11601
11602 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11603 example.
11604 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11605 (Parser::Parser): Remove the ctor that used to initialize it.
11606 (Parser::parse): Like in the other skeletons, issue the "starting
11607 parse" message before any action.
11608 Honor %initial-action.
11609 Initialize the stacks with the lookahead.
11610 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11611 look-ahead.
11612 Push them in the stacks.
11613 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11614
11615 2004-09-20 Akim Demaille <akim@epita.fr>
11616
11617 * doc/bison.texinfo (Initial Action Decl): New.
11618
11619 2004-09-20 Akim Demaille <akim@epita.fr>
11620
11621 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11622 clearer criterion to define it.
11623 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11624 When reducing on an empty RHS, use the latest stacked location as
11625 location.
11626 yylloc is not always available.
11627 * data/glr.c: Likewise.
11628 Also, honor initial-actions.
11629
11630 2004-09-20 Akim Demaille <akim@epita.fr>
11631
11632 * data/yacc.c (YY_LOCATION_PRINT): New.
11633 Define when we know YYLTYPE's structure, i.e., when the default
11634 YYLLOC_DEFAULT is used.
11635 * data/c.m4 (b4_yysymprint_generate): Use it.
11636 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11637 value of the result.
11638 (error_start_): Replace with...
11639 (error_range_): this location array.
11640 This allows to replace code relying on the implementation of
11641 locations by portable code.
11642 * data/yacc.c (yylerrsp): Replace with...
11643 (yyerror_range): this.
11644 Every time a token is popped, update yyerror_range[0], to have an
11645 accurate location for the error token.
11646 * data/glr.c (YY_LOCATION_PRINT): New.
11647 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11648 deference a pointer.
11649 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11650 report the location in %printers.
11651
11652 * src/scan-skel.l: Instead of abort, report error messages to ease
11653 understanding skeleton scanning failures.
11654
11655 2004-09-16 Akim Demaille <akim@epita.fr>
11656
11657 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11658 (iterator, const_iterator): these, to be more in the C++ spirit.
11659 Also, return reverse iterators so that when displaying the stack
11660 we display its bottom first.
11661 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11662 from yacc.c.
11663 We should probably use vector here though.
11664
11665 2004-09-16 Akim Demaille <akim@epita.fr>
11666
11667 Have more complete shift traces.
11668
11669 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11670 to report Shifts instead of ad hoc YYDPRINTF invocations,
11671 including for the error token.
11672 * data/lalr1.cc (symprint_): Output the location.
11673 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11674 output the location within the %printer.
11675 Activate GLR tests, at least to make sure they compile properly.
11676 They still don't pass though.
11677 * tests/calc.at: Adjust expect verbose output, since now "Entering
11678 state..." is on a different line than the "Shifting" message.
11679
11680 2004-09-08 Akim Demaille <akim@epita.fr>
11681
11682 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11683 Bison directive from the Bison file to the invocation of this
11684 macro, so that these directives are passed to
11685 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11686 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11687 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11688 the extra Bison directives instead of the whole series.
11689 Change the grammar so that there are recoverable errors, and
11690 unrecoverable errors. Now we can have the parser give up before
11691 consuming the whole input. As a result we now can observe that
11692 the lookahead is freed when needed.
11693 Change the parser source to parse argv[1] instead of a hard coded
11694 string.
11695 Simplify yylex, and give a value and location to EOF.
11696 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11697 passed directives already coded in the file.
11698 Add some tests to check the location of "error".
11699 For some tests, the C++ parser is correct, and not yacc.c.
11700 For other tests, they provide different, but unsatisfying, values,
11701 so keep the C++ value so that at least one parser is "correct"
11702 according to the test suite.
11703 (Actions after errors): Remove, this is subsumed by the
11704 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11705
11706 2004-09-06 Akim Demaille <akim@epita.fr>
11707
11708 * data/lalr1.cc: Adjust the indentation of the labels.
11709 (Parser::pop): New.
11710 Use it.
11711
11712 2004-09-06 Akim Demaille <akim@epita.fr>
11713
11714 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11715 argument, an informative message.
11716 Call YY_SYMBOL_PRINT.
11717 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11718 * data/lalr1.cc (destruct_): Likewise.
11719 In addition, no longer depend on b4_yysymprint_generate and
11720 b4_yydestruct_generate to generate these functions, do it "by
11721 hand".
11722
11723 2004-09-03 Akim Demaille <akim@epita.fr>
11724
11725 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11726 invoked, yydestruct the lookahead.
11727 * tests/calc.at (Calculator $1): Update the expected lengths of
11728 traces: there is an added line for the discarded lookahead.
11729 * doc/bison.texinfo (Destructor Decl): Some rewording.
11730 Define "discarded" symbols.
11731
11732 2004-09-02 Akim Demaille <akim@epita.fr>
11733
11734 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11735
11736 2004-09-02 Akim Demaille <akim@epita.fr>
11737
11738 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11739 (YYDSYMPRINTF): Rename as...
11740 (YY_SYMBOL_PRINT): this.
11741 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11742 two.
11743 Use it instead of direct symprint_ calls.
11744 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11745 one.
11746
11747 2004-09-02 Akim Demaille <akim@epita.fr>
11748
11749 * data/lalr1.cc (b4_yysymprint_generate): New.
11750 (symprint_): New member function, defined when YYDEBUG.
11751 Use it consistently instead of token/nterm debugging output by
11752 hand.
11753 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11754 %printer calls to use cdebug_ when using lalr1.cc.
11755
11756 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11757
11758 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11759 with #ifdef YYDEBUG.
11760
11761 2004-08-26 Akim Demaille <akim@epita.fr>
11762
11763 * doc/bison.texinfo (Implementing Loops): Rename as...
11764 (Implementing Gotos/Loops): this.
11765
11766 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11767
11768 Adjust to latest gnulib.
11769 * bootstrap (gnulib_modules): Add xalloc-die.
11770 Set LC_ALL=C so that file names sort consistently.
11771 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11772 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11773 uintmax_t.m4, ulonglong.m4.
11774 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11775 po.m4 since we are now using _gl.m4 instead.
11776
11777 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11778
11779 * src/scan-action.l: Remove. Scanning of semantic actions is
11780 handled in scan-gram.l.
11781
11782 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11783
11784 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11785
11786 * src/location.h (struct): The file member is a uniqstr.
11787 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11788
11789 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11790
11791 Fix bug with non-%union parsers that have printers or destructors,
11792 which led to a Bison core dump. Reported by Peter Fales in
11793 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11794
11795 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11796 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11797 not to our own type.
11798 * src/output.c (symbol_destructors_output, symbol_printers_output):
11799 Don't assume %union.
11800 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11801 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11802 UNION-FLAG. All callers changed.
11803 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11804 Use type char, not unsigned int, when declaring an array of char;
11805 this lets us remove a cast.
11806 (Printers and Destructors): Add non-%union test cases.
11807
11808 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11809
11810 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11811 GLR writeups. E.g., avoid frenchspacing and the future tense,
11812 change "lookahead" to "look-ahead", and change "wrt" to "with
11813 respect to".
11814
11815 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11816
11817 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11818 New sections, split off from the GLR Parsers section. Put the new
11819 Simple GLR Parser near the start of the GLR section, for clarity.
11820 Rewrite connective text.
11821
11822 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11823
11824 * doc/bison.texinfo (Simple GLR Parsers): New section.
11825
11826 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11827
11828 * NEWS, TODO, doc/bison.texinfo:
11829 Use "look-ahead" instead of "lookahead", to be consistent.
11830 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11831 while we're fixing "look-ahead".
11832 * src/conflicts.c (shift_set): Renamed from shiftset.
11833 (look_ahead_set): Renamed from lookaheadset.
11834 * src/print.c: Likewise.
11835 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11836 name for "lookahead".
11837 (report_types, usage): Likewise.
11838 * src/getargs.h (report_look_ahead_tokens): Renamed from
11839 report_lookaheads.
11840 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11841 compute_lookaheads.
11842 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11843 (look_ahead_tokens_print): Renamed from lookaheads_print.
11844 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11845 state_rule_lookaheads_print.
11846 * src/state.h: Likewise.
11847 (reductions.look_ahead_tokens): Renamed from lookaheads.
11848 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11849 AT_DATA_LOOKAHEADS_GRAMMAR.
11850
11851 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11852
11853 * README: Update location of patched M4 distribution.
11854
11855 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11856
11857 Don't assume the C++ compiler takes the same arguments as the C compiler
11858 (trivial change).
11859 * configure.ac (O0CXXFLAGS): New var.
11860 * tests/atlocal.in (CXXFLAGS): Use it.
11861
11862 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11863
11864 Fix some "make check" problems with C++ reported by
11865 Albert Chin-A-Young for Tru64 C++ in this thread:
11866 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11867
11868 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11869 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11870 Output to a .cc file for C++, not to a .c file.
11871 * tests/calc.at (AT_CHECK_CALC): Likewise.
11872 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11873 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11874
11875 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11876
11877 * tests/calc.at, tests/actions.at: Workaround for SGI
11878 C++ compiler. (trivial change)
11879
11880 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11881
11882 Spent a few hours checking out which prerequisite versions the
11883 current sources actually require. I went all the way back to
11884 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11885 a seemingly endless set of combinations of versions more recent
11886 than that. The bottom line is that the current sources require
11887 fairly recent versions of the build tools, and it'll be some work
11888 to change this.
11889 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11890 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11891 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11892 Add comments explaining why those particular versions are
11893 currently needed.
11894
11895 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11896 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11897 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11898
11899 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11900 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11901
11902 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11903
11904 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11905 0.11.5. Suggested by Bruno Haible.
11906 * bootstrap: Remove gettext version checking.
11907
11908 * doc/bison.texinfo (Decl Summary): Also mention that %union
11909 can depend on prerequisite types. Problem reported by Tim
11910 Van Holder.
11911
11912 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11913
11914 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11915 * README-alpha: Don't tell people not to package this.
11916
11917 * bootstrap: Don't assume $(...) works; use `...` instead.
11918 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11919 gettext better.
11920
11921 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11922 put into the -d output file, and mention what to do if YYSTYPE is
11923 defined as a macro.
11924
11925 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11926
11927 Undo change made earlier today: it caused autopoint to not bring
11928 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11929 autopoint's.
11930
11931 * bootstrap: Check that gettext version matches what's in
11932 configure.ac. Warn users to ignore robots.txt ERROR 404.
11933 * bootstrap: Undo today's earlier change (logged below).
11934 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11935
11936 The gettext version checking is causing more trouble than it's
11937 curing; remove it. Problem reported by Paul Hilfinger.
11938
11939 * bootstrap: Issue a warning that one can expect a message
11940 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11941 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11942
11943 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11944
11945 Ensure that the C++ compiler used for testing actually works on a
11946 simple test program; if not, skip the C++-related tests. Problem
11947 reported by Vin Shelton in:
11948 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11949
11950 * m4/cxx.m4: New file.
11951 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11952 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11953 * tests/local.at (AT_COMPILE_CXX): Use it.
11954
11955 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11956
11957 * data/glr.c (yylloc): Output this macro even if locations are not
11958 being generated, as the GLR parser needs it even in that case.
11959 Problem reported by Troy A. Johnson
11960 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11961
11962 * configure.ac (AC_INIT): Update to 1.875e.
11963
11964 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11965
11966 * NEWS: Version 1.875d.
11967 * configure.ac (AC_INIT): Likewise.
11968 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11969
11970 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11971 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11972 lalr1.cc runs afoul of the first, and the last two are no longer
11973 supported by GCC 3.4.0.
11974 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11975 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11976
11977 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11978
11979 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11980 unsigned int, for compatibility with latest gnulib hash module.
11981 * src/state.c (state_hash, state_hasher): Likewise.
11982 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11983 * src/uniqstr.c (hash_uniqstr): Likewise.
11984
11985 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11986
11987 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11988
11989 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11990 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11991 character and string literals.
11992 (unexpected_end): New function.
11993 (unexpected_eof): Use it.
11994 (unexpected_newline): New function.
11995 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11996 actions.
11997
11998 * NEWS: Document %expect-rr.
11999
12000 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12001 Fix typo by replacing $1 with $option.
12002 Remove more 'intl'-related files.
12003 Don't DEFUN AM_INTL_SUBDIR twice.
12004
12005 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12006 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12007 strtoul.c.
12008 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12009 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12010 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12011 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12012 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12013 * src/.cvsignore: Add *.output.
12014
12015 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12016 gets copied to the output file.
12017
12018 2004-04-28 Paul Eggert <eggert@twinsun.com>
12019
12020 Get files from the gnulib and po repositories, instead of relying
12021 on them being in our CVS. Upgrade to latest versions of gnulib
12022 and Automake.
12023
12024 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12025 * bootstrap: Bootstrap from gnulib and po repositories.
12026 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12027 * README-cvs: Document these changes. Remove version numbers from
12028 mentions of build tools, since they change so often. Mention Flex.
12029
12030 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12031 (gl_USE_SYSTEM_EXTENSIONS): Add.
12032 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12033 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12034 does this for us.
12035 (AC_ISC_POSIX): Remove; we no longer support this
12036 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12037 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12038 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12039 Do not check for C89 headers, except for locale.h which is used
12040 by the Yacc library and must port to K&R hosts.
12041 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12042 Do not check for C89 functions, except for setlocale which is
12043 used by the Yacc library.
12044 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12045 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12046 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12047 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12048 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12049 AM_GNU_GETTEXT): Remove; now done by:
12050 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12051 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12052 for us.
12053
12054 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12055 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12056 Define to empty, as gnulib.mk will do the rest for us.
12057 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12058 for us.
12059 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12060 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12061
12062 * src/files.c: Include gnulib's xstrndup.h.
12063
12064 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12065 (REALLOC): Use xnrealloc, for likewise.
12066 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12067 (strnlen, memrchr): Remove decls; functions no longer used.
12068 Include <stpcpy.h>.
12069
12070 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12071 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12072 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12073 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12074 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12075 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12076 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12077 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12078 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12079 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12080 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12081 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12082 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12083 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12084 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12085 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12086 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12087 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12088 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12089 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12090 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12091 Remove, as these files are now generated automatically
12092 by bootstrap or automake.
12093
12094 * po/ChangeLog: Remove: all but one entry was a duplicate
12095 of this file, and I moved that 2000-11-02 entry here.
12096
12097 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12098 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12099 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12100 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12101 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12102 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12103 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12104 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12105 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12106 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12107 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12108 xstrndup.h.
12109 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12110 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12111 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12112 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12113 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12114 * src/.cvsignore: Remove *_.c.
12115
12116
12117 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12118 support it. (The latest stable gzip doesn't.)
12119
12120 2004-04-27 Paul Eggert <eggert@twinsun.com>
12121
12122 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12123 case, as stos_ is now used by destructors due to the 2004-02-09
12124 change.
12125
12126 Remove more K&R C support.
12127 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12128 * lib/subpipe.c (errno): Remove decl.
12129 Include <stdlib.h> unconditionally.
12130 (EXIT_FAILURE): Remove macro.
12131 * src/complain.c (vfprintf, strerror): Remove.
12132 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12133 unconditionally.
12134 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12135 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12136 (strchr, strspn, memchr): Remove decls.
12137 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12138 unconditionally. Do not declare perror.
12139 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12140 unconditionally.
12141
12142 * src/complain.c (_): Remove useless defn, as system.h defines this.
12143
12144 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12145 with latest obstack.h.
12146 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12147 to procedure types, as obstack.h now does that for us.
12148 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12149
12150 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12151 so that this include file can stand alone.
12152 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12153 does this now. Include subpipe.h first after config.h, to
12154 test whether it can stand alone.
12155
12156 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12157 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12158 unused declaration.
12159
12160 * tests/synclines.at (%union synch line): Put a dummy member in
12161 the union, because empty unions aren't allowed in C. Caught
12162 by GCC 3.4.0.
12163
12164 2004-04-13 Jim Meyering <jim@meyering.net>
12165
12166 * src/conflicts.c (conflicts_print): Correct format string typo:
12167 use `%%' to produce literal `%'. (trivial change)
12168
12169 2004-03-30 Paul Eggert <eggert@twinsun.com>
12170
12171 * src/getargs.c (version): Update copyright year to 2004.
12172
12173 * data/c.m4 (b4_int_type): Use 'short int' rather than
12174 'short', and similarly for 'long', 'unsigned', etc.
12175 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12176 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12177 yy_yypstack, yydumpstack): Likewise.
12178 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12179 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12180 Likewise.
12181 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12182 yy_stack_print, yyparse): Likewise.
12183 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12184 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12185 * lib/bitset.c (bitset_print): Likewise.
12186 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12187 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12188 * lib/bitsetv.c (bitsetv_dump): Likewise.
12189 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12190 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12191 Likewise.
12192 * src/LR0.c (allocate_itemsets): Likewise.
12193 * src/gram.h (rule_number, rule): Likewise.
12194 * src/lalr.h (goto_number): Likewise.
12195 * src/nullable.c (nullable_compute): Likewise.
12196 * src/output.c (prepare_rules): Likewise.
12197 * src/relation.c (relation_print, relation_digraph): Likewise.
12198 * src/relation.h (relation_node): Likewise.
12199 * src/state.h (state_number, transitions, errs, reductions,
12200 struct state): Likewise.
12201 * src/symtab.h (symbol_number, struct symbol): Likewise.
12202 * src/tables.c (vector_number, tally, action_number,
12203 default_goto, goto_actions): Likewise.
12204 * tests/existing.at (GNU Cim Grammar): Likewise.
12205 * tests/regression.at (Web2c Actions): Likewise.
12206
12207 * src/output.c (muscle_insert_short_int_table): Renamed from
12208 muscle_insert_short_table. All uses changed.
12209
12210 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12211
12212 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12213 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12214 Add %expect-rr rule.
12215
12216 * src/scan-gram.l: Recognize %expect-rr.
12217
12218 * src/conflicts.h (expected_sr_conflicts): Rename from
12219 expected_conflicts.
12220 (expected_rr_conflicts): Declare.
12221
12222 * src/conflicts.c (expected_sr_conflicts): Rename from
12223 expected_conflicts.
12224 (expected_rr_conflicts): Define.
12225 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12226 for GLR parsers.
12227 Use expected_sr_conflicts in place of expected_conflicts.
12228 Warn if expected_rr_conflicts used in non-GLR parser.
12229
12230 * doc/bison.texinfo: Add documentation for %expect-rr.
12231
12232 2004-03-08 Paul Eggert <eggert@gnu.org>
12233
12234 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12235 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12236
12237 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12238 in lalr1.cc.
12239 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12240 * src/scan-gram.l (scan_integer): New function.
12241 ({int}): Use it.
12242 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12243 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12244 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12245 Say "long int", not "long", for uniformity with GNU style.
12246
12247 2004-02-25 Paul Eggert <eggert@twinsun.com>
12248
12249 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12250 compilers. This fixes a problem with Intel's C++ compiler being
12251 chatty, reported by Guido Trentalancia in
12252 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12253
12254 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12255
12256 Support %destructor and merge error locations in lalr1.cc.
12257
12258 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12259 (Parser::stos_): Define unconditionally.
12260 (Parser::destruct_): New method. Generate its body with
12261 b4_yydestruct_generate.
12262 (Parser::error_start_): New attribute.
12263 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12264 token which are discarded.
12265 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12266 error_start_ when erroneous token are discarded.
12267 (Parser::parse) <yyerrlab1>: Compute the location of the error
12268 token so that it covers all the discarded tokens.
12269 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12270 it can be called with `%skeleton "lalr1.cc"', and do that.
12271
12272 2004-02-02 Paul Eggert <eggert@twinsun.com>
12273
12274 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12275 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12276 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12277 There's no need to mention top_builddir since Automake does that
12278 for us.
12279 (INCLUDES): Remove, as Automake says it's obsolescent.
12280 Contents migrated into AM_CPPFLAGS as described above.
12281 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12282
12283 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12284
12285 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12286 (yyreportSyntaxError): Handle case where lookahead token is
12287 YYEMPTY.
12288
12289 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12290
12291 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12292 resulting parsers are compilable with C++.
12293
12294 2003-12-23 Paul Eggert <eggert@twinsun.com>
12295
12296 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12297 * src/output.c (output_skeleton): Rename local var.
12298 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12299 Bison tokens, as this runs afoul of the 2003-10-07 change that
12300 disallowed NUL bytes in character constants or string literals.
12301
12302 * tests/local.at: Require Autoconf 2.59's Autotest.
12303 * tests/testsuite.at: Don't include local.at, since we now assume
12304 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12305 including it.
12306 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12307 multiple inclusion warnings.
12308
12309 2003-12-02 Akim Demaille <akim@epita.fr>
12310
12311 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12312 conditions.
12313 From Bruno Haible.
12314
12315 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12316
12317 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12318
12319 2003-10-07 Paul Eggert <eggert@twinsun.com>
12320
12321 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12322 if testsuite doesn't exist.
12323
12324 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12325 literals, unfortunately.
12326 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12327 Complain about NUL bytes in character constants or string literals.
12328
12329 2003-10-05 Paul Eggert <eggert@twinsun.com>
12330
12331 * NEWS: Don't document %no-default-prec, as it's still
12332 too experimental.
12333 * doc/bison.texinfo: Document %no-default-prec only if
12334 the defaultprec flag is set. Normally it's not.
12335
12336 2003-10-04 Paul Eggert <eggert@twinsun.com>
12337
12338 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12339 non-modifiable lvalue, instead of a modifiable one.
12340 * doc/bison.texinfo (Actions): Document that $$ can
12341 be assigned to. Do not claim that $$ and $N are
12342 array element references: user code should not rely on this.
12343
12344 2003-10-01 Paul Eggert <eggert@twinsun.com>
12345
12346 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12347 (grammar_declaration): Use it.
12348 * src/scan-gram.l: New token %no-default-prec.
12349 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12350 * NEWS, doc/bison.texinfo: Document the above.
12351
12352 2003-10-01 Akim Demaille <akim@epita.fr>
12353
12354 VCG no longer supports long_straight_phase.
12355
12356 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12357 * src/print_graph.c (print_graph): Adjust.
12358
12359 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12360 and Paul Eggert <eggert@twinsun.com>
12361
12362 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12363 Table of Symbols): Document %default-prec.
12364 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12365 (grammar_declaration): Set default_prec on %default-prec.
12366 * src/scan-gram.l (%default-prec): New token.
12367 * src/reader.h (default_prec): New flag.
12368 * src/reader.c: Likewise.
12369 (packgram): Handle it.
12370 * tests/conflicts.at (%default-prec without %prec,
12371 %default-prec with %prec, %default-prec 1): New tests.
12372
12373 2003-09-30 Paul Eggert <eggert@twinsun.com>
12374
12375 * tests/testsuite.at: Include local.at, not input.at, fixing
12376 a typo in the 2003-08-25 patch.
12377
12378 2003-08-27 Akim Demaille <akim@epita.fr>
12379
12380 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12381 GCC warnings.
12382
12383 2003-08-26 Akim Demaille <akim@epita.fr>
12384
12385 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12386 "<\#" to avoid magic from Gnus when posting parts of this script.
12387
12388 2003-08-26 Akim Demaille <akim@epita.fr>
12389
12390 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12391 (Parser::parse): here.
12392 Adjust: nerrs and errstatus is now replaced by...
12393 (Parser::nerrs_, Parser::errstatus_): New.
12394
12395 2003-08-25 Akim Demaille <akim@epita.fr>
12396
12397 * config/announce-gen, Makefile.cfg: New.
12398 * Makefile.am: Adjust.
12399 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12400 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12401
12402 2003-08-25 Akim Demaille <akim@epita.fr>
12403
12404 When reducing initial empty rules, Bison parser read an initial
12405 location that is not defined. This results in garbage, and that
12406 affects Bison's own parser. Therefore we need (i) to extend Bison
12407 to support a means to initialize this location, and (ii) to use
12408 this CVS Bison to fix CVS Bison's parser.
12409
12410 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12411 with...
12412 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12413 * src/parse-gram.y: Adjust.
12414 (%initial-action): New.
12415 (%error-verbose): Since we require CVS Bison, there is no reason
12416 not to use it.
12417 * src/scan-gram.l: Adjust.
12418 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12419 * data/yacc.c (yyparse): Use b4_initial_action.
12420
12421 2003-08-25 Akim Demaille <akim@epita.fr>
12422
12423 * doc/bison.texinfo: Don't promote stdout for error messages.
12424
12425 2003-08-25 Akim Demaille <akim@epita.fr>
12426
12427 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12428 From Alexandre Duret-Lutz.
12429
12430 2003-08-25 Akim Demaille <akim@epita.fr>
12431
12432 Version 1.875c.
12433
12434 2003-08-25 Akim Demaille <akim@epita.fr>
12435
12436 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12437 Use them.
12438
12439 2003-08-25 Akim Demaille <akim@epita.fr>
12440
12441 * data/lalr1.cc (Parser::reduce_print_): New.
12442 Use it.
12443
12444 2003-08-25 Akim Demaille <akim@epita.fr>
12445
12446 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12447 error recovery loops. This patch is based on
12448 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12449 Also, augment the similarity between lalr1.cc and yacc.c.
12450 Note: the locations of error recovery rules are not correct yet.
12451
12452 * data/lalr1.cc: Comment changes to augment the similarity between
12453 lalr1.cc and yacc.c.
12454 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12455 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12456 yyerrlab), when hitting EOF, pop the whole stack here instead of
12457 merely falling thru the default error handling mechanism.
12458 (yyerrorlab): New label, with the old contents of YYERROR,
12459 plus the following change: pop the stack of rhs corresponding
12460 to the production that invoked YYERROR. That is how Yacc
12461 behaves (required by POSIX).
12462 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12463 fail.
12464
12465 2003-08-25 Akim Demaille <akim@epita.fr>
12466
12467 Tune local.at so that people can "autom4te -l autotest calc.at -o
12468 calc" for instance, to extract a sub test suite.
12469
12470 * tests/testsuite.at: Move the initialization, Autotest version
12471 requirement, and AT_TESTED invocation into...
12472 * tests/local.at: here.
12473 * tests/testsuite.at: Include it for compatibility with Autoconf
12474 2.57.
12475 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12476 be ignore.
12477
12478 2003-08-04 Paul Eggert <eggert@twinsun.com>
12479
12480 Rework code slightly to avoid gcc -Wtraditional warnings.
12481 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12482 The returned value is now stored in *YY0. All callers changed.
12483 * src/output.c (merge_output): Adjust to the above change.
12484
12485 2003-07-26 Paul Eggert <eggert@twinsun.com>
12486
12487 * data/glr.c (YYASSERT): New macro.
12488 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12489 yyresolveStates, yyprocessOneStack):
12490 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12491 Derived from a suggestion by Frank Heckenbach.
12492
12493 2003-07-25 Paul Eggert <eggert@twinsun.com>
12494
12495 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12496 for portability to K&R C (after ansi2knr, presumably). See
12497 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12498 by Frank Heckenbach, though I have omitted the structure-initialization
12499 part of his glr-knr.diff patch since I recall that the Portable
12500 C Compiler didn't require that change.
12501
12502 Let the user specify how to allocate and free memory.
12503 Derived from a suggestion by Frank Heckenbach in
12504 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12505 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12506 All uses of free, malloc, realloc changed to use these macros,
12507 and unnecessary casts removed.
12508 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12509
12510 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12511
12512 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12513 use s.empty() rather than s == "" to test for empty string; see
12514 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12515 (trivial change)
12516
12517 2003-06-25 Akim Demaille <akim@epita.fr>
12518
12519 * config/depcomp, config/install-sh: Update from masters.
12520
12521 2003-06-20 Paul Eggert <eggert@twinsun.com>
12522
12523 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12524 and return properly parenthesized result.
12525 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12526 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12527 Remove unnecessary parentheses from uses.
12528 * doc/bison.texinfo (Location Default Action): Describe the
12529 conventions for parentheses.
12530
12531 2003-06-19 Paul Eggert <eggert@twinsun.com>
12532
12533 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12534 yyreportTree): Do not assume that size_t is the same width as int,
12535 when printing sizes. Print sizes using an unsigned format.
12536 Problem reported by Frank Heckenbach in
12537 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12538
12539 Port to Forte Developer 7 C compiler.
12540 * data/glr.c (struct YYLTYPE): If locations are not being used,
12541 declare a single dummy member, as empty structs do not conform
12542 to the C standard.
12543 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12544 the Forte Developer 7 C compiler complains that end-of-loop
12545 code is not reached.
12546
12547 2003-06-17 Paul Eggert <eggert@twinsun.com>
12548
12549 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12550 avoid warnings from picky compilers about redefinition of PARAMS.
12551
12552 2003-06-17 Paul Eggert <eggert@twinsun.com>
12553
12554 Version 1.875b.
12555
12556 * NEWS: Document 1.875b.
12557
12558 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12559 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12560 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12561 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12562 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12563 per recent gettext manual's suggestion.
12564 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12565 Use prototypes, not old-style definitions.
12566 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12567 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12568 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12569 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12570 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12571 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12572 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12573 vbitset_or_and_cmp, vbitset_copy): Likewise.
12574
12575 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12576 Do not include <stdlib.h>.
12577 (PARAMS): Define unconditionally for C89.
12578 (ATTRIBUTE_NORETURN): Remove.
12579 (ATTRIBUTE_UNUSED): Define unconditionally.
12580
12581 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12582 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12583 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12584 * lib/vbitset.c, lib/vbitset.h: New files.
12585 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12586 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12587 from libbitset.
12588
12589 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12590 `How Can I Reset @code{yyparse}', since texinfo does not allow
12591 arbitrary @ in node names.
12592
12593 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12594 shouldn't be needed according to the gettext 0.12.1 documentation
12595 but which seem to be needed anyway: codeset.m4 glibc21.m4
12596 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12597 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12598 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12599
12600 * lib/.cvsignore: Add stdbool.h.
12601 * m4/.cvsignore: Add nls.m4, po.m4.
12602
12603 Upgrade to CVS gnulib.
12604 * stdbool_.h: File renamed from stdbool.h.in.
12605 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12606 AC_HEADER_STDBOOL.
12607 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12608 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12609 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12610 (MOSTLYCLEANFILES): New var.
12611 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12612 (stdbool.h): New rule.
12613 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12614 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12615 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12616 m4/quote.m4: Upgrade to today's gnulib.
12617
12618 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12619 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12620 the tests right now.
12621 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12622 yyerror are declared before use; C99 requires this.
12623
12624 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12625
12626 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12627 first.
12628 (yyrecoverSyntaxError): Correct the logic for setting and testing
12629 yyerrState.
12630 Correct comment on handling EOF.
12631 Allow states with only a default reduction, rather than failing
12632 (I can't quite reconstruct why these were not allowed before).
12633
12634 Fixes to avoid problem that $-N rules in GLR parsers can cause
12635 buffer overruns, corrupting state.
12636
12637 * src/output.c (prepare_rules): Output max_left_semantic_context
12638 definition.
12639 * src/reader.h (max_left_semantic_context): New variable declaration.
12640 * src/scan-gram.l (max_left_semantic_context): Define.
12641 (handle_action_dollar): Update max_left_semantic_context.
12642 * data/glr.c (YYMAXLEFT): New definition.
12643 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12644 (yyresolveAction): Ditto.
12645
12646 Fixes to problems with location handling in GLR parsers reported by
12647 Frank Heckenbach (2003/06/05).
12648
12649 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12650 (YYRHSLOC): Add parentheses, and define only if locations used.
12651 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12652 locations not used.
12653 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12654 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12655
12656 * tests/cxx-type.at: Exercise location information; update tests
12657 to differentiate output with and without locations.
12658 Remove forward declarations of yylex and yyerror---caused errors
12659 because default YYLTYPE not yet defined.
12660 Change semantic actions to compute strings, rather than printing
12661 them directly (to test proper passing of semantics values). Change
12662 output to prefix notation and update test data and expected results.
12663 (yylex): Track locations.
12664 (stmtMerge): Return value rather than printing, and include arguments
12665 in value.
12666
12667 2003-06-03 Paul Eggert <eggert@twinsun.com>
12668
12669 Avoid warnings generated by GCC 2.95.4 when Bison is
12670 configured with --enable-gcc-warnings.
12671 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12672 yy::]b4_parser_class_name[::translate_,
12673 yy::Stack::operator[] (unsigned),
12674 yy::Stack::operator[] (unsigned) const,
12675 yy::Slice::operator[] (unsigned),
12676 yy::Slice::operator[] (unsigned) const):
12677 Rename local vars to avoid warnings.
12678 * tests/glr-regression.at (Improper handling of embedded actions
12679 and $-N in GLR parsers): Remove unused local variable from yylex.
12680 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12681 (void) as arg when not pure, since we now assume C89 when building
12682 Bison. Pacify GCC by using parameter.
12683
12684 2003-06-02 Paul Eggert <eggert@twinsun.com>
12685
12686 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12687 yy::Location::lines, yy::Location::columns): Rename arguments
12688 to avoid shadowing; this removes a warning generated by GCC 3.3.
12689
12690 2003-06-01 Paul Eggert <eggert@twinsun.com>
12691
12692 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12693 to g++, as GCC 3.3 complains if you do it.
12694 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12695 everything that WARNING_CFLAGS has, except omit warnings
12696 not suitable for C++.
12697 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12698 * tests/atlocal.in (CXXFLAGS): New var.
12699 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12700
12701 Fix a GLR parser bug I reported in February; see
12702 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12703 The problem was that GLR parsers did not conform to the C standard,
12704 because actions like { $1 = $2 + $3; } expanded to expressions
12705 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12706 to a local variable. The C standard says that expressions
12707 like (var = f ()) + (var = f ()) have undefined behavior.
12708 Another problem was that GCC sometimes issues warnings that
12709 yyfill and its parameters are unused.
12710
12711 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12712 as possibly unused.
12713 (yyfill): New function.
12714 (YYFILL): Use it.
12715 (yyuserAction): Change type of yynormal to bool, so that it matches
12716 the new yyfill signature. Mark it as possibly unused.
12717
12718
12719 Follow up on a bug I reported in February, where a Bison-generated
12720 parser can loop. Provide a test case and a fix for yacc.c. I
12721 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12722 The original bug report is in:
12723 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12724
12725 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12726 macro's size was becoming unwieldy.
12727 (yyerrlab): Do not discard an empty lookahead symbol, as this
12728 might destroy garbage.
12729 (yyerrorlab): New label, with the old contents of YYERROR,
12730 plus the following change: pop the stack of rhs corresponding
12731 to the production that invoked YYERROR. That is how Yacc
12732 behaves, and POSIX requires this behavior.
12733 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12734 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12735 Define 'alarm' to do nothing if unistd.h is not available.
12736 Add a new rule "exp: '-' error;" to test the above change to
12737 data/yacc.c. Use 'alarm' to abort any test taking longer than
12738 10 seconds, as it's probably looping.
12739 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12740 Also, the new yacc.c generates two fewer diagnostics for an
12741 existing test.
12742
12743 2003-05-24 Paul Eggert <eggert@twinsun.com>
12744
12745 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12746 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12747 This fixes a problem reported by John Bowman when the Compaq/HP
12748 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12749 -ansi -Wall -gall).
12750 * data/yacc.c (union yyalloc): Likewise.
12751 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12752
12753 Switch from 'int' to 'bool' where that makes sense.
12754
12755 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12756 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12757 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12758 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12759 Return or accept bool, not int. All callers changed.
12760 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12761 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12762 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12763 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12764 bitset_or_and_cmp_): Likewise.
12765 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12766 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12767 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12768 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12769 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12770 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12771 bitset_stats_or_and_cmp): Likewise.
12772 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12773 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12774 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12775 ebitset_xor_cmp): Likewise.
12776 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12777 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12778 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12779 lbitset_xor_cmp): Likewise.
12780 * lib/bbitset.h: Include <stdbool.h>.
12781 (struct bitset_vtable): The following members now return bool, not
12782 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12783 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12784 or_and_cmp).
12785 * src/conflicts.c (count_rr_conflicts): Likewise.
12786 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12787 All uses changed.
12788 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12789 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12790 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12791 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12792 graph_flag): Likewise.
12793 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12794 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12795 graph_flag): Likewise.
12796 * src/output.c (error_verbose): Likewise.
12797 * src/output.h (error_verbose): Likewise.
12798 * src/reader.c (start_flag, typed): Likewise.
12799 * src/reader.h (typed): Likewise.
12800 * src/getargs.c (LOCATIONS_OPTION): New constant.
12801 (long_options, getargs): Use it.
12802 * src/lalr.c (build_relations): Use bool, not int.
12803 * src/nullable.c (nullable_compute): Likewise.
12804 * src/print.c (print_reductions): Likewise.
12805 * src/tables.c (action_row, pack_vector): Likewise.
12806 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12807 * src/output.c (prepare): Use it.
12808 * src/output.c (token_definitions_output,
12809 symbol_destructors_output, symbol_destructors_output): Use string,
12810 not boolean integer, to keep track of whether to output separator.
12811 * src/print_graph.c (print_core): Likewise.
12812 * src/state.c (state_rule_lookaheads_print): Likewise.
12813
12814 * config/install-sh: Sync from automake 1.7.5.
12815
12816 2003-05-14 Paul Eggert <eggert@twinsun.com>
12817
12818 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12819 semicolon after a grammar declaration, in the interest of possible
12820 future changes to the Bison input language.
12821 Do not allow a stray semicolon at the start of the grammar.
12822 (rhses.1): Allow one or more semicolons after any rule, including
12823 just before "|" as required by POSIX.
12824 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12825 grammar.
12826
12827 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12828
12829 %parse-param support for lalr1.cc.
12830
12831 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12832 b4_cc_constructor_calls, b4_cc_constructor_call,
12833 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12834 definitions.
12835 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12836 parse-param arguments.
12837 (yy::b4_parser_class_name): Declare instance variables to
12838 hold parse-param arguments.
12839 * tests/calc.at: s/value/semantic_value/ because value clashes
12840 with a member of yy::b4_parser_class_name. Adjust C++ code
12841 to handle %parse-param. Enable %parse-param test in C++.
12842
12843 2003-05-12 Paul Eggert <eggert@twinsun.com>
12844
12845 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12846 English a bit. Fix fclose typo. Change "const char" to "char
12847 const", and use ANSI C rather than K&R for "main". Suggest
12848 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12849 and suggest yy_switch_to_buffer.
12850
12851 2003-05-05 Paul Eggert <eggert@twinsun.com>
12852
12853 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12854 C89. This avoids a diagnostic on compilers that define __STDC__
12855 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12856 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12857
12858 2003-05-03 Paul Eggert <eggert@twinsun.com>
12859
12860 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12861 Do not overrun array bounds.
12862 This should fix a bug reported today by Olatunji Oluwabukunmi in
12863 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12864
12865 2003-04-29 Akim Demaille <akim@epita.fr>
12866
12867 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12868 * src/getargs.c, src/getargs.h: here, as bool, not int.
12869 (nondeterministic_parser): New.
12870 * src/parse-gram.y, src/scan-gram.l: Support
12871 %nondeterministic-parser.
12872 * src/output.c (prepare): Use nondeterministic_parser instead
12873 of glr_parser where appropriate.
12874 * src/tables.c (conflict_row, action_row, save_row)
12875 (token_actions, token_actions, pack_vector): Ditto.
12876
12877 2003-04-29 Akim Demaille <akim@epita.fr>
12878
12879 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12880
12881 2003-04-29 Akim Demaille <akim@epita.fr>
12882
12883 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12884 with %pure-parser and %locations to exercise the patch from Yakov
12885 Markovitch below.
12886
12887 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12888
12889 * data/yacc.c: (b4_lex_param): Corrected for the case where
12890 %lex-param is provided and %pure-parser isn't.
12891
12892 2003-04-27 Paul Eggert <eggert@twinsun.com>
12893
12894 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12895 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12896 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12897 if it is not defined.
12898 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12899
12900 2003-04-26 Paul Eggert <eggert@twinsun.com>
12901
12902 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12903 Declare to be of type suitable for the ninf value itself, not of
12904 type suitable for the corresponding table, since the latter might
12905 be unsigned but the ninf value might be negative. This fixes a
12906 bug reported by Alexandre Duret-Lutz in
12907 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12908
12909 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12910 invokes it. We shouldn't invoke it twice because it will attempt
12911 to put error.o in the archive twice. This fixes a glitch reported
12912 by Martin Mokrejs in
12913 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12914
12915 2003-04-21 Paul Eggert <eggert@twinsun.com>
12916
12917 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12918 to gnulib.
12919
12920 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12921
12922 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12923 Fix obvious typo that results in uncompilable GLR parsers
12924 when both %pure-parser and %locations are used. (trivial change)
12925
12926 2003-04-17 Paul Eggert <eggert@twinsun.com>
12927
12928 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12929 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12930 Do not insert the expected token via unput, as this runs afoul
12931 of a POSIX-compatibility bug in flex 2.5.31.
12932 All uses changed to BEGIN the parent state,
12933 since we no longer insert the expected token via unput.
12934 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12935 that is no longer emitted after the above change.
12936
12937 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12938 the first one. This change is from Paul Hilfinger, and it fixes
12939 regression reported by Werner Lemberg in
12940 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12941
12942 (resolve_sr_conflict): Don't invoke state_errs_set
12943 unless one or more tokens have been explicitly made errors.
12944 Otherwise, the above change causes Bison to abort.
12945
12946 * tests/existing.at (GNU pic Grammar): New test case, taken from
12947 Lemberg's email.
12948
12949 2003-03-31 Akim Demaille <akim@epita.fr>
12950
12951 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12952
12953 2003-03-31 Akim Demaille <akim@epita.fr>
12954
12955 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12956 output.
12957
12958 2003-03-31 Akim Demaille <akim@epita.fr>
12959
12960 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12961 From Paul Hilfinger.
12962
12963 2003-03-29 Akim Demaille <akim@epita.fr>
12964
12965 * m4/error.m4: Do not put under dynamic conditions some code which
12966 expansion is under static control.
12967
12968 2003-03-29 Akim Demaille <akim@epita.fr>
12969
12970 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12971
12972 2003-03-29 Akim Demaille <akim@epita.fr>
12973
12974 * doc/bison.texinfo (Strings are Destroyed): New.
12975
12976 2003-03-13 Paul Eggert <eggert@twinsun.com>
12977
12978 * .cvsignore: Add configure.lineno.
12979 * src/.cvsignore: Add yacc.
12980 * tests/.cvsignore: Add testsuite.log.
12981 * doc/fdl.texi: Sync with latest FSF version.
12982
12983 2003-03-12 Paul Eggert <eggert@twinsun.com>
12984
12985 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12986 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12987 cursor, instead of leaving it undefined. This fixes a bug
12988 reported by Tim Van Holder in
12989 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12990 * tests/input.at (Torturing the Scanner): Test the scanner on
12991 an empty input file, which was Tim Van Holder's test case.
12992
12993 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12994 <sys/resource.h> can be included, include sys/time.h and
12995 sys/times.h first, if available. This works around the SunOS
12996 4.1.4 porting bug reported by Bruce Becker in
12997 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12998
12999 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13000 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13001 AC_HEADER_SYS_WAIT.
13002
13003 Merge changes from gnulib. This was prompted because the CVS
13004 snapshot didn't build on Solaris 7 due to strnlen problems.
13005
13006 These changes need to be merged back into gnulib:
13007 * lib/hash.c: Include <stdbool.h> unconditionally.
13008 * m4/onceonly.m4 (m4_quote): New macro.
13009 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13010 Quote AC_FOREACH variable-expansions properly.
13011 The 2003-01-03 obstack.h change also needs merging.
13012 {end of changes requiring merging}
13013
13014 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13015 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13016 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13017 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13018 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13019 New files, imported from gnulib.
13020 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13021 above.
13022
13023 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13024 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13025 gnulib sources.
13026
13027 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13028 Add.
13029 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13030 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13031 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13032 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13033 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13034 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13035 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13036 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13037 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13038 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13039 (jm_PREREQ_ARGMATCH): Remove.
13040 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13041 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13042
13043 * src/system.h: Include <stdbool.h> unconditionally.
13044
13045 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13046 assuming at least C89 in the bitset code for some time now.
13047
13048 2003-03-03 Akim Demaille <akim@epita.fr>
13049
13050 * ro.po: New.
13051
13052 2003-03-02 Akim Demaille <akim@epita.fr>
13053
13054 * doc/bison.texinfo (Table of Symbols): Reactivate the
13055 documentation for %lex-param, and %parse-param.
13056
13057 2003-03-02 Akim Demaille <akim@epita.fr>
13058
13059 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13060 generate verbose error messages.
13061 Use the number of tokens as an upper bound in yytname, as it
13062 cannot be a non terminal.
13063
13064 2003-03-02 Akim Demaille <akim@epita.fr>
13065
13066 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13067 message.
13068
13069 2003-03-02 Akim Demaille <akim@epita.fr>
13070
13071 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13072 Use them to exercise yycheck overrun.
13073 Based on Andrew Suffield's grammar.
13074
13075 2003-03-02 Akim Demaille <akim@epita.fr>
13076
13077 Create tests/local.at for Bison generic testing macros.
13078
13079 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13080 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13081 This new file.
13082 * tests/calc.at (AT_CHECK_CALC): Adjust.
13083 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13084 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13085 * tests/local.at: here.
13086 (AT_COMPILE_CXX): Tags the tests using it as c++.
13087 Ignore the test if CXX is not functional.
13088
13089 2003-03-01 Paul Eggert <eggert@twinsun.com>
13090
13091 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13092 not loc->end, since loc->end might contain garbage and this leads
13093 to undefined behavior on some platforms.
13094 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13095 depend on *loc, so that the reader doesn't give the the false
13096 impression that *loc is initialized.
13097 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13098 does not survive the return.
13099
13100 2003-03-01 Akim Demaille <akim@epita.fr>
13101
13102 * src/scan-gram.l (code_start): Always initialize it when entering
13103 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13104 yylex invocation. An alternative would be making it static, but
13105 then it starts with the second %%'s beginning, instead of its end.
13106
13107 2003-02-28 Paul Eggert <eggert@twinsun.com>
13108
13109 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13110 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13111 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13112
13113 2003-02-26 Paul Eggert <eggert@twinsun.com>
13114
13115 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13116 Remove Sequent/Pyramid discussion (nobody uses them any more).
13117 Merge VMS and MS-DOS discussion; these ports may well be dead
13118 but let's keep mentioning them for now. Put <> around email
13119 addresses. Add copyright notice.
13120
13121 2003-02-24 Paul Eggert <eggert@twinsun.com>
13122
13123 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13124 to avoid collision with flex use of yylineno.
13125 Problem reported by Bruce Lilly in
13126 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13127 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13128 * data/yacc.c (yy_reduce_print): Likewise.
13129
13130 * config/depcomp: Sync with Automake 1.7.3.
13131
13132 2003-02-21 Akim Demaille <akim@epita.fr>
13133
13134 * data/lalr1.cc: Use temporary variables instead of casts to
13135 change integer types.
13136 Suggested by Paul Eggert.
13137
13138 2003-02-21 Akim Demaille <akim@epita.fr>
13139
13140 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13141 to avoid confusions with lalr1.cc's notion of Position.
13142 Suggested by Paul Eggert.
13143
13144 2003-02-20 Akim Demaille <akim@epita.fr>
13145
13146 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13147 before initial_columns.
13148 (location.hh): Use consistent variable names when defining the
13149 operator<<.
13150 Use "last" so that we subtract from Positions, not from unsigned.
13151
13152 2003-02-20 Akim Demaille <akim@epita.fr>
13153
13154 * data/lalr1.cc (position.hh): New subfile, including the extended
13155 and Doxygen'ed documentation of class Position.
13156 (location.hh): Use it.
13157 Document a` la Doxygen.
13158 With the help of Benoit Perrot.
13159
13160 2003-02-20 Akim Demaille <akim@epita.fr>
13161
13162 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13163 AT_YACC_IF.
13164 Redefine AT_YYERROR_SEES_LOC_IF using it.
13165 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13166 not defined.
13167 Don't use the location in yy::Parser::error_ and
13168 yy::Parser::print_ when not %locations.
13169 Activate more lalr1.cc tests.
13170
13171 2003-02-19 Akim Demaille <akim@epita.fr>
13172
13173 * data/lalr1.cc: When displaying a line number, be sure to make it
13174 an int.
13175
13176 2003-02-19 Akim Demaille <akim@epita.fr>
13177
13178 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13179 Remove, useless.
13180 (YYABORT, YYACCEPT, YYERROR): New.
13181 * tests/calc.at: Renable the lalr1.cc test.
13182
13183 2003-02-19 Akim Demaille <akim@epita.fr>
13184
13185 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13186 error recovery, mixing with/without pops and discarding of the
13187 lookahead.
13188 Exercise YYERROR.
13189 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13190
13191 2003-02-17 Paul Eggert <eggert@twinsun.com>
13192
13193 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13194 * tests/testsuite.at (AT_COMPILE): Use them.
13195 This fixes the testsuite problem reported by Robert Lentz in
13196 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13197
13198 2003-02-12 Paul Eggert <eggert@twinsun.com>
13199
13200 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13201 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13202 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13203 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13204 Check for malloc failure, for consistency with yacc.c.
13205 (yytname_size): Remove, for consistency with yacc.c.
13206
13207 The bug still remains in data/lalr1.cc, as I didn't have time
13208 to fix it there.
13209
13210 2003-02-06 Akim Demaille <akim@epita.fr>
13211
13212 * configure.ac (GXX): Rename as...
13213 (CXX): this, to keep the original Autoconf semantics.
13214 Require 2.57.
13215 * data/lalr1.cc: Fix b4_copyright invocations.
13216 If YYDEBUG is not defined, don't depend upon name_ being defined.
13217 (location.hh): Include string and iostream.
13218 (Position::filename): New member.
13219 (Position::Position ()): New.
13220 (operator<< (Position)): New.
13221 (operator- (Position, int)): New.
13222 (Location::first, Location::last): Rename as...
13223 (Location::begin, Location::end): these, to mock the conventional
13224 iterator names.
13225 (operator<< (Location)): New.
13226 * tests/atlocal.in (CXX): New.
13227 * tests/testsuite.at (AT_COMPILE_CXX): New.
13228 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13229 locations in a more synthetic way.
13230 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13231 lalr1.cc is used.
13232 Adjust the C locations to match those from Emacs: first column is
13233 column 0.
13234 Change all the expected results.
13235 Conform to the GCS: simplify the locations when applicable.
13236 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13237 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13238 these CPP macros with the m4 macros new defined by...
13239 (AT_CHECK_PUSHDEFS): this, i.e.:
13240 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13241 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13242 New macros.
13243 (AT_CHECK_POPDEFS): Undefine them.
13244 (AT_CHECK_CALC_LALR1_CC): New.
13245 Use it for the first lalr1.cc test.
13246
13247 2003-02-04 Akim Demaille <akim@epita.fr>
13248
13249 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13250 Location as is defined.
13251
13252 2003-02-04 Akim Demaille <akim@epita.fr>
13253
13254 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13255 name_ being defined.
13256
13257 2003-02-03 Paul Eggert <eggert@twinsun.com>
13258
13259 * src/gram.h (start_symbol): Remove unused decl.
13260
13261 Use more-consistent naming conventions for local vars.
13262
13263 * src/derives.c (derives_compute): Change type of local var from
13264 int to rule_number.
13265 * src/gram.c (grammar_rules_partial_print): Likewise.
13266 * src/print.c (print_core): Likewise.
13267 * src/reduce.c (reduce_grammar_tables): Likewise.
13268
13269 * src/gram.c (grammar_dump): Change name of item_number *
13270 local var from r to rp.
13271 * src/nullable.c (nullable_compute): Likewise.
13272
13273 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13274
13275 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13276 for symbol or symbol_number var.
13277 * src/reader.c (grammar_start_symbol_set): Likewise.
13278 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13279 Likewise.
13280 * src/state.c (transitions_to): Likewise.
13281 * src/state.h: Likewise.
13282 * src/tables.c (symbol_number_to_vector_number): Likewise.
13283
13284 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13285 char * var.
13286
13287 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13288 var.
13289
13290 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13291 var.
13292
13293 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13294 Use str, not s, for char * var. Use ch, not c, for character var.
13295 Use size for size var.
13296
13297 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13298 char * var.
13299 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13300 uniqstr var.
13301 * src/uniqstr.h: Likewise.
13302
13303 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13304 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13305 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13306 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13307 param to have same name as that of enum, so that we don't use
13308 "s" to stand for a non-state.
13309
13310 2003-02-02 Akim Demaille <akim@epita.fr>
13311
13312 * src/scan-skel.l: Scan more than one inert character per yylex
13313 invocation.
13314
13315 2003-02-01 Paul Eggert <eggert@twinsun.com>
13316
13317 Version 1.875a.
13318
13319 * po/LINGUAS: Add ms.
13320
13321 2003-01-30 Akim Demaille <akim@epita.fr>
13322
13323 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13324
13325 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13326
13327 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13328 of $1.
13329
13330 Changes in response to error report by S. Eken: GLR mode does not
13331 handle negative $ indices or $ indices in embedded rules correctly.
13332 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13333
13334 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13335 (b4_rhs_location): Ditto.
13336 (yyfill): New function to copy from stack tree into array
13337 incrementally.
13338 (yyuserAction): Modify to allow incremental move of semantic values
13339 to rhs array when in GLR mode.
13340 Define YYFILL to use in user-defined actions to fill semantic array
13341 as needed.
13342 Remove dummy use of yystack, as there is now a guaranteed use.
13343 (yydoAction): Modify to allow incremental move of semantic values
13344 to rhs array when in GLR mode.
13345 (yyresolveAction): Ditto.
13346 (yyglrShiftDefer): Update comment.
13347 (yyresolveStates): Use X == NULL for pointers, not !X.
13348 (yyglrReduce): Ditto.
13349 (yydoAction): Ditto
13350
13351 * tests/glr-regr1.at: Rename to ...
13352 * tests/glr-regression.at: Add new regression test for the problems
13353 described above (adapted from S. Eken).
13354 Update copyright notice.
13355 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13356 * tests/Makefile.am: Ditto.
13357
13358 2003-01-28 Paul Eggert <eggert@twinsun.com>
13359
13360 * data/lalr1.cc: Do not use @output_header_name@ unless
13361 b4_defines_flag is set. This fixes two bugs reported by
13362 Tim Van Holder in
13363 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13364 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13365
13366 2003-01-21 Paul Eggert <eggert@twinsun.com>
13367
13368 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13369 we don't need to worry about yyerrlab1 being reported as an
13370 "unused label" by non-GCC C compilers. The downside is that if
13371 locations are used then a couple of statements are duplicated each
13372 time YYERROR is invoked, but the upside is that the warnings
13373 should vanish.
13374 (yyerrlab1): Move code to YERROR.
13375 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13376 This reverts some of the 2002-12-27 change.
13377
13378 2003-01-17 Paul Eggert <eggert@twinsun.com>
13379
13380 * src/output.c (symbol_printers_output): Fix typo that led
13381 to core dump. Problem reported by Antonio Rus in
13382 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13383
13384 2003-01-13 Akim Demaille <akim@epita.fr>,
13385 Quoc Peyrot <chojin@lrde.epita.fr>,
13386 Robert Anisko <anisko_r@lrde.epita.fr>
13387
13388 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13389 when the stacks contain one element, as the loop would otherwise
13390 free the last state, and then use the top state (the one we just
13391 popped). This means that the initial elements will not be freed
13392 explicitly, as is the case in yacc.c; it is not a problem, as
13393 these elements have fake values.
13394
13395 2003-01-11 Paul Eggert <eggert@twinsun.com>
13396
13397 * NEWS: %expect-violations are now just warnings, reverting
13398 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13399 bootstrapping problem reported by Matthias Klose; see
13400 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13401 * src/conflicts.c (conflicts_print): Likewise.
13402 * tests/conflicts.at (%expect not enough, %expect too much,
13403 %expect with reduce conflicts): Likewise.
13404 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13405 that the warning is enabled if the number of conflicts changes
13406 (not necessarily increases).
13407
13408 * src/getargs.c (version): Update copyright year.
13409
13410 2003-01-09 Akim Demaille <akim@epita.fr>
13411
13412 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13413
13414 2003-01-08 Paul Eggert <eggert@twinsun.com>
13415
13416 * Makefile.maint (WGETFLAGS):
13417 New macro, containing "-C off" to disable proxy caches.
13418 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13419 (rel-check): Use $(WGET) instead of wget.
13420
13421 2003-01-06 Paul Eggert <eggert@twinsun.com>
13422
13423 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13424 the GLR paper of Scott, Johnstone and Hussain.
13425
13426 2003-01-04 Paul Eggert <eggert@twinsun.com>
13427
13428 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13429 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13430 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13431 (EXTRA_LIBRARIES): New var, for liby.a.
13432 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13433 (EXTRA_SCRIPTS): New var, for yacc.
13434
13435 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13436 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13437 Problem reported by Nelson H. F. Beebe.
13438
13439 2003-01-03 Paul Eggert <eggert@twinsun.com>
13440
13441 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13442 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13443 when compiling Bison 1.875's `bitset bset = obstack_alloc
13444 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13445
13446 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13447 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13448 grow to a huge size with typical invocation.
13449
13450 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13451 Use the pattern recommended by Autoconf 2.57, except also protect
13452 against double-definition.
13453 * src/system.h: Likewise.
13454 Portability issues reported by Nelson H. F. Beebe.
13455
13456 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13457 All uses changed. Provide a definition in both C and C++.
13458 (yytrue, yyfalse): Define even if defined (__cplusplus).
13459
13460 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13461 Reported by Nelson H. F. Beebe.
13462
13463 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13464
13465 2003-01-02 Paul Eggert <eggert@twinsun.com>
13466
13467 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13468 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13469 Bug reported by Nelson H. F. Beebe.
13470
13471 2003-01-01 Paul Eggert <eggert@twinsun.com>
13472
13473 * Version 1.875.
13474
13475 2002-12-30 Paul Eggert <eggert@twinsun.com>
13476
13477 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13478 Moved here from...
13479 (<INITIAL>","): Here. This causes stray "," to be treated
13480 more uniformly.
13481
13482 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13483 last brace in braced code when not in Yacc mode, for compatibility
13484 with Bison 1.35. This resurrects the 2001-12-15 patch to
13485 src/reader.c.
13486
13487 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13488 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13489
13490 2002-12-28 Paul Eggert <eggert@twinsun.com>
13491
13492 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13493 that of SYM's type. This fixes Debian bug 168069, reported by
13494 Thomas Olsson.
13495
13496 2002-12-28 Paul Eggert <eggert@twinsun.com>
13497
13498 Version 1.75f.
13499
13500 Switch back to the Yacc style of conflict reports, undoing some
13501 of the 2002-07-30 change.
13502 * doc/bison.texinfo (Understanding): Use Yacc style for
13503 conflict reports. Also, use new way of locating rules.
13504 * src/conflicts.c (conflict_report):
13505 Renamed from conflict_report_yacc, removing the old
13506 'conflict_report'. Translate the entire conflict report at once,
13507 so that we don't assume that "," has the same interpretation in
13508 all languages.
13509 (conflicts_output): Use Yacc-style conflict report for each state,
13510 instead of our more-complicated style.
13511 (conflicts_print): Use Yacc-style conflict report, except print
13512 the input file name when not emulating Yacc.
13513 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13514 Conflicted Reduction, %expect not enough, %expect too much,
13515 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13516 * tests/existing.at (GNU Cim Grammar): Likewise.
13517 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13518
13519 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13520 fatal): Don't invoke fflush; it's not needed and it might even be
13521 harmful for stdout, as stdout might not be open.
13522 * src/reduce.c (reduce_print): Likewise.
13523
13524 2002-12-27 Paul Eggert <eggert@twinsun.com>
13525
13526 Fix a bug where error locations were not being recorded correctly.
13527 This problem was originally reported by Paul Hilfinger in
13528 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13529
13530 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13531 top of the location stack's error locations.
13532 (yyerrlab): Set it. When discarding a token, push its location
13533 onto yylerrsp so that we don't lose track of the error's end.
13534 (yyerrlab1): Now is only the target of YYERROR, so that we can
13535 properly record the location of the action that failed. For GCC
13536 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13537 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13538 (yyerrlab2): New label, which yyerrlab now falls through to.
13539 Compute the error's location by applying YYLLOC_DEFAULT to
13540 the locations of all the symbols that went into the error.
13541 * doc/bison.texinfo (Location Default Action): Mention that
13542 YYLLOC_DEFAULT is also invoked for syntax errors.
13543 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13544 Error locations include the locations of all the tokens that were
13545 discarded, not just the last token.
13546
13547 2002-12-26 Paul Eggert <eggert@twinsun.com>
13548
13549 * src/files.c: Include quote.h.
13550 (compute_output_file_names): Warn if we detect conflicting
13551 outputs to the same file. This should catch the misunderstanding
13552 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13553
13554 * src/conflicts.c (conflicts_print): If the user specifies
13555 "%expect N", report an error if there are any reduce/reduce
13556 conflicts. This is what the manual says should happen.
13557 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13558 * tests/conflicts.at (%expect with reduce conflicts): New test.
13559
13560 Don't use m4_include on relative file names, as it doesn't work as
13561 desired if there happens to be a file with that name under ".".
13562
13563 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13564 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13565 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13566 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13567 * src/output.c (output_skeleton): Use full path names when
13568 specifying a file to include; don't rely on include path, as
13569 it's unreliable when the working file contains a file with
13570 that name.
13571
13572 2002-12-25 Paul Eggert <eggert@twinsun.com>
13573
13574 Remove obsolete references to bison.simple and bison.hairy.
13575 Problem mentioned by Aubin Mahe in
13576 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13577 * data/glr.c: Comment fix.
13578 * doc/bison.1: Remove references. Also, mention "yacc".
13579
13580 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13581 with -g option.
13582
13583 * src/parse-gram.y (declaration): Use enum "report_states" rather
13584 than its numeric value 1.
13585
13586 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13587 opening a new one. This fixes Debian bug 165349, reported by
13588 Bruce Stephens.
13589
13590 2002-12-24 Paul Eggert <eggert@twinsun.com>
13591
13592 Version 1.75e.
13593
13594 * Makefile.maint (cvs-update): Don't assume that the shell
13595 supports $(...), as Solaris sh doesn't.
13596
13597 * src/parse-gram.y (lloc_default): Remove test for empty
13598 nonterminals at the end, since it didn't change the result.
13599
13600 2002-12-24 Paul Eggert <eggert@twinsun.com>
13601
13602 If the user does not define YYSTYPE as a macro, Bison now declares it
13603 using typedef instead of defining it as a macro. POSIX requires this.
13604 For consistency, YYLTYPE is also declared instead of defined.
13605
13606 %union directives can now have a tag before the `{', e.g., the
13607 directive `%union foo {...}' now generates the C code
13608 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13609 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13610 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13611 instead of `yyltype'.
13612
13613 `yystype' and `yyltype' are now obsolescent macros instead of being
13614 typedefs or tags; they are no longer documented and will be
13615 withdrawn in a future release.
13616
13617 * data/glr.c (b4_location_type): Remove.
13618 (YYSTYPE): Renamed from yystype.
13619 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13620 (struct YYLTYPE): Renamed from struct yyltype.
13621 (YYLTYPE): Renamed from yyltype.
13622 (yyltype, yystype): New (and obsolescent) macros,
13623 for backward compatibility.
13624 * data/yacc.c: Likewise.
13625
13626 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13627 does not specify a union tag. This is for compatibility with
13628 Solaris 9 yacc.
13629
13630 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13631 const *, since it is now modified by stripping surrounding { }.
13632 (current_braced_code): Remove.
13633 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13634 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13635 trailing " {...}". Now of type <chars>.
13636 (grammar_declaration): Adjust to bundled tokens.
13637 (code_content): Remove; stripping is now done by add_param.
13638 (print_token_value): Print contents of bundled tokens.
13639 (token_name): New function.
13640
13641 * src/reader.h (braced_code, current_braced_code): Remove.
13642 (token_name): New decl.
13643
13644 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13645 token_type, not braced_code code_kind. All uses changed.
13646 (SC_PRE_CODE): New state, for scanning after a keyword that
13647 has (or usually has) an immediately-following braced code.
13648 (token_type): New local var, to keep track of which token type
13649 to return when scanning braced code.
13650 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13651 <INITIAL>"%parse-param", <INITIAL>"%printer",
13652 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13653 instead of returning a token type immediately.
13654 (<INITIAL>"{"): Set token type.
13655 (<SC_BRACED_CODE>"}"): Use it.
13656 (handle_action_dollar, handle_action_at): Now returns bool
13657 indicating success. Fail if ! current_rule; this prevents a core dump.
13658 (handle_symbol_code_dollar, handle_symbol_code_at):
13659 Remove; merge body into caller.
13660 (handle_dollar, handle_at): Complain in invalid contexts.
13661
13662 * NEWS, doc/bison.texinfo: Document the above.
13663 * NEWS: Fix years and program names in copyright notice.
13664
13665 2002-12-17 Paul Eggert <eggert@twinsun.com>
13666
13667 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13668 Reporting, Table of Symbols): Omit mentions of %lex-param and
13669 %parse-param from the documentation for now.
13670
13671 2002-12-15 Paul Eggert <eggert@twinsun.com>
13672
13673 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13674 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13675 lookahead symbol, and which sets yychar in parser actions) and it
13676 disagreed with the Bison documentation. Bug
13677 reported by Andrew Walrond.
13678
13679 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13680 as the caller now does that.
13681 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13682 (YYEMPTY): Parenthesize right hand side, since others use it.
13683 (yyparse): Don't assume that our generated code is the only code
13684 that sets yychar.
13685
13686 2002-12-13 Paul Eggert <eggert@twinsun.com>
13687
13688 Version 1.75d.
13689
13690 POSIX requires a "yacc" command.
13691 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13692 (MOSTLYCLEANFILES): Add yacc.
13693 (yacc): New rule.
13694 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13695 as an alias for bison y.
13696
13697 * po/LINGUAS: Add da.
13698
13699 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13700 problem with latest <getopt.h>.
13701 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13702
13703 * doc/fdl.texi: Upgrade to 1.2.
13704 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13705 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13706 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13707 gnulib.
13708 * config/install-sh: Sync with autotools.
13709
13710 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13711 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13712 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13713 locations are requested.
13714 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13715 locations are requested.
13716
13717 2002-12-12 Paul Eggert <eggert@twinsun.com>
13718
13719 Remove unportable casts and storage allocation tricks.
13720 While we're at it, remove almost all casts, since they
13721 usually aren't needed and are a sign of trouble.
13722
13723 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13724
13725 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13726 the pointer DSET returned by malloc; this isn't portable.
13727 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13728 Similarly for DERIVES.
13729 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13730 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13731 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13732
13733 * src/derives.c (derives_compute): Do not bother invoking
13734 int_of_rule_number, since rule numbers are integers.
13735
13736 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13737 rather than XMALLOC (char, N).
13738
13739 * src/files.c (filename_split): Rewrite to avoid cast.
13740
13741 * src/gram.h (symbol_number_as_item_number,
13742 item_number_as_symbol_number, rule_number_as_item_number,
13743 item_number_as_rule_number):
13744 Now inline functions rather than macros, to avoid casts.
13745 * src/state.h (state_number_as_int): Likewise.
13746 * src/tables.c (state_number_to_vector_number,
13747 symbol_number_to_vector_number): Likewise.
13748
13749 * src/gram.h (int_of_rule_number): Remove; no longer used.
13750
13751 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13752 since the resulting storage is always stored into.
13753
13754 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13755 where it's needed.
13756
13757 * src/muscle_tab.c (muscle_m4_output):
13758 Now inline. Return bool, not int.
13759 * src/state.c (state_compare): Likewise.
13760 * src/symtab.c (symbol_check_defined,
13761 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13762 hash_compare_symbol, hash_symbol):
13763 Likewise.
13764 * src/uniqstr.c (uniqstr_print): Likewise.
13765 * src/muscle_tab.c (muscle_m4_output_processor):
13766 New function, to avoid casts.
13767 * src/state.c (state_comparator, stage_hasher): Likewise.
13768 * src/symtab.c (symbol_check_defined_processor,
13769 symbol_check_alias_consistency_processor, symbol_pack_processor,
13770 symbol_translation_processor, hash_symbol_comparator,
13771 hash_symbol_hasher): Likewise.
13772 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13773 * src/muscle_tab.c (muscles_m4_output):
13774 Use new functions instead of casting old functions unportably.
13775 * src/state.c (state_hash_new): Likewise.
13776 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13777 symbols_token_translations_init):
13778 Likewise.
13779 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13780
13781 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13782 var instead of casting to long, to avoid casts.
13783 (prepare_states): Use MALLOC rather than alloca, so that we don't
13784 have to worry about alloca.
13785 * src/state.c (state_hash_lookup): Likewise.
13786
13787 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13788 local var instead of casting to unsigned char, to avoid casts.
13789
13790 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13791 STATE_ALLOC): Remove.
13792 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13793 rather than calloc, and use offsetof to avoid allocating slightly
13794 too much storage.
13795 (state_new): Initialize all members.
13796
13797 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13798
13799 * src/symtab.c (symbol_free): Remove; unused.
13800 (symbol_get): Remove cast in lhs of assignment.
13801 (symbols_do): Now static. Accept generic arguments, not
13802 hashing-related ones.
13803
13804 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13805 (symbol_processor): Remove.
13806 (symbols_do): Remove decl; now static.
13807
13808 * src/system.h (alloca): Remove; decl no longer needed.
13809 (<stddef.h>): Include, for offsetof.
13810 (<inttypes.>, <stdint.h>): Include if available.
13811 (uintptr_t): New type, if system lacks it.
13812 (CALLOC, MALLOC, REALLOC): New macros.
13813 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13814 new macros.
13815
13816 * src/tables.c (table_size): Now int, to pacify GCC.
13817 (table_grow, table_ninf_remap): Use signed table size.
13818 (save_row): Don't bother initializing locals when not needed.
13819 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13820 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13821
13822 * src/vcg.h: Correct misspellings.
13823
13824 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13825
13826
13827 * src/getargs.c (getargs): Don't assume EOF == -1.
13828
13829 2002-12-09 Paul Eggert <eggert@twinsun.com>
13830
13831 Change identifier spellings to avoid collisions with names
13832 that are reserved by POSIX.
13833
13834 Don't use names ending in _t, since POSIX reserves them.
13835 For consistency, remove _e and _s endings -- they're weren't
13836 needed to remove ambiguity. All uses changed.
13837 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13838 turn was just renamed from struniq_t.
13839 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13840 which in turn was just renamed from struniq_processor_t.
13841 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13842 in turn was renamed from hash_compare_struniq_t.
13843 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13844 (state_list): Renamed from state_list_t.
13845 * src/assoc.h (assoc): Renamed from assoc_t.
13846 * src/conflicts.c (enum conflict_resolution): Renamed from
13847 enum conflict_resolution_e.
13848 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13849 (rule_list): Renamed from rule_list_t.
13850 * src/getargs.h (enum trace): Renamed from enum trace_e.
13851 (enum report): Renamed from enum report_e.
13852 * src/gram.h (item_number): Renamed from item_number_t.
13853 (rule_number): Renamed from rule_number_t.
13854 (struct rule_s): Remove the "rule_s" part; not used.
13855 (rule): Renamed from rule_t.
13856 (rule_filter): Renamed from rule_filter_t.
13857 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13858 (goto_list): Renamed from goto_list_t.
13859 * src/lalr.h (goto_number): Renamed from goto_number_t.
13860 * src/location.h (location): Renamed from location_t.
13861 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13862 and moved here from:
13863 * src/muscle_tab.h (muscle_entry_t): here.
13864 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13865 (rule_list): Renamed from rule_list_t.
13866 * src/print_graph.c (static_graph): Renamed from graph.
13867 * src/reader.h (braced_code): Renamed from braced_code_t.
13868 Remove brace_code_e tag.
13869 * src/relation.h (relation_node): Renamed from relation_node_t.
13870 (relation_nodes): Renamed from relation_nodes_t.
13871 (relation): Renamed from relation_t.
13872 * src/state.h (state_number): Renamed from state_number_t.
13873 (struct state): Renamed from struct state_s.
13874 (state): Renamed from state_t.
13875 (transitions): Renamed from transitions_t. Unused (and
13876 misspelled) transtion_s tag removed.
13877 (errs): Renamed from errs_t. Unused errs_s tag removed.
13878 (reductions): Renamed from reductions_t. Unused tag
13879 reductions_s removed.
13880 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13881 (struct symbol_list): Renamed from struct symbol_list_s.
13882 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13883 (struct symbol): Renamed from struct symbol_s.
13884 (symbol): Renamed from symbol_t.
13885 * src/tables.c (vector_number): Renamed from vector_number_t.
13886 (action_number): Renamed from action_t.
13887 * src/tables.h (base_number): Renamed from base_t.
13888 * src/vcg.h (enum color): Renamed from enum color_e.
13889 (enum textmode): Renamed from enum textmode_e.
13890 (enum shape): Renamed from enum shape_e.
13891 (struct colorentry): Renamed from struct colorentry_s.
13892 (struct classname): Renamed from struct classname_s.
13893 (struct infoname): Renamed from struct infoname_s.
13894 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13895 (enum decision): Renamed from enum decision_e.
13896 (enum orientation): Renamed from enum orientation_e.
13897 (enum alignment): Renamed from enum alignment_e.
13898 (enum arrow_mode): Renamed from enum arrow_mode_e.
13899 (enum crossing_type): Renamed from enum crossing_type_e.
13900 (enum view): Renamed from enum view_e.
13901 (struct node): Renamed from struct node_s.
13902 (node): Renamed from node_t.
13903 (enum linestyle): Renamed from enum linestyle_e.
13904 (enum arrowstyle): Renamed from enum arrowstyle_e.
13905 (struct edge): Renamed from struct edge.
13906 (edge): Renamed from edge_t.
13907 (struct graph): Renamed from struct graph_s.
13908 (graph): Renamed from graph_t.
13909 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13910 Rename value_t -> value.
13911 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13912 value_t_as_yystype -> value_as_yystype.
13913
13914 Don't include <errno.h> in the mainstream code, since it
13915 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13916 * lib/get-errno.c, lib/get-errno.h: New files.
13917 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13918 get-errno.c.
13919 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13920 * src/output.c (output_skeleton): Likewise.
13921 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13922 instead of errno.
13923 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13924 Likewise.
13925 (handle_action_dollar, handle_action_at): Likewise.
13926 * src/system.h: Do not include <errno.h>.
13927 (TAB_EXT): Renamed from EXT_TAB.
13928 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13929
13930 Avoid str[a-z]*, since <string.h> reserves that name space.
13931 Change all instances of "struniq" in names to "uniqstr", and
13932 likewise for "STRUNIQ" and "UNIQSTR".
13933 * src/uniqstr.c: Renamed from src/struniq.c.
13934 * src/uniqstr.h: Renamed from src/struniq.h.
13935 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13936 * src/files.c (strsuffix): Remove; unused.
13937 (concat2): Renamed from stringappend. Now static.
13938 * src/files.h (strsuffix, stringappend): Remove; unused.
13939 * src/parse-gram.y (<chars>): Renamed from <string>.
13940 (<uniqstr>): Renamed from <struniq>.
13941 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13942 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13943 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13944 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13945 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13946 (N_EXPAND): Renamed from N_STRETCH.
13947
13948 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13949 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13950 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13951 Remove; unused.
13952 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13953 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13954 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13955 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13956 (BASE_MAXIMUM): Renamed from BASE_MAX.
13957 (BASE_MINIMUM): Renamed from BASE_MIN.
13958 (ACTION_MAX): Remove; unused.
13959 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13960 Unnecessary casts removed from above defines.
13961
13962
13963 Fix misspelling in names.
13964 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13965 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13966 G_NODE_ALIGNEMENT.
13967
13968
13969 * lib/timevar.c (timevar_report): Renamed from time_report,
13970 for consistency with other names.
13971 * lib/timevar.h (timevar_report): New decl.
13972 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13973
13974
13975 Sort include-file uses.
13976
13977 Reorder all include files under src to be in the order "system.h".
13978 then the ../lib include files in angle brackets (alphabetized),
13979 then the . include files in double-quotes (alphabetized). Fix
13980 dependency breakages encountered in this process, as follows:
13981 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13982 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13983 * src/state.h: Include "symtab.h".
13984
13985 2002-12-08 Paul Eggert <eggert@twinsun.com>
13986
13987 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13988 since this causes problems when __file__ contains character
13989 sequences like "@" that are treated specially by src/scan-skel.l.
13990 Instead, just use the file's basename. This fixes the bug
13991 reported by Martin Mokrejs in
13992 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13993
13994 2002-12-06 Paul Eggert <eggert@twinsun.com>
13995
13996 Add support for rules that do not have trailing semicolons, as
13997 POSIX requires. Improve the quality of locations in Bison
13998 diagnostics.
13999
14000 * src/location.c: Include <quotearg.h>.
14001 (empty_location): Now const.
14002 (location_print): New function. Follow the recommendation of the
14003 GNU Coding Standards for locations that span file boundaries.
14004 * src/location.h: Do not include <quotearg.h>; no longer needed.
14005 (boundary): New type.
14006 (location_t): Use it. This allows locations to span file boundaries.
14007 All member uses changed: file -> start.file or end.file (as needed),
14008 first_line -> start.line, first_column -> start.column,
14009 last_line -> end.line, last_column -> end.column.
14010 (equal_boundaries): New function.
14011 (LOCATION_RESET, LOCATION_STEP): Remove.
14012 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14013 (empty_location): Now const.
14014 (location_print): New decl.
14015 * src/parse-gram.y (lloc_default): New function, which handles
14016 empty locations more accurately.
14017 (YYLLOC_DEFAULT): Use it.
14018 (%token COLON): Remove.
14019 (%token ID_COLON): New token.
14020 (rules): Use it.
14021 (declarations, rules): Remove trailing semicolon.
14022 (declaration, rules_or_grammar_declaration):
14023 Allow empty (";") declaration.
14024 (symbol_def): Remove empty actions; no longer needed.
14025 (rules_or_grammar_declaration): Remove trailing semicolon.
14026 (semi_colon.opt): Remove.
14027 * src/reader.h: Include location.h.
14028 (scanner_cursor): New decl.
14029 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14030 rolling our own.
14031 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14032 of *loc.
14033 (STEP): Remove. No longer needed, now that adjust_location does
14034 the work. All uses removed.
14035 (scanner_cursor): New var.
14036 (adjust_location): Renamed from extend_location. It now sets
14037 *loc and adjusts the scanner cursor. All uses changed.
14038 Don't bother testing for CR.
14039 (handle_syncline): Remove location arg; now updates scanner cursor.
14040 All callers changed.
14041 (unexpected_end_of_file): Now accepts start boundary of token or
14042 comment, not location. All callers changed. Update scanner cursor,
14043 not the location.
14044 (SC_AFTER_IDENTIFIER): New state.
14045 (context_state): Renamed from c_context. All uses changed.
14046 (id_loc, code_start, token_start): New local vars.
14047 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14048 processing of Yacc white space and equivalents here.
14049 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14050 instead of returning ID immediately, since we need to search for
14051 a subsequent colon.
14052 (<INITIAL>"'", "\""): Save token_start.
14053 (<INITIAL>"%{", "{", "%%"): Save code_start.
14054 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14055 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14056 BEGIN context_state at end, not INITIAL.
14057 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14058 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14059 Return correct token start.
14060 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14061 the start of a character, string or multiline comment is found.
14062 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14063 Reduction): Adjust reported locations to match the more-precise
14064 results now expected.
14065 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14066 * tests/reduce.at (Useless Rules, Reduced Automaton,
14067 Underivable Rules): Likewise.
14068 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14069 or "|"' now that so many other tokens are allowed by the new grammar.
14070
14071 * src/complain.h (current_file): Remove duplicate decl;
14072 current_file is now owned by files.h.
14073 * src/complain.c, src/scan-gram.l: Include files.h.
14074
14075 2002-12-06 Paul Eggert <eggert@twinsun.com>
14076
14077 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14078 promotes to int; it might be unsigned int.
14079 * data/yacc.c (yy_reduce_print): Likewise.
14080
14081 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14082 be #defined in the prologue, not in the Bison declarations.
14083 This fixes Debian Bug 102878, reported by Shaul Karl.
14084
14085 2002-12-02 Paul Eggert <eggert@twinsun.com>
14086
14087 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14088 * lib/strtoul.c: New file, from gnulib.
14089 This fixes a porting bug reported by Peter Klein in
14090 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14091
14092 2002-11-30 Paul Eggert <eggert@twinsun.com>
14093
14094 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14095 and put only a forward declaration in the prologue. This is for
14096 consistency with the other scanner helper functions.
14097
14098 Type clashes now generate warnings, not errors, since it
14099 appears that POSIX may allow some grammars with type clashes.
14100 * src/reader.c (grammar_current_rule_check): Warn about
14101 type clashes instead of complaining.
14102 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14103
14104 Add Yacc library, since POSIX requires it.
14105 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14106 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14107 * lib/main.c, lib/yyerror.c: New files.
14108
14109 gram_error can be static; it need not be extern.
14110 * src/reader.h (gram_error): Remove decl.
14111 * src/parse-gram.y (gram_error): Now static. Add static decl.
14112 (print_token_value): Omit parameter names from forward decl,
14113 for consistency.
14114
14115 2002-11-29 Paul Eggert <eggert@twinsun.com>
14116
14117 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14118 be declared before being used. E.g., one should typically
14119 declare them in the prologue. Use GNU coding style in examples.
14120 Put "const" consistently after the type it modifies. Mention
14121 that C99 supports "inline". Mention that yyerror traditionally
14122 returns "int".
14123
14124 %parse-param and %lex-param now take just one argument, the
14125 declaration; the argument name is deduced from the declaration.
14126
14127 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14128 Reporting, Table of Symbols): Document this.
14129 * src/parse-gram.y (add_param): New function.
14130 (COMMA): Remove.
14131 (declaration): Implement new rule for %parse-param and %lex-param.
14132 * src/scan-gram.l: "," now elicits a warning, rather than being
14133 a token; this is more compatible with byacc.
14134 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14135
14136 2002-11-27 Paul Eggert <eggert@twinsun.com>
14137
14138 Rename identifiers to avoid real and potential collisions.
14139
14140 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14141 to avoid collision with lex macro described by Bruce Lilly in
14142 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14143 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14144 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14145 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14146 All uses changed.
14147 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14148 The name "yycontrol" violates the name space rules, and this stuff
14149 wasn't being used anyway.
14150 (input): Remove action; this stuff wasn't being used.
14151 (gram_error): Rename local variable yylloc -> loc.
14152 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14153 (YY_DECL): Don't use "yy" at start of local variables.
14154 All uses changed, e.g., yylloc -> loc.
14155 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14156 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14157 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14158 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14159
14160 * src/parse-gram.y (gram_error): loc is now const *.
14161 * src/reader.h (gram_error): Likewise.
14162
14163 2002-11-24 Paul Eggert <eggert@twinsun.com>
14164
14165 Version 1.75c.
14166
14167 * tests/actions.at (Actions after errors): Use an output format
14168 more similar to that of the Printers and Destructors test.
14169 Test the position of the ';' token too.
14170 (Printers and Destructors): Likewise.
14171 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14172 unnecessarily alarming people when the test fails.
14173
14174 * data/yacc.c (yyerrlab1): Move this label down, so that the
14175 parser does not discard the lookahead token if the user code
14176 invokes YYERROR. This change is required for POSIX conformance.
14177
14178 * lib/error.c: Sync with gnulib.
14179
14180 2002-11-22 Paul Eggert <eggert@twinsun.com>
14181
14182 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14183 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14184 * lib/xmalloc.c: Likewise.
14185
14186 2002-11-20 Paul Eggert <eggert@twinsun.com>
14187
14188 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14189
14190 2002-11-20 Paul Eggert <eggert@twinsun.com>
14191
14192 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14193 should use `if (! x) abort ();' rather than `assert (x);', and
14194 anyway it's one less thing to worry about configuring.
14195
14196 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14197 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14198 and replace all instances of assert with abort.
14199 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14200 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14201
14202 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14203 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14204 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14205 hash_find_entry, hash_rehash, hash_insert): Likewise.
14206 * src/conflicts.c (resolve_sr_conflict): Likewise.
14207 * src/lalr.c (set_goto_map, map_goto): Likewise.
14208 * src/nullable.c (nullable_compute): Likewise.
14209 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14210 * src/reader.c (packgram, reader): Likewise.
14211 * src/state.c (state_new, state_free, state_transitions_set,
14212 state_reduction_find): Likewise.
14213 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14214 symbol_pack): Likewise.
14215 * src/tables.c (conflict_row, pack_vector): Likewise.
14216 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14217 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14218 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14219 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14220
14221 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14222 (ARGMATCH_CONSTRAINT): New macro.
14223 (ARGMATCH_ASSERT): Use it.
14224
14225 * src/system.h (verify): New macro.
14226 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14227 rather than assert.
14228 * src/tables.c (tables_generate): Likewise.
14229
14230 * src/struniq.c (struniq_assert): Now returns void, and aborts
14231 if the assertion is false.
14232 (struniq_assert_p): Remove.
14233 * src/struniq.h: Likewise.
14234
14235 2002-11-18 Paul Eggert <eggert@twinsun.com>
14236
14237 * data/glr.c (yygetLRActions): Replace `yyindex' with
14238 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14239 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14240 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14241
14242 2002-11-18 Akim Demaille <akim@epita.fr>
14243
14244 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14245 space.
14246 From Tim Van Holder.
14247
14248 2002-11-17 Paul Eggert <eggert@twinsun.com>
14249
14250 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14251 to "SyntaxError" for consistency with my 2002-11-15 change.
14252
14253 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14254 not define to {}, since this breaks the common use of `YYDPRINTF
14255 ((...));' if a single statement is desired (e.g. before `else').
14256 Work around GCC warnings by surrounding corresponding calls with
14257 {} if needed.
14258 (yyhasResolvedValue): Remove unused function.
14259 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14260 loop body.
14261 (yyreportSyntaxError): Renamed from yyreportParseError.
14262 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14263 All uses changed.
14264 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14265 extern when possible. Remove unused initializations.
14266
14267 2002-11-16 Akim Demaille <akim@epita.fr>
14268
14269 Augment the similarity between GLR and LALR traces.
14270
14271 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14272 (YY_REDUCE_PRINT): New.
14273 (yyparse): Use them.
14274 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14275 YYDPRINT here.
14276 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14277 state reached after the reduction/recovery, since...
14278 (yyparse, yyprocessOneStack): Report the state we are entering in.
14279
14280 2002-11-16 Akim Demaille <akim@epita.fr>
14281
14282 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14283 Add support for --trace=skeleton.
14284 * src/scan-skel.l: %option debug.
14285 Scan strings of non-@ or \n instead of character by character.
14286 (scan_skel): Handle trace_skeleton.
14287 (QPUTS): New.
14288 (@output_parser_name@, @output_header_name@): ``Restore'' their
14289 support (used to be M4 macros).
14290 * data/yacc.c: Quote larger chunks, a la glr.c.
14291 * data/lalr1.cc: Likewise.
14292 The header guards are no longer available, so use some other
14293 string than `YYLSP_NEEDED'.
14294
14295 2002-11-16 Akim Demaille <akim@epita.fr>
14296
14297 Make the ``Printers and Destructors'' test more verbose, taking
14298 `yacc.c''s behavior as (possibly wrong) reference.
14299
14300 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14301 instead of fprint on stdout.
14302 Set and report the last_line of the symbols.
14303 Consistently display values and locations.
14304
14305 2002-11-16 Paul Eggert <eggert@twinsun.com>
14306
14307 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14308
14309 2002-11-15 Paul Eggert <eggert@twinsun.com>
14310
14311 * tests/actions.at (Actions after errors): New test case.
14312
14313 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14314 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14315 tests/action.at, tests/calc.at, tests/conflicts.at,
14316 tests/cxx-type.at, tests/regression.at:
14317 "parse error" -> "syntax error" for POSIX compatibility.
14318 "parsing stack overflow..." -> "parser stack overflow" so
14319 that code matches Bison documentation.
14320
14321 2002-11-15 Akim Demaille <akim@epita.fr>
14322
14323 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14324 take two BRACED_CODE, not two string_content.
14325 Free the scanner's obstack when we are done.
14326 (code_content): New.
14327 * tests/calc.at: Adjust.
14328 * doc/bison.texinfo: Adjust.
14329 Also, make sure to include the `,' for these declarations.
14330
14331 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14332
14333 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14334 definition; avoids potential autoreconf problems.
14335
14336 2002-11-15 Akim Demaille <akim@epita.fr>
14337
14338 Always check the value returned by yyparse.
14339
14340 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14341 returned by yyparse.
14342 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14343 Adjust calls.
14344 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14345 returned by yyparse.
14346
14347 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14348
14349 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14350 on input.at test.
14351
14352 2002-11-14 Paul Eggert <eggert@twinsun.com>
14353
14354 * src/output.c (output_skeleton): Call xfopen instead of
14355 duplicating xfopen's body.
14356
14357 Fix bugs reported by Nelson H. F. Beebe in
14358 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14359
14360 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14361 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14362 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14363 file twice in the grammar, as an extra check.
14364
14365 * tests/input.at (Torturing the Scanner): Surround the
14366 backslash-newline tests with "#if 0", to make it less likely that
14367 we'll run into compiler bugs. Bring back solitary \ inside
14368 comment, but add a closing comment to work around HP C bug. Don't
14369 test backslash-newline in C character constant.
14370
14371 2002-11-14 Akim Demaille <akim@epita.fr>
14372
14373 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14374 status of the compiler.
14375 Calling `exit 1' is no longer needed.
14376 Reported by Nelson H. F. Beebe.
14377
14378 2002-11-14 Akim Demaille <akim@epita.fr>
14379
14380 * tests/atlocal.in (CPPFLAGS): We have config.h.
14381 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14382 New.
14383 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14384 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14385 * tests/regression.at, tests/torture.at: Use them for all the
14386 grammars that are to be compiled.
14387 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14388 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14389 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14390
14391 2002-11-14 Akim Demaille <akim@epita.fr>
14392
14393 * doc/bison.texinfo: Various formatting changes (alignments in
14394 samples, additional @group/@end group, GCS in samples.
14395 Use @deffn instead of simple @table to define the directives,
14396 macros, variables etc.
14397
14398 2002-11-13 Paul Eggert <eggert@twinsun.com>
14399
14400 Fix some bugs reported by Albert Chin-A-Young in
14401 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14402
14403 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14404 -o c"; the HP C compiler chatters during compilation.
14405 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14406 * tests/headers.at (export YYLTYPE): Likewise.
14407
14408 * tests/input.at (Torturing the Scanner): Remove lines containing
14409 solitary backslashes, as they tickle a bug in the HP C compiler.
14410
14411 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14412 comments, since they're not portable. Use GNU coding style.
14413
14414 2002-11-13 Akim Demaille <akim@epita.fr>
14415
14416 * data/yacc.c: Leave bigger chunks of quoted text.
14417 (YYDSYMPRINTF): New.
14418 Use it to report symbol activities.
14419 * data/glr.c (YYDSYMPRINTF): New.
14420 Use it.
14421
14422 2002-11-12 Paul Eggert <eggert@twinsun.com>
14423
14424 Version 1.75b.
14425
14426 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14427 (yyglrReduce): Return yyok, not 0.
14428 This should avoid the enumerated-type warnings reported
14429 by Nelson H. F. Beebe in
14430 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14431
14432 * lib/bbitset.h (BITSET_INLINE): Remove.
14433 * lib/bitset.h [! BITSET_INLINE]: Remove.
14434 (bitset_set, bitset_reset, bitset_test): Rename local vars
14435 to avoid shadowing warnings by GCC.
14436
14437 * data/glr.c (inline): Remove #define. It's the user's
14438 responsibility to #define it away, just like 'const'.
14439 This fixes one of the bugs reported by Nelson H. F. Beebe in
14440 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14441
14442 * Makefile.maint (po-check): Scan .l and .y files instead of the
14443 .c and the .h files that they generate. This fixes the bug
14444 reported by Tim Van Holder in:
14445 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14446 Look for N_ as well as for _. Try to avoid matching #define for
14447 N_ and _.
14448 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14449 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14450 * src/scan-gram.l: Revamp regular expressions so that " and '
14451 do not confuse xgettext.
14452
14453 * src/struniq.h (struniq_new): Do not declare the return type
14454 to be 'const'; this violates the C standard.
14455 * src/struniq.c (struniq_new): Likewise.
14456
14457 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14458
14459 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14460 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14461 linker.
14462
14463 2002-11-12 Akim Demaille <akim@epita.fr>
14464
14465 * Makefile.maint: Sync with Autoconf:
14466 (local_updates): New.
14467
14468 2002-11-12 Akim Demaille <akim@epita.fr>
14469
14470 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14471
14472 2002-11-12 Akim Demaille <akim@epita.fr>
14473
14474 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14475 locations.
14476
14477 2002-11-12 Akim Demaille <akim@epita.fr>
14478
14479 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14480 not yyvalue.
14481
14482 2002-11-12 Akim Demaille <akim@epita.fr>
14483
14484 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14485 Use it to test the GLR parser.
14486
14487 2002-11-12 Akim Demaille <akim@epita.fr>
14488
14489 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14490 defines it.
14491 * data/glr.c (yystos): New.
14492 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14493 (YYDSYMPRINT): New.
14494 (yyval): Don't define it, it is handled via M4.
14495 (yyrecoverParseError): Free verbosely the discarded symbols.
14496 * data/yacc.c (yysymprint): Remove, rather...
14497 (b4_yysymprint_generate): invoke.
14498 * data/c.m4 (b4_yysymprint_generate): New.
14499 Accept pointers as arguments, as opposed to the version from
14500 yacc.c.
14501 (b4_yydestruct_generate): Likewise.
14502 * tests/cations.at (Printers and Destructors): Use Bison directives
14503 instead of CPP macros.
14504 Don't rely on internal details.
14505
14506 2002-11-12 Akim Demaille <akim@epita.fr>
14507
14508 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14509 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14510 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14511 it against YYEMPTY and so forth), work on yytoken (i.e., set
14512 it to YYEMPTY etc.).
14513 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14514 (b4_symbol_actions): Remove.
14515 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14516 for 0, end-of-input.
14517
14518 2002-11-12 Akim Demaille <akim@epita.fr>
14519
14520 * doc/bison.texinfo (Destructor Decl): New.
14521
14522 2002-11-12 Akim Demaille <akim@epita.fr>
14523
14524 * src/tables.c (tables_generate): Use free for pointers that
14525 cannot be NULL, not XFREE.
14526 (pack_vector): Use assert, not fatal, for bound violations.
14527 * src/state.c (state_new): Likewise.
14528 * src/reader.c (reader): Likewise.
14529 * src/lalr.c (set_goto_map): Likewise.
14530 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14531 the file name.
14532
14533 2002-11-12 Akim Demaille <akim@epita.fr>
14534
14535 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14536 Restore.
14537 * src/scan-gram.l (last_string): Is global to the file, not to
14538 yylex.
14539 * src/parse-gram.y (input): Don't append the epilogue here,
14540 (epilogue.opt): do it here, and free the scanner's obstack.
14541 * src/reader.c (epilogue_set): Rename as...
14542 (epilogue_augment): this.
14543 * data/c.m4 (b4_epilogue): Defaults to empty.
14544
14545 2002-11-12 Akim Demaille <akim@epita.fr>
14546
14547 * src/getargs.c (long_options): Remove duplicates.
14548 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14549 Remove.
14550 * doc/bison.rnh: Remove.
14551 * doc/bison.texinfo (VMS Invocation): Remove.
14552
14553 2002-11-12 Akim Demaille <akim@epita.fr>
14554
14555 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14556 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14557
14558 Use struniq for symbols.
14559
14560 * src/symtab.h (symbol_t): The tag member is a struniq.
14561 (symbol_type_set): Adjust.
14562 * src/symtab.c (symbol_new): Takes a struniq.
14563 (symbol_free): Don't free the tag member.
14564 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14565 (hash_compare_symbol, hash_symbol): these.
14566 Use the fact that tags as struniqs.
14567 (symbol_get): Use struniq_new.
14568 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14569 Returns a strniq.
14570 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14571 and type members are struniqs.
14572 * src/reader.c (get_merge_function)
14573 (grammar_current_rule_merge_set): Adjust.
14574 (TYPE, current_type): Are struniq.
14575
14576 Use struniq for file names.
14577
14578 * src/files.h, src/files.c (infile): Split into...
14579 (grammar_file, current_file): these.
14580 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14581 * src/reduce.c (reduce_print): Likewise.
14582 * src/getargs.c (getargs): Likewise.
14583 * src/complain.h, src/complain.c: Likewise.
14584 * src/main.c (main): Call struniqs_new early enough to use it for
14585 file names.
14586 Don't free the input file name.
14587
14588 2002-11-12 Akim Demaille <akim@epita.fr>
14589
14590 * src/symtab.c (symbol_free): Remove dead deactivated code:
14591 type_name are properly removed.
14592 Don't use XFREE to free items that cannot be NULL.
14593 * src/struniq.h, src/struniq.c: New.
14594 * src/main.c (main): Initialize/free struniqs.
14595 * src/parse-gram.y (%union): Add astruniq member.
14596 (yyprint): Adjust.
14597 * src/scan-gram.l (<{tag}>): Return a struniq.
14598 Free the obstack bit that used to store it.
14599 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14600
14601 2002-11-11 Paul Eggert <eggert@twinsun.com>
14602
14603 Revamp to fix many (but not all) of the C- and M4-related quoting
14604 problems. Among other things, this fixes the Bison bug reported
14605 by Jan Hubicka when processing the Bash grammar; see:
14606 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14607
14608 Use new @ escapes consistently. Represent brackets with @{ and @}
14609 rather than @<:@ and @:>@, since this works a bit better with dumb
14610 editors like vi. Represent @ with @@, since @ is now consistently
14611 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14612 __ofile__, to avoid unexpected expansions. Similarly, use @output
14613 rather than #output.
14614
14615 * data/c.m4 (b4_copyright): Omit file name from comment, since
14616 the file name could contain "*/".
14617 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14618 be quoted. All uses changed.
14619
14620 * data/glr.c: Use new @ escapes consistently.
14621 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14622 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14623 Remove, since they couldn't handle arbitrary characters in file
14624 names.
14625 * data/lalr1.cc: Likewise.
14626 * data/yacc.c: Likewise.
14627
14628 * src/files.c (output_infix): Remove; all uses removed.
14629 * src/files.h: Likewise.
14630
14631 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14632 mishandled funny characters in file names, and anyway it isn't
14633 needed any more.
14634 * data/yacc.c: Likewise.
14635 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14636
14637 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14638 * data/yacc.c: Likewise.
14639
14640 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14641 strings now.
14642 (muscle_init): Quote filename as a C string.
14643 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14644 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14645 * src/output.c (escaped_file_name_output): New function.
14646 (prepare_symbols): Quote tokens for M4.
14647 (prepare): Don't insert output_infix, output_prefix,
14648 output_parser_name, output_header_name; this is now down by scan-skel.
14649 Insert skeleton as a C string.
14650
14651 * src/output.c (user_actions_output, symbol_destructors_output,
14652 symbol_printers_output): Quote filenames for C and M4.
14653 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14654
14655 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14656 escapes other than \\ and \'; this simplifies the code.
14657 (<SC_STRING>): Likewise, for \\ and \".
14658 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14659 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14660 Use new escapes @{ and @} for [ and ].
14661
14662 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14663 them with auto vars.
14664 Switch to new escape scheme, where @ is the escape character uniformly.
14665 Abort if a stray escape character is found. Avoid unbounded input
14666 buffer when parsing non-escaped text.
14667
14668 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14669 __oline__, #output, $@, and @{ do not have unintended meanings.
14670
14671 2002-11-09 Paul Eggert <eggert@twinsun.com>
14672
14673 Fix the test failure due to GCC warnings described in
14674 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14675 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14676 evaluate to 0 if it's impossible for NINF to be in the respective
14677 table.
14678 (yygetLRActions, yyrecoverParseError): Use them.
14679
14680 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14681 counted in the token inserted at end of file. Now takes
14682 location_t *, not location_t, so that the location can be
14683 adjusted. All uses changed.
14684
14685 * tests/regression.at (Invalid inputs): Adjust wording in
14686 diagnostic to match the new behavior.
14687
14688 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14689 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14690 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14691 abort ();'. This reduces the runtime of the "Many lookaheads"
14692 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14693 GCC 3.2.
14694
14695 2002-11-07 Paul Eggert <eggert@twinsun.com>
14696
14697 * src/parse-gram.y (CHARACTER): Remove unused token.
14698 All uses removed.
14699
14700 * src/scan-gram.l: Remove stack option. We no longer use the
14701 stack, since the stack was never deeper than 1; instead, use the
14702 new auto var c_context to record the stacked value.
14703
14704 Remove nounput option. At an unexpected end of file, we now unput
14705 the minimal input necessary to end cleanly; this simplifies the
14706 code.
14707
14708 Avoid unbounded token sizes where this is easy.
14709
14710 (unexpected_end_of_file): New function.
14711 Use it to systematize the error message on unexpected EOF.
14712 (last-string): Now auto, not static.
14713 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14714 (scanner_last_string_free): Remove; not used.
14715 (percent_percent_count): Move decl to just before use.
14716 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14717 not the (never otherwised-used) CHARACTER.
14718
14719 2002-11-07 Akim Demaille <akim@epita.fr>
14720
14721 Let yyerror always receive the msg as last argument, so that
14722 yyerror can be variadic.
14723
14724 * data/yacc.c (b4_yyerror_args): New.
14725 Use it when calling yyerror.
14726 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14727 Use it when calling yyerror.
14728 * doc/bison.texinfo (Error Reporting): Adjust.
14729 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14730 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14731
14732 2002-11-06 Akim Demaille <akim@epita.fr>
14733
14734 #line should have quoted strings.
14735 Ideally, this should be done by m4_quotearg.
14736
14737 * src/scan-skel.l: Include quotearg.h.
14738 Quote __ofile__.
14739 * src/output.c (symbol_printers_output)
14740 (symbol_destructors_output): Quote the file name.
14741
14742 2002-11-06 Akim Demaille <akim@epita.fr>
14743
14744 * tests/regression.at (Invalid inputs): Adjust to the recent
14745 messages.
14746
14747 2002-11-06 Akim Demaille <akim@epita.fr>
14748
14749 Restore --no-lines.
14750 Reported by Jim Kent.
14751
14752 * data/c.m4 (b4_syncline): New.
14753 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14754 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14755 * src/output.c (user_actions_output): Likewise.
14756 (prepare): Define 'b4_synclines_flag'.
14757 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14758
14759 2002-11-06 Akim Demaille <akim@epita.fr>
14760
14761 * src/main.c (main): Free `infile'.
14762 * src/scan-gram.l (handle_syncline): New.
14763 Recognize `#line'.
14764 * src/output.c (user_actions_output, symbol_destructors_output)
14765 (symbol_printers_output): Use the location's file name, not
14766 infile.
14767 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14768
14769 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14770
14771 * src/tables.c (matching_state): Don't allow states to match if
14772 either has GLR conflict entries.
14773
14774 2002-11-05 Paul Eggert <eggert@twinsun.com>
14775
14776 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14777 "integer out of range" rather than "invalid value".
14778 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14779 accordingly.
14780
14781 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14782 Also, remove one static variable in the scanner.
14783
14784 * src/scan-gram.l (braces_level): Now auto, not static.
14785 Initialize to zero if the compiler is being picky.
14786 (INITIAL): Clear braces_level instead of incrementing it.
14787 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14788 as POSIX 1003.1-2001 requires.
14789 * src/system.h (IF_LINT): New macro, taken from coreutils.
14790 * configure.ac: Define "lint" if --enable-gcc-warnings.
14791
14792 2002-11-05 Akim Demaille <akim@epita.fr>
14793
14794 * src/scan-gram.l: When it starts with `%', complain about the
14795 whole directive, not just that `invalid character: %'.
14796
14797 2002-11-04 Akim Demaille <akim@epita.fr>
14798
14799 * Makefile.maint: Update from Autoconf.
14800 (update, cvs-update, po-update, do-po-update): New.
14801
14802 2002-11-04 Akim Demaille <akim@epita.fr>
14803
14804 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14805 and yyerror.
14806 Have yyerror `use' its arguments.
14807 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14808 returns true when location & yacc & pure & parse-param.
14809 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14810
14811 2002-11-04 Akim Demaille <akim@epita.fr>
14812
14813 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14814 clashes.
14815 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14816 font-lock-mode.
14817 Use complain_at.
14818 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14819 slot 0.
14820
14821 2002-11-03 Paul Eggert <eggert@twinsun.com>
14822
14823 * src/reader.c (get_merge_function, grammar_current_rule_check):
14824 Use consistent diagnostics for reporting type name clashes.
14825 Quote the types with <>, for consistency with Yacc.
14826 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14827
14828 2002-11-03 Akim Demaille <akim@epita.fr>
14829
14830 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14831 New.
14832 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14833 (b4_parse_param): Remove.
14834 Use b4_identification.
14835 Propagate b4_pure_args where needed to pass them to yyerror.
14836 * data/glr.m4 (b4_parse_param): Remove.
14837 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14838 (b4_lpure_formals): New.
14839 Use b4_identification.
14840 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14841 b4_user_formals and b4_user_args.
14842 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14843 (yyreportAmbiguity): When using a pure parser, also need
14844 the location, and the parse-params.
14845 Adjust callers.
14846 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14847 When using a pure parser, also need the parse-params.
14848 Adjust callers.
14849 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14850 (%pure-parser + %parse-param) LALR and GLR parsers.
14851 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14852 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14853 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14854 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14855 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14856 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14857 * doc/bison.texinfo: Untabify the whole file.
14858 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14859 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14860 (Error Reporting): Adjust to these new directives.
14861 Document %error-verbose, deprecate YYERROR_VERBOSE.
14862
14863 2002-11-03 Akim Demaille <akim@epita.fr>
14864
14865 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14866 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14867 command line options.
14868 * tests/cxx-type.at: Formatting changes.
14869
14870 2002-11-03 Paul Eggert <eggert@twinsun.com>
14871
14872 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14873 to count columns correctly, and to check for invalid inputs.
14874
14875 Use mbsnwidth to count columns correctly. Account for tabs, too.
14876 Include mbswidth.h.
14877 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14878 (extend_location): New function.
14879 (YY_LINES): Remove.
14880
14881 Handle CRLF in C code rather than in Lex code.
14882 (YY_INPUT): New macro.
14883 (no_cr_read): New function.
14884
14885 Scan UCNs, even though we don't fully handle them yet.
14886 (convert_ucn_to_byte): New function.
14887
14888 Handle backslash-newline correctly in C code.
14889 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14890 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14891 all uses changed.
14892 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14893 Use {splice} wherever C allows backslash-newline.
14894 YY_STEP after space, newline, vertical-tab.
14895 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14896
14897 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14898
14899 ({int}, handle_action_dollar, handle_action_at): Check for integer
14900 overflow.
14901
14902 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14903
14904 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14905 as well as \000. Check for UCHAR_MAX, not 255.
14906 Allow \x with an arbitrary positive number of digits, as in C.
14907 Check for overflow here.
14908 Allow \? and UCNs, for compatibility with C.
14909
14910 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14911 with quote slot used by complain_at.
14912
14913 * tests/input.at: Add tests for backslash-newline, m4 quotes
14914 in symbols, long literals, and funny escapes in strings.
14915
14916 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14917 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14918 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14919 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14920 * m4/mbswidth.m4: New file, from GNU coreutils.
14921
14922 * doc/bison.texinfo (Grammar Outline): Document // comments.
14923 (Symbols): Document that trigraphs have no special meaning in Bison,
14924 nor is backslash-newline allowed.
14925 (Actions): Document that trigraphs have no special meaning.
14926
14927 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14928 no longer used.
14929
14930 2002-11-02 Paul Eggert <eggert@twinsun.com>
14931
14932 * src/reader.c: Don't include quote.h; not needed.
14933 (get_merge_function): Reword warning to be consistent with
14934 type clash diagnostic in grammar_current_rule_check.
14935
14936 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14937 bug in trigraph handling.
14938
14939 * src/output.c (prepare_symbols): When printing token names,
14940 escape "[" as "@<:@" and likewise for "]".
14941
14942 * src/system.h (errno): Remove declaration, as we are now
14943 assuming C89 or better, and C89 guarantees errno.
14944
14945 2002-10-30 Paul Eggert <eggert@twinsun.com>
14946
14947 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14948 Check for close failures.
14949 * src/files.h (xfclose): Return void, not int, since it always
14950 returned zero.
14951 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14952 indicates one.
14953 * src/output.c (output_skeleton): Use xfclose rather than fclose
14954 and ferror. xfclose now checks ferror.
14955
14956 * data/glr.c (YYLEFTMOST_STATE): Remove.
14957 (yyreportTree): Use a stack-based leftmost state. This avoids
14958 our continuing battles with bogus warnings about initializers.
14959
14960 2002-10-30 Akim Demaille <akim@epita.fr>
14961
14962 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14963 #if.
14964
14965 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14966
14967 * tests/glr-regr1.at: New test for reported regressions.
14968 * tests/testsuite.at: Add glr-regr1.at test.
14969 * tests/Makefile.am: Add glr-regr1.at test.
14970
14971 2002-10-24 Paul Eggert <eggert@twinsun.com>
14972
14973 Version 1.75a.
14974
14975 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14976 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14977 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14978 Don't assume strdup exists; POSIX says its an XSI extension.
14979 Check for buffer overflow on input.
14980
14981 2002-10-24 Akim Demaille <akim@epita.fr>
14982
14983 * src/output.c (output_skeleton): Don't disable M4sugar comments
14984 too soon: it results in comments being expanded.
14985 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14986 first output.
14987
14988 2002-10-24 Akim Demaille <akim@epita.fr>
14989
14990 * data/yacc.c (m4_int_type): New.
14991 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14992 char' as only yacc.c wants K&R portability.
14993 * data/glr.c (yysigned_char): Remove.
14994 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14995 Reported by Quoc Peyrot.
14996
14997 2002-10-23 Paul Eggert <eggert@twinsun.com>
14998
14999 * src/main.c (main): With --trace=time, report times even if a
15000 non-fatal error occurs. Formerly, the times were reported in some
15001 such cases but not in others.
15002 * src/reader.c (reader): Just return if a complaint has been issued,
15003 instead of exiting, so that 'main' can report times.
15004
15005 2002-10-22 Akim Demaille <akim@epita.fr>
15006
15007 * src/system.h: Include sys/types.
15008 Reported by Bert Deknuydt.
15009
15010 2002-10-23 Paul Eggert <eggert@twinsun.com>
15011
15012 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15013 Suggested by Art Haas.
15014
15015 2002-10-22 Paul Eggert <eggert@twinsun.com>
15016
15017 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15018 decl; not needed any more.
15019 * src/main.c (main): Use return to exit, undoing yesterday's change.
15020 The last OS that we could find where this wouldn't work is
15021 SunOS 3.5, and that's too old to worry about now.
15022
15023 * data/glr.c (struct yyltype): Define members even when not
15024 doing locations. This is more consistent with yacc.c, and it
15025 works around the following bug reports:
15026 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15027 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15028
15029 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15030 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15031 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15032
15033 2002-10-22 Akim Demaille <akim@epita.fr>
15034
15035 * data/README: New.
15036
15037 2002-10-21 Paul Eggert <eggert@twinsun.com>
15038
15039 Be consistent about 'bool'; the old code used an enum in one
15040 module and an int in another, and this violates the C standard.
15041 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15042 * configure.ac (AC_HEADER_STDBOOL): Add.
15043 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15044 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15045 * src/symtab.c (hash_compare_symbol_t): Likewise.
15046 * src/system.h (bool, false, true): Use a definition consistent
15047 with ../lib/hash.c. All uses changed.
15048
15049 * src/complain.c (warning_issued): Renamed from warn_message_count,
15050 so that we needn't worry about integer overflow (!).
15051 Now of type bool. All uses changed.
15052 (complaint_issued): Renamed from complain_message_count; likewise.
15053
15054 * src/main.c (main): Use exit to exit with failure.
15055
15056 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15057 rather than 1 and 0.
15058 * src/main.c (main): Likewise.
15059 * src/getargs.c (getargs): Likewise.
15060 * src/reader.c (reader): Likewise.
15061
15062 * src/getarg.c (getargs): Remove duplicate code for
15063 "Try `bison --help'".
15064
15065 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15066 What was that "2" for?
15067
15068 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15069 * src/getargs.c (usage): Likewise.
15070
15071 * src/getargs.c (getargs): When there are too few operands, report
15072 the last one. When there are too many, report the first extra
15073 one. This is how diffutils does it.
15074
15075 2002-10-20 Paul Eggert <eggert@twinsun.com>
15076
15077 Remove K&R vestiges.
15078 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15079 * src/complain.c (VA_START): Remove. Assume prototypes.
15080 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15081 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15082 fatal): Assume prototypes.
15083 * src/complain.h: Assume prototypes.
15084 * src/system.h (PARAMS): Remove.
15085 Include <limits.h> unconditionally, since it's guaranteeed even
15086 for a freestanding C89 compiler.
15087 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15088 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15089
15090 2002-10-20 Akim Demaille <akim@epita.fr>
15091
15092 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15093 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15094 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15095 (yyresolveStates, yyresolveAction, yyresolveStack)
15096 (yyprocessOneStack): Use them.
15097 (yy_reduce_print): New.
15098 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15099
15100 2002-10-20 Akim Demaille <akim@epita.fr>
15101
15102 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15103 arguments and output `void'.
15104 (b4_c_function): Rename as...
15105 (b4_c_function_def): this.
15106 (b4_c_function_decl, b4_c_ansi_function_def)
15107 (b4_c_ansi_function_decl): New.
15108 Change the interpretation of the arguments: before `int, foo', now
15109 `int foo, foo'.
15110 * data/yacc.c (yyparse): Prototype and define thanks to these.
15111 Adjust b4_c_function_def uses.
15112 * data/glr.c (yyparse): Likewise, but ANSI only.
15113
15114 2002-10-20 Akim Demaille <akim@epita.fr>
15115
15116 * src/output.c (prepare): Move the definition of `tokens_number',
15117 `nterms_number', `undef_token_number', `user_token_number_max'
15118 to...
15119 (prepare_tokens): Here.
15120 (prepare_tokens): Rename as...
15121 (prepare_symbols): this.
15122 (prepare): Move the definition of `rules_number' to...
15123 (prepare_rules): here.
15124 (prepare): Move the definition of `last', `final_state_number',
15125 `states_number' to...
15126 (prepare_states): here.
15127 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15128
15129 2002-10-20 Akim Demaille <akim@epita.fr>
15130
15131 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15132
15133 2002-10-20 Akim Demaille <akim@epita.fr>
15134
15135 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15136 * data/c.m4: here.
15137
15138 2002-10-20 Akim Demaille <akim@epita.fr>
15139
15140 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15141 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15142 `pair'.
15143 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15144 `name' to...
15145 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15146 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15147 These.
15148
15149 2002-10-19 Paul Eggert <eggert@twinsun.com>
15150
15151 Do not create a temporary file, as that involves security and
15152 cleanup headaches. Instead, use a pair of pipes.
15153 Derived from a suggestion by Florian Krohm.
15154 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15155 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15156 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15157 (BISON_PREREQ_SUBPIPE): Add.
15158 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15159 Add subpipe.h, subpipe.c.
15160 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15161 * po/POTFILES.in: Add lib/subpipe.c.
15162 * src/output.c: Include "subpipe.h".
15163 (m4_invoke): Remove decl.
15164 (scan_skel): New decl.
15165 (output_skeleton): Use pipe rather than temporary file for m4 input.
15166 Check that m4sugar.m4 is readable, to avoid deadlock.
15167 Check for pipe I/O error.
15168 * src/scan-skel.l (readpipe): Remove decl.
15169 (scan_skel): New function, to be used in place of m4_invoke.
15170 Read from stream rather than file.
15171
15172 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15173 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15174 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15175 this generates a more-accurate value anyway.
15176
15177 * lib/timevar.c (timervar_accumulate): Rename locals to
15178 avoid confusion with similarly-named more-global.
15179 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15180
15181 * src/output.c (prepare): Use xstrdup to convert char const *
15182 to char *, to avoid GCC warning.
15183
15184 2002-10-19 Akim Demaille <akim@epita.fr>
15185
15186 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15187 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15188 Use them to have `calc.y' ready for %pure-parser.
15189 * data/yacc.c (YYLEX): Pass a yylex return type to
15190 b4_c_function_call.
15191
15192 2002-10-19 Akim Demaille <akim@epita.fr>
15193
15194 Prototype support of %lex-param and %parse-param.
15195
15196 * src/parse-gram.y: Add the definition of the %lex-param and
15197 %parse-param tokens, plus their rules.
15198 Drop the `_' version of %glr-parser.
15199 Add the "," token.
15200 * src/scan-gram.l (INITIAL): Scan them.
15201 * src/muscle_tab.c: Comment changes.
15202 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15203 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15204 (muscle_entry_s): The `value' member is no longer const.
15205 Adjust all dependencies.
15206 * src/muscle_tab.c (muscle_init): Adjust: use
15207 MUSCLE_INSERT_STRING.
15208 Initialize the obstack earlier.
15209 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15210 (muscle_pair_list_grow): New.
15211 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15212 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15213 * tests/calc.at: Use %locations, not --locations.
15214 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15215
15216 2002-10-19 Akim Demaille <akim@epita.fr>
15217
15218 * src/getargs.c (usage): Take status as argument and exit
15219 accordingly.
15220 Report the traditional `Try ... --help' message when status != 0.
15221 (usage, version): Don't take a FILE * as arg, it is pointless.
15222 (getargs): When there is an incorrect number of arguments, make it
15223 an error, and report it GNUlically thanks to `usage ()'.
15224
15225 2002-10-18 Paul Eggert <eggert@twinsun.com>
15226
15227 * data/glr.c (yyreportParseError): Don't assume that sprintf
15228 yields the length of the printed string, as this is not true
15229 on SunOS 4.1.4. Reported by Peter Klein.
15230
15231 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15232 * tests/conflicts.at (%nonassoc and eof): Likewise.
15233 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15234
15235 2002-10-17 Akim Demaille <akim@epita.fr>
15236
15237 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15238 * src/getargs.c (trace_types, trace_args): Adjust.
15239 * src/reader.c (grammar_current_rule_prec_set)
15240 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15241 Standardize error messages.
15242 And s/@prec/%prec/!
15243 (reader): Use trace_flag to enable scanner/parser debugging,
15244 instead of an adhoc scheme.
15245 * src/scan-gram.l: Remove trailing debugging code.
15246
15247 2002-10-16 Paul Eggert <eggert@twinsun.com>
15248
15249 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15250 MUSCLE_TAB_H.
15251
15252 * NEWS: Officially drop support for building Bison with K&R C,
15253 since it didn't work anyway and it's not worth worrying about.
15254 * Makefile.maint (wget_files): Remove ansi2knr.c.
15255 (ansi2knr.c-url_prefix): Remove.
15256 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15257 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15258 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15259
15260 2002-10-15 Paul Eggert <eggert@twinsun.com>
15261
15262 Stop using the "enum_" trick for K&R-style function definitions;
15263 it confused me, and I was the author! Instead, assume that people
15264 who want to use K&R C compilers (when using these modules in GCC,
15265 perhaps?) will run ansi2knr.
15266
15267 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15268 All uses of "enum_" changed to "enum ".
15269 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15270 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15271
15272 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15273 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15274 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15275 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15276 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15277 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15278 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15279 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15280 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15281 Use function prototypes; this removes the need for declaring
15282 static functions simply to provide their prototypes.
15283 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15284 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15285 bitset_count_, bitset_create, bitset_dump, bitset_first,
15286 bitset_free, bitset_init, bitset_last, bitset_next,
15287 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15288 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15289 bitset_print, bitset_release_memory, bitset_toggle_,
15290 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15291 debug_bitset): Likewise.
15292 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15293 * lib/bitset_stats.c (bitset_log_histogram_print,
15294 bitset_percent_histogram_print, bitset_stats_and,
15295 bitset_stats_and_cmp, bitset_stats_and_or,
15296 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15297 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15298 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15299 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15300 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15301 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15302 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15303 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15304 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15305 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15306 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15307 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15308 bitset_stats_zero): Likewise.
15309 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15310 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15311 bitsetv_dump, debug_bitsetv): Likewise.
15312 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15313 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15314 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15315 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15316 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15317 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15318 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15319 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15320 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15321 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15322 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15323 Likewise.
15324 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15325 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15326 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15327 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15328 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15329 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15330 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15331 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15332 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15333 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15334 lbitset_xor_cmp, lbitset_zero): Likewise.
15335
15336 2002-10-14 Akim Demaille <akim@epita.fr>
15337
15338 Version 1.75.
15339
15340 2002-10-14 Akim Demaille <akim@epita.fr>
15341
15342 * tests/Makefile.am (maintainer-check-posix): New.
15343
15344 2002-10-14 Akim Demaille <akim@epita.fr>
15345
15346 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15347 member.
15348
15349 2002-10-14 Akim Demaille <akim@epita.fr>
15350
15351 * src/tables.c (table_ninf_remap): base -> tab.
15352 Reported by Matt Rosing.
15353
15354 2002-10-14 Paul Eggert <eggert@twinsun.com>
15355
15356 * tests/action.at, tests/calc.at, tests/conflicts.at,
15357 tests/cxx-type.at, tests/headers.at, tests/input.at,
15358 tests/regression.at, tests/synclines.at, tests/torture.at:
15359 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15360 so that the tests still work even if POSIXLY_CORRECT is set.
15361 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15362
15363 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15364 for portability to K&R hosts. Fix typo: signed char is guaranteed
15365 only to 127, not to 128.
15366 * data/glr.c (yysigned_char): New type.
15367 * data/yacc.c (yysigned_char): Likewise.
15368 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15369
15370 2002-10-13 Paul Eggert <eggert@twinsun.com>
15371
15372 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15373 true due to limited range of data type" warning from GCC.
15374
15375 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15376 by wrapping enum yytokentype's definition inside #ifndef
15377 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15378
15379 2002-10-13 Akim Demaille <akim@epita.fr>
15380
15381 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15382 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15383
15384 2002-10-13 Akim Demaille <akim@epita.fr>
15385
15386 * Makefile.maint: Update from Autoconf 2.54.
15387 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15388
15389 2002-10-13 Akim Demaille <akim@epita.fr>
15390
15391 * src/print.c (print_state): Separate the list of solved conflicts
15392 from the other items.
15393 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15394
15395 2002-10-13 Akim Demaille <akim@epita.fr>
15396
15397 Let nondeterministic skeletons be usable with deterministic
15398 tables.
15399
15400 With the patch, GAWK compiled by GCC without -O2 passes its test
15401 suite using a GLR parser driven by LALR tables. It fails with -O2
15402 because `struct stat' gives two different answers on my machine:
15403 88 (definition of an auto var) and later 96 (memset on this var).
15404 Hence the stack is badly corrumpted. The headers inclusion is to
15405 blame: if I move the awk.h inclusion before GLR's system header
15406 inclusion, the two struct stat have the same size.
15407
15408 * src/tables.c (pack_table): Always create conflict_table.
15409 (token_actions): Always create conflict_list.
15410 * data/glr.c (YYFLAG): Remove, unused.
15411
15412 2002-10-13 Akim Demaille <akim@epita.fr>
15413
15414 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15415 (O0FLAGS): New.
15416 (VALGRIND, GXX): New.
15417 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15418 * tests/bison.in: Run $PREBISON a pre-command.
15419 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15420 (maintainer-check-g++): New.
15421 * Makefile.am (maintainer-check): New.
15422
15423 2002-10-13 Akim Demaille <akim@epita.fr>
15424
15425 * data/glr.c: Formatting changes.
15426 Tweak some trace messages to match yacc.c's.
15427
15428 2002-10-13 Akim Demaille <akim@epita.fr>
15429
15430 GLR parsers sometimes raise parse errors instead of performing the
15431 default reduction.
15432 Reported by Charles-Henry de Boysson.
15433
15434 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15435 check the length of the traces when %glr.
15436 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15437 GLR's traces.
15438 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15439 Test GLR parsers.
15440 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15441 (yyltype): Remove the yy prefix from the member names.
15442 (yytable): Complete its comment.
15443 (yygetLRActions): Map error action number from YYTABLE from
15444 YYTABLE_NINF to 0.
15445 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15446 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15447 not satisfying as we could compare an YYACTION computed from
15448 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15449 only value for error actions.
15450 (yyreportParseError): In verbose parse error messages, don't issue
15451 `error' in the list of expected tokens.
15452 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15453 next action to perform to match glr.c's decoding.
15454 (yytable): Complete its comment.
15455
15456 2002-10-13 Paul Eggert <eggert@twinsun.com>
15457
15458 Fix problem reported by Henrik Grubbstroem in
15459 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15460 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15461 because the Bison parser reads the second action before reducing
15462 the first one.
15463 * src/scan-gram.l (rule_length): New static var.
15464 Use it to keep track of the rule length in the scanner, since
15465 we can't expect the parser to be in lock-step sync with the scanner.
15466 (handle_action_dollar, handle_action_at): Use this var.
15467 * tests/actions.at (Exotic Dollars): Test for the problem.
15468
15469 2002-10-12 Paul Eggert <eggert@twinsun.com>
15470
15471 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15472 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15473 Include <sys/time.h> when checking for clock_t and struct tms.
15474 Use same include order as source.
15475 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15476 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15477
15478 * lib/timevar.c: Update copyright date and clarify comments.
15479 (get_time) [IN_GCC]: Keep the GCC version for reference.
15480
15481 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15482 GCC version as of today, then merge Bison's changes.
15483 Change "GCC" to "Bison" in copyright notice. timevar.def's
15484 author is Akim, so change that too.
15485
15486 * src/reader.c (grammar_current_rule_check):
15487 Don't worry about the default action if $$ is untyped.
15488 Prevents bogus warnings reported by Jim Gifford in
15489 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15490
15491 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15492 * data/glr.c, data/lalr1.cc, data/yacc.c:
15493 Output token definitions before the first part of user declarations.
15494 Fixes compatibility problem reported by Jim Gifford for kbd in
15495 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15496
15497 2002-10-11 Paul Eggert <eggert@twinsun.com>
15498
15499 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15500 (yyparse): here. This undoes some of the 2002-07-25 change.
15501 Compatibility problem reported by Ralf S. Engelschall with
15502 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15503
15504 2002-10-11 Akim Demaille <akim@epita.fr>
15505
15506 * tests/regression.at Characters Escapes): New.
15507 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15508 characters.
15509 Reported by Jan Nieuwenhuizen.
15510
15511 2002-10-11 Akim Demaille <akim@epita.fr>
15512
15513 * po/id.po: New.
15514
15515 2002-10-10 Paul Eggert <eggert@twinsun.com>
15516
15517 Portability fixes for bitsets; this also avoids several GCC
15518 warnings.
15519
15520 * lib/abitset.c: Include <stddef.h>, for offsetof.
15521 * lib/lbitset.c: Likewise.
15522
15523 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15524 properly for vectors of objects. Do not assume that adding a
15525 header size to a multiple of a word size yields a value that is
15526 properly aligned for the whole union.
15527 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15528
15529 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15530 unique names for structures.
15531 * lib/ebitset.c (ebitset_bytes): Likewise.
15532 * lib/lbitset.c (lbitset_bytes): Likewise.
15533
15534 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15535 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15536 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15537 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15538 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15539 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15540 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15541 to improve the type-checking that GCC can do.
15542 * lib/bitset.c (bitset_op4_cmp): Likewise.
15543 * lib/bitset_stats.c (bitset_stats_count,
15544 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15545 bitset_stats_copy, bitset_stats_disjoint_p,
15546 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15547 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15548 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15549 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15550 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15551 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15552 bitset_stats_or_and_cmp): Likewise.
15553 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15554 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15555 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15556 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15557
15558 * lib/abitset.h: Include bitset.h, not bbitset.h.
15559 * lib/ebitset.h: Likewise.
15560 * lib/lbitset.h: Likewise.
15561
15562 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15563 All instances of parameters of type enum bitset_opts are now of
15564 type enum_bitset_opts, to conform to the C Standard, and similarly
15565 for enum_bitset_type.
15566 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15567 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15568
15569 Do not use "struct bitset_struct" to mean different things in
15570 different modules. Not only is this confusing, it violates
15571 the C Standard, which requires that structure types in different
15572 modules must be compatible if one is to be passed to the other.
15573 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15574 All instances of "struct bitset_struct *" replaced with "bitset".
15575 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15576 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15577 struct lbitset_struct, struct bitset_stats_struct): New types.
15578 All uses of struct bitset_struct changed to union bitset_union,
15579 etc.
15580 * lib/abitset.c (struct abitset_struct, abitset,
15581 struct bitset_struct): Remove.
15582 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15583 struct bitset_struct): Remove.
15584 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15585 bitset_struct): Remove.
15586 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15587 Likewise.
15588
15589 Do not call a function of type T using a call that assumes the
15590 function is of a different type U. Standard C requires that a
15591 function must be called with a type that is compatible with its
15592 definition.
15593 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15594 New decls.
15595 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15596 New functions.
15597 * lib/ebitset.c (PFV): Remove.
15598 * lib/lbitset.c (PFV): Likewise.
15599 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15600 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15601 decls.
15602 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15603 (ebitset_vtable): Use them.
15604 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15605 lbitset_xor): New functions.
15606 (lbitset_vtable): Use them.
15607
15608 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15609 Declare.
15610
15611 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15612 GCC warning.
15613 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15614 Use offsetof, for simplicity.
15615
15616 2002-10-06 Paul Eggert <eggert@twinsun.com>
15617
15618 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15619 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15620 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15621 which was inadvertently undone by the 2002-09-30 patch.
15622 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15623 the same width as int.
15624
15625 2002-10-04 Paul Eggert <eggert@twinsun.com>
15626
15627 Version 1.50.
15628
15629 * configure.ac (AC_INIT), NEWS: Increment version number.
15630
15631 * doc/bison.texinfo: Minor spelling, grammar, and white space
15632 fixes.
15633 (Symbols): Mention that any negative value returned from yylex
15634 signifies end-of-input. Warn about negative chars. Mention
15635 the portable Standard C character set.
15636
15637 The GNU coding standard says CFLAGS and YFLAGS are reserved
15638 for the installer to set.
15639 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15640 * src/Makefile.am (AM_CFLAGS): Likewise.
15641 (AM_YFLAGS): Renamed from YFLAGS.
15642
15643 Fix some MAX and MIN problems.
15644 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15645 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15646 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15647 * src/reader.c (reader): Use it.
15648
15649 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15650 POSIX 1003.1-2001 has removed fgrep.
15651
15652 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15653
15654 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15655 interpreted as signed.
15656 * lib/ebitset.c (ebitset_list): Fix bug.
15657
15658 2002-10-01 Paul Eggert <eggert@twinsun.com>
15659
15660 More fixes for 64-bit hosts and large bitsets.
15661
15662 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15663 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15664 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15665 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15666 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15667 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15668 bitset_count_): Likewise.
15669 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15670 bitset_first, bitset_last): Likewise.
15671 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15672 bitset_stats_list_reverse, bitset_stats_size,
15673 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15674 Likewise.
15675 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15676 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15677 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15678 bitsetv_reflexive_transitive_closure): Likewise.
15679 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15680 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15681 Likewise.
15682 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15683 Likewise.
15684
15685 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15686 Use size_t, not unsigned int, to count bytes.
15687 * lib/abitset.h (abitset_bytes): Likewise.
15688 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15689 Likewise.
15690 * lib/bitset.h (bitset_bytes): Likewise.
15691 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15692 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15693 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15694 * lib/ebitset.c (ebitset_bytes): Likewise.
15695 * lib/ebitset.h (ebitset_bytes): Likewise.
15696 * lib/lbitset.c (lbitset_bytes): Likewise.
15697 * lib/lbitset.h (lbitset_bytes): Likewise.
15698
15699 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15700 abitset_subset_p, abitset_disjoint_p, abitset_and,
15701 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15702 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15703 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15704 abitset_or_and, abitset_or_and_cmp):
15705 Use bitset_windex instead of unsigned int.
15706 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15707 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15708 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15709 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15710 Likewise.
15711 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15712
15713 * lib/bitset.c (bitset_print):
15714 Use proper printf formats for widths of integer types.
15715 * lib/bitset_stats.c (bitset_percent_histogram_print,
15716 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15717 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15718 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15719 * lib/lbitset.c (lbitset_bytes): Likewise.
15720
15721 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15722 BITSET_SIZE_MAX): New macros.
15723 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15724 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15725 to BITSET_WINDEX_MAX.
15726
15727 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15728 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15729 since we now return the bitset_bindex type (not int).
15730
15731 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15732 when computing sizes.
15733 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15734
15735 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15736 and avoid cast to unsigned.
15737
15738 2002-09-30 Akim Demaille <akim@epita.fr>
15739
15740 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15741 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15742 Updates from Michael Hayes.
15743
15744 2002-09-30 Art Haas <ahaas@neosoft.com>
15745
15746 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15747 invocations.
15748 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15749 defined.
15750
15751 2002-09-27 Akim Demaille <akim@epita.fr>
15752
15753 Version 1.49c.
15754
15755 2002-09-27 Akim Demaille <akim@epita.fr>
15756
15757 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15758 (Because of AC_LIBSOURCE).
15759
15760 2002-09-27 Akim Demaille <akim@epita.fr>
15761
15762 Playing with Autoscan.
15763
15764 * configure.ac: Remove the old LIBOBJ tweaks.
15765 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15766 * lib/strrchr.c: New.
15767 * lib/strtol.c: New, from the Coreutils 4.5.1.
15768
15769 2002-09-27 Akim Demaille <akim@epita.fr>
15770
15771 Playing with Autoscan.
15772
15773 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15774 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15775 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15776 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15777 Coreutils 4.5.1.
15778
15779 2002-09-24 Akim Demaille <akim@epita.fr>
15780
15781 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15782 (Frequently Asked Questions, Parser Stack Overflow): New.
15783
15784 2002-09-13 Akim Demaille <akim@epita.fr>
15785
15786 Playing with autoscan.
15787
15788 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15789 * src/files.c (skeleton_find): Remove, unused.
15790 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15791 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15792
15793 2002-09-13 Akim Demaille <akim@epita.fr>
15794
15795 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15796 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15797
15798 2002-09-13 Akim Demaille <akim@epita.fr>
15799
15800 * configure.ac: Require 2.54.
15801 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15802 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15803 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15804 Remove, provided by Autoconf macros.
15805
15806 2002-09-12 Akim Demaille <akim@epita.fr>
15807
15808 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15809
15810 2002-09-12 Akim Demaille <akim@epita.fr>
15811
15812 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15813 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15814 Reported by Martin Mokrejs.
15815
15816 2002-09-10 Akim Demaille <akim@epita.fr>
15817
15818 * src/parse-gram.y: Associate a human readable string to each
15819 token type.
15820 * tests/regression.at (Invalid inputs): Adjust.
15821
15822 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15823
15824 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15825 with an Autoconf-2.5x style configure.ac.
15826
15827 2002-09-06 Paul Eggert <eggert@twinsun.com>
15828
15829 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15830 exception applies only to yacc.c. This is a modification of a
15831 patch originally suggested by Akim Demaille.
15832
15833 2002-09-06 Akim Demaille <akim@epita.fr>
15834
15835 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15836 here to...
15837 * data/yacc.c: here.
15838
15839 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15840 LocationType.
15841 (b4_ltype): Default to yy::Location from location.hh.
15842
15843 2002-09-04 Jim Meyering <jim@meyering.net>
15844
15845 * data/yacc.c: Guard the declaration of yytoknum also with
15846 `#ifdef YYPRINT', so it is declared only when used.
15847
15848 2002-09-04 Akim Demaille <akim@epita.fr>
15849
15850 * configure.in: Rename as...
15851 * configure.ac: this.
15852 Bump to 1.49c.
15853
15854 2002-09-04 Akim Demaille <akim@epita.fr>
15855
15856 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15857 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15858 translate maintainer only messages.
15859
15860 2002-08-12 Paul Eggert <eggert@twinsun.com>
15861
15862 Version 1.49b.
15863
15864 * Makefile.am (SUBDIRS): Remove intl.
15865 (DISTCLEANFILES): Remove.
15866 * NEWS: Mention that GNU M4 is now required. Clarify what is
15867 meant by "larger grammars". Mention the pt_BR translation.
15868 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15869 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15870 Bump version from 0.11.2 to 0.11.5.
15871 (BISON_PREREQ_STAGE): Remove.
15872 (AM_GNU_GETTEXT): Use external gettext.
15873 (AC_OUTPUT): Remove intl/Makefile.
15874
15875 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15876
15877 * data/glr.c: Include string.h, for strlen.
15878 (yyreportParseError): Use size_t for yysize.
15879 (yy_yypstack): No longer nested inside yypstates, as nested
15880 functions are not portable. Do not assume size_t is the
15881 same width as int.
15882 (yypstates): Do not assume that ptrdiff_t is the same width
15883 as int, and similarly for yyposn and YYINDEX.
15884
15885 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15886
15887 * lib/Makefile.am (INCLUDES): Do not include from the intl
15888 directory, which has been removed.
15889 * src/Makefile.am (INCLUDES): Likewise.
15890
15891 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15892 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15893 New vars.
15894
15895 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15896 * tests/Makefile.am (EXTRA_DIST): Likewise.
15897
15898 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15899 Do not assume that bitset_windex is the same width as unsigned.
15900
15901 * lib/abitset.c (abitset_unused_clear): Do not assume that
15902 bitset_word is the same width as int.
15903 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15904 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15905 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15906 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15907 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15908
15909 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15910 portability to one's complement hosts!).
15911 * lib/ebitset.c (ebitset_op1): Likewise.
15912 * lib/lbitset.c (lbitset_op1): Likewise.
15913
15914 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15915 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15916 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15917 Sync with fileutils.
15918 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15919 lib/gettext.h: Sync with diffutils.
15920
15921 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15922 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15923
15924 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15925 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15926 check for void *.
15927
15928 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15929 size_t; the old version tried to do this but casted improperly.
15930 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15931 (bitset_test): Now returns int, not unsigned long.
15932
15933 * lib/bitset_stats.c: Include "gettext.h".
15934 (_): New macro.
15935 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15936 name locals "index", as it generates unnecessary warnings on some
15937 hosts that have an "index" function.
15938
15939 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15940 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15941 they need translation.
15942 * src/LR0.c (state_list_append, new_itemsets, get_state,
15943 append_states, generate_states): Likewise.
15944 * src/assoc.c (assoc_to_string): Likewise.
15945 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15946 * src/gram.c (grammar_dump): Likewise.
15947 * src/injections.c (injections_compute): Likewise.
15948 * src/lalr.c (lookaheads_print): Likewise.
15949 * src/relation.c (relation_transpose): Likewise.
15950 * src/scan-gram.l: Likewise.
15951 * src/tables.c (table_grow, pack_vector): Likewise.
15952
15953 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15954 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15955 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15956 * m4/mbstate_t.m4: Sync with fileutils.
15957 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15958
15959 * po/LINGUAS: Add pt_BR.
15960 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15961 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15962 lib/timevar.c.
15963 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15964 manual recommends.
15965 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15966
15967 * src/complain.c (strerror_r): Remove decl; not needed.
15968 (strerror): Use same pattern as ../lib/error.c.
15969
15970 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15971
15972 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15973
15974 * src/main.c (main): Cast result of bindtextdomain and textdomain
15975 to void, to avoid a GCC warning when --disable-nls is in effect.
15976
15977 * src/scan-gram.l: Use strings rather than escapes when possible,
15978 to minimize the number of warnings from xgettext.
15979 (handle_action_dollar, handle_action_at): Don't use isdigit,
15980 as it mishandles negative chars and it may not work as expected
15981 outside the C locale.
15982
15983 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15984 this is a GCC extension and is not portable to other compilers.
15985
15986 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15987 Do not include <ctype.h>; no longer needed.
15988 Do not include <malloc.h>; no longer needed (and generates
15989 warnings on OpenBSD 3.0).
15990
15991 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15992 it's not portable.
15993
15994 * tests/regression.at: Do not use 'cc -c input.c -o input';
15995 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15996
15997 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15998 exit status as failure, not just exit status 1. Sun C exits
15999 with status 2 sometimes.
16000
16001 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16002 Use it for the two large tests.
16003
16004 2002-08-02 Akim Demaille <akim@epita.fr>
16005
16006 * src/conflicts.c (conflicts_output): Don't output rules never
16007 reduced here, since anyway that computation doesn't work.
16008 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16009 (rule_useless_p, rule_never_reduced_p): New.
16010 (grammar_rules_partial_print): Use a filter instead of a range.
16011 Display the title only if needed.
16012 (grammar_rules_print): Adjust.
16013 (grammar_rules_never_reduced_report): New.
16014 * src/tables.c (action_row): Move the computation of rules never
16015 reduced to...
16016 (token_actions): here.
16017 * src/main.c (main): Make the parser before making the report, so
16018 that rules never reduced are computed.
16019 Call grammar_rules_never_reduced_report.
16020 * src/print.c (print_results): Report rules never reduced.
16021 * tests/conflicts.at, tests/reduce.at: Adjust.
16022
16023 2002-08-01 Akim Demaille <akim@epita.fr>
16024
16025 Instead of attaching lookaheads and duplicating the rules being
16026 reduced by a state, attach the lookaheads to the reductions.
16027
16028 * src/state.h (state_t): Remove the `lookaheads',
16029 `lookaheads_rule' member.
16030 (reductions_t): Add a `lookaheads' member.
16031 Use a regular array for the `rules'.
16032 * src/state.c (reductions_new): Initialize the lookaheads member
16033 to 0.
16034 (state_rule_lookaheads_print): Adjust.
16035 * src/state.h, src/state.c (state_reductions_find): New.
16036 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16037 (count_rr_conflicts): Adjust.
16038 * src/lalr.c (LArule): Remove.
16039 (add_lookback_edge): Adjust.
16040 (state_lookaheads_count): New.
16041 (states_lookaheads_initialize): Merge into...
16042 (initialize_LA): this.
16043 (lalr_free): Adjust.
16044 * src/main.c (main): Don't free nullable and derives too early: it
16045 is used by --verbose.
16046 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16047
16048 2002-08-01 Akim Demaille <akim@epita.fr>
16049
16050 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16051 `rule_number_t**'.
16052 (set_derives, free_derives): Rename as...
16053 (derives_compute, derives_free): this.
16054 Adjust all dependencies.
16055 * src/nullable.c (set_nullable, free_nullable): Rename as...
16056 (nullable_compute, nullable_free): these.
16057 (rule_list_t): Store rule_t *, not rule_number_t.
16058 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16059 pointers, instead of their numbers.
16060 * src/main.c (main): Call nullable_free, and derives_free earlier,
16061 as they were lo longer used.
16062
16063 2002-08-01 Akim Demaille <akim@epita.fr>
16064
16065 * lib/timevar.c (get_time): Include children time.
16066 * src/lalr.h (LA, LArule): Don't export them: used with the
16067 state_t.
16068 * src/lalr.c (LA, LArule): Static.
16069 * src/lalr.h, src/lalr.c (lalr_free): New.
16070 * src/main.c (main): Call it.
16071 * src/tables.c (pack_vector): Check whether loc is >= to the
16072 table_size, not >.
16073 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16074 (tables_generate): do it, since that's also it which allocates
16075 them.
16076 Don't free LA and LArule, main does.
16077
16078 2002-07-31 Akim Demaille <akim@epita.fr>
16079
16080 Separate parser tables computation and output.
16081
16082 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16083 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16084 (yydefgoto, yydefact, high): Move to...
16085 * src/tables.h, src/tables.c: here.
16086 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16087 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16088 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16089 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16090 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16091 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16092 (action_row, save_row, token_actions, save_column, default_goto)
16093 (goto_actions, sort_actions, matching_state, pack_vector)
16094 (table_ninf_remap, pack_table, prepare_actions): Move to...
16095 * src/tables.c: here.
16096 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16097 * src/output.c (token_actions, output_base, output_conflicts)
16098 (output_check): Merge into...
16099 (prepare_actions): this.
16100 (actions_output): Rename as...
16101 (user_actions_output): this.
16102 * src/main.c (main): Call tables_generate and tables_free.
16103
16104 2002-07-31 Akim Demaille <akim@epita.fr>
16105
16106 Steal GCC's --time-report support.
16107
16108 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16109 stolen/adjusted from GCC.
16110 * m4/stage.m4: Remove time related checks.
16111 * m4/timevar.m4: New.
16112 * configure.in: Adjust.
16113 * src/system.h: Adjust to using timevar.h.
16114 * src/getargs.h, src/getargs.c: Support trace_time for
16115 --trace=time.
16116 * src/main.c (stage): Remove.
16117 (main): Replace `stage' invocations with timevar calls.
16118 * src/output.c: Insert pertinent timevar calls.
16119
16120 2002-07-31 Akim Demaille <akim@epita.fr>
16121
16122 Let --trace have arguments.
16123
16124 * src/getargs.h (enum trace_e): New.
16125 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16126 (long_options, short_options): --trace/-T takes an optional
16127 argument.
16128 Change all the uses of trace_flag to reflect the new flags.
16129 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16130
16131 Strengthen `stage' portability.
16132
16133 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16134 * configure.in: Use it.
16135 Don't check for malloc.h and sys/times.h.
16136 * src/system.h: Include them when appropriate.
16137 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16138 times and struct tms are available.
16139
16140 2002-07-30 Akim Demaille <akim@epita.fr>
16141
16142 In verbose parse error message, don't report `error' as an
16143 expected token.
16144 * tests/actions.at (Printers and Destructors): Adjust.
16145 * tests/calc.at (Calculator $1): Adjust.
16146 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16147 error message, do not report the parser accepts the error token in
16148 that state.
16149
16150 2002-07-30 Akim Demaille <akim@epita.fr>
16151
16152 Normalize conflict related messages.
16153
16154 * src/complain.h, src/complain.c (warn, complain): New.
16155 * src/conflicts.c (conflicts_print): Use them.
16156 (conflict_report_yacc): New, extracted from...
16157 (conflicts_print): here.
16158 * tests/conflicts.at, tests/existing.at: Adjust.
16159
16160 2002-07-30 Akim Demaille <akim@epita.fr>
16161
16162 Report rules which are never reduced by the parser: those hidden
16163 by conflicts.
16164
16165 * src/LR0.c (save_reductions): Don't make the final state too
16166 different: save its reduction (accept) instead of having a state
16167 without any action (no shift or goto, no reduce).
16168 Note: the final state is now a ``regular'' state, i.e., the
16169 parsers now contain `reduce 0' as default reduction.
16170 Nevertheless, since they decide to `accept' when yystate =
16171 final_state, they still will not reduce rule 0.
16172 * src/print.c (print_actions, print_reduction): Adjust.
16173 * src/output.c (action_row): Track reduced rules.
16174 (token_actions): Report rules never reduced.
16175 * tests/conflicts.at, tests/regression.at: Adjust.
16176
16177 2002-07-30 Akim Demaille <akim@epita.fr>
16178
16179 `stage' was accidently included in a previous patch.
16180 Initiate its autoconfiscation.
16181
16182 * configure.in: Look for malloc.h and sys/times.h.
16183 * src/main.c (stage): Adjust.
16184 Report only when trace_flag.
16185
16186 2002-07-29 Akim Demaille <akim@epita.fr>
16187
16188 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16189 state_number_t.
16190 (errs_t): symbol_t*, not symbol_number_t.
16191 (reductions_t): rule_t*, not rule_number_t.
16192 (FOR_EACH_SHIFT): New.
16193 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16194 * src/print.c, src/print_graph.c: Adjust.
16195
16196 2002-07-29 Akim Demaille <akim@epita.fr>
16197
16198 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16199
16200 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16201 (endtoken, accept): these.
16202 * src/reader.c (reader): Set endtoken's default tag to "$end".
16203 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16204 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16205 Adjust.
16206
16207 2002-07-29 Akim Demaille <akim@epita.fr>
16208
16209 * src/reduce.c (reduce_grammar): When the language is empty,
16210 complain about the start symbol, not the axiom.
16211 Use its location.
16212 * tests/reduce.at (Empty Language): New.
16213
16214 2002-07-26 Akim Demaille <akim@epita.fr>
16215
16216 * src/reader.h, src/reader.c (gram_error): ... can't get
16217 yycontrol without making too strong assumptions on the parser
16218 itself.
16219 * src/output.c (prepare_tokens): Use the real 0th value of
16220 token_translations instead of `0'.
16221 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16222 visible here.
16223 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16224 for the time being: %locations ought to provide it to yyerror.
16225
16226 2002-07-25 Akim Demaille <akim@epita.fr>
16227
16228 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16229 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16230 * tests/regression.at (Web2c Actions): Adjust.
16231
16232 2002-07-25 Akim Demaille <akim@epita.fr>
16233
16234 Stop storing rules from 1 to nrules + 1.
16235
16236 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16237 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16238 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16239 Iterate from 0 to nrules.
16240 Use rule_number_as_item_number and item_number_as_rule_number.
16241 Adjust to `derive' now containing possibly 0.
16242 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16243 Handle the `- 1' part in rule numbers from/to item numbers.
16244 * src/conflicts.c (log_resolution): Fix the message which reversed
16245 shift and reduce.
16246 * src/output.c (action_row): Initialize default_rule to -1.
16247 (token_actions): Adjust.
16248 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16249 expected output.
16250 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16251
16252 2002-07-25 Akim Demaille <akim@epita.fr>
16253
16254 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16255 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16256 (b4_c_knr_arg_decl): New.
16257 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16258 yyreport_parse_error.
16259
16260 2002-07-25 Akim Demaille <akim@epita.fr>
16261
16262 * data/yacc.c (yyreport_parse_error): New, extracted from...
16263 (yyparse): here.
16264 (yydestruct, yysymprint): Move above yyparse.
16265 Be K&R compliant.
16266
16267 2002-07-25 Akim Demaille <akim@epita.fr>
16268
16269 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16270 replace...
16271 (b4_sint_type, b4_uint_type): these.
16272 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16273 * tests/regression.at (Web2c Actions): Adjust.
16274
16275 2002-07-25 Akim Demaille <akim@epita.fr>
16276
16277 * src/gram.h (TIEM_NUMBER_MAX): New.
16278 (item_number_of_rule_number, rule_number_of_item_number): Rename
16279 as...
16280 (rule_number_as_item_number, item_number_as_rule_number): these.
16281 Adjust dependencies.
16282 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16283 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16284 (symbol_number_to_vector_number): New.
16285 (order): Of vector_number_t* type.
16286 (base_t, BASE_MAX, BASE_MIN): New.
16287 (froms, tos, width, pos, check): Of base_t type.
16288 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16289 (actrow): Of action_number_t type.
16290 (conflrow): Of unsigned int type.
16291 (table_ninf, base_ninf): New.
16292 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16293 (muscle_insert_int_table, muscle_insert_base_table)
16294 (muscle_insert_rule_number_table): New.
16295 (prepare_tokens): Output `toknum' as int_table.
16296 (action_row): Returns a rule_number_t.
16297 Use ACTION_MIN, not SHRT_MIN.
16298 (token_actions): yydefact is rule_number_t*.
16299 (table_ninf_remap): New.
16300 (pack_table): Use it for `base' and `table'.
16301 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16302 replaced with...
16303 (YYPACT_NINF, YYTABLE_NINF): these.
16304 (yypact, yytable): Compute their types instead of hard-coded
16305 `short'.
16306 * tests/regression.at (Web2c Actions): Adjust.
16307
16308 2002-07-19 Akim Demaille <akim@epita.fr>
16309
16310 * src/scan-gram.l (id): Can start with an underscore.
16311
16312 2002-07-16 Akim Demaille <akim@epita.fr>
16313
16314 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16315 Adjust all former `associativity' dependencies.
16316 * src/symtab.c (symbol_new): Default associativity is `undef', not
16317 `right'.
16318 (symbol_check_alias_consistence): Adjust.
16319
16320 2002-07-09 Akim Demaille <akim@epita.fr>
16321
16322 * doc/bison.texinfo: Properly set the ``header'' part.
16323 Use @dircategory ``GNU programming tools'' as per Texinfo's
16324 documentation.
16325 Use @copying.
16326
16327 2002-07-09 Akim Demaille <akim@epita.fr>
16328
16329 * lib/quotearg.h: Protect against multiple inclusions.
16330 * src/location.h (location_t): Add a `file' member.
16331 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16332 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16333 `error_one_per_line' support.
16334
16335 2002-07-09 Akim Demaille <akim@epita.fr>
16336
16337 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16338 * src/reader.c (lineno): Remove.
16339 Adjust all dependencies.
16340 (get_merge_function): Take a location and use complain_at.
16341 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16342 * tests/regression.at (Invalid inputs, Mixing %token styles):
16343 Adjust.
16344
16345 2002-07-09 Akim Demaille <akim@epita.fr>
16346
16347 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16348 recovery rule, and forbid extensions when --yacc.
16349 (gram_error): Use complain_at.
16350 * src/reader.c (reader): Exit if there were parse errors.
16351
16352 2002-07-09 Akim Demaille <akim@epita.fr>
16353
16354 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16355 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16356 Reported by R Blake <blakers@mac.com>.
16357
16358 2002-07-09 Akim Demaille <akim@epita.fr>
16359
16360 * data/yacc.c: Output the copyright notive in the header.
16361
16362 2002-07-03 Akim Demaille <akim@epita.fr>
16363
16364 * src/output.c (froms, tos): Are state_number_t.
16365 (save_column): sp, sp1, and sp2 are state_number_t.
16366 (prepare): Rename `final' as `final_state_number', `nnts' as
16367 `nterms_number', `nrules' as `rules_number', `nstates' as
16368 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16369 unused.
16370 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16371 * data/lalr1.cc (nsym_): Remove, unused.
16372
16373 2002-07-03 Akim Demaille <akim@epita.fr>
16374
16375 * src/lalr.h, src/lalr.c (goto_number_t): New.
16376 * src/lalr.c (goto_list_t): New.
16377 Propagate them.
16378 * src/nullable.c (rule_list_t): New.
16379 Propagate.
16380 * src/types.h: Remove.
16381
16382 2002-07-03 Akim Demaille <akim@epita.fr>
16383
16384 * src/closure.c (print_fderives): Use rule_rhs_print.
16385 * src/derives.c (print_derives): Use rule_rhs_print.
16386 (rule_list_t): New, replaces `shorts'.
16387 (set_derives): Add comments.
16388 * tests/sets.at (Nullable, Firsts): Adjust.
16389
16390 2002-07-03 Akim Demaille <akim@epita.fr>
16391
16392 * src/output.c (prepare_actions): Free `tally' and `width'.
16393 (prepare_actions): Allocate and free `order'.
16394 * src/symtab.c (symbols_free): Free `symbols'.
16395 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16396 * src/output.c (m4_invoke): Move to...
16397 * src/scan-skel.l: here.
16398 (<<EOF>>): Close yyout, and free its name.
16399
16400 2002-07-03 Akim Demaille <akim@epita.fr>
16401
16402 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16403
16404 * src/LR0.c (new_state): Merge into...
16405 (state_list_append): this.
16406 (new_states): Merge into...
16407 (generate_states): here.
16408 (set_states): Don't ensure a proper `errs' state member here, do it...
16409 * src/conflicts.c (conflicts_solve): here.
16410 * src/state.h, src/state.c: Comment changes.
16411 (state_t): Rename member `shifts' as `transitions'.
16412 Adjust all dependencies.
16413 (errs_new): For consistency, also take the values as argument.
16414 (errs_dup): Remove.
16415 (state_errs_set): New.
16416 (state_reductions_set, state_transitions_set): Assert that no
16417 previous value was assigned.
16418 (state_free): New.
16419 (states_free): Use it.
16420 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16421 temporary storage: use `errs' and `nerrs' as elsewhere.
16422 (set_conflicts): Allocate and free this `errs'.
16423
16424 2002-07-02 Akim Demaille <akim@epita.fr>
16425
16426 * lib/libiberty.h: New.
16427 * lib: Update the bitset implementation from upstream.
16428 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16429 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16430 * src/main.c: Adjust bitset stats calls.
16431
16432 2002-07-01 Paul Eggert <eggert@twinsun.com>
16433
16434 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16435 char, so that negative chars don't collide with $.
16436
16437 2002-06-30 Akim Demaille <akim@epita.fr>
16438
16439 Have the GLR tests be `warning' checked, and fix the warnings.
16440
16441 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16442 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16443 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16444 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16445 (yyaddDeferredAction): static.
16446 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16447 (yyreportParseError): yyprefix is const.
16448 yytokenp is used only when verbose.
16449 (yy__GNUC__): Replace with __GNUC__.
16450 (yypdumpstack): yyi is size_t.
16451 (yypreference): Un-yy local variables and arguments, to avoid
16452 clashes with `yyr1'. Anyway, we are not in the user name space.
16453 (yytname_size): be an int, as is compared with ints.
16454 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16455 Use them.
16456 * tests/cxx-gram.at: Use quotation to protect $1.
16457 Use AT_COMPILE to enable warnings hunts.
16458 Prototype yylex and yyerror.
16459 `Use' argc.
16460 Include `string.h', not `strings.h'.
16461 Produce and prototype stmtMerge only when used.
16462 yylex takes a location.
16463
16464 2002-06-30 Akim Demaille <akim@epita.fr>
16465
16466 We spend a lot of time in quotearg, in particular when --verbose.
16467
16468 * src/symtab.c (symbol_get): Store a quoted version of the key.
16469 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16470 Adjust all callers.
16471
16472 2002-06-30 Akim Demaille <akim@epita.fr>
16473
16474 * src/state.h (reductions_t): Rename member `nreds' as num.
16475 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16476 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16477
16478 2002-06-30 Akim Demaille <akim@epita.fr>
16479
16480 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16481 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16482 (shifts_to): Rename as...
16483 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16484 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16485 (TRANSITION_IS_DISABLED, transitions_to): these.
16486
16487 2002-06-30 Akim Demaille <akim@epita.fr>
16488
16489 * src/print.c (print_shifts, print_gotos): Merge into...
16490 (print_transitions): this.
16491 (print_transitions, print_errs, print_reductions): Align the
16492 lookaheads columns.
16493 (print_core, print_transitions, print_errs, print_state,
16494 print_grammar): Output empty lines separator before, not after.
16495 (state_default_rule_compute): Rename as...
16496 (state_default_rule): this.
16497 * tests/conflicts.at (Defaulted Conflicted Reduction),
16498 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16499 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16500
16501 2002-06-30 Akim Demaille <akim@epita.fr>
16502
16503 Display items as we display rules.
16504
16505 * src/gram.h, src/gram.c (rule_lhs_print): New.
16506 * src/gram.c (grammar_rules_partial_print): Use it.
16507 * src/print.c (print_core): Likewise.
16508 * tests/conflicts.at (Defaulted Conflicted Reduction),
16509 (Unresolved SR Conflicts): Adjust.
16510 (Unresolved SR Conflicts): Adjust and rename as...
16511 (Resolved SR Conflicts): this, as was meant.
16512 * tests/regression.at (Web2c Report): Adjust.
16513
16514 2002-06-30 Akim Demaille <akim@epita.fr>
16515
16516 * src/print.c (state_default_rule_compute): New, extracted from...
16517 (print_reductions): here.
16518 Pessimize, but clarify the code.
16519 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16520
16521 2002-06-30 Akim Demaille <akim@epita.fr>
16522
16523 * src/output.c (action_row): Let default_rule be always a rule
16524 number.
16525
16526 2002-06-30 Akim Demaille <akim@epita.fr>
16527
16528 * src/closure.c (print_firsts, print_fderives, closure):
16529 Use BITSET_EXECUTE.
16530 * src/lalr.c (lookaheads_print): Likewise.
16531 * src/state.c (state_rule_lookaheads_print): Likewise.
16532 * src/print_graph.c (print_core): Likewise.
16533 * src/print.c (print_reductions): Likewise.
16534 * src/output.c (action_row): Likewise.
16535 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16536
16537 2002-06-30 Akim Demaille <akim@epita.fr>
16538
16539 * src/print_graph.c: Use report_flag.
16540
16541 2002-06-30 Akim Demaille <akim@epita.fr>
16542
16543 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16544 to...
16545 * src/relation.h, src/relation.c (traverse, relation_digraph)
16546 (relation_print, relation_transpose): New.
16547
16548 2002-06-30 Akim Demaille <akim@epita.fr>
16549
16550 * src/state.h, src/state.c (shifts_to): New.
16551 * src/lalr.c (build_relations): Use it.
16552
16553 2002-06-30 Akim Demaille <akim@epita.fr>
16554
16555 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16556 (item_number_of_rule_number, rule_number_of_item_number): New.
16557 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16558 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16559 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16560 Propagate their use.
16561 Much remains to be done, in particular wrt `shorts' from types.h.
16562
16563 2002-06-30 Akim Demaille <akim@epita.fr>
16564
16565 * src/symtab.c (symbol_new): Initialize the `printer' member.
16566
16567 2002-06-30 Akim Demaille <akim@epita.fr>
16568
16569 * src/LR0.c (save_reductions): Remove, replaced by...
16570 * src/state.h, src/state.c (state_reductions_set): New.
16571 (reductions, errs): Rename as...
16572 (reductions_t, errs_t): these.
16573 Adjust all dependencies.
16574
16575 2002-06-30 Akim Demaille <akim@epita.fr>
16576
16577 * src/LR0.c (state_list_t, state_list_append): New.
16578 (first_state, last_state): Now symbol_list_t.
16579 (this_state): Remove.
16580 (new_itemsets, append_states, save_reductions): Take a state_t as
16581 argument.
16582 (set_states, generate_states): Adjust.
16583 (save_shifts): Remove, replaced by...
16584 * src/state.h, src/state.c (state_shifts_set): New.
16585 (shifts): Rename as...
16586 (shifts_t): this.
16587 Adjust all dependencies.
16588 * src/state.h (state_t): Remove the `next' member.
16589
16590 2002-06-30 Akim Demaille <akim@epita.fr>
16591
16592 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16593 escaped in slot 0.
16594
16595 2002-06-30 Akim Demaille <akim@epita.fr>
16596
16597 Use hash.h for the state hash table.
16598
16599 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16600 (allocate_storage): Use state_hash_new.
16601 (free_storage): Use state_hash_free.
16602 (new_state, get_state): Adjust.
16603 * src/lalr.h, src/lalr.c (states): Move to...
16604 * src/states.h (state_t): Remove the `link' member, no longer
16605 used.
16606 * src/states.h, src/states.c: here.
16607 (state_hash_new, state_hash_free, state_hash_lookup)
16608 (state_hash_insert, states_free): New.
16609 * src/states.c (state_table, state_compare, state_hash): New.
16610 * src/output.c (output_actions): Do not free states now, since we
16611 still need to know the final_state number in `prepare', called
16612 afterwards. Do it...
16613 * src/main.c (main): here: call states_free after `output'.
16614
16615 2002-06-30 Akim Demaille <akim@epita.fr>
16616
16617 * src/state.h, src/state.c (state_new): New, extracted from...
16618 * src/LR0.c (new_state): here.
16619 * src/state.h (STATE_ALLOC): Move to...
16620 * src/state.c: here.
16621 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16622 * src/state.h, src/state.c: here.
16623
16624 2002-06-30 Akim Demaille <akim@epita.fr>
16625
16626 * src/reader.c (gensym): Rename as...
16627 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16628 (getsym): Rename as...
16629 (symbol_get): this.
16630
16631 2002-06-30 Akim Demaille <akim@epita.fr>
16632
16633 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16634 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16635 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16636 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16637
16638 2002-06-30 Akim Demaille <akim@epita.fr>
16639
16640 Make the test suite pass with warnings checked.
16641
16642 * tests/actions.at (Printers and Destructors): Improve.
16643 Avoid unsigned vs. signed issues.
16644 * tests/calc.at: Don't exercise the scanner here, do it...
16645 * tests/input.at (Torturing the Scanner): here.
16646
16647 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16648
16649 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16650 reorganize first lines parallel to yacc.c.
16651
16652 2002-06-28 Akim Demaille <akim@epita.fr>
16653
16654 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16655 (b4_token_enum, b4_token_defines): New, factored from...
16656 * data/lalr1.cc, data/yacc.c, glr.c: here.
16657
16658 2002-06-28 Akim Demaille <akim@epita.fr>
16659
16660 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16661 unused variables.
16662 * src/output.c (merger_output): static.
16663
16664 2002-06-28 Akim Demaille <akim@epita.fr>
16665
16666 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16667 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16668 pacify GCC.
16669 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16670
16671 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16672
16673 Accumulated changelog for new GLR parsing features.
16674
16675 * src/conflicts.c (count_total_conflicts): Change name to
16676 conflicts_total_count.
16677 * src/conflicts.h: Ditto.
16678 * src/output.c (token_actions): Use the new name.
16679 (output_conflicts): Change conflp => conflict_list_heads, and
16680 confl => conflict_list for better readability.
16681 * data/glr.c: Use the new names.
16682 * NEWS: Add self to GLR announcement.
16683
16684 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16685
16686 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16687 Akim Demaille.
16688
16689 * data/bison.glr: Change name to glr.c
16690 * data/glr.c: Renamed from bison.glr.
16691 * data/Makefile.am: Add glr.c
16692
16693 * src/getargs.c:
16694
16695 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16696 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16697
16698 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16699
16700 * data/bison.glr: Be sure to restore the
16701 current #line when returning to the skeleton contents after having
16702 exposed the input file's #line.
16703
16704 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16705
16706 * data/bison.glr: Bring up to date with changes to bison.simple.
16707
16708 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16709
16710 * data/bison.glr: Correct definitions that use b4_prefix.
16711 Various reformatting.
16712 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16713 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16714 yytokenp argument; now part of stack.
16715 (yychar): Define to behave as documented.
16716 (yyclearin): Ditto.
16717
16718 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16719
16720 * src/reader.h: Add declaration for free_merger_functions.
16721
16722 * src/reader.c (merge_functions): New variable.
16723 (get_merge_function): New function.
16724 (free_merger_functions): New function.
16725 (readgram): Check for %prec that is not followed by a symbol.
16726 Handle %dprec and %merge declarations.
16727 (packgram): Initialize dprec and merger fields in rules array.
16728
16729 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16730 conflict_list_cnt, conflict_list_free): New variables.
16731 (table_grow): Also grow conflict_table.
16732 (prepare_rules): Output dprec and merger tables.
16733 (conflict_row): New function.
16734 (action_row): Output conflict lists for GLR parser. Don't use
16735 default reduction in conflicted states for GLR parser so that there
16736 are spaces for the conflict lists.
16737 (save_row): Also save conflict information.
16738 (token_actions): Allocate conflict list.
16739 (merger_output): New function.
16740 (pack_vector): Pack conflict table, too.
16741 (output_conflicts): New function to output yyconflp and yyconfl.
16742 (output_check): Allocate conflict_tos.
16743 (output_actions): Output conflict tables, also.
16744 (output_skeleton): Output b4_mergers definition.
16745 (prepare): Output b4_max_rhs_length definition.
16746 Use 'bison.glr' as default skeleton for GLR parsers.
16747
16748 * src/gram.c (glr_parser): New flag.
16749 (grammar_free): Call free_merger_functions.
16750
16751 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16752 all pairs of conflicting reductions, rather than just all tokens
16753 causing conflicts. Needed to size conflict tables.
16754 (conflicts_output): Modify call to count_rr_conflicts for new
16755 interface.
16756 (conflicts_print): Ditto.
16757 (count_total_conflicts): New function.
16758
16759 * src/reader.h (merger_list): New type.
16760 (merge_functions): New variable.
16761
16762 * src/lex.h (tok_dprec, tok_merge): New token types.
16763
16764 * src/gram.h (rule_s): Add dprec and merger fields.
16765 (glr_parser): New flag.
16766
16767 * src/conflicts.h (count_total_conflicts): New function.
16768
16769 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16770
16771 * doc/bison.texinfo (Generalized LR Parsing): New section.
16772 (GLR Parsers): New section.
16773 (Language and Grammar): Mention GLR parsing.
16774 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16775 Correct typo ("tge" -> "the").
16776
16777 * data/bison.glr: New skeleton for GLR parsing.
16778
16779 * tests/cxx-gram.at: New tests for GLR parsing.
16780
16781 * tests/testsuite.at: Include cxx-gram.at.
16782
16783 * tests/Makefile.am: Add cxx-gram.at.
16784
16785 * src/parse-gram.y:
16786
16787 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16788
16789 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16790
16791 2002-06-27 Akim Demaille <akim@epita.fr>
16792
16793 * src/options.h, src/options.c: Remove.
16794 * src/getargs.c (short_options, long_options): New.
16795
16796 2002-06-27 Akim Demaille <akim@epita.fr>
16797
16798 * data/bison.simple, data/bison.c++: Rename as...
16799 * data/yacc.c, data/lalr1.cc: these.
16800 * doc/bison.texinfo (Environment Variables): Remove.
16801
16802 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16803
16804 * src/getargs.c (report_argmatch): Initialize strtok().
16805
16806 2002-06-20 Akim Demaille <akim@epita.fr>
16807
16808 * data/bison.simple (b4_symbol_actions): New, replaces...
16809 (b4_symbol_destructor, b4_symbol_printer): these.
16810 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16811 user token numbers.
16812
16813 2002-06-20 Akim Demaille <akim@epita.fr>
16814
16815 * data/bison.simple (yydestructor): Rename as...
16816 (yydestruct): this.
16817
16818 2002-06-20 Akim Demaille <akim@epita.fr>
16819
16820 * src/symtab.h, src/symtab.c (symbol_type_set)
16821 (symbol_destructor_set, symbol_precedence_set): The location is
16822 the last argument.
16823 Adjust all callers.
16824
16825 2002-06-20 Akim Demaille <akim@epita.fr>
16826
16827 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16828 internals.
16829 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16830 Takes a location.
16831 * src/symtab.h, src/symtab.c (symbol_class_set)
16832 (symbol_user_token_number_set): Likewise.
16833 Adjust all callers.
16834 Promote complain_at.
16835 * tests/input.at (Type Clashes): Adjust.
16836
16837 2002-06-20 Akim Demaille <akim@epita.fr>
16838
16839 * data/bison.simple (YYLEX): Fix the declaration when
16840 %pure-parser.
16841
16842 2002-06-20 Akim Demaille <akim@epita.fr>
16843
16844 * data/bison.simple (yysymprint): Don't print the token number,
16845 just its name.
16846 * tests/actions.at (Destructors): Rename as...
16847 (Printers and Destructors): this.
16848 Also exercise %printer.
16849
16850 2002-06-20 Akim Demaille <akim@epita.fr>
16851
16852 * data/bison.simple (YYDSYMPRINT): New.
16853 Use it to remove many of the #if YYDEBUG/if (yydebug).
16854
16855 2002-06-20 Akim Demaille <akim@epita.fr>
16856
16857 * src/symtab.h, src/symtab.c (symbol_t): printer and
16858 printer_location are new members.
16859 (symbol_printer_set): New.
16860 * src/parse-gram.y (PERCENT_PRINTER): New token.
16861 Handle its associated rule.
16862 * src/scan-gram.l: Adjust.
16863 (handle_destructor_at, handle_destructor_dollar): Rename as...
16864 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16865 * src/output.c (symbol_printers_output): New.
16866 (output_skeleton): Call it.
16867 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16868 since there are already many grammar files with a user `yyprint'.
16869 Replace the calls to YYPRINT to calls to yysymprint.
16870 * tests/calc.at: Adjust.
16871 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16872 taking advantage of parser very internal details (stack size!).
16873
16874 2002-06-20 Akim Demaille <akim@epita.fr>
16875
16876 * src/scan-gram.l: Complete the scanner with the missing patterns
16877 to pacify Flex.
16878 Use `quote' and `symbol_tag_get' where appropriate.
16879
16880 2002-06-19 Akim Demaille <akim@epita.fr>
16881
16882 * tests/actions.at (Destructors): Augment to test locations.
16883 * data/bison.simple (yydestructor): Pass it the current location
16884 if locations are enabled.
16885 Prototype only when __STDC__ or C++.
16886 Change the argument names to move into the yy name space: there is
16887 user code here.
16888
16889 2002-06-19 Akim Demaille <akim@epita.fr>
16890
16891 * data/bison.simple (b4_pure_if): New.
16892 Use it instead of #ifdef YYPURE.
16893
16894 2002-06-19 Akim Demaille <akim@epita.fr>
16895
16896 * data/bison.simple (b4_location_if): New.
16897 Use it instead of #ifdef YYLSP_NEEDED.
16898
16899 2002-06-19 Akim Demaille <akim@epita.fr>
16900
16901 Prepare @$ in %destructor, but currently don't bind it in the
16902 skeleton, as %location use is not cleaned up yet.
16903
16904 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16905 (handle_action_at): New.
16906 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16907 a braced_code_t and a location as additional arguments.
16908 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16909 unquote one when outputting `b4_dollar_dollar'.
16910 Adjust callers.
16911 * data/bison.simple (b4_eval): Remove.
16912 (b4_symbol_destructor): Adjust.
16913 * tests/input.at (Invalid @n): Adjust.
16914
16915 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16916
16917 * doc/bison.texinfo: Document ability to have multiple
16918 prologue sections.
16919
16920 2002-06-18 Akim Demaille <akim@epita.fr>
16921
16922 * src/files.c (compute_base_names): When computing the output file
16923 names from the input file name, strip the directory part.
16924
16925 2002-06-18 Akim Demaille <akim@epita.fr>
16926
16927 * data/bison.simple.new: Comment changes.
16928 Reported by Andreas Schwab.
16929
16930 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16931
16932 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16933 there are no `label `yyoverflowlab' defined but not used' warnings
16934 when yyoverflow is defined.
16935
16936 2002-06-18 Akim Demaille <akim@epita.fr>
16937
16938 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16939 new member.
16940 (symbol_destructor_set): Adjust.
16941 * src/output.c (symbol_destructors_output): Output the destructor
16942 locations.
16943 Output the symbol name.
16944 * data/bison.simple (b4_symbol_destructor): Adjust.
16945
16946 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16947 and Akim Demaille <akim@epita.fr>
16948
16949 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16950 what's left on the stack when the error recovery hits EOF.
16951 * tests/actions.at (Destructors): Complete to exercise this case.
16952
16953 2002-06-17 Akim Demaille <akim@epita.fr>
16954
16955 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16956 arguments is really empty, not only equal to `[]'.
16957 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16958 member.
16959 (symbol_destructor_set): New.
16960 * src/output.c (symbol_destructors_output): New.
16961 * src/reader.h (brace_code_t, current_braced_code): New.
16962 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16963 (handle_dollar): Rename as...
16964 (handle_action_dollar): this.
16965 (handle_destructor_dollar): New.
16966 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16967 (grammar_declaration): Use it.
16968 * data/bison.simple (yystos): Is always defined.
16969 (yydestructor): New.
16970 * tests/actions.at (Destructors): New.
16971 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16972
16973 2002-06-17 Akim Demaille <akim@epita.fr>
16974
16975 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16976 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16977 rule_length only when needed.
16978 * src/output.c (actions_output, token_definitions_output): Output
16979 the full M4 block.
16980 * src/symtab.c: Don't access directly to the symbol tag, use
16981 symbol_tag_get.
16982 * src/parse-gram.y: Use symbol_list_free.
16983
16984 2002-06-17 Akim Demaille <akim@epita.fr>
16985
16986 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16987 (symbol_list_prepend, get_type_name): Move to...
16988 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16989 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16990 Adjust all callers.
16991 (symbol_list_free): New.
16992 * src/scan-gram.l (handle_dollar): Takes a location.
16993 * tests/input.at (Invalid $n): Adjust.
16994
16995 2002-06-17 Akim Demaille <akim@epita.fr>
16996
16997 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16998 (symbol_list_prepend): New.
16999 * src/parse-gram.y (%union): `list' is a new member.
17000 (symbols.1): New, replaces...
17001 (terms_to_prec.1, nterms_to_type.1): these.
17002 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17003 Take a location as additional argument.
17004 Adjust all callers.
17005
17006 2002-06-15 Akim Demaille <akim@epita.fr>
17007
17008 * src/parse-gram.y: Move %token in the declaration section so that
17009 we don't depend upon CVS Bison.
17010
17011 2002-06-15 Akim Demaille <akim@epita.fr>
17012
17013 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17014 * src/print.c (print_core): Use it.
17015
17016 2002-06-15 Akim Demaille <akim@epita.fr>
17017
17018 * src/conflicts.c (log_resolution): Accept the rule involved in
17019 the sr conflicts instead of the lookahead number that points to
17020 that rule.
17021 (flush_reduce): Accept the current lookahead vector as argument,
17022 instead of the index in LA.
17023 (resolve_sr_conflict): Accept the current number of lookahead
17024 bitset to consider for the STATE, instead of the index in LA.
17025 (set_conflicts): Adjust.
17026 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17027
17028 2002-06-15 Akim Demaille <akim@epita.fr>
17029
17030 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17031 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17032 Adjust all dependencies.
17033 * src/lalr.c (initialize_lookaheads): Split into...
17034 (states_lookaheads_count, states_lookaheads_initialize): these.
17035 (lalr): Adjust.
17036
17037 2002-06-15 Akim Demaille <akim@epita.fr>
17038
17039 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17040 out of...
17041 (grammar_rules_print): here.
17042 * src/reduce.c (reduce_output): Use it.
17043 * tests/reduce.at (Useless Rules, Reduced Automaton)
17044 (Underivable Rules): Adjust.
17045
17046 2002-06-15 Akim Demaille <akim@epita.fr>
17047
17048 Copy BYacc's nice way to report the grammar.
17049
17050 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17051 New.
17052 Don't print the rules' location, it is confusing and useless.
17053 (rule_print): Use grammar_rhs_print.
17054 * src/print.c (print_grammar): Use grammar_rules_print.
17055
17056 2002-06-15 Akim Demaille <akim@epita.fr>
17057
17058 Complete and rationalize `useless thing' warnings.
17059
17060 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17061 (symbol_tag_print): New.
17062 Use them everywhere in place of accessing directly the tag member.
17063 * src/gram.h, src/gram.c (rule_print): New.
17064 Use it where a rule used to be printed `by hand'.
17065 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17066 (reduce_grammar_tables): Report the useless rules.
17067 (reduce_print): Useless things are a warning, not an error.
17068 Report it as such.
17069 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17070 (Reduced Automaton, Underivable Rules): Adjust.
17071 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17072 * tests/conflicts.at (Unresolved SR Conflicts)
17073 (Solved SR Conflicts): Adjust.
17074
17075 2002-06-15 Akim Demaille <akim@epita.fr>
17076
17077 Let symbols have a location.
17078
17079 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17080 (getsym): Adjust.
17081 Adjust all callers.
17082 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17083 Use location_t, not int.
17084 * src/symtab.c (symbol_check_defined): Take advantage of the
17085 location.
17086 * tests/regression.at (Invalid inputs): Adjust.
17087
17088 2002-06-15 Akim Demaille <akim@epita.fr>
17089
17090 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17091 (input): Don't try to initialize yylloc here, do it in the
17092 scanner.
17093 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17094 * src/gram.h (rule_t): Change line and action_line into location
17095 and action_location, of location_t type.
17096 Adjust all dependencies.
17097 * src/location.h, src/location.c (empty_location): New.
17098 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17099 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17100 (grammar_current_rule_symbol_append)
17101 (grammar_current_rule_action_append): Expect a location as argument.
17102 * src/reader.c (grammar_midrule_action): Adjust to attach an
17103 action's location as dummy symbol location.
17104 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17105 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17106 the line numbers.
17107
17108 2002-06-14 Akim Demaille <akim@epita.fr>
17109
17110 Grammar declarations may be found in the grammar section.
17111
17112 * src/parse-gram.y (rules_or_grammar_declaration): New.
17113 (declarations): Each declaration may end with a semicolon, not
17114 just...
17115 (grammar_declaration): `"%union"'.
17116 (grammar): Branch to rules_or_grammar_declaration.
17117
17118 2002-06-14 Akim Demaille <akim@epita.fr>
17119
17120 * src/main.c (main): Invoke scanner_free.
17121
17122 2002-06-14 Akim Demaille <akim@epita.fr>
17123
17124 * src/output.c (m4_invoke): Extracted from...
17125 (output_skeleton): here.
17126 Free tempfile.
17127
17128 2002-06-14 Akim Demaille <akim@epita.fr>
17129
17130 * src/parse-gram.y (directives, directive, gram)
17131 (grammar_directives, precedence_directives, precedence_directive):
17132 Rename as...
17133 (declarations, declaration, grammar, grammar_declaration)
17134 (precedence_declaration, precedence_declarator): these.
17135 (symbol_declaration): New.
17136
17137 2002-06-14 Akim Demaille <akim@epita.fr>
17138
17139 * src/files.c (action_obstack): Remove, unused.
17140 (output_obstack): Remove it, and all its dependencies, as it is no
17141 longer needed.
17142 * src/reader.c (epilogue_set): Build the epilogue in the
17143 muscle_obstack.
17144 * src/output.h, src/output.c (muscle_obstack): Move to...
17145 * src/muscle_tab.h, src/muscle_tab.h: here.
17146 (muscle_init): Initialize muscle_obstack.
17147 (muscle_free): New.
17148 * src/main.c (main): Call it.
17149
17150 2002-06-14 Akim Demaille <akim@epita.fr>
17151
17152 * src/location.h: New, extracted from...
17153 * src/reader.h: here.
17154 * src/Makefile.am (noinst_HEADERS): Merge into
17155 (bison_SOURCES): this.
17156 Add location.h.
17157 * src/parse-gram.y: Use location_t instead of Bison's.
17158 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17159 Use location_t instead of ints.
17160
17161 2002-06-14 Akim Demaille <akim@epita.fr>
17162
17163 * data/bison.simple, data/bison.c++: Be sure to restore the
17164 current #line when returning to the skeleton contents after having
17165 exposed the input file's #line.
17166
17167 2002-06-12 Akim Demaille <akim@epita.fr>
17168
17169 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17170 eager.
17171 * tests/actions.at (Exotic Dollars): New.
17172
17173 2002-06-12 Akim Demaille <akim@epita.fr>
17174
17175 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17176 ['"/] too eagerly.
17177 * tests/input.at (Torturing the Scanner): New.
17178
17179 2002-06-11 Akim Demaille <akim@epita.fr>
17180
17181 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17182 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17183 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17184 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17185 * src/reader.c (reader): Use it.
17186
17187 2002-06-11 Akim Demaille <akim@epita.fr>
17188
17189 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17190 Adjust all callers.
17191 (scanner_last_string_free): New.
17192
17193 2002-06-11 Akim Demaille <akim@epita.fr>
17194
17195 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17196 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17197 (last_string, YY_OBS_FREE): New.
17198 Use them when returning an ID.
17199
17200 2002-06-11 Akim Demaille <akim@epita.fr>
17201
17202 Have Bison grammars parsed by a Bison grammar.
17203
17204 * src/reader.c, src/reader.h (prologue_augment): New.
17205 * src/reader.c (copy_definition): Remove.
17206
17207 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17208 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17209 (grammar_current_rule_prec_set, grammar_current_rule_check)
17210 (grammar_current_rule_symbol_append)
17211 (grammar_current_rule_action_append): Export.
17212 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17213 (symbol_list_action_append): Remove.
17214 Hook the routines from reader.
17215 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17216 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17217
17218 * src/reader.c (read_declarations): Remove, unused.
17219
17220 * src/parse-gram.y: Handle the epilogue.
17221 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17222 (grammar_start_symbol_set): this.
17223 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17224 * src/reader.c (readgram): Remove, unused.
17225 (reader): Adjust to insert eoftoken and axiom where appropriate.
17226
17227 * src/reader.c (copy_dollar): Replace with...
17228 * src/scan-gram.h (handle_dollar): this.
17229 * src/parse-gram.y: Remove `%thong'.
17230
17231 * src/reader.c (copy_at): Replace with...
17232 * src/scan-gram.h (handle_at): this.
17233
17234 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17235 New.
17236
17237 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17238 time being.
17239
17240 * src/reader.h, src/reader.c (grammar_rule_end): New.
17241
17242 * src/parse.y (current_type, current_class): New.
17243 Implement `%nterm', `%token' support.
17244 Merge `%term' into `%token'.
17245 (string_as_id): New.
17246 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17247 type name.
17248
17249 * src/parse-gram.y: Be sure to handle properly the beginning of
17250 rules.
17251
17252 * src/parse-gram.y: Handle %type.
17253 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17254
17255 * src/parse-gram.y: More directives support.
17256 * src/options.c: No longer handle source directives.
17257
17258 * src/parse-gram.y: Fix %output.
17259
17260 * src/parse-gram.y: Handle %union.
17261 Use the prologue locations.
17262 * src/reader.c (parse_union_decl): Remove.
17263
17264 * src/reader.h, src/reader.c (epilogue_set): New.
17265 * src/parse-gram.y: Use it.
17266
17267 * data/bison.simple, data/bison.c++: b4_stype is now either not
17268 defined, then default to int, or to the contents of %union,
17269 without `union' itself.
17270 Adjust.
17271 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17272
17273 * src/output.c (actions_output): Don't output braces, as they are
17274 already handled by the scanner.
17275
17276 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17277 characters to themselves.
17278
17279 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17280 that the epilogue has a proper #line.
17281
17282 * src/parse-gram.y: Handle precedence/associativity.
17283
17284 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17285 a terminal.
17286 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17287 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17288 at all to define terminals that cannot be emitted.
17289
17290 * src/scan-gram.l: Escape M4 characters.
17291
17292 * src/scan-gram.l: Working properly with escapes in user
17293 strings/characters.
17294
17295 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17296 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17297 grammar.
17298 Use more modest sizes, as for the time being the parser does not
17299 release memory, and therefore the process swallows a huge amount
17300 of memory.
17301
17302 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17303 stricter %token grammar.
17304
17305 * src/symtab.h (associativity): Add `undef_assoc'.
17306 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17307 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17308
17309 * tests/regression.at (Invalid %directive): Remove, as it is now
17310 meaningless.
17311 (Invalid inputs): Adjust to the new error messages.
17312 (Token definitions): The new grammar doesn't allow too many
17313 eccentricities.
17314
17315 * src/lex.h, src/lex.c: Remove.
17316 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17317 (copy_character, copy_string2, copy_string, copy_identifier)
17318 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17319 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17320 (parse_action): Remove.
17321 * po/POTFILES.in: Adjust.
17322
17323 2002-06-11 Akim Demaille <akim@epita.fr>
17324
17325 * src/reader.c (parse_action): Don't store directly into the
17326 rule's action member: return the action as a string.
17327 Don't require `rule_length' as an argument: compute it.
17328 (grammar_current_rule_symbol_append)
17329 (grammar_current_rule_action_append): New, eved out from
17330 (readgram): here.
17331 Remove `action_flag', `rulelength', unused now.
17332
17333 2002-06-11 Akim Demaille <akim@epita.fr>
17334
17335 * src/reader.c (grammar_current_rule_prec_set).
17336 (grammar_current_rule_check): New, eved out from...
17337 (readgram): here.
17338 Remove `xaction', `first_rhs': useless.
17339 * tests/input.at (Type clashes): New.
17340 * tests/existing.at (GNU Cim Grammar): Adjust.
17341
17342 2002-06-11 Akim Demaille <akim@epita.fr>
17343
17344 * src/reader.c (grammar_midrule_action): New, Eved out from
17345 (readgram): here.
17346
17347 2002-06-11 Akim Demaille <akim@epita.fr>
17348
17349 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17350 New.
17351 (readgram): Use them as replacement of inlined code, crule and
17352 crule1.
17353
17354 2002-06-11 Akim Demaille <akim@epita.fr>
17355
17356 * src/reader.c (grammar_end, grammar_symbol_append): New.
17357 (readgram): Use them.
17358 Make the use of `p' as local as possible.
17359
17360 2002-06-10 Akim Demaille <akim@epita.fr>
17361
17362 GCJ's parser requires the tokens to be defined before the prologue.
17363
17364 * data/bison.simple: Output the token definition before the user's
17365 prologue.
17366 * tests/regression.at (Braces parsing, Duplicate string)
17367 (Mixing %token styles): Check the output from bison.
17368 (Early token definitions): New.
17369
17370 2002-06-10 Akim Demaille <akim@epita.fr>
17371
17372 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17373 assigning twice the same user number to a token, so that we can
17374 use it in...
17375 * src/lex.c (lex): here.
17376 Also use `symbol_class_set' instead of hand written code.
17377 * src/reader.c (parse_assoc_decl): Likewise.
17378
17379 2002-06-10 Akim Demaille <akim@epita.fr>
17380
17381 * src/symtab.c, src/symtab.c (symbol_class_set)
17382 (symbol_user_token_number_set): New.
17383 * src/reader.c (parse_token_decl): Use them.
17384 Use a switch instead of ifs.
17385 Use a single argument.
17386
17387 2002-06-10 Akim Demaille <akim@epita.fr>
17388
17389 Remove `%thong' support as it is undocumented, unused, duplicates
17390 `%token's job, and creates useless e-mail traffic with people who
17391 want to know what it is, why it is undocumented, unused, and
17392 duplicates `%token's job.
17393
17394 * src/reader.c (parse_thong_decl): Remove.
17395 * src/options.c (option_table): Remove "thong".
17396 * src/lex.h (tok_thong): Remove.
17397
17398 2002-06-10 Akim Demaille <akim@epita.fr>
17399
17400 * src/symtab.c, src/symtab.c (symbol_type_set)
17401 (symbol_precedence_set): New.
17402 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17403 (value_components_used): Remove, unused.
17404
17405 2002-06-09 Akim Demaille <akim@epita.fr>
17406
17407 Move symbols handling code out of the reader.
17408
17409 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17410 (axiom): Move to...
17411 * src/symtab.h, src/symtab.c: here.
17412
17413 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17414 * src/reader.c (startval): Rename as...
17415 * src/symtab.h, src/symtab.c (startsymbol): this.
17416 * src/reader.c: Adjust.
17417
17418 * src/reader.c (symbol_check_defined, symbol_make_alias)
17419 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17420 (token_translations_init)
17421 Move to...
17422 * src/symtab.c: here.
17423 * src/reader.c (packsymbols): Move to...
17424 * src/symtab.h, src/symtab.c (symbols_pack): here.
17425 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17426 argument.
17427
17428 2002-06-03 Akim Demaille <akim@epita.fr>
17429
17430 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17431 then statements.
17432
17433 2002-06-03 Akim Demaille <akim@epita.fr>
17434
17435 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17436 structs with non literals.
17437 * src/scan-skel.l: never-interactive.
17438 * src/conflicts.c (enum conflict_resolution_e): No trailing
17439 comma.
17440 * src/getargs.c (usage): Split long literal strings.
17441 Reported by Hans Aberg.
17442
17443 2002-05-28 Akim Demaille <akim@epita.fr>
17444
17445 * data/bison.c++: Use C++ ostreams.
17446 (cdebug_): New member.
17447
17448 2002-05-28 Akim Demaille <akim@epita.fr>
17449
17450 * src/output.c (output_skeleton): Be sure to allocate enough room
17451 for `/' _and_ for `\0' in full_skeleton.
17452
17453 2002-05-28 Akim Demaille <akim@epita.fr>
17454
17455 * data/bison.c++: Catch up with bison.simple:
17456 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17457 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17458 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17459 and popping traces.
17460
17461 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17462
17463 * src/output.c (output_skeleton): Put an explicit path in front of
17464 the skeleton file name, rather than relying on the -I directory,
17465 to partially alleviate effects of having a skeleton file lying around
17466 in the current directory.
17467
17468 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17469
17470 * src/conflicts.c (log_resolution): Correct typo:
17471 obstack_printf should be obstack_fgrow1.
17472
17473 2002-05-26 Akim Demaille <akim@epita.fr>
17474
17475 * src/state.h (state_t): `solved_conflicts' is a new member.
17476 * src/LR0.c (new_state): Set it to 0.
17477 * src/conflicts.h, src/conflicts.c (print_conflicts)
17478 (free_conflicts, solve_conflicts): Rename as...
17479 (conflicts_print, conflicts_free, conflicts_solve): these.
17480 Adjust callers.
17481 * src/conflicts.c (enum conflict_resolution_e)
17482 (solved_conflicts_obstack): New, used by...
17483 (log_resolution): this.
17484 Adjust to attach the conflict resolution to each state.
17485 Complete the description with the precedence/associativity
17486 information.
17487 (resolve_sr_conflict): Adjust.
17488 * src/print.c (print_state): Output its solved_conflicts.
17489 * tests/conflicts.at (Unresolved SR Conflicts)
17490 (Solved SR Conflicts): Exercise --report=all.
17491
17492 2002-05-26 Akim Demaille <akim@epita.fr>
17493
17494 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17495 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17496 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17497 (token_number_t, item_number_as_token_number)
17498 (token_number_as_item_number, muscle_insert_token_number_table):
17499 Rename as...
17500 (symbol_number_t, item_number_as_symbol_number)
17501 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17502 these, since it is more appropriate.
17503
17504 2002-05-26 Akim Demaille <akim@epita.fr>
17505
17506 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17507 `Error:' lines.
17508 * data/bison.simple (yystos) [YYDEBUG]: New.
17509 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17510 error recovery.
17511 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17512
17513 2002-05-25 Akim Demaille <akim@epita.fr>
17514
17515 * doc/bison.texinfo (Debugging): Split into...
17516 (Tracing): this new section, its former contents, and...
17517 (Understanding): this new section.
17518 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17519 by...
17520 (report_flag): this.
17521 Adjust all dependencies.
17522 (report_args, report_types, report_argmatch): New.
17523 (usage, getargs): Report/support -r, --report.
17524 * src/options.h
17525 (struct option_table_struct): Rename as..,
17526 (struct option_table_s): this.
17527 Rename the `set_flag' member to `flag' to match with getopt_long's
17528 struct.
17529 * src/options.c (option_table): Split verbose into an entry for
17530 %verbose, and another for --verbose.
17531 Support --report/-r, so remove -r from the obsolete --raw.
17532 * src/print.c: Attach full item sets and lookaheads reports to
17533 report_flag instead of trace_flag.
17534 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17535
17536 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17537 and Paul Eggert <eggert@twinsun.com>
17538
17539 * data/bison.simple (yyparse): Correct error handling to conform to
17540 POSIX and yacc. Specifically, after syntax error is discovered,
17541 do not reduce further before shifting the error token.
17542 Clean up the code a bit by removing the labels yyerrdefault,
17543 yyerrhandle, yyerrpop.
17544 * NEWS: Document the above.
17545
17546 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17547
17548 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17549 type; it isn't always big enough, since it doesn't necessarily
17550 include non-terminals.
17551 (yytranslate): Expand definition of yy_token_number_type, so that
17552 the latter can be removed.
17553 (yy_token_number_type): Remove, only one use.
17554 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17555 don't use TokenNumberType as element type.
17556
17557 * tests/regression.at: Modify expected output to agree with change
17558 to yyr1 and yytranslate.
17559
17560 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17561
17562 * src/reader.c (parse_action): Use copy_character instead of
17563 obstack_1grow.
17564
17565 2002-05-13 Akim Demaille <akim@epita.fr>
17566
17567 * tests/regression.at (Token definitions): Prototype yylex and
17568 yyerror.
17569
17570 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17571
17572 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17573 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17574 32-bit arithmetic.
17575 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17576
17577 2002-05-07 Akim Demaille <akim@epita.fr>
17578
17579 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17580 avoid GCC warnings.
17581
17582 2002-05-07 Akim Demaille <akim@epita.fr>
17583
17584 Kill GCC warnings.
17585
17586 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17587 over the RHS of each rule.
17588 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17589 * src/state.h (state_t): Member `nitems' is unsigned short.
17590 * src/LR0.c (get_state): Adjust.
17591 * src/reader.c (packgram): Likewise.
17592 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17593 `Type'.
17594 (muscle_insert_int_table): Remove, unused.
17595 (prepare_rules): Remove `max'.
17596
17597 2002-05-06 Akim Demaille <akim@epita.fr>
17598
17599 * src/closure.c (print_firsts): Display of the symbol tags.
17600 (bitmatrix_print): Move to...
17601 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17602 here.
17603 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17604
17605 2002-05-06 Akim Demaille <akim@epita.fr>
17606
17607 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17608 hash_do_for_each.
17609
17610 2002-05-06 Akim Demaille <akim@epita.fr>
17611
17612 * src/LR0.c (new_state, get_state): Instead of using the global
17613 `kernel_size' and `kernel_base', have two new arguments:
17614 `core_size' and `core'.
17615 Adjust callers.
17616
17617 2002-05-06 Akim Demaille <akim@epita.fr>
17618
17619 * src/reader.c (packgram): No longer end `ritem' with a 0
17620 sentinel: it is not used.
17621
17622 2002-05-05 Akim Demaille <akim@epita.fr>
17623
17624 New experimental feature: display the lookaheads in the report and
17625 graph.
17626
17627 * src/print (print_core): When --trace-flag, display the rules
17628 lookaheads.
17629 * src/print_graph.c (print_core): Likewise.
17630 Swap the arguments.
17631 Adjust caller.
17632
17633 2002-05-05 Akim Demaille <akim@epita.fr>
17634
17635 * tests/torture.at (Many lookaheads): New test.
17636
17637 2002-05-05 Akim Demaille <akim@epita.fr>
17638
17639 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17640 (GENERATE_MUSCLE_INSERT_TABLE): this.
17641 (output_int_table, output_unsigned_int_table, output_short_table)
17642 (output_token_number_table, output_item_number_table): Replace with...
17643 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17644 (muscle_insert_short_table, muscle_insert_token_number_table)
17645 (muscle_insert_item_number_table): these.
17646 Adjust all callers.
17647 (prepare_tokens): Don't free `translations', since...
17648 * src/reader.h, src/reader.c (grammar_free): do it.
17649 Move to...
17650 * src/gram.h, src/gram.c (grammar_free): here.
17651 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17652 b4_translate_max.
17653
17654 2002-05-05 Akim Demaille <akim@epita.fr>
17655
17656 * src/output.c (output_unsigned_int_table): New.
17657 (prepare_rules): `i' is unsigned.
17658 `prhs', `rline', `r2' are unsigned int.
17659 Rename muscle `rhs_number_max' as `rhs_max'.
17660 Output muscles `prhs_max', `rline_max', and `r2_max'.
17661 Free rline and r1.
17662 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17663 to compute types instead of constant types.
17664 * tests/regression.at (Web2c Actions): Adjust.
17665
17666 2002-05-04 Akim Demaille <akim@epita.fr>
17667
17668 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17669 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17670 Adjust dependencies.
17671 * src/output.c (token_definitions_output): Be sure not to output a
17672 `#define 'a'' when fed with `%token 'a' "a"'.
17673 * tests/regression.at (Token definitions): New.
17674
17675 2002-05-03 Paul Eggert <eggert@twinsun.com>
17676
17677 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17678 for K&R C.
17679
17680 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17681
17682 * Makefile.am (SUBDIRS): Remove intl.
17683 (EXTRA_DIST): Add config/config.rpath.
17684
17685 2002-05-03 Akim Demaille <akim@epita.fr>
17686
17687 * data/bison.simple (m4_if): Don't output empty enums.
17688 And actually, output valid enum definitions :(.
17689
17690 2002-05-03 Akim Demaille <akim@epita.fr>
17691
17692 * configure.bat: Remove, completely obsolete.
17693 * Makefile.am (EXTRA_DIST): Adjust.
17694 Don't distribute config.rpath...
17695 * config/Makefile.am (EXTRA_DIST): Do it.
17696
17697 2002-05-03 Akim Demaille <akim@epita.fr>
17698
17699 * configure.in (GETTEXT_VERSION): New.
17700 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17701
17702 2002-05-03 Akim Demaille <akim@epita.fr>
17703
17704 * data/bison.simple (b4_token_enum): New.
17705 (b4_token_defines): Use it to output tokens both as #define and
17706 enums.
17707 Suggested by Paul Eggert.
17708 * src/output.c (token_definitions_output): Don't output spurious
17709 white spaces.
17710
17711 2002-05-03 Akim Demaille <akim@epita.fr>
17712
17713 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17714
17715 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17716
17717 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17718 Update the stack class, give a try to deque as the default container.
17719
17720 2002-05-02 Akim Demaille <akim@epita.fr>
17721
17722 * data/bison.simple (yyparse): Do not implement @$ = @1.
17723 (YYLLOC_DEFAULT): Adjust to do it.
17724 * doc/bison.texinfo (Location Default Action): Fix.
17725
17726 2002-05-02 Akim Demaille <akim@epita.fr>
17727
17728 * src/reader.c (parse_braces): Merge into...
17729 (parse_action): this.
17730
17731 2002-05-02 Akim Demaille <akim@epita.fr>
17732
17733 * configure.in (ALL_LINGUAS): Remove.
17734 * po/LINGUAS, hr.po: New.
17735
17736 2002-05-02 Akim Demaille <akim@epita.fr>
17737
17738 Remove the so called hairy (semantic) parsers.
17739
17740 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17741 * src/gram.h, src/gram.c (semantic_parser): Remove.
17742 (rule_t): Remove the guard and guard_line members.
17743 * src/lex.h (token_t): remove tok_guard.
17744 * src/options.c (option_table): Remove %guard and %semantic_parser
17745 support.
17746 * src/output.c, src/output.h (guards_output): Remove.
17747 (prepare): Adjust.
17748 (token_definitions_output): Don't output the `T'
17749 tokens (???).
17750 (output_skeleton): Don't output the guards.
17751 * src/files.c, src/files.c (attrsfile): Remove.
17752 * src/reader.c (symbol_list): Remove the guard and guard_line
17753 members.
17754 Adjust dependencies.
17755 (parse_guard): Remove.
17756 * data/bison.hairy: Remove.
17757 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17758 BISON_HAIRY.
17759
17760 2002-05-02 Akim Demaille <akim@epita.fr>
17761
17762 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17763 (parse_guard): Rename the formal argument `stack_offset' as
17764 `rule_length', which is more readable.
17765 Adjust callers.
17766 (copy_at, copy_dollar): Instead of outputting the hard coded
17767 values of $$, $n and so forth, output invocation to b4_lhs_value,
17768 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17769 Note: this patch partially drops `semantic-parser' support: it
17770 always does `rule_length - n', where semantic parsers ought to
17771 always use `-n'.
17772 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17773 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17774
17775 2002-05-02 Akim Demaille <akim@epita.fr>
17776
17777 * configure.in (AC_INIT): Bump to 1.49b.
17778 (AM_INIT_AUTOMAKE): Short invocation.
17779
17780 2002-05-02 Akim Demaille <akim@epita.fr>
17781
17782 Version 1.49a.
17783
17784 2002-05-01 Akim Demaille <akim@epita.fr>
17785
17786 * src/skeleton.h: Remove.
17787
17788 2002-05-01 Akim Demaille <akim@epita.fr>
17789
17790 * src/skeleton.h: Fix the #endif.
17791 Reported by Magnus Fromreide.
17792
17793 2002-04-26 Paul Eggert <eggert@twinsun.com>
17794
17795 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17796 Define if we define YYSTYPE and YYLTYPE, respectively.
17797 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17798
17799 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17800
17801 * src/scan-skel.l: Postprocess quadrigraphs.
17802
17803 * src/reader.c (copy_character): New function, used to output
17804 single characters while replacing `[' and `]' with quadrigraphs, to
17805 avoid troubles with M4 quotes.
17806 (copy_comment): Output characters with copy_character.
17807 (read_additionnal_code): Likewise.
17808 (copy_string2): Likewise.
17809 (copy_definition): Likewise.
17810
17811 * tests/calc.at: Exercise M4 quoting.
17812
17813 2002-04-25 Akim Demaille <akim@epita.fr>
17814
17815 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17816 between `!' and the command.
17817 Reported by Paul Eggert.
17818
17819 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17820
17821 * tests/calc.at: Exercise prologue splitting.
17822
17823 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17824 `b4_post_prologue' instead of `b4_prologue'.
17825
17826 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17827 muscles.
17828 (output): Free pre_prologue_obstack and post_prologue_obstack.
17829 * src/files.h, src/files.c (attrs_obstack): Remove.
17830 (pre_prologue_obstack, post_prologue_obstack): New.
17831 * src/reader.c (copy_definition): Add a parameter to specify the
17832 obstack to fill, instead of using attrs_obstack unconditionally.
17833 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17834 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17835
17836 2002-04-23 Paul Eggert <eggert@twinsun.com>
17837
17838 * data/bison.simple: Remove unnecessary commentary and white
17839 space differences from 1_29-branch.
17840 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17841
17842 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17843 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17844 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17845 constructors or destructors.
17846
17847 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17848
17849 2002-04-23 Akim Demaille <akim@epita.fr>
17850
17851 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17852 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17853 location with columns.
17854 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17855 All reported by Paul Eggert.
17856
17857 2002-04-22 Akim Demaille <akim@epita.fr>
17858
17859 * src/reduce.c (dump_grammar): Move to...
17860 * src/gram.h, src/gram.c (grammar_dump): here.
17861 Be sure to separate long item numbers.
17862 Don't read the members of a rule's prec if its nil.
17863
17864 2002-04-22 Akim Demaille <akim@epita.fr>
17865
17866 * src/output.c (table_size, table_grow): New.
17867 (MAXTABLE): Remove, replace uses with table_size.
17868 (pack_vector): Instead of dying when the table is too big, grow it.
17869
17870 2002-04-22 Akim Demaille <akim@epita.fr>
17871
17872 * data/bison.simple (yyr1): Its type is that of a token number.
17873 * data/bison.c++ (r1_): Likewise.
17874 * tests/regression.at (Web2c Actions): Adjust.
17875
17876 2002-04-22 Akim Demaille <akim@epita.fr>
17877
17878 * src/reader.c (token_translations_init): 256 is now the default
17879 value for the error token, i.e., it will be assigned another
17880 number if the user assigned 256 to one of her tokens.
17881 (reader): Don't force 256 to error.
17882 * doc/bison.texinfo (Symbols): Adjust.
17883 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17884 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17885 etc. instead of 10, 20, 30 (which was used to `jump' over error
17886 (256) and undefined (2)).
17887
17888 2002-04-22 Akim Demaille <akim@epita.fr>
17889
17890 Propagate more token_number_t.
17891
17892 * src/gram.h (token_number_as_item_number)
17893 (item_number_as_token_number): New.
17894 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17895 Use it to create output_item_number_table and
17896 output_token_number_table.
17897 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17898 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17899 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17900 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17901
17902 2002-04-22 Akim Demaille <akim@epita.fr>
17903
17904 * src/output.h, src/output.c (get_lines_number): Remove.
17905
17906 2002-04-19 Akim Demaille <akim@epita.fr>
17907
17908 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17909 as Lex/Flex'.
17910 (Debugging): More details about enabling the debugging features.
17911 (Table of Symbols): Describe $$, $n, @$, and @n.
17912 Suggested by Tim Josling.
17913
17914 2002-04-19 Akim Demaille <akim@epita.fr>
17915
17916 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17917
17918 2002-04-10 Akim Demaille <akim@epita.fr>
17919
17920 * src/system.h: Rely on HAVE_LIMITS_H.
17921 Suggested by Paul Eggert.
17922
17923 2002-04-09 Akim Demaille <akim@epita.fr>
17924
17925 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17926 full stderr, and strip it according to the bison options, instead
17927 of composing the error message from different bits.
17928 This makes it easier to check for several error messages.
17929 Adjust all the invocations.
17930 Add an invocation exercising the error token.
17931 Add an invocation demonstrating a stupid error message.
17932 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17933 Adjust the tests.
17934 Error message are for stderr, not stdout.
17935
17936 2002-04-09 Akim Demaille <akim@epita.fr>
17937
17938 * src/gram.h, src/gram.c (error_token_number): Remove, use
17939 errtoken->number.
17940 * src/reader.c (reader): Don't specify the user token number (2)
17941 for $undefined, as it uselessly prevents using it.
17942 * src/gram.h (token_number_t): Move to...
17943 * src/symtab.h: here.
17944 (state_t.number): Is a token_number_t.
17945 * src/print.c, src/reader.c: Use undeftoken->number instead of
17946 hard coded 2.
17947 (Even though this 2 is not the same as above: the number of the
17948 undeftoken remains being 2, it is its user token number which
17949 might not be 2).
17950 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17951 `user_token_number_max'.
17952 Output `undef_token_number'.
17953 * data/bison.simple, data/bison.c++: Use them.
17954 Be sure to map invalid yylex return values to
17955 `undef_token_number'. This saves us from gratuitous SEGV.
17956
17957 * tests/conflicts.at (Solved SR Conflicts)
17958 (Unresolved SR Conflicts): Adjust.
17959 * tests/regression.at (Web2c Actions): Adjust.
17960
17961 2002-04-08 Akim Demaille <akim@epita.fr>
17962
17963 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17964 Adding #line.
17965 Remove the duplicate `typedefs'.
17966 (RhsNumberType): Fix the declaration and various other typos.
17967 Use __ofile__.
17968 * data/bison.simple: Use __ofile__.
17969 * src/scan-skel.l: Handle __ofile__.
17970
17971 2002-04-08 Akim Demaille <akim@epita.fr>
17972
17973 * src/gram.h (item_number_t): New, the type of item numbers in
17974 RITEM. Note that it must be able to code symbol numbers as
17975 positive number, and the negation of rule numbers as negative
17976 numbers.
17977 Adjust all dependencies (pretty many).
17978 * src/reduce.c (rule): Remove this `short *' pointer: use
17979 item_number_t.
17980 * src/system.h (MINSHORT, MAXSHORT): Remove.
17981 Include `limits.h'.
17982 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17983 (shortcpy): Remove.
17984 (MAXTABLE): Move to...
17985 * src/output.c (MAXTABLE): here.
17986 (prepare_rules): Use output_int_table to output rhs.
17987 * data/bison.simple, data/bison.c++: Adjust.
17988 * tests/torture.at (Big triangle): Move the limit from 254 to
17989 500.
17990 * tests/regression.at (Web2c Actions): Ajust.
17991
17992 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17993 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17994 passes, but produces negative #line number, once fixed, GCC is
17995 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17996 C), it passes.
17997 * src/state.h (state_h): Code input lines on ints, not shorts.
17998
17999 2002-04-08 Akim Demaille <akim@epita.fr>
18000
18001 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18002 and then the grammar.
18003
18004 2002-04-08 Akim Demaille <akim@epita.fr>
18005
18006 * src/system.h: No longer using strndup.
18007
18008 2002-04-07 Akim Demaille <akim@epita.fr>
18009
18010 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18011 * src/output.c (output_table_data): Return the longest number.
18012 (prepare_tokens): Output `token_number_max').
18013 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18014 New.
18015 Use them to define yy_token_number_type/TokenNumberType.
18016 Use this type for yytranslate.
18017 * tests/torture.at (Big triangle): Push the limit from 124 to
18018 253.
18019 * tests/regression.at (Web2c Actions): Adjust.
18020
18021 2002-04-07 Akim Demaille <akim@epita.fr>
18022
18023 * tests/torture.at (Big triangle): New.
18024 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18025 * tests/existing.at: here.
18026
18027 2002-04-07 Akim Demaille <akim@epita.fr>
18028
18029 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18030 nritems.
18031 Adjust dependencies.
18032
18033 2002-04-07 Akim Demaille <akim@epita.fr>
18034
18035 * src/reader.c: Normalize increments to prefix form.
18036
18037 2002-04-07 Akim Demaille <akim@epita.fr>
18038
18039 * src/reader.c, symtab.c: Remove debugging code.
18040
18041 2002-04-07 Akim Demaille <akim@epita.fr>
18042
18043 Rename all the `bucket's as `symbol_t'.
18044
18045 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18046 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18047 * src/symtab.c, src/symtab.h (bucket): Rename as...
18048 (symbol_t): this.
18049 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18050 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18051 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18052 (buckets_new, buckets_free, buckets_do): Rename as...
18053 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18054 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18055 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18056 (symbols_new, symbols_free, symbols_do): these.
18057
18058 2002-04-07 Akim Demaille <akim@epita.fr>
18059
18060 Use lib/hash for the symbol table.
18061
18062 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18063 EOF.
18064 * src/lex.c (lex): Set the `number' member of new terminals.
18065 * src/reader.c (bucket_check_defined, bucket_make_alias)
18066 (bucket_check_alias_consistence, bucket_translation): New.
18067 (reader, grammar_free, readgram, token_translations_init)
18068 (packsymbols): Adjust.
18069 (reader): Number the predefined tokens.
18070 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18071 for predefined tokens.
18072 * src/symtab.h (bucket): Remove all the hash table related
18073 members.
18074 * src/symtab.c (symtab): Replace by...
18075 (bucket_table): this.
18076 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18077 (buckets_new, buckets_do): New.
18078
18079 2002-04-07 Akim Demaille <akim@epita.fr>
18080
18081 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18082 (start_symbol, max_user_token_number, semantic_parser)
18083 (error_token_number): Initialize.
18084 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18085 Initialize.
18086 (reader): Don't.
18087 (errtoken, eoftoken, undeftoken, axiom): Extern.
18088
18089 2002-04-07 Akim Demaille <akim@epita.fr>
18090
18091 * src/gram.h (rule_s): prec and precsym are now pointers
18092 to the bucket giving the priority/associativity.
18093 Member `associativity' removed: useless.
18094 * src/reduce.c, src/conflicts.c: Adjust.
18095
18096 2002-04-07 Akim Demaille <akim@epita.fr>
18097
18098 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18099 Properly escape the symbols' TAG when outputting them.
18100
18101 2002-04-07 Akim Demaille <akim@epita.fr>
18102
18103 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18104
18105 2002-04-07 Akim Demaille <akim@epita.fr>
18106
18107 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18108 (LArule): this, which is an array to rule_t*.
18109 * src/print.c, src/conflicts.c: Adjust.
18110
18111 2002-04-07 Akim Demaille <akim@epita.fr>
18112
18113 * src/gram.h (rule_t): Rename `number' as `user_number'.
18114 `number' is a new member.
18115 Adjust dependencies.
18116 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18117
18118 2002-04-07 Akim Demaille <akim@epita.fr>
18119
18120 As a result of the previous patch, it is no longer needed
18121 to reorder ritem itself.
18122
18123 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18124
18125 2002-04-07 Akim Demaille <akim@epita.fr>
18126
18127 Be sure never to walk through RITEMS, but use only data related to
18128 the rules themselves. RITEMS should be banished.
18129
18130 * src/output.c (output_token_translations): Rename as...
18131 (prepare_tokens): this.
18132 In addition to `translate', prepare the muscles `tname' and
18133 `toknum', which were handled by...
18134 (output_rule_data): this.
18135 Remove, and move the remainder of its outputs into...
18136 (prepare_rules): this new routines, which also merges content from
18137 (output_gram): this.
18138 (prepare_rules): Be sure never to walk through RITEMS.
18139 (output_stos): Rename as...
18140 (prepare_stos): this.
18141 (output): Always invoke prepare_states, after all, just don't use it
18142 in the output if you don't need it.
18143
18144 2002-04-07 Akim Demaille <akim@epita.fr>
18145
18146 * src/LR0.c (new_state): Display `nstates' as the name of the
18147 newly created state.
18148 Adjust to initialize first_state and last_state if needed.
18149 Be sure to distinguish the initial from the final state.
18150 (new_states): Create the itemset of the initial state, and use
18151 new_state.
18152 * src/closure.c (closure): Now that the initial state has its
18153 items properly set, there is no need for a special case when
18154 creating `ruleset'.
18155
18156 As a result, now the rule 0, reducing to $axiom, is visible in the
18157 outputs. Adjust the test suite.
18158
18159 * tests/conflicts.at (Solved SR Conflicts)
18160 (Unresolved SR Conflicts): Adjust.
18161 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18162 * tests/conflicts.at (S/R in initial): New.
18163
18164 2002-04-07 Akim Demaille <akim@epita.fr>
18165
18166 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18167 the RHS of the rules.
18168 * src/output.c (output_gram): Likewise.
18169
18170 2002-04-07 Akim Demaille <akim@epita.fr>
18171
18172 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18173 bucket.
18174 Adjust all dependencies.
18175 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18176 `number' of the buckets too.
18177 * src/gram.h: Include `symtab.h'.
18178 (associativity): Move to...
18179 * src/symtab.h: here.
18180 No longer include `gram.h'.
18181
18182 2002-04-07 Akim Demaille <akim@epita.fr>
18183
18184 * src/gram.h, src/gram.c (rules_rhs_length): New.
18185 (ritem_longest_rhs): Use it.
18186 * src/gram.h (rule_t): `number' is a new member.
18187 * src/reader.c (packgram): Set it.
18188 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18189 the end of `rules', and count them out of `nrules'.
18190 (reduce_output, dump_grammar): Adjust.
18191 * src/print.c (print_grammar): It is no longer needed to check for
18192 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18193 * tests/reduce.at (Reduced Automaton): New test.
18194
18195 2002-04-07 Akim Demaille <akim@epita.fr>
18196
18197 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18198 lacking `+ 1' to nrules, Bison reported as useless a token if it
18199 was used solely to set the precedence of the last rule...
18200
18201 2002-04-07 Akim Demaille <akim@epita.fr>
18202
18203 * data/bison.c++, data/bison.simple: Don't output the current file
18204 name in #line, to avoid useless diffs between two identical
18205 outputs under different names.
18206
18207 2002-04-07 Akim Demaille <akim@epita.fr>
18208
18209 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18210 Normalize loops to using `< nrules + 1', not `<= nrules'.
18211
18212 2002-04-07 Akim Demaille <akim@epita.fr>
18213
18214 * TODO: Update.
18215
18216 2002-04-07 Akim Demaille <akim@epita.fr>
18217
18218 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18219 bucket.value as bucket.number.
18220
18221 2002-04-07 Akim Demaille <akim@epita.fr>
18222
18223 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18224 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18225 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18226 RHS, instead of being an index in RITEMS.
18227
18228 2002-04-04 Paul Eggert <eggert@twinsun.com>
18229
18230 * doc/bison.texinfo: Update copyright date.
18231 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18232 (Symbols): Warn about running Bison in one character set,
18233 but compiling and/or running in an incompatible one.
18234 Warn about character code 256, too.
18235
18236 2002-04-03 Paul Eggert <eggert@twinsun.com>
18237
18238 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18239 YYERROR_VERBOSE is nonzero, not whether it is defined.
18240
18241 Merge changes from bison-1_29-branch.
18242
18243 2002-03-20 Paul Eggert <eggert@twinsun.com>
18244
18245 Merge fixes from Debian bison_1.34-1.diff.
18246
18247 * configure.in (AC_PREREQ): 2.53.
18248
18249 2002-03-20 Akim Demaille <akim@epita.fr>
18250
18251 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18252
18253 2002-03-19 Paul Eggert <eggert@twinsun.com>
18254
18255 * src/bison.simple (YYCOPY): New macro.
18256 (YYSTACK_RELOCATE): Use it.
18257 Remove Type arg; no longer needed. All callers changed.
18258 (yymemcpy): Remove; no longer needed.
18259
18260 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18261 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18262
18263 2002-03-19 Akim Demaille <akim@epita.fr>
18264
18265 Test and fix the #line outputs.
18266
18267 * tests/atlocal.at (GCC): New.
18268 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18269 (Prologue synch line, %union synch line, Postprologue synch line)
18270 (Action synch line, Epilogue synch line): New tests.
18271 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18272 * data/bison.simple, data/bison.c++: Use it.
18273
18274 2002-03-19 Akim Demaille <akim@epita.fr>
18275
18276 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18277 (Solved SR Conflicts, %expect not enough, %expect right)
18278 (%expect too much): Move to...
18279 * tests/conflicts.at: this new file.
18280
18281 2002-03-19 Akim Demaille <akim@epita.fr>
18282
18283 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18284 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18285 that we can move to enums for instance.
18286 * src/output.c (token_definitions_output): Output a list of
18287 `token-name, token-number' instead of the #define.
18288 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18289
18290 2002-03-14 Akim Demaille <akim@epita.fr>
18291
18292 Use Gettext 0.11.1.
18293
18294 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18295
18296 * data/bison.c++: Make the user able to add members to the generated
18297 parser by subclassing.
18298
18299 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18300
18301 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18302 a character.
18303 Reported by Nicolas Tisserand and Nicolas Burrus.
18304
18305 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18306
18307 * src/reader.c: Warn about lacking semi-colons, do not complain.
18308
18309 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18310
18311 * data/bison.c++: Remove a debug line.
18312
18313 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18314
18315 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18316 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18317 provide a default implementation.
18318
18319 2002-03-04 Akim Demaille <akim@epita.fr>
18320
18321 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18322 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18323 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18324 * tests/semantic.at (Parsing Guards): Similarly.
18325 * src/reader.at (readgram): Complain if the last rule is not ended
18326 with a semi-colon.
18327
18328 2002-03-04 Akim Demaille <akim@epita.fr>
18329
18330 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18331 * src/closure.c: here.
18332 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18333 RTC.
18334 * src/warshall.h, src/warshall.c: Remove.
18335 * tests/sets.at (Broken Closure): Adjust.
18336
18337 2002-03-04 Akim Demaille <akim@epita.fr>
18338
18339 * src/output.c (output_skeleton): tempdir is const.
18340 bytes_read is unused.
18341
18342 2002-03-04 Akim Demaille <akim@epita.fr>
18343
18344 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18345 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18346 Update.
18347 From Michael Hayes.
18348
18349 2002-03-04 Akim Demaille <akim@epita.fr>
18350
18351 * src/closure.c (closure): `r' is unused.
18352
18353 2002-03-04 Akim Demaille <akim@epita.fr>
18354
18355 * tests/sets.at (Broken Closure): Add the ending `;'.
18356 * src/reader.at (readgram): Complain if a rule is not ended with a
18357 semi-colon.
18358
18359 2002-03-04 Akim Demaille <akim@epita.fr>
18360
18361 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18362 (count_sr_conflicts): Use bitset_count.
18363 * src/reduce.c (inaccessable_symbols): Ditto.
18364 (bits_size): Remove.
18365 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18366
18367 2002-03-04 Akim Demaille <akim@epita.fr>
18368
18369 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18370 * src/reduce.c: Remove the `bitset_zero's following the
18371 `bitset_create's, as now it is performed by the latter.
18372
18373 2002-03-04 Akim Demaille <akim@epita.fr>
18374
18375 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18376 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18377 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18378 latest sources from Michael.
18379
18380 2002-03-04 Akim Demaille <akim@epita.fr>
18381
18382 * src/output.c (output): Don't free the grammar.
18383 * src/reader.c (grammar_free): New.
18384 * src/main.c (main): Call it and don't free symtab here.
18385
18386 2002-03-04 Akim Demaille <akim@epita.fr>
18387
18388 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18389 before returning.
18390 Reported by Benoit Perrot.
18391
18392 2002-03-04 Akim Demaille <akim@epita.fr>
18393
18394 Use bitset operations when possible, not loops over bits.
18395
18396 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18397 bitset_or.
18398 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18399 * src/reduce.c (useless_nonterminals): Formatting changes.
18400 * src/warshall.c (TC): Use bitset_or.
18401
18402 2002-03-04 Akim Demaille <akim@epita.fr>
18403
18404 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18405 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18406 Ditto.
18407
18408 2002-03-04 Akim Demaille <akim@epita.fr>
18409
18410 * src/lalr.c (F): Now a bitset*.
18411 Adjust all dependencies.
18412
18413 2002-03-04 Akim Demaille <akim@epita.fr>
18414
18415 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18416 Adjust all dependencies.
18417
18418 2002-03-04 Akim Demaille <akim@epita.fr>
18419
18420 * src/L0.c, src/LR0.h (nstates): Be size_t.
18421 Adjust comparisons (signed vs unsigned).
18422 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18423 bitset*.
18424 Adjust all dependencies.
18425
18426 2002-03-04 Akim Demaille <akim@epita.fr>
18427
18428 * src/closure.c (firsts): Now, also a bitset.
18429 Adjust all dependencies.
18430 (varsetsize): Remove, now unused.
18431 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18432
18433 2002-03-04 Akim Demaille <akim@epita.fr>
18434
18435 * src/print.c: Convert to use bitset.h, not hand coded iterations
18436 over ints.
18437
18438 2002-03-04 Akim Demaille <akim@epita.fr>
18439
18440 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18441
18442 2002-03-04 Akim Demaille <akim@epita.fr>
18443
18444 * src/closure.c (ruleset): Be a bitset.
18445 (rulesetsize): Remove.
18446
18447 2002-03-04 Akim Demaille <akim@epita.fr>
18448
18449 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18450 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18451 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18452 * src/closure.c (fderives): Be an array of bitsets.
18453
18454 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18455
18456 * data/bison.c++: Merge the two generated headers. Insert a copyright
18457 notice in each output file.
18458
18459 2002-02-28 Akim Demaille <akim@epita.fr>
18460
18461 * data/bison.c++: Copy the prologue of bison.simple to fetch
18462 useful M4 definitions, such as b4_header_guard.
18463
18464 2002-02-25 Akim Demaille <akim@epita.fr>
18465
18466 * src/getargs.c (version): Give the name of the authors, and use a
18467 translator friendly scheme for the bgr
18468 copyright notice.
18469
18470 2002-02-25 Akim Demaille <akim@epita.fr>
18471
18472 * src/output.c (header_output): Remove, now handled completely via
18473 M4.
18474
18475 2002-02-25 Akim Demaille <akim@epita.fr>
18476
18477 * m4/m4.m4: New, from CVS Autoconf.
18478 * configure.in: Invoke it.
18479 * src/output.c (output_skeleton): Use its result instead of the
18480 hard coded name.
18481
18482 2002-02-25 Akim Demaille <akim@epita.fr>
18483
18484 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18485 Fileutils 4.1.5.
18486 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18487 * src/output.c (output_skeleton): Use mkstemp to create a real
18488 temporary file.
18489 Move the filling of `skeleton' and its muscle to...
18490 (prepare): here.
18491 (output): Move the definition of the prologue muscle to...
18492 (prepare): here.
18493 * src/system.h (DEFAULT_TMPDIR): New.
18494
18495 2002-02-14 Paul Eggert <eggert@twinsun.com>
18496
18497 Remove the support for C++ namespace cleanliness; it was
18498 causing more problems than it was curing, since it didn't work
18499 properly on some nonstandard C++ compilers. This can wait
18500 for a proper C++ parser.
18501
18502 * NEWS: Document this.
18503 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18504 of C++, as it's treated like C now.
18505 * src/bison.simple (YYSTD): Remove.
18506 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18507 Treat C++ just like Standard C instead of trying to support
18508 namespace cleanliness.
18509
18510 2002-02-14 Akim Demaille <akim@epita.fr>
18511
18512 * tests/regression.at (else): Adjust to Andreas' change.
18513
18514 2002-02-14 Akim Demaille <akim@epita.fr>
18515
18516 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18517
18518 2002-02-13 Andreas Schwab <schwab@suse.de>
18519
18520 * src/output.c (output_rule_data): Don't output NULL, it might
18521 not be defined yet.
18522
18523 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18524
18525 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18526 (Copyright notice): Update.
18527
18528 2002-02-11 Akim Demaille <akim@epita.fr>
18529
18530 * tests/regression.at (%nonassoc and eof): Don't include
18531 nonportable headers.
18532
18533 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18534
18535 * data/bison.c++: Correct error recovery. Make the user able to
18536 initialize the starting location.
18537
18538 2002-02-07 Akim Demaille <akim@epita.fr>
18539
18540 * tests/input.at: New.
18541
18542 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18543
18544 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18545 more consistent when naming methods and variables. Put preprocessor
18546 directives around tables only needed for debugging.
18547
18548 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18549
18550 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18551 C++ parsers.
18552 (yy::b4_name::parse): Use print_.
18553
18554 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18555
18556 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18557
18558 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18559
18560 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18561 C++ parsers.
18562 (yy::b4_name::parse): Build verbose error messages, and use error_.
18563
18564 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18565
18566 * data/bison.c++: Fix m4 quoting in comments.
18567
18568 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18569
18570 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18571 not expanded by m4.
18572
18573 2002-02-05 Akim Demaille <akim@epita.fr>
18574
18575 * data/bison.c++: Adjust to the M4 back end.
18576 More is certainly needed.
18577
18578 2002-02-05 Akim Demaille <akim@epita.fr>
18579
18580 Give a try to M4 as a back end.
18581
18582 * lib/readpipe.c: New, from wdiff.
18583 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18584 BISON_HAIRY.
18585 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18586 specific values. Now it is m4 that performs the lookup.
18587 * src/parse-skel.y: Remove.
18588 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18589 * src/output.c (actions_output, guards_output)
18590 (token_definitions_output): No longer keeps track of the output
18591 line number, hence remove the second argument.
18592 (guards_output): Check against the guard member of a rule, not the
18593 action member.
18594 Adjust callers.
18595 (output_skeleton): Don't look for the skeleton location, let m4 do
18596 that.
18597 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18598 file will be used.
18599 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18600 (prepare): Given that for the time being changesyntax is not
18601 usable in M4, rename the muscles using `-' to `_'.
18602 Define `defines_flag', `output_parser_name' and `output_header_name'.
18603 * src/output.h (actions_output, guards_output)
18604 (token_definitions_output): Adjust prototypes.
18605 * src/scan-skel.l: Instead of scanning the skeletons, it now
18606 processes the output of m4: `__oline__' and `#output'.
18607 * data/bison.simple: Adjust to be used by M4(sugar).
18608 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18609 to date.
18610 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18611 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18612 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18613 shamelessly stolen from CVS Autoconf.
18614
18615 2002-02-05 Akim Demaille <akim@epita.fr>
18616
18617 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18618 * configure.in: Check for the declarations of free and malloc.
18619 * src/muscle_tab.c: Adjust.
18620
18621 2002-02-05 Akim Demaille <akim@epita.fr>
18622
18623 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18624 which have no values.
18625
18626 2002-02-05 Akim Demaille <akim@epita.fr>
18627
18628 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18629 * data/: here.
18630
18631 2002-01-29 Paul Eggert <eggert@twinsun.com>
18632
18633 * src/bison.simple (YYSIZE_T): Do not define merely because
18634 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18635 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18636
18637 2002-01-27 Akim Demaille <akim@epita.fr>
18638
18639 Fix `%nonassoc and eof'.
18640
18641 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18642 which were not properly copied! Replace
18643 memcpy (res->errs, src->errs, src->nerrs);
18644 with
18645 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18646 !!!
18647 * tests/regression.at (%nonassoc and eof): Adjust to newest
18648 Autotest: `.' is not in the PATH.
18649
18650 2002-01-27 Akim Demaille <akim@epita.fr>
18651
18652 * tests/sets.at (AT_EXTRACT_SETS): New.
18653 (Nullable): Use it.
18654 (Firsts): New.
18655
18656 2002-01-26 Akim Demaille <akim@epita.fr>
18657
18658 * tests/actions.at, tests/calc.at, tests/headers.at,
18659 * tests/torture.at: Adjust to the newest Autotest which no longer
18660 forces `.' in the PATH.
18661
18662 2002-01-25 Akim Demaille <akim@epita.fr>
18663
18664 * tests/regression.at (%nonassoc and eof): New.
18665 Suggested by Robert Anisko.
18666
18667 2002-01-24 Akim Demaille <akim@epita.fr>
18668
18669 Bison dumps core when trying to complain about broken input files.
18670 Reported by Cris van Pelt.
18671
18672 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18673 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18674 into...
18675 (Invalid inputs): Strengthen: exercise parse_percent_token.
18676
18677 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18678
18679 * src/Makefile.am: Add bison.c++.
18680 * src/bison.c++: New skeleton.
18681
18682 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18683
18684 * po/it.po: New.
18685
18686 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18687
18688 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18689
18690 2002-01-20 Marc Autret <marc@gnu.org>
18691
18692 * src/files.c (compute_output_file_names): Fix
18693
18694 2002-01-20 Marc Autret <marc@gnu.org>
18695
18696 * tests/output.at: New test.
18697 * src/files.c (compute_base_names): Don't map extensions when
18698 the YACC flag is set, use defaults.
18699 Reported by Evgeny Stambulchik.
18700
18701 2002-01-20 Marc Autret <marc@gnu.org>
18702
18703 * src/system.h: Need to define __attribute__ away for non-GCC
18704 compilers as well (i.e., the vendor C compiler).
18705 Suggested by Albert Chin-A-Young.
18706
18707 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18708
18709 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18710 canonical definition.
18711 * src/system.h: Use the canonical definition for PARAMS (avoids
18712 a conflict with the macro from lib/hash.h).
18713
18714 2002-01-11 Akim Demaille <akim@epita.fr>
18715
18716 * configure.in: Use AC_FUNC_STRNLEN.
18717 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18718
18719 2002-01-09 Akim Demaille <akim@epita.fr>
18720
18721 * src/files.c, src/files.h (output_infix): New.
18722 (tab_extension): Remove.
18723 (compute_base_names): Compute the former, drop the latter.
18724 * src/output.c (prepare): Insert the muscles `output-infix', and
18725 `output-suffix'.
18726 * src/parse-skel.y (string, string.1): New.
18727 (section.header): Use it.
18728 (section.yacc): Remove.
18729 (prefix): Remove too.
18730 * src/scan-skel.l: Adjust.
18731 * src/bison.simple, src/bison.hairy: Adjust.
18732
18733 2002-01-09 Akim Demaille <akim@epita.fr>
18734
18735 * configure.in (WERROR_CFLAGS): Compute it.
18736 * src/Makefile.am (CFLAGS): Pass it.
18737 * tests/atlocal.in (CFLAGS): Idem.
18738 * src/files.c: Fix a few warnings.
18739 (get_extension_index): Remove, unused.
18740
18741 2002-01-08 Akim Demaille <akim@epita.fr>
18742
18743 * src/getargs.c (AS_FILE_NAME): New.
18744 (getargs): Use it to convert DOSish file names.
18745 * src/files.c (base_name): Rename as full_base_name to avoid
18746 clashes with `base_name ()'.
18747 (filename_split): New.
18748 (compute_base_names): N-th rewrite, using filename_split.
18749
18750 2002-01-08 Akim Demaille <akim@epita.fr>
18751
18752 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18753 New, stolen from the Fileutils 4.1.
18754 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18755 * configure.in: Check for the presence of memrchr, and of its
18756 prototype.
18757
18758 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18759
18760 * lib/hash.h (__P): Added definition for this macro.
18761 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18762 BUILT_SOURCES, to ensure they are generated first.
18763 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18764 %error-verbose to allow bootstrapping with bison 1.30x.
18765
18766 2002-01-06 Akim Demaille <akim@epita.fr>
18767
18768 * src/reader.c (parse_braces): Don't fetch the next char, the
18769 convention is to fetch on entry.
18770 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18771 'switch' without a following semicolon.
18772 * tests/regression.at (braces parsing): New.
18773
18774 2002-01-06 Akim Demaille <akim@epita.fr>
18775
18776 Bison is dead wrong in its RR conflict reports.
18777
18778 * tests/torture.at (GNU Cim Grammar): New.
18779 * src/conflicts.c (count_rr_conflicts): Fix.
18780
18781 2002-01-06 Akim Demaille <akim@epita.fr>
18782
18783 Creating package.m4 from configure.ac causes too many problems.
18784
18785 * tests/Makefile.am (package.m4): Create it by hand,
18786 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18787
18788 2002-01-06 Akim Demaille <akim@epita.fr>
18789
18790 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18791 skeleton.h.
18792
18793 2002-01-04 Paul Eggert <eggert@twinsun.com>
18794
18795 * doc/bison.texinfo (Debugging):
18796 Remove YYSTDERR; it's no longer defined or used.
18797 Also, s/cstdio.h/cstdio/.
18798
18799 2002-01-03 Akim Demaille <akim@epita.fr>
18800
18801 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18802
18803 2002-01-03 Akim Demaille <akim@epita.fr>
18804
18805 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18806 tracing code to --trace, wait for a better --trace option, with
18807 args.
18808
18809 2002-01-03 Akim Demaille <akim@epita.fr>
18810
18811 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18812 The ISO C++ standard is extremely clear about it: stderr is
18813 considered a macro, not a regular symbol (see table 94 `Header
18814 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18815 Therefore std:: does not apply to it. It still does with fprintf.
18816 Also, s/cstdio.h/cstdio/.
18817
18818 2002-01-03 Akim Demaille <akim@epita.fr>
18819
18820 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18821 for non system headers.
18822
18823 2002-01-02 Akim Demaille <akim@epita.fr>
18824
18825 Equip the skeleton chain with location tracking, runtime trace,
18826 pure parser and scanner.
18827
18828 * src/parse-skel.y: Request a pure parser, locations, and prefix
18829 renaming.
18830 (%union): Having several members with the same type does not help
18831 type mismatches, simplify.
18832 (YYPRINT, yyprint): New.
18833 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18834 (skel_error): this.
18835 Handle locations.
18836 * src/scan-skel.l: Adjust to these changes.
18837 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18838 (LOCATION_PRINT, skel_control_t): New.
18839
18840 2001-12-30 Akim Demaille <akim@epita.fr>
18841
18842 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18843 replace `gb' with BLANKS.
18844 * src/scan-skel.l: Adjust.
18845
18846 2001-12-30 Akim Demaille <akim@epita.fr>
18847
18848 * src/system.h: We don't need nor want bcopy.
18849 Throw away MS-DOS crap: we don't need getpid.
18850 * configure.in: We don't need strndup. It was even causing
18851 problems: because Flex includes the headers *before* us,
18852 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18853 not visible.
18854 * lib/xstrndup.c: New.
18855 * src/scan-skel.l: Use it.
18856 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18857 * src/parse-skel.y: Use %directives instead of #defines.
18858
18859 2001-12-30 Akim Demaille <akim@epita.fr>
18860
18861 * src/skeleton.h: New.
18862 * src/output.c (output_parser, output_master_parser): Remove, dead
18863 code.
18864 * src/output.h (get_lines_number, actions_output, guards_output)
18865 (token_definitions_output): Prototype them.
18866 * src/parse-skel.y: Add the license notice.
18867 Include output.h and skeleton.h.
18868 (process_skeleton): Returns void, and takes a single parameter.
18869 * src/scan-skel.l: Add the license notice.
18870 Include skeleton.h.
18871 Don't use %option yylineno: it seems that then Flex imagines
18872 REJECT has been used, and therefore it won't reallocate its
18873 buffers (which makes no other sense to me than a bug). It results
18874 in warnings for `unused: yy_flex_realloc'.
18875
18876 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18877
18878 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18879 (MUSCLE_INSERT_PREFIX): ...to there.
18880 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18881 (MUSCLE_INSERT_PREFIX): Move from here...
18882
18883 * src/bison.hairy: Add a section directive. Put braces around muscle
18884 names. This parser skeleton is still broken, but Bison should not
18885 choke on a bad muscle 'syntax'.
18886 * src/bison.simple: Add a section directive. Put braces around muscle
18887 names.
18888
18889 * src/files.h (strsuffix, stringappend): Add declarations.
18890 (tab_extension): Add declaration.
18891 (short_base_name): Add declaration.
18892
18893 * src/files.c (strsuffix, stringappend): No longer static. These
18894 functions are used in the skeleton parser.
18895 (tab_extension): New.
18896 (compute_base_names): Use the computations done in this function
18897 to guess if the generated parsers should have '.tab' in their
18898 names.
18899 (short_base_name): No longer static.
18900
18901 * src/output.c (output_skeleton): New.
18902 (output): Disable call to output_master_parser, and give a try to
18903 a new skeleton handling system.
18904 (guards_output, actions_output): No longer static.
18905 (token_definitions_output, get_lines_number): No longer static.
18906
18907 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18908
18909 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18910 parse-skel.y.
18911
18912 * src/parse-skel.y: New file.
18913 * src/scan-skel.l: New file.
18914
18915 2001-12-29 Akim Demaille <akim@epita.fr>
18916
18917 %name-prefix is broken.
18918
18919 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18920 Adjust all dependencies.
18921 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18922 %name-prefix.
18923
18924 Renaming yylval but not yylloc is not consistent. Now we do.
18925
18926 * src/bison.simple: Prefix yylloc if used.
18927 * doc/bison.texinfo (Decl Summary): Document that.
18928
18929 2001-12-29 Akim Demaille <akim@epita.fr>
18930
18931 * doc/bison.texinfo: Promote `%long-directive' over
18932 `%long_directive'.
18933 Remove all references to fixed-output-files, yacc is enough.
18934
18935 2001-12-29 Akim Demaille <akim@epita.fr>
18936
18937 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18938 user prologue. These are defaults.
18939 * tests/actions.at (Mid-rule actions): Make sure the user can
18940 define YYDEBUG and YYERROR_VERBOSE.
18941
18942 2001-12-29 Akim Demaille <akim@epita.fr>
18943
18944 * src/output.c (header_output): Don't forget to export YYLTYPE and
18945 yylloc.
18946 * tests/headers.at (export YYLTYPE): New, make sure it does.
18947 * tests/regression.at (%union and --defines, Invalid CPP headers):
18948 Move to...
18949 * tests/headers.at: here.
18950
18951 2001-12-29 Akim Demaille <akim@epita.fr>
18952
18953 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18954
18955 2001-12-29 Akim Demaille <akim@epita.fr>
18956
18957 * tests/actions.at (Mid-rule actions): Output on a single line
18958 instead of several.
18959
18960 2001-12-29 Akim Demaille <akim@epita.fr>
18961
18962 * doc/bison.texinfo: Formatting changes.
18963
18964 2001-12-29 Akim Demaille <akim@epita.fr>
18965
18966 Don't store the token defs in a muscle, just be ready to output it
18967 on command. Now possible via `symbols'. Fixes a memory leak.
18968
18969 * src/output.c (token_definitions_output): New.
18970 (output_parser, header_output): Use it.
18971 * src/reader.c (symbols_save): Remove.
18972
18973 2001-12-29 Akim Demaille <akim@epita.fr>
18974
18975 * src/bison.simple: Do not provide a default for YYSTYPE and
18976 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18977 default.
18978
18979 2001-12-29 Akim Demaille <akim@epita.fr>
18980
18981 Mid-rule actions are simply... ignored!
18982
18983 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18984 the empty-rule associated to the dummy symbol, not to the host
18985 rule.
18986 * tests/actions.at (Mid-rule actions): New.
18987
18988 2001-12-29 Akim Demaille <akim@epita.fr>
18989
18990 Memory leak.
18991
18992 * src/reader.c (reader): Free grammar.
18993
18994 2001-12-29 Akim Demaille <akim@epita.fr>
18995
18996 Memory leak.
18997
18998 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18999 since it allocates it for each state, although only one is needed.
19000 (allocate_storage): Do it here.
19001
19002 2001-12-29 Akim Demaille <akim@epita.fr>
19003
19004 * src/options.h, src/options.c (create_long_option_table): Rename
19005 as...
19006 (long_option_table_new): this, with a clearer prototype.
19007 (percent_table): Remove, unused,
19008 * src/getargs.c (getargs): Adjust.
19009
19010 2001-12-29 Akim Demaille <akim@epita.fr>
19011
19012 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19013 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19014 as states.
19015
19016 2001-12-29 Akim Demaille <akim@epita.fr>
19017
19018 * src/lalr.c (build_relations): Rename `states' as `states1'.
19019 Sorry, I don't understand exactly what it is, no better name...
19020
19021 2001-12-29 Akim Demaille <akim@epita.fr>
19022
19023 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19024 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19025 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19026 as rules.
19027
19028 2001-12-29 Akim Demaille <akim@epita.fr>
19029
19030 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19031 ago.
19032
19033 2001-12-29 Akim Demaille <akim@epita.fr>
19034
19035 * src/reader.c, src/reader.h (user_toknums): Remove.
19036 Adjust all users to use symbols[i]->user_token_number.
19037
19038 2001-12-29 Akim Demaille <akim@epita.fr>
19039
19040 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19041 Adjust all users to use symbols[i]->prec or ->assoc.
19042
19043 2001-12-29 Akim Demaille <akim@epita.fr>
19044
19045 * src/reader.c, src/reader.h (tags): Remove.
19046 Adjust all users to use symbols[i]->tag.
19047
19048 2001-12-29 Akim Demaille <akim@epita.fr>
19049
19050 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19051 and rule_table.
19052 * src/reader.c (packsymbols): Fill this table.
19053 Drop sprec.
19054 * src/conflicts.c (resolve_sr_conflict): Adjust.
19055 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19056 single table.
19057 Use symbols[i]->tag instead of tags[i].
19058
19059 2001-12-29 Akim Demaille <akim@epita.fr>
19060
19061 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19062 In addition, put a comment in there, to replace...
19063 * tests/regression.at (%union and C comments): Remove.
19064
19065 2001-12-29 Akim Demaille <akim@epita.fr>
19066
19067 * tests/regression.at (Web2c Actions): Blindly move the actual
19068 output as expected output. The contents *seem* right to me, but I
19069 can't pretend reading perfectly parser tables... Nonetheless, all
19070 the other tests pass correctly, the table look OK, even though the
19071 presence of `$axiom' is to be noted: AFAICS it is useless (but
19072 harmless).
19073
19074 2001-12-29 Akim Demaille <akim@epita.fr>
19075
19076 * src/reader.c (readgram): Don't add the rule 0 if there were no
19077 rules read. In other words, add it _after_ having performed
19078 grammar sanity checks.
19079 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19080
19081 2001-12-29 Akim Demaille <akim@epita.fr>
19082
19083 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19084 visible, and some states have now a different number.
19085
19086 2001-12-29 Akim Demaille <akim@epita.fr>
19087
19088 * src/reader.c (readgram): Bind the initial rule's lineno to that
19089 of the first rule.
19090 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19091 (Solved SR Conflicts): Adjust rule 0's line number.
19092
19093 2001-12-29 Akim Demaille <akim@epita.fr>
19094
19095 Fix the `GAWK Grammar' failure.
19096
19097 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19098 the reductions of the first state which was mistakenly confused
19099 with the final state because precisely final_state was initialized
19100 to 0.
19101 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19102 now noticed by Bison.
19103 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19104 have a reduction on $default.
19105
19106 2001-12-29 Akim Demaille <akim@epita.fr>
19107
19108 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19109 rule line numbers.
19110 * src/closure.c (print_closure): Likewise.
19111 * src/derives.c (print_derives): Likewise.
19112 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19113 now.
19114
19115 2001-12-29 Akim Demaille <akim@epita.fr>
19116
19117 * src/lalr.c (lookaheads_print): New.
19118 (lalr): Call it when --trace-flag.
19119 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19120 are dumped.
19121
19122 2001-12-29 Akim Demaille <akim@epita.fr>
19123
19124 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19125 when walking through ritem, even via rule->rhs.
19126 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19127 (useful_production, useless_nonterminals): Likewise.
19128 (reduce_grammar_tables): Likewise, plus update nritems.
19129 * src/nullable.c (set_nullable): Likewise.
19130 * src/lalr.c (build_relations): Likewise.
19131 * tests/sets.at (Nullable): Adjust.
19132 Fortunately, now, the $axiom is no longer nullable.
19133
19134 2001-12-29 Akim Demaille <akim@epita.fr>
19135
19136 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19137 the 0-sentinel.
19138 * src/gram.c (ritem_longest_rhs): Likewise.
19139 * src/reduce.c (nonterminals_reduce): Likewise.
19140 * src/print_graph.c (print_graph): Likewise.
19141 * src/output.c (output_rule_data): Likewise.
19142 * src/nullable.c (set_nullable): Likewise.
19143
19144 2001-12-29 Akim Demaille <akim@epita.fr>
19145
19146 * src/output.c: Comment changes.
19147
19148 2001-12-27 Paul Eggert <eggert@twinsun.com>
19149
19150 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19151 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19152 Sparc, as they were causing more porting problems than the
19153 (minor) performance improvement was worth.
19154
19155 Also, catch up with 1.31's YYSTD.
19156
19157 2001-12-27 Akim Demaille <akim@epita.fr>
19158
19159 * src/output.c (output_gram): Rely on nritems, not the
19160 0-sentinel. See below.
19161 Use -1 as separator, not 0.
19162 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19163 Rely on -1 as separator in yyrhs, instead of 0.
19164 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19165 twice `Now at end of input', therefore there are two lines less to
19166 expect.
19167
19168 2001-12-27 Akim Demaille <akim@epita.fr>
19169
19170 * tests/regression.at (Unresolved SR Conflicts):
19171 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19172 below.
19173
19174 2001-12-27 Akim Demaille <akim@epita.fr>
19175
19176 * src/LR0.c (new_state): Recognize the final state by the fact it
19177 is reached by eoftoken.
19178 (insert_start_shifting_state, insert_eof_shifting_state)
19179 (insert_accepting_state, augment_automaton): Remove, since now
19180 these states are automatically computed from the initial state.
19181 (generate_states): Adjust.
19182 * src/print.c: When reporting a rule number to the user, substract
19183 1, so that the axiom rule is rule 0, and the first user rule is 1.
19184 * src/reduce.c: Likewise.
19185 * src/print_graph.c (print_core): For the time being, just as for
19186 the report, depend upon --trace-flags to dump the full set of
19187 items.
19188 * src/reader.c (readgram): Once the grammar read, insert the rule
19189 0: `$axiom: START-SYMBOL $'.
19190 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19191 number of the states has changed (the final state is no longer
19192 necessarily the last), catch up.
19193
19194 2001-12-27 Akim Demaille <akim@epita.fr>
19195
19196 Try to make the use of the eoftoken valid. Given that its value
19197 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19198 is used instead of > 0 where appropriate, (ii), depend upon nritems
19199 instead of the 0-sentinel.
19200
19201 * src/gram.h, src/gram.c (nritems): New.
19202 Expected to be duplication of nitems, but for the time being...
19203 * src/reader.c (packgram): Assert nritems and nitems are equal.
19204 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19205 * src/closure.c (print_closure, print_fderives): Likewise.
19206 * src/gram.c (ritem_print): Likewise.
19207 * src/print.c (print_core, print_grammar): Likewise.
19208 * src/print_graph.c: Likewise.
19209
19210 2001-12-27 Akim Demaille <akim@epita.fr>
19211
19212 * src/main.c (main): If there are complains after grammar
19213 reductions, then output the report anyway if requested, then die.
19214 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19215 * src/reader.c (eoftoken): New.
19216 (parse_token_decl): If the token being defined has value `0', it
19217 is the eoftoken.
19218 (packsymbols): No longer hack `tags' to insert `$' by hand.
19219 Be sure to preserve the value of the eoftoken.
19220 (reader): Make sure eoftoken is defined.
19221 Initialize nsyms to 0: now eoftoken is created just like the others.
19222 * src/print.c (print_grammar): Don't special case the eof token.
19223 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19224 lie anyway, albeit pleasant.
19225 * tests/calc.at: Exercise error messages with eoftoken.
19226 Change the grammar so that empty input is invalid.
19227 Adjust expectations.
19228 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19229
19230 2001-12-27 Akim Demaille <akim@epita.fr>
19231
19232 * configure.in: Check the protos of strchr ans strspn.
19233 Replace strchr if needed.
19234 * src/system.h: Provide the protos of strchr, strspn and memchr if
19235 missing.
19236 * lib/strchr.c: New.
19237 * src/reader.c (symbols_save): Use strchr.
19238
19239 2001-12-27 Akim Demaille <akim@epita.fr>
19240
19241 * src/print.c, src/print_graph.c (escape): New.
19242 Use it to quote the TAGS outputs.
19243 * src/print_graph.c (print_state): Now errors are in red, and
19244 reductions in green.
19245 Prefer high to wide: output the state number on a line of its own.
19246
19247 2001-12-27 Akim Demaille <akim@epita.fr>
19248
19249 * src/state.h, src/state.c (reductions_new): New.
19250 * src/LR0.c (set_state_table): Let all the states have a
19251 `reductions', even if reduced to 0.
19252 (save_reductions): Adjust.
19253 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19254 * src/print.c (print_reductions, print_actions): Adjust.
19255 * src/output.c (action_row): Adjust.
19256
19257 2001-12-27 Akim Demaille <akim@epita.fr>
19258
19259 * src/state.h, src/state.c (errs_new, errs_dup): New.
19260 * src/LR0.c (set_state_table): Let all the states have an errs,
19261 even if reduced to 0.
19262 * src/print.c (print_errs, print_reductions): Adjust.
19263 * src/output.c (output_actions, action_row): Adjust.
19264 * src/conflicts.c (resolve_sr_conflict): Adjust.
19265
19266 2001-12-27 Akim Demaille <akim@epita.fr>
19267
19268 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19269
19270 2001-12-27 Akim Demaille <akim@epita.fr>
19271
19272 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19273 * src/print.c: here.
19274 (lookaheadset, shiftset): New, used as additional storage by
19275 print_reductions.
19276 (print_results): Adjust.
19277 (print_shifts, print_gotos, print_errs): New, extracted from...
19278 (print_actions): here.
19279 * src/print_graph.c (print_actions): Remove dead code.
19280
19281 2001-12-27 Akim Demaille <akim@epita.fr>
19282
19283 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19284 `$n' and `@n'.
19285
19286 2001-12-27 Akim Demaille <akim@epita.fr>
19287
19288 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19289 (build_relations): Adjust.
19290
19291 2001-12-27 Akim Demaille <akim@epita.fr>
19292
19293 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19294 duplication.
19295
19296 2001-12-27 Akim Demaille <akim@epita.fr>
19297
19298 * src/reader.c (packgram): Catch nitems overflows.
19299
19300 2001-12-27 Akim Demaille <akim@epita.fr>
19301
19302 * src/files.c, src/files.h (guard_obstack): Remove.
19303 * src/output.c (output): Adjust.
19304 * src/reader.c (parse_braces): New, factoring...
19305 (copy_action, copy_guard): these two which are renamed as...
19306 (parse_action, parse_guard): these.
19307 As a voluntary consequence, using braces around guards is now
19308 mandatory.
19309
19310 2001-12-27 Akim Demaille <akim@epita.fr>
19311
19312 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19313 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19314 members.
19315 (symbol_list_new): Adjust.
19316 (copy_action): action_line is the first line, not the last.
19317 (copy_guard): Just as for actions, store the `action' only, not
19318 the switch/case/break flesh.
19319 Don't parse the user action that might follow the guard, let...
19320 (readgram): do it, i.e., now, there can be an action after a
19321 guard.
19322 In other words the guard is just explicitly optional.
19323 (packgram): Adjust.
19324 * src/output.c (guards_output): New.
19325 (output_parser): Call it when needed.
19326 (output): Also free the guard and attrs obstacks.
19327 * src/files.c, src/files.h (obstack_save): Remove.
19328 (output_files): Remove.
19329 As a result, if one needs the former `.act' file, using an
19330 appropriate skeleton which requires actions and guards is now
19331 required.
19332 * src/main.c (main): Adjust.
19333 * tests/semantic.at: New.
19334 * tests/regression.at: Use `input.y' as input file name.
19335 Avoid 8+3 problems by requiring input.c when the test needs the
19336 parser.
19337
19338 2001-12-27 Akim Demaille <akim@epita.fr>
19339
19340 * src/reader.c (symbol_list_new): Be sure to initialize all the
19341 fields.
19342
19343 2001-12-27 Akim Demaille <akim@epita.fr>
19344
19345 All the hacks using a final pseudo state are now useless.
19346
19347 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19348 * src/lalr.c (nLA): New.
19349 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19350 instead of lookaheadsp from the pseudo state (nstate + 1).
19351
19352 2001-12-27 Akim Demaille <akim@epita.fr>
19353
19354 * src/output.c (action_row, token_actions): Use a state_t instead
19355 of a integer, and nlookaheads instead of the following state's
19356 lookaheadsp.
19357
19358 2001-12-27 Akim Demaille <akim@epita.fr>
19359
19360 * src/conflicts.c (log_resolution, flush_shift)
19361 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19362 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19363 (conflicts_print, print_reductions): Use a state_t instead of an
19364 integer when referring to a state.
19365 As much as possible, depend upon nlookaheads, instead of the
19366 `lookaheadsp' member of the following state (since lookaheads of
19367 successive states are successive, the difference between state n + 1
19368 and n served as the number of lookaheads for state n).
19369 * src/lalr.c (add_lookback_edge): Likewise.
19370 * src/print.c (print_core, print_actions, print_state)
19371 (print_results): Likewise.
19372 * src/print_graph.c (print_core, print_actions, print_state)
19373 (print_graph): Likewise.
19374 * src/conflicts.h: Adjust.
19375
19376 2001-12-27 Akim Demaille <akim@epita.fr>
19377
19378 * src/bison.hairy: Formatting/comment changes.
19379 ANSIfy.
19380 Remove `register' indications.
19381 Add plenty of `static'.
19382
19383 2001-12-27 Akim Demaille <akim@epita.fr>
19384
19385 * src/output.c (prepare): Drop the muscle `ntbase' which
19386 duplicates ntokens.
19387 * src/bison.simple: Formatting/comment changes.
19388 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19389 is an undocumented synonym.
19390
19391 2001-12-22 Akim Demaille <akim@epita.fr>
19392
19393 * src/output.c (output_table_data): Change the prototype to use
19394 `int' for array ranges: some invocations do pass an int, not a
19395 short.
19396 Reported by Wayne Green.
19397
19398 2001-12-22 Akim Demaille <akim@epita.fr>
19399
19400 Some actions of web2c.y are improperly triggered.
19401 Reported by Mike Castle.
19402
19403 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19404 * tests/regression.at (Web2c): Rename as...
19405 (Web2c Report): this.
19406 (Web2c Actions): New.
19407
19408 2001-12-22 Akim Demaille <akim@epita.fr>
19409
19410 Reductions in web2c.y are improperly reported.
19411 Reported by Mike Castle.
19412
19413 * src/conflicts.c (print_reductions): Fix.
19414 * tests/regression.at (Web2c): New.
19415
19416 2001-12-18 Akim Demaille <akim@epita.fr>
19417
19418 Some host fail on `assert (!"foo")', which expands to
19419 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19420 Reported by Nelson Beebee.
19421
19422 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19423 `#define it_succeeded 0' and `assert (it_succeeded)'.
19424
19425 2001-12-17 Marc Autret <autret_m@epita.fr>
19426
19427 * src/bison.simple: Don't hard code the skeleton line and filename.
19428 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19429 New line counter 'skeleton_line' (skeleton-line muscle).
19430
19431 2001-12-17 Paul Eggert <eggert@twinsun.com>
19432
19433 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19434 YYDEBUG must be defined to a nonzero value.
19435
19436 * src/bison.simple (yytname): Do not assume that the user defines
19437 YYDEBUG to a properly parenthesized expression.
19438
19439 2001-12-17 Akim Demaille <akim@epita.fr>
19440
19441 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19442 nlookaheads is a new member.
19443 Adjust all users.
19444 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19445 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19446 state.
19447
19448 2001-12-17 Akim Demaille <akim@epita.fr>
19449
19450 * src/files.h, src/files.c (open_files, close_files): Remove.
19451 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19452 let...
19453 * src/reader.c (reader): Do it.
19454
19455 2001-12-17 Akim Demaille <akim@epita.fr>
19456
19457 * src/conflicts.c (print_reductions): Formatting changes.
19458
19459 2001-12-17 Akim Demaille <akim@epita.fr>
19460
19461 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19462 (flush_reduce): New.
19463 (resolve_sr_conflict): Adjust.
19464
19465 2001-12-17 Akim Demaille <akim@epita.fr>
19466
19467 * src/output.c (output_obstack): Be static and rename as...
19468 (format_obstack): this, to avoid any confusion with files.c's
19469 output_obstack.
19470 * src/reader.h (muscle_obstack): Move to...
19471 * src/output.h: here, since it's defined in output.c.
19472
19473 2001-12-17 Akim Demaille <akim@epita.fr>
19474
19475 * src/output.c (action_row, save_column, default_goto)
19476 (sort_actions, matching_state, pack_vector): Better variable
19477 locality.
19478
19479 2001-12-17 Akim Demaille <akim@epita.fr>
19480
19481 * src/output.c: Various formatting changes.
19482
19483 2001-12-17 Akim Demaille <akim@epita.fr>
19484
19485 * src/files.c (output_files): Free the output_obstack.
19486 * src/main.c (main): Call print and print_graph conditionally.
19487 * src/print.c (print): Work unconditionally.
19488 * src/print_graph.c (print_graph): Work unconditionally.
19489 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19490
19491 2001-12-16 Marc Autret <autret_m@epita.fr>
19492
19493 * src/output.c (actions_output): Fix. When we use %no-lines,
19494 there is one less line per action.
19495
19496 2001-12-16 Marc Autret <autret_m@epita.fr>
19497
19498 * src/bison.simple: Remove a useless #line directive.
19499 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19500 * src/output.c (get_lines_number): New.
19501 (output_parser): Adjust, now takes care about the lines of a
19502 output muscles.
19503 Fix line numbering.
19504 (actions_output): Computes the number of lines taken by actions.
19505 (output_master_parser): Insert new skeleton which is the name of
19506 the output parser file name.
19507
19508 2001-12-15 Marc Autret <autret_m@epita.fr>
19509
19510 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19511
19512 2001-12-15 Marc Autret <autret_m@epita.fr>
19513
19514 * src/output.c (output_gram): Keep track of the hairy one.
19515
19516 2001-12-15 Akim Demaille <akim@epita.fr>
19517
19518 Make `make distcheck' work.
19519
19520 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19521 system.h which uses libgettext.h.
19522
19523 2001-12-15 Akim Demaille <akim@epita.fr>
19524
19525 * src/nullable.c (set_nullable): Useless rules must be skipped,
19526 otherwise, since we range over their symbols, we might look at a
19527 nonterminal which no longer ``exists'', i.e., it is not counted in
19528 `nvars', hence we overflow our arrays.
19529
19530 2001-12-15 Akim Demaille <akim@epita.fr>
19531
19532 The header can also be produced directly, without any obstack!
19533 Yahoo!
19534
19535 * src/files.c, src/files.h (defines_obstack): Remove.
19536 (compute_header_macro): Global.
19537 (defines_obstack_save): Remove.
19538 * src/reader.c (parse_union_decl): No longer output to
19539 defines_obstack: its content can be found in the `stype' muscle
19540 anyway.
19541 (output_token_translations): Merge into...
19542 (symbols_output): this.
19543 Rename as...
19544 (symbols_save): this.
19545 (reader): Adjust.
19546 * src/output.c (header_output): New.
19547 (output): Call it.
19548
19549 2001-12-15 Akim Demaille <akim@epita.fr>
19550
19551 * src/reader.c (parse_union_decl): Instead of handling two obstack
19552 simultaneously, use one to define the `stype' muscle, and use the
19553 value of the latter to fill defines_obstack.
19554 (copy_comment): Remove.
19555 (copy_comment2): Work for a single obstack.
19556 Rename as...
19557 (copy_comment): this.
19558
19559 2001-12-15 Akim Demaille <akim@epita.fr>
19560
19561 * src/lex.c, src/lex.h (xgetc): No longer static.
19562 * src/reader.c (parse_union_decl): Revamp.
19563
19564 2001-12-15 Akim Demaille <akim@epita.fr>
19565
19566 Still making progress in separating Bison into (i) input, (ii)
19567 process, (iii) output: now we can directly output the parser file
19568 without using table_obstack at all.
19569
19570 * src/files.c, src/files.h (table_obstack): Bye bye.
19571 (parser_file_name): New.
19572 * src/files.c (compute_output_file_names): Compute it.
19573 * src/output.c (actions_output, output_parser)
19574 (output_master_parser): To a file instead of an obstack.
19575
19576 2001-12-15 Akim Demaille <akim@epita.fr>
19577
19578 Attach actions to rules, instead of pre-outputting them to
19579 actions_obstack.
19580
19581 * src/gram.h (rule_t): action and action_line are new members.
19582 * src/reader.c (symbol_list): Likewise.
19583 (copy_action): Save the actions within the rule.
19584 (packgram): Save them in rule_table.
19585 * src/output.c (actions_output): New.
19586 (output_parser): Use it on `%%actions'.
19587 (output_rule_data): Don't free rule_table.
19588 (output): Do it.
19589 (prepare): Don't save the `action' muscle.
19590 * src/bison.simple: s/%%action/%%actions/.
19591
19592 2001-12-15 Akim Demaille <akim@epita.fr>
19593
19594 * src/reader.c (copy_action): When --yacc, don't append a `;'
19595 to the user action: let it fail if lacking.
19596 Suggested by Arnold Robbins and Tom Tromey.
19597
19598 2001-12-14 Akim Demaille <akim@epita.fr>
19599
19600 * src/lex.c (literalchar): Simply return the char you decoded, non
19601 longer mess around with obstacks and int pointers.
19602 Adjust all callers.
19603
19604 2001-12-14 Akim Demaille <akim@epita.fr>
19605
19606 * src/lex.c (literalchar): Don't escape the special characters,
19607 just decode them, and keep them as char (before, eol was output as
19608 the 2 char string `\n' etc.).
19609 * src/output.c (output_rule_data): Use quotearg to output the
19610 token strings.
19611
19612 2001-12-13 Paul Eggert <eggert@twinsun.com>
19613
19614 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19615 Do not infringe on the global user namespace when using C++.
19616 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19617 All uses of `fprintf' and `stderr' changed.
19618
19619 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19620
19621 2001-12-13 Akim Demaille <akim@epita.fr>
19622
19623 The computation of nullable is broken: it doesn't handle empty
19624 RHS's properly.
19625
19626 * tests/torture.at (GNU AWK Grammar): New.
19627 * tests/sets.at (Nullable): New.
19628 * src/nullable.c (set_nullable): Instead of blindly looping over
19629 `ritems', loop over the rules, and then over their rhs's.
19630
19631 Work around Autotest bugs.
19632
19633 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19634 frame, because Autotest understand lines starting with a `+' as
19635 traces from the shell. Then, they are not processed properly.
19636 Admittedly an Autotest bug, but we don't have time to wait for
19637 Autotest to catch up.
19638 * tests/regression.at (Broken Closure): Adjust to the new table
19639 frames.
19640 Move to...
19641 * tests/sets.at: here.
19642
19643 2001-12-13 Akim Demaille <akim@epita.fr>
19644
19645 * src/closure.c (closure): Use nrules instead of playing tricks
19646 with BITS_PER_WORD.
19647
19648 2001-12-13 Akim Demaille <akim@epita.fr>
19649
19650 * src/print.c (print_actions): Output the handling of `$' as the
19651 traces do: shifting the token EOF. Before EOF was treated as a
19652 nonterminal.
19653 * tests/regression.at: Adjust some tests.
19654 * src/print_graph.c (print_core): Complete the set of items via
19655 closure. The next-to-final and final states are still unsatisfying,
19656 but that's to be addressed elsewhere.
19657 No longer output the rule numbers, but do output the state number.
19658 A single loop for the shifts + gotos is enough, but picked a
19659 distinct color for each.
19660 (print_graph): Initialize and finalize closure.
19661
19662 2001-12-13 Akim Demaille <akim@epita.fr>
19663
19664 * src/reader.c (readgram): Remove dead code, an strip useless
19665 braces.
19666 (get_type): Remove, unused.
19667
19668 2001-12-12 Akim Demaille <akim@epita.fr>
19669
19670 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19671 on that of lib/error.c.
19672
19673 2001-12-12 Akim Demaille <akim@epita.fr>
19674
19675 Some hosts don't like `/' in includes.
19676
19677 * src/system.h: Include libgettext.h without qualifying the path.
19678 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19679 $(top_srcdir).
19680
19681 2001-12-11 Marc Autret <autret_m@epita.fr>
19682
19683 * src/output.c (output_parser): Remove useless muscle.
19684
19685 2001-12-11 Marc Autret <autret_m@epita.fr>
19686
19687 * src/bison.simple: Remove #line just before %%epilogue. It
19688 is now handled in ...
19689 * src/reader.c (read_additionnal_code): Add the output of a
19690 #line for the epilogue.
19691
19692 2001-12-10 Marc Autret <autret_m@epita.fr>
19693
19694 * src/reader.c (copy_definition): Re-use CPP-outed code which
19695 replace precedent remove.
19696 * src/bison.simple: Remove #line before %%prologue because
19697 %%input-line is wrong at this time.
19698
19699 2001-12-10 Marc Autret <autret_m@epita.fr>
19700
19701 * src/reader.c (symbols_output): Clean up.
19702 * src/output.c (output_gram, output): Clean up.
19703
19704 2001-12-10 Akim Demaille <akim@epita.fr>
19705
19706 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19707 * src/LR0.c (set_state_table): here.
19708 * src/lalr.c (lalr): Call it.
19709
19710 2001-12-10 Akim Demaille <akim@epita.fr>
19711
19712 * src/state.h (shifts): Remove the `number' member: shifts are
19713 attached to state, hence no longer need to be labelled with a
19714 state number.
19715
19716 2001-12-10 Akim Demaille <akim@epita.fr>
19717
19718 Now that states have a complete set of members, the linked list of
19719 shifts is useless: just fill directly the state's shifts member.
19720
19721 * src/state.h (shifts): Remove the `next' member.
19722 * src/LR0.c (first_state, last_state): Remove.
19723 Adjust the callers.
19724 (augment_automaton): Don't look for the shifts that must be added
19725 a shift on EOF: it is those of the state we looked for! But now,
19726 since shifts are attached, it is no longer needed to looking
19727 merely by its id: its number.
19728
19729 2001-12-10 Akim Demaille <akim@epita.fr>
19730
19731 * src/LR0.c (augment_automaton): Better variable locality.
19732 Remove an impossible branch: if there is a state corresponding to
19733 the start symbol being shifted, then there is shift for the start
19734 symbol from the initial state.
19735
19736 2001-12-10 Akim Demaille <akim@epita.fr>
19737
19738 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19739 only when appropriate: when insert_start_shifting_state' is not
19740 invoked.
19741 * tests/regression.at (Rule Line Numbers): Adjust.
19742
19743 2001-12-10 Akim Demaille <akim@epita.fr>
19744
19745 * src/LR0.c (augment_automaton): Now that all states have shifts,
19746 merge the two cases addition shifts to the initial state.
19747
19748 2001-12-10 Akim Demaille <akim@epita.fr>
19749
19750 * src/lalr.c (set_state_table): Move to...
19751 * src/LR0.c: here.
19752 * src/lalr.c (lalr): Don't call it...
19753 * src/LR0.c (generate_states): do it.
19754 * src/LR0.h (first_state): Remove, only the table is used.
19755
19756 2001-12-10 Akim Demaille <akim@epita.fr>
19757
19758 * src/LR0.h (first_shift, first_reduction): Remove.
19759 * src/lalr.c: Don't use first_shift: find shifts through the
19760 states.
19761
19762 2001-12-10 Akim Demaille <akim@epita.fr>
19763
19764 * src/LR0.c: Attach shifts to states as soon as they are
19765 computed.
19766 * src/lalr.c (set_state_table): Instead of assigning shifts to
19767 state, just assert that the mapping was properly done.
19768
19769 2001-12-10 Akim Demaille <akim@epita.fr>
19770
19771 * src/LR0.c (insert_start_shift): Rename as...
19772 (insert_start_shifting_state): this.
19773 (insert_eof_shifting_state, insert_accepting_state): New.
19774 (augment_automaton): Adjust.
19775 Better locality of the variables.
19776 When looking if the start_symbol is shifted from the initial
19777 state, using `while (... symbol != start_symbol ...)' sounds
19778 better than `while (... symbol < start_symbol ...)': If fail
19779 to see how the order between symbols could be relevant!
19780
19781 2001-12-10 Akim Demaille <akim@epita.fr>
19782
19783 * src/getargs.h: Don't declare `spec_name_prefix' and
19784 `spec_file_prefix', declared by src/files.h.
19785 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19786 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19787 * src/output.c (prepare): Adjust.
19788 * src/reader.c (symbols_output): Likewise.
19789 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19790
19791 2001-12-10 Akim Demaille <akim@epita.fr>
19792
19793 * src/muscle_tab.c (muscle_init): NULL is a better default than
19794 `"0"'.
19795
19796 2001-12-10 Akim Demaille <akim@epita.fr>
19797
19798 * src/reader.c (reader): Calling symbols_output once is enough.
19799
19800 2001-12-10 Akim Demaille <akim@epita.fr>
19801
19802 Now that states have a complete set of members, the linked list of
19803 reductions is useless: just fill directly the state's reductions
19804 member.
19805
19806 * src/state.h (struct reductions): Remove member `number' and
19807 `next'.
19808 * src/LR0.c (first_reduction, last_reduction): Remove.
19809 (save_reductions): Don't link the new reductions, store them in
19810 this_state.
19811 * src/lalr.c (set_state_table): No need to attach reductions to
19812 states, it's already done.
19813 * src/output.c (output_actions): No longer free the shifts, then
19814 the reductions, then the states: free all the states and their
19815 members.
19816
19817 2001-12-10 Akim Demaille <akim@epita.fr>
19818
19819 * src/options.c (OPTN, DRTV, BOTH): New.
19820 (option_table): Use them.
19821
19822 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19823 the job of system.h.
19824 * src/options.c: Don't include stdio.h and xalloc.h for the same
19825 reasons.
19826
19827 2001-12-10 Akim Demaille <akim@epita.fr>
19828
19829 * src/output.c (output, prepare): Make sure the values of the
19830 muscles `action' and `prologue' are 0-terminated.
19831
19832 2001-12-10 Akim Demaille <akim@epita.fr>
19833
19834 Clean up GCC warnings.
19835
19836 * src/reader.c (copy_action): `buf' is not used.
19837 (parse_skel_decl): Be static.
19838 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19839 * src/options.h (create_long_option_table): Have a real prototype.
19840 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19841 (hash_delete_at): Return const void *.
19842 Adjust casts to preserve the const.
19843
19844 2001-12-10 Akim Demaille <akim@epita.fr>
19845
19846 * configure.in: Require 2.52g.
19847 M4 is not needed, but AUTOM4TE is.
19848 * m4/m4.m4: Remove.
19849 * tests/Makefile.am: Adjust.
19850
19851 2001-12-10 Akim Demaille <akim@epita.fr>
19852
19853 One structure for states is enough, even though theoretically
19854 there are LR(0) states and LALR(1) states.
19855
19856 * src/lalr.h (state_t): Remove.
19857 (state_table): Be state_t **, not state_t *.
19858 * src/state.h (core, CORE_ALLOC): Rename as...
19859 (state_t, STATE_ALLOC): this.
19860 Add the LALR(1) members: shifts, reductions, errs.
19861 * src/LR0.c (state_table): Rename as...
19862 (state_hash): this, to avoid name clashes with the global
19863 `state_table'.
19864 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19865 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19866
19867 2001-12-10 Akim Demaille <akim@epita.fr>
19868
19869 Bison dumps core on bash.y.
19870 Reported by Pascal Bart.
19871
19872 * src/warshall.c (bitmatrix_print): New.
19873 (TC): Use it.
19874 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19875 j must be the outer loop.
19876 * tests/regression.at (Broken Closure): New.
19877
19878 2001-12-05 Akim Demaille <akim@epita.fr>
19879
19880 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19881 its argument.
19882 Reported by Peter Hamorsky.
19883
19884 2001-12-05 Akim Demaille <akim@epita.fr>
19885
19886 * src/conflicts.c (err_table): Remove.
19887 (resolve_sr_conflict): Adjust.
19888 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19889 Rename as...
19890 (state_t.reductions, state_t.shifts): this.
19891
19892 2001-12-05 Akim Demaille <akim@epita.fr>
19893
19894 * src/reduce.c (reduce_grammar_tables): No longer disable the
19895 removal of useless rules via CPP but via `if (0)', so that the
19896 compiler still check the code is valid.
19897 For instance, it should have noticed `rline' no longer exists: use
19898 the `line' member of rule_t.
19899 * src/gram.c (dummy, rline): Remove, unused.
19900
19901 2001-12-05 Akim Demaille <akim@epita.fr>
19902
19903 * src/output.c (pack_vector): Use assert, not berror.
19904 * src/main.c (berror): Remove, unused.
19905
19906 2001-12-05 Akim Demaille <akim@epita.fr>
19907
19908 New experimental feature: if --verbose --trace output all the
19909 items of a state, not only its kernel.
19910
19911 * src/print.c (print_core): If `trace_flag', then invoke closure
19912 before outputting the items of the state (print_core is no longer
19913 a correct name them).
19914 (print_results): Invoke new_closure/free_closure if needed.
19915
19916 2001-12-05 Akim Demaille <akim@epita.fr>
19917
19918 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19919 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19920 (nitemset): for consistency with the rest of the project.
19921
19922 2001-12-05 Akim Demaille <akim@epita.fr>
19923
19924 * src/closure.c (print_closure): Improve.
19925 (closure): Use it for printing input and output.
19926
19927 2001-12-05 Akim Demaille <akim@epita.fr>
19928
19929 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19930 indexed by nonterminals.
19931
19932 2001-12-05 Akim Demaille <akim@epita.fr>
19933
19934 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19935 what it was!).
19936 * src/warshall.h: Remove accidental duplication of the content.
19937
19938 2001-12-05 Akim Demaille <akim@epita.fr>
19939
19940 * src/closure.c (set_fderives): De-obfuscate.
19941
19942 2001-12-05 Akim Demaille <akim@epita.fr>
19943
19944 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19945
19946 2001-12-05 Akim Demaille <akim@epita.fr>
19947
19948 * src/closure.c (set_firsts): De-obfuscate.
19949
19950 2001-12-05 Akim Demaille <akim@epita.fr>
19951
19952 * src/output.c (action_row): De-obfuscate
19953 using the good o' techniques: arrays not pointers, variable
19954 locality, BITISSET, RESETBIT etc.
19955
19956 2001-12-05 Akim Demaille <akim@epita.fr>
19957
19958 Pessimize the code to simplify it: from now on, all the states
19959 have a valid SHIFTS, which NSHIFTS is possibly 0.
19960
19961 * src/LR0.c (shifts_new): Be global and move to..
19962 * src/state.c, src/state.h: here.
19963 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19964 * src/print_graph: Adjust.
19965
19966 2001-12-05 Akim Demaille <akim@epita.fr>
19967
19968 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19969 * src/conflicts.c: Use it.
19970 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19971 incorrectly ``simplified''.
19972
19973 2001-12-05 Akim Demaille <akim@epita.fr>
19974
19975 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19976 using the good o' techniques: arrays not pointers, variable
19977 locality, BITISSET, RESETBIT etc.
19978
19979 2001-12-05 Akim Demaille <akim@epita.fr>
19980
19981 * src/state.h (SHIFT_SYMBOL): New.
19982 * src/conflicts.c: Use it to deobfuscate.
19983
19984 2001-12-05 Akim Demaille <akim@epita.fr>
19985
19986 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19987 (print_reductions): De-obfuscate using the good o' techniques:
19988 arrays not pointers, variable locality, BITISSET.
19989
19990 2001-12-05 Akim Demaille <akim@epita.fr>
19991
19992 * src/conflicts.c (print_reductions): Arrays, not pointers.
19993 Use BITISSET.
19994
19995 2001-12-05 Akim Demaille <akim@epita.fr>
19996
19997 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19998
19999 2001-12-05 Akim Demaille <akim@epita.fr>
20000
20001 * src/conflicts.c (print_reductions): Improve variable locality.
20002
20003 2001-12-05 Akim Demaille <akim@epita.fr>
20004
20005 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20006
20007 2001-12-05 Akim Demaille <akim@epita.fr>
20008
20009 * src/conflicts.c (print_reductions): Improve variable locality.
20010
20011 2001-12-05 Akim Demaille <akim@epita.fr>
20012
20013 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20014 * src/lalr.c: Use them.
20015
20016 2001-12-05 Akim Demaille <akim@epita.fr>
20017
20018 * src/LR0.c (augment_automaton): Formatting changes.
20019 Better variable locality.
20020
20021 2001-12-05 Akim Demaille <akim@epita.fr>
20022
20023 * src/lalr.c (matrix_print): New.
20024 (transpose): Use it.
20025 Use arrays instead of pointers.
20026
20027 2001-12-05 Akim Demaille <akim@epita.fr>
20028
20029 * src/lalr.c (maxrhs): Move to...
20030 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20031 * src/lalr.c (build_relations): Adjust.
20032
20033 2001-12-05 Akim Demaille <akim@epita.fr>
20034
20035 * src/lalr.c (transpose): Free the memory allocated to the
20036 argument, as it is replaced by the results by the unique caller.
20037 (build_relations): Merely invoke transpose: it handles the memory
20038 deallocation.
20039 Improve variable locality.
20040 Avoid variables used as mere abbreviations.
20041 (compute_lookaheads): Use arrays instead of pointers.
20042
20043 2001-12-05 Akim Demaille <akim@epita.fr>
20044
20045 * src/lalr.c (initialize_F): Improve variable locality.
20046 Avoid variables used as mere abbreviations.
20047
20048 2001-12-05 Akim Demaille <akim@epita.fr>
20049
20050 * src/derives.c (print_derives): Display the ruleno.
20051 * src/lalr.c (initialize_F, transpose): Better variable locality
20052 to improve readability.
20053 Avoid variables used as mere abbreviations.
20054
20055 2001-12-05 Akim Demaille <akim@epita.fr>
20056
20057 * src/lalr.c (traverse): Use arrays instead of pointers.
20058
20059 2001-12-05 Akim Demaille <akim@epita.fr>
20060
20061 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20062 the handling of squeue.
20063 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20064
20065 2001-12-05 Akim Demaille <akim@epita.fr>
20066
20067 Because useless nonterminals are now kept alive (instead of being
20068 `destroyed'), we now sometimes examine them, and store information
20069 related to them. Hence we need to know their number, and adjust
20070 memory allocations.
20071
20072 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20073 static.
20074 * src/LR0.c (allocate_itemsets): The memory allocated to
20075 `symbol_count' was used for two different purpose: once to count
20076 the number of occurrences of each symbol, and later reassigned to
20077 `shift_symbol', containing the symbol that can be shifted from a
20078 given state.
20079 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20080 only, and...
20081 (new_itemsets): Allocate `shift_symbol' here.
20082 (allocate_itemsets): symbol_count includes useless nonterminals.
20083 Make room for them.
20084 (free_storage): Use `free', not `XFREE', for pointers that cannot
20085 be null.
20086
20087 2001-12-05 Akim Demaille <akim@epita.fr>
20088
20089 * src/nullable.c (set_nullable): Deobfuscate the handling of
20090 ritem.
20091 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20092
20093 2001-12-05 Akim Demaille <akim@epita.fr>
20094
20095 * src/gram.c, src/gram.h (ritem_print): New.
20096 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20097 (This useless function was defined only to work around VMS linkers
20098 that can't handle compilation units with variables only).
20099 * src/reduce.c (dump_grammar): Use it to trace the construction of
20100 ritem.
20101
20102 2001-12-04 Paul Eggert <eggert@twinsun.com>
20103
20104 * src/bison.simple (union yyalloc): Change member names
20105 to be the same as the stack names.
20106 (yyparse): yyptr is now union yyalloc *, not char *.
20107 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20108 and may generate better code on some machines.
20109 (yystpcpy): Use prototype if __STDC__ is defined, not just
20110 if __cplusplus is defined.
20111
20112 2001-11-30 Akim Demaille <akim@epita.fr>
20113
20114 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20115 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20116 Gettext doesn't compile cleanly, and dies with -Werror.
20117 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20118 Include WARNING_CFLAGS here.
20119 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20120 before being defined.
20121
20122 2001-11-27 Paul Eggert <eggert@twinsun.com>
20123
20124 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20125 First arg is int, not unsigned.
20126 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20127 (SIZE_MAX, UINT_MAX): New macros.
20128 (quotearg_n_options): Abort if N is negative.
20129 Avoid overflow check on hosts where size_t is 64 bits and int
20130 is 32 bits, as overflow is impossible there.
20131 Fix off-by-one typo that caused unnecessary reallocation.
20132
20133 2001-11-29 Paul Eggert <eggert@twinsun.com>
20134
20135 Name space cleanup in generated parser.
20136
20137 * doc/bison.texinfo (Bison Parser): Discuss system headers
20138 and their effect on the user name space.
20139
20140 * src/bison.simple:
20141 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20142 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20143 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20144
20145 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20146 on user names when possible.
20147
20148 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20149 Simplify test for whather <alloca.h> exists.
20150
20151 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20152
20153 (<stdio.h>): Include if YYDEBUG.
20154
20155 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20156 ! defined (yyoverflow) && ! defined (yymemcpy).
20157
20158 (yymemcpy, yyparse): Rename local variables as needed so that
20159 they all begin with 'yy'.
20160
20161 (yystrlen, yystpcpy): New functions.
20162
20163 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20164 All uses changed.
20165
20166 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20167 instead of relying on string.h functions. Use YYSTACK_ALLOC
20168 and YYSTACK_FREE instead of malloc and free.
20169
20170 2001-11-30 Akim Demaille <akim@epita.fr>
20171
20172 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20173 before their first uses.
20174 (YYBISON, YYPURE): Move to the top of the output.
20175
20176 2001-11-30 Akim Demaille <akim@epita.fr>
20177
20178 * tests/reduce.at (Useless Nonterminals): Fix.
20179
20180 2001-11-30 Akim Demaille <akim@epita.fr>
20181
20182 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20183 if body instead of `;' to pacify GCC's warnings.
20184
20185 2001-11-30 Akim Demaille <akim@epita.fr>
20186
20187 Instead of mapping the LHS of unused rules to -1, keep the LHS
20188 valid, but flag the rules as invalid.
20189
20190 * src/gram.h (rule_t): `useful' is a new member.
20191 * src/print.c (print_grammar): Adjust.
20192 * src/derives.c (set_derives): Likewise.
20193 * src/reader.c (packgram, reduce_output): Likewise.
20194 * src/reduce.c (reduce_grammar_tables): Likewise.
20195 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20196
20197 2001-11-30 Akim Demaille <akim@epita.fr>
20198
20199 * src/reduce.c (reduce_output): Formatting changes.
20200 * src/print.c (print_results, print_grammar): Likewise.
20201 * tests/regression.at (Rule Line Numbers)
20202 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20203
20204 2001-11-30 Akim Demaille <akim@epita.fr>
20205
20206 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20207 useless nonterminals, move them at the end of the symbol arrays.
20208 (reduce_output): Adjust.
20209 * tests/reduce.at (Useless Nonterminals): Adjust.
20210
20211 2001-11-30 Akim Demaille <akim@epita.fr>
20212
20213 * src/reduce.c: Various comment/formatting changes.
20214 (nonterminals_reduce): New, extracted from...
20215 (reduce_grammar_tables): here.
20216 (reduce_grammar): Call nonterminals_reduce.
20217
20218 2001-11-29 Paul Eggert <eggert@twinsun.com>
20219
20220 * src/bison.simple (YYSTACK_REALLOC): Remove.
20221 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20222 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20223 New macros.
20224 (union yyalloc): New type.
20225 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20226 an arbitrary restriction on hosts where size_t is wider than int.
20227
20228 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20229 a parser stack overflow. Allocate just one block of memory for all
20230 three stacks, instead of allocating three blocks; this typically is
20231 faster and reduces fragmentation.
20232
20233 Do not limit the number of items in the stack to a value that fits
20234 in 'int', as this is an arbitrary limit on hosts with 64-bit
20235 size_t and 32-bit int.
20236
20237 2001-11-29 Marc Autret <autret_m@epita.fr>
20238
20239 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20240 of defining YYERROR_VERBOSE.
20241 [AT_DATA]: $4 is now out of C declarations in the prologue.
20242
20243 2001-11-28 Marc Autret <autret_m@epita.fr>
20244
20245 * src/reader.c (parse_dquoted_param): New.
20246 (parse_skel_decl): Use it.
20247 * src/lex.h: Add its prototype.
20248 * src/lex.c (literalchar): Become not static.
20249
20250 2001-11-28 Marc Autret <autret_m@epita.fr>
20251
20252 * src/output.h: And put its extern declaration here.
20253 * src/output.c (error_verbose): Define here.
20254 (prepare): Echo name modification.
20255 * src/getargs.h: Clean its extern declaration.
20256 * src/getargs.c (error_verbose_flag): Remove.
20257 (getargs): Remove case 'e'.
20258 * src/options.c (option_table): 'error-verbose' is now seen as simple
20259 percent option.
20260 Include output.h.
20261
20262 * src/reader.c (read_declarations): Remove case tok_include.
20263 (parse_include_decl): Remove.
20264 * src/lex.h (token_t): Remove tok_include.
20265 * src/options.c (option_table): 'include' is now a simple command line
20266 option.
20267
20268 2001-11-28 Marc Autret <autret_m@epita.fr>
20269
20270 * src/bison.simple: Adjust muscle names.
20271 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20272 * src/output.c (prepare): s/_/-/ for the muscles names.
20273 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20274
20275 2001-11-28 Marc Autret <autret_m@epita.fr>
20276
20277 * src/bison.simple: Fix debug.
20278 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20279
20280 2001-11-28 Akim Demaille <akim@epita.fr>
20281
20282 * src/LR0.c (shifts_new): New.
20283 (save_shifts, insert_start_shift, augment_automaton): Use it.
20284
20285 2001-11-28 Akim Demaille <akim@epita.fr>
20286
20287 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20288 keep ruleno only.
20289
20290 2001-11-28 Akim Demaille <akim@epita.fr>
20291
20292 * src/closure.c (closure): Instead of looping over word in array
20293 then bits in words, loop over bits in array.
20294
20295 2001-11-28 Akim Demaille <akim@epita.fr>
20296
20297 * src/closure.c (closure): No longer optimize the special case
20298 where all the bits of `ruleset[r]' are set to 0, to make the code
20299 clearer.
20300
20301 2001-11-28 Akim Demaille <akim@epita.fr>
20302
20303 * src/closure.c (closure): `r' and `c' are new variables, used to
20304 de-obfuscate accesses to RULESET and CORE.
20305
20306 2001-11-28 Akim Demaille <akim@epita.fr>
20307
20308 * src/reduce.c (reduce_print): Use ngettext.
20309 (dump_grammar): Improve the trace accuracy.
20310
20311 2001-11-28 Akim Demaille <akim@epita.fr>
20312
20313 * src/reduce.c (dump_grammar): Don't translate trace messages.
20314
20315 2001-11-28 Akim Demaille <akim@epita.fr>
20316
20317 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20318 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20319 as all tags are free'ed afterwards.
20320 From Enrico Scholz.
20321
20322 2001-11-27 Paul Eggert <eggert@twinsun.com>
20323
20324 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20325 use alloca when we didn't want to, and vice versa.
20326
20327 2001-11-27 Marc Autret <autret_m@epita.fr>
20328
20329 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20330 initialization.
20331 * src/output.c (prepare): Remove its update.
20332
20333 2001-11-27 Marc Autret <autret_m@epita.fr>
20334
20335 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20336 Use %error-verbose.
20337
20338 2001-11-27 Marc Autret <autret_m@epita.fr>
20339
20340 * src/bison.simple: Remove YYERROR_VERBOSE using.
20341 Use %%error_verbose.
20342 (yyparse): Likewise.
20343 * src/output.c (prepare): Give its final value.
20344 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20345 * src/getargs.h: Add its extern declaration.
20346 * src/getargs.c (error_verbose_flag): New int.
20347 (getargs): Update to catch new case.
20348 * src/options.c (option_table): 'error-verbose' is a new option.
20349 (shortopts): Update.
20350
20351 2001-11-27 Akim Demaille <akim@epita.fr>
20352
20353 * src/system.h: Use intl/libgettext.h.
20354 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20355
20356 2001-11-27 Akim Demaille <akim@epita.fr>
20357
20358 * tests/torture.at (Exploding the Stack Size with Malloc):
20359 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20360
20361 2001-11-27 Akim Demaille <akim@epita.fr>
20362
20363 * src/files.c: Include error.h.
20364 Reported by Hans Aberg.
20365
20366 2001-11-26 Marc Autret <autret_m@epita.fr>
20367
20368 * src/reader.c (parse_include_decl): New, not yet implemented.
20369 (read_declarations): Add case tok_include.
20370 * src/getargs.h (include): Add its extern definition.
20371 * src/getargs.c (include): New const char *.
20372 (getargs): Add case '-I'.
20373 * src/options.c (option_table): Add include as command line and
20374 percent option.
20375 * src/lex.h (token_t): Add tok_include.
20376
20377 2001-11-26 Akim Demaille <akim@epita.fr>
20378
20379 * src/reader.c (readgram): Make sure rules for mid-rule actions
20380 have a lineno equal to that of their host rule.
20381 Reported by Hans Aberg.
20382 * tests/regression.at (Rule Line Numbers): New.
20383
20384 2001-11-26 Akim Demaille <akim@epita.fr>
20385
20386 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20387 size_ts.
20388
20389 2001-11-26 Akim Demaille <akim@epita.fr>
20390
20391 * src/complain.c, src/complain.h (error): Remove, provided by
20392 lib/error.[ch].
20393
20394 2001-11-26 Akim Demaille <akim@epita.fr>
20395
20396 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20397 issue an error message.
20398 * tests/regression.at (Invalid %directive): New.
20399 Reported by Hans Aberg.
20400
20401 2001-11-26 Akim Demaille <akim@epita.fr>
20402
20403 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20404 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20405
20406 2001-11-26 Akim Demaille <akim@epita.fr>
20407
20408 * src/conflicts.c (conflicts_print): Don't complain at all when
20409 there are no reduce/reduce conflicts, and as many shift/reduce
20410 conflicts as expected.
20411 * tests/regression.at (%expect right): Adjust.
20412
20413 2001-11-23 Akim Demaille <akim@epita.fr>
20414
20415 * lib/alloca.c: Update, from fileutils.
20416
20417 2001-11-23 Akim Demaille <akim@epita.fr>
20418
20419 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20420
20421 2001-11-23 Akim Demaille <akim@epita.fr>
20422
20423 * src/system.h: Include alloca.h.
20424 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20425
20426 2001-11-23 Akim Demaille <akim@epita.fr>
20427
20428 * src/print_graph.c (print_actions): Remove `rule', unused.
20429 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20430 pacify GCC's signed < unsigned warnings.
20431 * src/closure.c (itemsetsize): Likewise.
20432 * src/reader.c (symbol_list_new): Static.
20433
20434 2001-11-23 Akim Demaille <akim@epita.fr>
20435
20436 Attaching lineno to buckets is stupid, since only one copy of each
20437 symbol is kept, only the line of the first occurrence is kept too.
20438
20439 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20440 * src/reader.c (rline_allocated): Remove, unused.
20441 (symbol_list): Have a `line' member.
20442 (symbol_list_new): New.
20443 (readgram): Use it.
20444 * src/print.c (print_grammar): Output the rule line numbers.
20445 * tests/regression.at (Solved SR Conflicts)
20446 (Unresolved SR Conflicts): Adjust.
20447 Reported by Hans Aberg.
20448
20449 2001-11-22 Marc Autret <autret_m@epita.fr>
20450
20451 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20452
20453 2001-11-22 Marc Autret <autret_m@epita.fr>
20454
20455 * src/muscle_tab.c (muscle_init): Remove initialization of
20456 skeleton muscle.
20457 * src/output.c (output_master_parser): Do it here.
20458
20459 2001-11-20 Akim Demaille <akim@epita.fr>
20460
20461 * po/sv.po: New.
20462 * configure.in (ALL_LINGUAS): Adjust.
20463 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20464 longer contains strings to translate.
20465
20466 2001-11-19 Akim Demaille <akim@epita.fr>
20467
20468 * src/conflicts.c (conflicts_print): Add a missing \n.
20469
20470 2001-11-19 Akim Demaille <akim@epita.fr>
20471
20472 * src/nullable.c (nullable_print): New.
20473 (set_nullable): Call it when tracing.
20474 Better locality of variables.
20475
20476 2001-11-19 Akim Demaille <akim@epita.fr>
20477
20478 * src/print.c (print_actions): Better locality of variables.
20479
20480 2001-11-19 Akim Demaille <akim@epita.fr>
20481
20482 * src/derives.c (print_derives): Fix and enrich.
20483 * src/closure.c (print_fderives): Likewise.
20484
20485 2001-11-19 Akim Demaille <akim@epita.fr>
20486
20487 * src/closure.c (itemsetend): Remove, replaced with...
20488 (itemsetsize): new.
20489
20490 2001-11-19 Akim Demaille <akim@epita.fr>
20491
20492 * src/LR0.c (kernel_end): Remove, replaced with...
20493 (kernel_size): new.
20494
20495 2001-11-19 Akim Demaille <akim@epita.fr>
20496
20497 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20498 to clarify.
20499
20500 2001-11-19 Akim Demaille <akim@epita.fr>
20501
20502 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20503
20504 2001-11-19 Akim Demaille <akim@epita.fr>
20505
20506 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20507 trace messages.
20508 * src/LR0.c: Likewise.
20509 (allocate_itemsets): Use arrays instead of pointers to clarify.
20510
20511 2001-11-19 Akim Demaille <akim@epita.fr>
20512
20513 * src/getargs.c (statistics_flag): Replace with...
20514 (trace_flag): New.
20515 (longopts): Accept --trace instead of --statistics.
20516 * src/getargs.h, src/options.c: Adjust.
20517 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20518 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20519
20520 2001-11-19 Akim Demaille <akim@epita.fr>
20521
20522 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20523 pointers to clarify the code.
20524 (save_reductions, save_shifts): Factor common parts of alternatives.
20525
20526 2001-11-19 Akim Demaille <akim@epita.fr>
20527
20528 * src/LR0.c (new_state, get_state): Complete TRACE code.
20529 * src/closure.c: Include `reader.h' to get `tags', needed by the
20530 trace code.
20531 Rename the conditional DEBUG as TRACE.
20532 Output consistently TRACEs to stderr, not stdout.
20533 * src/derives.c: Likewise.
20534 * src/reduce.c: (inaccessable_symbols): Using if is better style
20535 than goto.
20536 Use `#if TRACE' instead of `#if 0' for tracing code.
20537
20538 2001-11-19 Akim Demaille <akim@epita.fr>
20539
20540 * src/system.h (LIST_FREE, shortcpy): New.
20541 * src/LR0.c: Use them.
20542 * src/output.c (free_itemsets, free_reductions, free_shifts):
20543 Remove, replaced by LIST_FREE.
20544
20545 2001-11-19 Akim Demaille <akim@epita.fr>
20546
20547 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20548 (REDUCTIONS_ALLOC): New.
20549 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20550 allocation.
20551
20552 2001-11-19 Akim Demaille <akim@epita.fr>
20553
20554 * src/LR0.c (new_state): Complete trace code.
20555 * src/nullable.c (set_nullable): Don't translate traces.
20556
20557 2001-11-19 Akim Demaille <akim@epita.fr>
20558
20559 * src/print_graph.c (print_core): Better locality of variables.
20560 * src/print.c (print_core): Likewise.
20561
20562 2001-11-19 Akim Demaille <akim@epita.fr>
20563
20564 * src/vcg.c: You do the output, so you are responsible of the
20565 handling of VCG syntax, in particular: use quotearg.
20566 * src/print_graph.c: Don't.
20567 (print_actions): Don't output the actions as part of the nodes,
20568 since that's the job of the edges.
20569 (print_state): Don't output by hand: fill the node description,
20570 and ask for its output.
20571
20572 2001-11-19 Akim Demaille <akim@epita.fr>
20573
20574 * src/bison.simple (yyparse): When verbosely reporting an error,
20575 no longer put additional quotes around token names.
20576 * tests/calc.at: Adjust.
20577
20578 2001-11-19 Akim Demaille <akim@epita.fr>
20579
20580 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20581 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20582 * src/output.c: Adjust.
20583
20584 2001-11-19 Akim Demaille <akim@epita.fr>
20585
20586 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20587 (rule_t): this.
20588 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20589
20590 2001-11-19 Akim Demaille <akim@epita.fr>
20591
20592 * src/gram.h (rule_t): New.
20593 (rule_table): New.
20594 (rrhs, rlhs): Remove, part of state_t.
20595 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20596 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20597 * src/reader.c, src/reduce.c: Adjust.
20598
20599 2001-11-19 Akim Demaille <akim@epita.fr>
20600
20601 * src/reader.c (symbols_output): New, extracted from...
20602 (packsymbols): Here.
20603 (reader): Call it.
20604
20605 2001-11-19 Akim Demaille <akim@epita.fr>
20606
20607 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20608 (maxrhs): this new function.
20609
20610 2001-11-19 Akim Demaille <akim@epita.fr>
20611
20612 * src/lalr.c (F): New macro to access the variable F.
20613 Adjust.
20614
20615 2001-11-19 Akim Demaille <akim@epita.fr>
20616
20617 * src/lalr.h (LA): New macro to access the variable LA.
20618 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20619 * src/lalr.c: Adjust.
20620
20621 2001-11-19 Akim Demaille <akim@epita.fr>
20622
20623 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20624 (set_state_table): handle the `lookaheads' members.
20625
20626 2001-11-19 Akim Demaille <akim@epita.fr>
20627
20628 * src/lalr.h (lookaheads): Removed array, whose contents is now
20629 a member of...
20630 (state_t): this structure.
20631 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20632 Adjust.
20633
20634 2001-11-19 Akim Demaille <akim@epita.fr>
20635
20636 * src/lalr.h (consistent): Removed array, whose contents is now
20637 a member of...
20638 (state_t): this structure.
20639 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20640 Adjust.
20641
20642 2001-11-19 Akim Demaille <akim@epita.fr>
20643
20644 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20645 contents are now members of...
20646 (state_t): this structure.
20647 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20648 Adjust.
20649
20650 2001-11-19 Akim Demaille <akim@epita.fr>
20651
20652 * src/lalr.h (state_t): New.
20653 (state_table): Be a state_t * instead of a core **.
20654 (accessing_symbol): Remove, part of state_t.
20655 * src/lalr.c: Adjust.
20656 (set_accessing_symbol): Merge into...
20657 (set_state_table): this.
20658 * src/print_graph.c, src/conflicts.c: Adjust.
20659
20660 2001-11-14 Akim Demaille <akim@epita.fr>
20661
20662 * tests/calc.at, tests/output.at, tests/regression.at,
20663 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20664 now the tests are run in private dirs, therefore AC_CLEANUP and
20665 family can be simplified to 0-ary.
20666 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20667 use abs. path to find config.h.
20668 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20669 stderr, there can be way too much random noise.
20670 Instead pass -Werror to GCC and rely on the exit status.
20671 Reported by Wolfram Wagner.
20672
20673 2001-11-14 Akim Demaille <akim@epita.fr>
20674
20675 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20676 defined only if yyoverflow is defined, to avoid `warning: unused
20677 variable `yyvs1''.
20678 Reported by The Test Suite.
20679
20680 2001-11-14 Akim Demaille <akim@epita.fr>
20681
20682 * src/print.c: Include reduce.h.
20683 Reported by Hans Aberg.
20684
20685 2001-11-14 Akim Demaille <akim@epita.fr>
20686
20687 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20688 Revert a previous patch: these are really const.
20689 * src/conflicts.c (conflict_report): Additional useless pair of
20690 braces to pacify GCC's warnings for `if () if () {} else {}'.
20691 * src/lex.c (parse_percent_token): Replace equal_offset with
20692 arg_offset.
20693 arg is const.
20694 Be sure to strdup `arg' when used, since there is no reason for
20695 token_buffer not to change.
20696
20697 2001-11-14 Akim Demaille <akim@epita.fr>
20698
20699 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20700 definition.
20701 * src/main.c (main): Use them.
20702 Suggested by Hans Aberg.
20703
20704 2001-11-12 Akim Demaille <akim@epita.fr>
20705
20706 * src/system.h (ngettext): Now that we use ngettext, be sure to
20707 provide a default definition when NLS are not used.
20708
20709 2001-11-12 Akim Demaille <akim@epita.fr>
20710
20711 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20712 Use @kbd to denote user input.
20713 (Language and Grammar): ANSIfy the example.
20714 Adjust its layout for info/notinfo.
20715 (Location Tracking Calc): Output error messages to stderr.
20716 Output locations in a more GNUtically correct way.
20717 Fix a couple of Englishos.
20718 Adjust @group/@end group pairs.
20719
20720 2001-11-12 Akim Demaille <akim@epita.fr>
20721
20722 %expect was not functioning at all.
20723
20724 * src/conflicts.c (expected_conflicts): Set to -1.
20725 (conflict_report): Use ngettext.
20726 (conflicts_print): Check %expect and make its violation an error.
20727 * doc/bison.texinfo (Expect Decl): Adjust.
20728 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20729 * tests/regression.at (%expect not enough, %expect right)
20730 (%expect too much): New.
20731
20732 2001-11-12 Akim Demaille <akim@epita.fr>
20733
20734 * tests/regression.at (Conflicts): Rename as...
20735 (Unresolved SR Conflicts): this.
20736 (Solved SR Conflicts): New.
20737
20738 2001-11-12 Akim Demaille <akim@epita.fr>
20739
20740 * src/reduce.c (print_results): Rename as...
20741 (reduce_output): This.
20742 Output to OUT, passed as argument, instead of output_obstack.
20743 (dump_grammar): Likewise.
20744 (reduce_free): New.
20745 Also free V1.
20746 (reduce_grammar): No longer call reduce_output, since...
20747 * src/print.c (print_results): do it.
20748 * src/main.c (main): Call reduce_free;
20749
20750 2001-11-12 Akim Demaille <akim@epita.fr>
20751
20752 * src/conflicts.c (print_reductions): Accept OUT as argument.
20753 Output to it, not to output_obstack.
20754 * src/print.c (print_actions): Adjust.
20755
20756 2001-11-12 Akim Demaille <akim@epita.fr>
20757
20758 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20759 the result instead of using...
20760 (src_total, rrc_total, src_count, rrc_count): Remove.
20761 (any_conflicts): Remove.
20762 (print_conflicts): Split into...
20763 (conflicts_print, conflicts_output): New.
20764 * src/conflicts.h: Adjust.
20765 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20766 * src/print.c (print_grammar): Issue `\n' between two rules.
20767 * tests/regression.at (Conflicts): New.
20768 Reported by Tom Lane.
20769
20770 2001-11-12 Akim Demaille <akim@epita.fr>
20771
20772 * tests/regression.at (Invalid input): Remove, duplicate with
20773 ``Invalid input: 1''.
20774
20775 2001-11-12 Akim Demaille <akim@epita.fr>
20776
20777 * tests/torture.at (AT_DATA_STACK_TORTURE)
20778 (Exploding the Stack Size with Alloca)
20779 (Exploding the Stack Size with Malloc): New.
20780
20781 2001-11-12 Akim Demaille <akim@epita.fr>
20782
20783 * src/bison.simple (YYSTACK_REALLOC): New.
20784 (yyparse) [!yyoverflow]: Use it and free the old stack.
20785 Reported by Per Allansson.
20786
20787 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20788
20789 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20790 define CPP macro, which substitute YYSTYPE by yystype.
20791 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20792 with yyltype/YYLTYPE. This allows inclusion of the generated
20793 header within the parser if the compiler, such as GGC, accepts
20794 multiple equivalent #defines.
20795 From Akim.
20796
20797 2001-11-05 Akim Demaille <akim@epita.fr>
20798
20799 * src/reader.c (symbols_output): New, extracted from...
20800 (packsymbols): here.
20801 (reader): Adjust.
20802
20803 2001-11-05 Akim Demaille <akim@epita.fr>
20804
20805 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20806
20807 2001-11-05 Akim Demaille <akim@epita.fr>
20808
20809 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20810 pattern.
20811
20812 2001-11-05 Akim Demaille <akim@epita.fr>
20813
20814 * src/options.h (struct option_table_struct): set_flags is void*.
20815 * src/options.c (longopts): Support `--output' and `%output'.
20816 (usage): Adjust.
20817 * src/lex.h (tok_setopt): Remove, replaced with...
20818 (tok_intopt, tok_stropt): these new guys.
20819 * src/lex.c (getopt.h): Not needed.
20820 (token_buffer, unlexed_token_buffer): Not const.
20821 (percent_table): Promote `-' over `_' in directive names.
20822 Active `%name-prefix', `file-prefix', and `output'.
20823 (parse_percent_token): Accept possible arguments to directives.
20824 Promote `-' over `_' in directive names.
20825
20826 2001-11-04 Akim Demaille <akim@epita.fr>
20827
20828 * doc/bison.texinfo (Decl Summary): Split the list into
20829 `directives for grammars' and `directives for bison'.
20830 Sort'em.
20831 Add description of `%name-prefix', `file-prefix', and `output'.
20832 Promote `-' over `_' in directive names.
20833 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20834 Simplify the description of `--name-prefix'.
20835 Promote `-' over `_' in directive names.
20836 Promote `--output' over `--output-file'.
20837 Fix the description of `--defines'.
20838 * tests/output.at: Exercise %file-prefix and %output.
20839
20840 2001-11-02 Akim Demaille <akim@epita.fr>
20841
20842 * doc/refcard.tex: Update.
20843
20844 2001-11-02 Akim Demaille <akim@epita.fr>
20845
20846 * src/symtab.h (SUNDEF): New.
20847 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20848 stand for `uninitialized', instead of 0.
20849 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20850 * src/lex.c (lex): Adjust.
20851
20852 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20853 Number it 0.
20854 Let yylex return it instead of a plain 0.
20855 Reported by Dick Streefland.
20856
20857 2001-11-02 Akim Demaille <akim@epita.fr>
20858
20859 * tests/regression.at (Mixing %token styles): New test.
20860
20861 2001-11-02 Akim Demaille <akim@epita.fr>
20862
20863 * src/reader.c (parse_thong_decl): Formatting changes.
20864 (token_translations_init): New, extracted from...
20865 (packsymbols): Here.
20866 Adjust.
20867
20868 2001-11-01 Akim Demaille <akim@epita.fr>
20869
20870 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20871 Check that `9foo.y' produces correct cpp guards.
20872 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20873 guards.
20874 Reported by Wwp.
20875
20876 2001-11-01 Akim Demaille <akim@epita.fr>
20877
20878 * tests/regression.at (Invalid input: 2): New.
20879 * src/lex.c (unlexed_token_buffer): New.
20880 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20881 too.
20882 Reported by Wwp.
20883
20884 2001-11-01 Akim Demaille <akim@epita.fr>
20885
20886 * tests/calc.at: Catch up with 1.30.
20887 * configure.in: Bump to 1.49a.
20888 Adjust to newer Autotest.
20889
20890 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20891
20892 * src/conflicts.c: Move global variables rrc_total and src_total ...
20893 (print_conflicts): here.
20894 * src/output.c (output): Free global variable user_toknums.
20895 * src/lex.c (token_obstack): Become static.
20896
20897 2001-10-18 Akim Demaille <akim@epita.fr>
20898
20899 * tests/atlocal.in (GCC): Add.
20900 * tests/calc.at: s/m4_match/m4_bmatch/.
20901 s/m4_patsubst/m4_bpatsubst/.
20902 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20903 * configure.in: AC_SUBST(GCC).
20904
20905 2001-10-14 Marc Autret <autret_m@epita.fr>
20906
20907 * src/options.c (create_long_option_table): Fix.
20908
20909 2001-10-10 Akim Demaille <akim@epita.fr>
20910
20911 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20912
20913 2001-10-04 Akim Demaille <akim@epita.fr>
20914
20915 * src/reader.c (parse_union_decl): Push the caracters in
20916 union_obstack, not attrs_obstack.
20917
20918 2001-10-04 Akim Demaille <akim@epita.fr>
20919
20920 Merge in the branch 1.29.
20921
20922 * src/reader.c (packsymbols): Use a temporary obstack for
20923 `%%tokendef', since output_stack is already used elsewhere.
20924
20925 2001-10-02 Akim Demaille <akim@epita.fr>
20926
20927 Bump 1.29d.
20928
20929 2001-10-02 Akim Demaille <akim@epita.fr>
20930
20931 Version 1.29c.
20932
20933 2001-10-02 Akim Demaille <akim@epita.fr>
20934
20935 * tests/regression.at (Invalid CPP headers): New.
20936 From Alexander Belopolsky.
20937 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20938
20939 2001-10-02 Akim Demaille <akim@epita.fr>
20940
20941 * tests/regression.at (Invalid input): New.
20942 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20943 Reported by Shura.
20944
20945 2001-10-02 Akim Demaille <akim@epita.fr>
20946
20947 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20948
20949 2001-10-02 Akim Demaille <akim@epita.fr>
20950
20951 * src/output.c (output_parser): Assert `skeleton'.
20952 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20953 systems.
20954 From Shura.
20955
20956 2001-10-01 Marc Autret <autret_m@epita.fr>
20957
20958 * src/lex.h: Echo modifications.
20959 * src/lex.c (unlex): Parameter is now token_t.
20960 From Hans Aberg.
20961
20962 2001-10-01 Marc Autret <autret_m@epita.fr>
20963
20964 * src/main.c: Include lex.h.
20965 From Hans Aberg.
20966
20967 2001-09-29 Akim Demaille <akim@epita.fr>
20968
20969 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20970
20971 2001-09-28 Akim Demaille <akim@epita.fr>
20972
20973 * tests/testsuite.at: Update to newer Autotest.
20974 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20975
20976 2001-09-27 Akim Demaille <akim@epita.fr>
20977
20978 Position independent wrapper.
20979
20980 * tests/bison: Remove.
20981 * tests/bison.in: New.
20982 * configure.in: Adjust.
20983
20984 2001-09-27 Paul Eggert <eggert@twinsun.com>
20985
20986 Port quotearg fixes from tar 1.13.24.
20987
20988 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20989 tm to be declared.
20990 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20991 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20992
20993 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20994 * m4/mbrtowc.m4: New file.
20995 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20996 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20997
20998 2001-09-27 Akim Demaille <akim@epita.fr>
20999
21000 Bump to 1.29c.
21001
21002 2001-09-27 Akim Demaille <akim@epita.fr>
21003
21004 Version 1.29b.
21005
21006 2001-09-25 Akim Demaille <akim@epita.fr>
21007
21008 * src/system.h: Include `xalloc.h'.
21009 Remove it from the C files.
21010 * src/files.c (output_files): Free the obstacks.
21011 * src/lex.c (init_lex): Rename as...
21012 (lex_init): this.
21013 (lex_free): New.
21014 * src/main.c (main): Use it.
21015
21016 2001-09-24 Marc Autret <autret_m@epita.fr>
21017
21018 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21019 to output informations in fout (FILE*).
21020 (open_graph, close_graph): Likewise.
21021 (output_graph, output_edge, output_node): Likewise.
21022 * src/vcg.h: Update function prototypes.
21023 * src/print_graph.c (print_graph): Open output graph file.
21024 (print_actions): Adjust.
21025 * src/files.h: Remove extern declaration.
21026 * src/files.c: Remove graph_obstack declaration.
21027 (open_files): Remove graph_obstack initialization.
21028 (output_files): Remove graph_obstack saving.
21029
21030 2001-09-24 Marc Autret <autret_m@epita.fr>
21031
21032 * src/files.c (compute_output_file_names): Fix.
21033
21034 2001-09-24 Marc Autret <autret_m@epita.fr>,
21035 Akim Demaille <akim@epita.fr>
21036
21037 * src/reader.c (reader): Remove call to free_symtab ().
21038 * src/main.c (main): Call it here.
21039 Include symtab.h.
21040 * src/conflicts.c (initialize_conflicts): Rename as...
21041 (solve_conflicts): this.
21042 * src/print.c (print_core, print_actions, print_state)
21043 (print_grammar): Dump to a file instead a `output_obstack'.
21044 (print_results): Dump `output_obstack', and then proceed with the
21045 FILE *.
21046 * src/files.c (compute_output_file_names, close_files): New.
21047 (output_files): Adjust.
21048 * src/main.c (main): Adjust.
21049
21050 2001-09-23 Marc Autret <autret_m@epita.fr>
21051
21052 * src/files.c (compute_header_macro): Computes header macro name
21053 from spec_defines_file when given.
21054
21055 2001-09-23 Marc Autret <autret_m@epita.fr>
21056
21057 * src/files.c (output_files): Add default extensions.
21058
21059 2001-09-22 Akim Demaille <akim@epita.fr>
21060
21061 * src/conflicts.c (finalize_conflicts): Rename as...
21062 (free_conflicts): this.
21063
21064 2001-09-22 Akim Demaille <akim@epita.fr>
21065
21066 * src/gram.c (gram_free): Rename back as...
21067 (dummy): this.
21068 (output_token_translations): Free `token_translations'.
21069 * src/symtab.c (free_symtab): Free the tag field.
21070
21071 2001-09-22 Akim Demaille <akim@epita.fr>
21072
21073 Remove `translations' as it is always set to true.
21074
21075 * src/gram.h: Adjust.
21076 * src/reader.c (packsymbols, parse_token_decl): Adjust
21077 * src/print.c (print_grammar): Adjust.
21078 * src/output.c (output_token_translations): Adjust.
21079 * src/lex.c (lex): Adjust.
21080 * src/gram.c: Be sure the set pointers to NULL.
21081 (dummy): Rename as...
21082 (gram_free): this.
21083
21084 2001-09-22 Akim Demaille <akim@epita.fr>
21085
21086 * configure.in: Invoke AM_LIB_DMALLOC.
21087 * src/system.h: Use dmalloc.
21088 * src/LR0.c: Be sure to have pointers initialized to NULL.
21089 (allocate_itemsets): Allocate kernel_items only if needed.
21090
21091 2001-09-22 Akim Demaille <akim@epita.fr>
21092
21093 * configure.in: Bump to 1.29b.
21094 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21095 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21096 need xmalloc.c in calc.y.
21097 From Pascal Bart.
21098
21099 2001-09-21 Akim Demaille <akim@epita.fr>
21100
21101 Version 1.29a.
21102 * Makefile.maint, config/config.guess, config/config.sub,
21103 * config/missing: Update from masters.
21104 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21105 upon package.m4.
21106 * configure.in (ALL_LINGUAS): Add `tr'.
21107
21108 2001-09-21 Akim Demaille <akim@epita.fr>
21109
21110 * tests/Makefile.am (package.m4): Move to...
21111 ($(srcdir)/$(TESTSUITE)): here.
21112
21113 2001-09-20 Akim Demaille <akim@epita.fr>
21114
21115 * src/complain.c: No longer try to be standalone: use system.h.
21116 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21117 * src/complain.h: Likewise.
21118 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21119 Remove the unused variable `n'.
21120 From Albert Chin-A-Young.
21121
21122 2001-09-18 Marc Autret <autret_m@epita.fr>
21123
21124 * doc/bison.1: Update.
21125 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21126 descriptions.
21127 (Option Cross Key): Update.
21128 Add --graph.
21129
21130 2001-09-18 Marc Autret <autret_m@epita.fr>
21131
21132 * tests/regression.at: New test (comment in %union).
21133
21134 2001-09-18 Marc Autret <autret_m@epita.fr>
21135
21136 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21137 do that.
21138 Reported by Keith Browne.
21139
21140 2001-09-18 Marc Autret <autret_m@epita.fr>
21141
21142 * tests/output.at: Add tests for --defines and --graph.
21143
21144 2001-09-18 Marc Autret <autret_m@epita.fr>
21145
21146 * tests/output.at: Removes tests of %{header,src}_extension features.
21147
21148 2001-09-18 Akim Demaille <akim@epita.fr>
21149
21150 * tests/Makefile.am (package.m4): New.
21151 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21152 (_AT_CHECK_CALC_ERROR): Likewise.
21153 Factor the `, ' part of verbose error messages.
21154
21155 2001-09-18 Marc Autret <autret_m@epita.fr>
21156
21157 * src/getargs.c (longopts): Declare --defines and --graph as options
21158 with optional arguments.
21159 * src/files.h: Add extern declarations.
21160 * src/files.c (spec_graph_file, spec_defines_file): New.
21161 (output_files): Update.
21162 Remove CPP-outed code.
21163
21164 2001-09-18 Marc Autret <autret_m@epita.fr>
21165
21166 Turn off %{source,header}_extension feature.
21167
21168 * src/files.c (compute_exts_from_gf): Update.
21169 (compute_exts_from_src): Update.
21170 (output_files): CPP-out useless code.
21171 * src/files.h: Remove {header,source}_extension extern declarations.
21172 * src/reader.c (parse_dquoted_param): CPP-out.
21173 (parse_header_extension_decl): Remove.
21174 (parse_source_extension_decl): Remove.
21175 (read_declarations): Remove cases tok_{hdrext,srcext}.
21176 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21177 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21178
21179 2001-09-10 Akim Demaille <akim@epita.fr>
21180
21181 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21182 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21183 (AT_CHECK_OUTPUT): this.
21184 Merely check ls' exit status, its output is useless.
21185
21186 2001-09-10 Akim Demaille <akim@epita.fr>
21187
21188 * tests/calc.at: Use m4_match.
21189 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21190
21191 2001-09-10 Marc Autret <autret_m@epita.fr>,
21192 Akim Demaille <akim@epita.fr>
21193
21194 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21195 enum color_e.
21196 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21197 to `normal'.
21198 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21199 * src/lex.h: Adjust prototype.
21200 (token_t): Add `tok_undef'.
21201 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21202 (parse_percent_token): Now returns token_t.
21203 Add default statement in switch.
21204 (lex): Separate `c' as an input variable, from the token_t result
21205 part.
21206 (unlexed): Is a token_t.
21207
21208 2001-09-10 Akim Demaille <akim@epita.fr>
21209
21210 * configure.in: Bump to 1.29a.
21211
21212 2001-09-07 Akim Demaille <akim@epita.fr>
21213
21214 Version 1.29.
21215
21216 2001-08-30 Akim Demaille <akim@epita.fr>
21217
21218 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21219 * m4/atconfig.m4: Remove.
21220 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21221 * tests/bison: New.
21222 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21223 m4_if, m4_patsubst, and m4_regexp.
21224 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21225 `input' file instead of echo.
21226
21227 2001-08-29 Akim Demaille <akim@epita.fr>
21228
21229 Bump to 1.28e.
21230
21231 2001-08-29 Akim Demaille <akim@epita.fr>
21232
21233 Version 1.28d.
21234
21235 2001-08-29 Paul Eggert <eggert@twinsun.com>
21236
21237 * src/bison.simple (yyparse): Don't take the address of an
21238 item before the start of an array, as that doesn't conform to
21239 the C Standard.
21240
21241 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21242
21243 * doc/bison.texinfo (Location Tracking Calc): New node.
21244
21245 2001-08-29 Paul Eggert <eggert@twinsun.com>
21246
21247 * src/output.c (output): Do not define const, as this now
21248 causes more problems than it cures.
21249
21250 2001-08-29 Akim Demaille <akim@epita.fr>
21251
21252 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21253 the nodes.
21254 Be sure to tag the `detailmenu'.
21255
21256 2001-08-29 Akim Demaille <akim@epita.fr>
21257
21258 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21259 download in a tmp dir.
21260
21261 2001-08-28 Marc Autret <autret_m@epita.fr>
21262
21263 * config/depcomp: New file.
21264
21265 2001-08-28 Marc Autret <autret_m@epita.fr>
21266
21267 * doc/bison.1 (mandoc): Adjust.
21268 From Juan Manuel Guerrero.
21269
21270 2001-08-28 Marc Autret <autret_m@epita.fr>
21271
21272 * src/print_graph.c (print_state): Fix.
21273
21274 2001-08-27 Marc Autret <autret_m@epita.fr>
21275
21276 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21277 char * members.
21278 Echo modifications to the functions prototypes.
21279 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21280
21281 2001-08-27 Marc Autret <autret_m@epita.fr>
21282
21283 * src/vcg.c: Include `xalloc.h'.
21284 (add_colorentry): New.
21285 (add_classname): New.
21286 (add_infoname): New.
21287 * src/vcg.h: Add new prototypes.
21288
21289 2001-08-27 Akim Demaille <akim@epita.fr>
21290
21291 * Makefile.maint: Sync. again with CVS Autoconf.
21292
21293 2001-08-27 Akim Demaille <akim@epita.fr>
21294
21295 * Makefile.maint: Formatting changes.
21296 (po-update, cvs-update, update): New targets.
21297 (AMTAR): Remove.
21298
21299 2001-08-27 Akim Demaille <akim@epita.fr>
21300
21301 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21302 * Makefile.maint: Sync. with CVS Autoconf.
21303
21304 2001-08-27 Marc Autret <autret_m@epita.fr>
21305
21306 * src/vcg.h (struct infoname_s): New.
21307 (struct colorentry_s): New.
21308 (graph_s): New fields {vertical,horizontal}_order in structure.
21309 Add `infoname' field.
21310 Add `colorentry' field;
21311 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21312 (G_HORIZONTAL_ORDER): New.
21313 (G_INFONAME): New.
21314 (G_COLORENTRY): New.
21315 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21316 Add output of `infoname'.
21317 Add output of `colorentry'.
21318
21319 2001-08-27 Marc Autret <autret_m@epita.fr>
21320
21321 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21322 This one shadowed a global parameter.
21323
21324 2001-08-24 Marc Autret <autret_m@epita.fr>
21325
21326 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21327 instead of `unsigned'.
21328 (print_state): Do not call obstack_object_size () in obstack_grow ()
21329 to avoid macro variables shadowing.
21330
21331 2001-08-23 Marc Autret <autret_m@epita.fr>
21332
21333 * src/lex.c (percent_table): Typo: s/naem/name/.
21334 Add graph option.
21335 Normalize new options declarations.
21336
21337 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21338
21339 * tests/suite.at: Exercise %header_extension and %source_extension.
21340
21341 2001-08-16 Marc Autret <autret_m@epita.fr>
21342
21343 * src/reader.c (parse_dquoted_param): New.
21344 (parse_header_extension_decl): Use it.
21345 (parse_source_extension_decl): Likewise.
21346
21347 2001-08-16 Marc Autret <autret_m@epita.fr>
21348
21349 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21350 (get_xxxx_str): Use assert () instead of complain ().
21351 Remove return invokations in default cases.
21352 (get_decision_str): Modify default behaviour. Remove second argument.
21353 Echo modifications on calls.
21354 (output_graph): Fix.
21355
21356 2001-08-16 Marc Autret <autret_m@epita.fr>
21357
21358 * src/getargs.c (usage): Update with ``-g, --graph''.
21359
21360 2001-08-16 Marc Autret <autret_m@epita.fr>
21361
21362 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21363 (Option Cross Key): Likewise.
21364 * doc/bison.1: Update.
21365
21366 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21367
21368 * src/output.c (output_master_parser): Don't finish action_obstack.
21369 (output_parser): Don't care about the muscle action, here.
21370 (prepare): Copy the action_obstack in the action muscle.
21371 (output): Free action_obstack.
21372
21373 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21374
21375 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21376 will contain `%union' declaration.
21377 (parse_union_decl): Delete #line directive output.
21378 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21379 informations about %union.
21380 (parse_union_decl): Copy the union_obstack in the muscle stype.
21381 * src/bison.simple: Add new #line directive.
21382 Add typdef %%stype YYSTYPE.
21383
21384 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21385
21386 * src/bison.simple: Add new `#line' directive.
21387
21388 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21389
21390 * src/bison.simple: New `#line' directive.
21391 * src/output.c (output_parser): Support new dynamic muscle input_line.
21392
21393 2001-09-22 Marc Autret <autret_m@epita.fr>
21394
21395 * src/output.c (output_master_parser): New.
21396 (output_parser): Be more re-entrant.
21397
21398 2001-09-21 Marc Autret <autret_m@epita.fr>
21399
21400 * src/reader.c (copy_definition, parse_union_decl): Update and use
21401 `linef' muscle.
21402 (copy_action): Likewise.
21403 Use obstack_1grow ().
21404 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21405
21406 2001-09-21 Marc Autret <autret_m@epita.fr>
21407
21408 * src/options.c (option_table): Adjust.
21409 * src/lex.c (parse_percent_token): Fix.
21410
21411 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21412
21413 * src/options.c (symtab.h): Include it, need by lex.h.
21414
21415 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21416
21417 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21418 is now an option_table_struct*.
21419 (option_strcmp): New function option_strcmp.
21420 (parse_percent_token): Call option_strcmp.
21421 * src/getargs.c (xalloc.h, options.h): Include it.
21422 (getargs): Call create_long_option_table.
21423 (getargs): Free longopts at the end of the function.
21424 (shortopts): Move in options.c.
21425 * src/options.c (create_long_option_table): New function. Convert
21426 information from option_table to option structure.
21427 * src/reader.c (options.h): Include it.
21428
21429 * src/Makefile.am: Adjust.
21430 * src/options.c (option_table): Create from longopts and percent_table.
21431 * src/getargs.c (longopts): Delete.
21432 * src/lex.c (struct percent_table_struct): Delete.
21433 (percent_table): Delete.
21434 (options.h): Include it.
21435 * src/options.c: Create.
21436 * src/options.h: Create.
21437 Declare enum opt_access_e.
21438 Define struct option_table_struct.
21439
21440 2001-09-20 Marc Autret <autret_m@epita.fr>
21441
21442 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21443 sections of Bison.
21444
21445 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21446
21447 * src/bison.simple: s/%%filename/%%skeleton.
21448 * src/muscle_tab.c (getargs.h): Include it.
21449 (muscle_init): Insert new muscle skeleton.
21450
21451 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21452
21453 * src/output.c (output_parser): Delete unused variable actions_dumped.
21454
21455 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21456
21457 * src/output.c (output): Delete call to reader_output_yylsp.
21458 * src/reader.c (reader): Likewise.
21459 * src/reader.h: Delete declaration of reader_output_yylsp.
21460
21461 2001-09-02 Marc Autret <autret_m@epita.fr>
21462
21463 * src/reader.c: Include muscle_tab.h.
21464 (parse_union_decl): Update.
21465 (parse_macro_decl): Rename parse_muscle_decl.
21466 Update to use renamed functions and variable.
21467 (read_declarations, copy_action, read_additionnal_code, : Updated
21468 with correct variables and functions names.
21469 (packsymbols, reader): Likewise.
21470
21471 * src/reader.h (muscle_obstack): Extern declaration update.
21472
21473 * src/output.c: Include muscle_tab.h
21474 In all functions using macro_insert, change by using muscle_insert ().
21475 (macro_obstack): Rename muscle_obstack.
21476 Echo modifications in the whole file.
21477 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21478 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21479 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21480
21481 * src/muscle_tab.h: Update double inclusion macros.
21482 (macro_entry_s): Rename muscle_entry_s.
21483 Update prototypes.
21484
21485 * src/muscle_tab.c: Include muscle_tab.h.
21486 Rename macro_tabble to muscle_table.
21487 (mhash1, mhash2, mcmp): Use muscle_entry.
21488 (macro_init): Rename muscle_init. Update.
21489 (macro_insert): Rename muscle_insert. Update.
21490 (macro_find): Rename muscle_find. Update.
21491
21492 * src/main.c: Include muscle_tab.h.
21493 (main): Call muscle_init ().
21494 * src/Makefile.am (bison_SOURCES): Echo modifications.
21495
21496 2001-09-02 Marc Autret <autret_m@epita.fr>
21497
21498 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21499
21500 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21501
21502 2001-09-02 Marc Autret <autret_m@epita.fr>
21503
21504 * src/macrotab.c, src/macrotab.h: Remove.
21505
21506 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21507
21508 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21509 filename.
21510
21511 2001-09-01 Marc Autret <autret_m@epita.fr>
21512
21513 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21514 to an explicit value to activate the feature. We do it here.
21515
21516 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21517
21518 * src/output.c (prepare): Delete the `filename' muscule insertion.
21519 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21520 (parse_union_decl): Likewise.
21521 * src/macrotab.c (macro_init): Initialize filename by infile.
21522
21523 2001-08-31 Marc Autret <autret_m@epita.fr>
21524
21525 * src/bison.simple (YYLSP_NEEDED): New definition.
21526 * src/output.c (prepare): Add macro insertion of `locations_flag'
21527
21528 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21529
21530 * src/output.c (prepare): Delete insertion of previous muscles,
21531 and insert the `prefix' muscles.
21532 * src/macrotab.c (macro_init): Likewise.
21533 (macro_init): Initialization prefix directive by `yy'.
21534 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21535 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21536 yylval, yydebug, yyerror, yynerrs and yyparse.
21537 New directive `#define' to substitute yydebug, ... with option
21538 name_prefix.
21539
21540 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21541
21542 * src/main.c (main): Standardize.
21543 * src/output.c (output_table_data, output_parser): Likewise.
21544 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21545
21546 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21547
21548 * src/reader.c (read_additionnal_code): Rename %%user_code to
21549 %%epilogue.
21550 * src/output.c (output): Rename %%declarations to %%prologue.
21551 * src/bison.simple: Echo modifications.
21552
21553 2001-08-31 Marc Autret <autret_m@epita.fr>
21554
21555 * src/reader.c (readgram): CleanUp.
21556 (output_token_defines): Likewise.
21557 (packsymbols): Likewise.
21558 (reader): Likewise.
21559 * src/output.c (output): CPP-out useless code.
21560
21561 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21562
21563 * src/reader.c (reader): Delete obsolete call to function
21564 output_trailers and output_headers.
21565 * src/output.h: Remove obsolete functions prototypes of output_headers
21566 and output_trailers.
21567
21568 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21569
21570 * src/main.c: Include macrotab.h.
21571 * src/macrotab.h (macro_entry_s): Constify fields.
21572 Adjust functions prototypes.
21573 * src/macrotab.c (macro_insert): Constify key and value.
21574 (macro_find): Constify key.
21575 (macro_insert): Include 'xalloc.h'
21576 (macro_insert): Use XMALLOC.
21577 (macro_find): Constify return value.
21578 * src/output.c (output_table_data): Rename table to table_data.
21579 (output_parser): Constify macro_key, macro_value.
21580
21581 2001-08-30 Marc Autret <autret_m@epita.fr>
21582
21583 * src/reader.c (parse_skel_decl): New.
21584 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21585 * src/lex.h (token_t): New token `tok_skel'.
21586 * src/lex.c (percent_table): Add skeleton option entry.
21587 Standardize.
21588
21589 2001-08-29 Marc Autret <autret_m@epita.fr>
21590
21591 * src/bison.simple: Add %%user_code directive at the end.
21592 * src/reader.c (read_additionnal_code): New.
21593 (reader): Use it.
21594 * src/output.c (output_program): Remove.
21595 (output): Update.
21596
21597 2001-08-28 Marc Autret <autret_m@epita.fr>
21598
21599 * src/output.c (output_actions): Clean up.
21600 (output_gram): CPP-out useless code.
21601 * src/reader.c (reader): Clean up, CPP-out useless code.
21602
21603 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21604
21605 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21606 directive.
21607 * src/bison.simple: Add `%%definitions'.
21608
21609 2001-08-28 Marc Autret <autret_m@epita.fr>
21610
21611 * config/depcomp: New file.
21612
21613 2001-08-27 Paul Eggert <eggert@twinsun.com>
21614
21615 * src/bison.simple (yyparse): Don't take the address of an
21616 item before the start of an array, as that doesn't conform to
21617 the C Standard.
21618
21619 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21620
21621 * src/output.c (output): Remove the initialization of the macro
21622 obstack. It was done too late here.
21623
21624 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21625 completely wrong.
21626 (reader): Initialize the macro obstack here, since we need it to grow
21627 '%define' directives.
21628
21629 * src/reader.h: Declare the macro obstack as extern.
21630
21631 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21632
21633 * src/output.c (output_parser): Fix. Store single '%' characters in
21634 the output obstack instead of throwing them away.
21635
21636 2001-08-27 Akim Demaille <akim@epita.fr>
21637
21638 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21639
21640 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21641
21642 * lib/Makefile.am: Adjust.
21643
21644 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21645
21646 * src/bison.simple: Update and add '%%' directives.
21647
21648 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21649
21650 * src/reader.c (reader): Remove calls to 'output_headers' and
21651 'output_trailers'. Remove some C output.
21652 (readgram): Disable a piece of code that was writing a default
21653 definition for 'YYSTYPE'.
21654 (reader_output_yylsp): Remove.
21655 (packsymbols): Output token defintions to a macro.
21656 (copy_definition): Disable C output.
21657
21658 * src/reader.c (parse_macro_decl): New function used to parse macro
21659 declarations.
21660 (copy_string2): Put the body of copy_string into this new function.
21661 Add a parameter to let the caller choose whether he wants to copy the
21662 string delimiters or not.
21663 (copy_string): Be a simple call to copy_string2 with the last argument
21664 bound to true.
21665 (read_declarations): Add case for macro definition.
21666 (copy_identifier): New.
21667 (parse_macro_decl): Read macro identifiers using copy_identifier
21668 rather than lex.
21669
21670 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21671
21672 * src/output.c (prepare): Add prefixed names.
21673 (output_parser): Output semantic actions.
21674 (output_parser): Fix bug on '%%line' directives.
21675
21676 * src/output.c (output_headers): Remove. The C code printed by this
21677 function should now be in the skeletons.
21678 (output_trailers): Remove.
21679 (output): Disable call to 'reader_output_yylsp'.
21680 (output_rule_data): Do not output tables to the table obstack.
21681
21682 * src/output.c: Remove some C dedicated output.
21683 Improve the use of macro and output obstacks.
21684 (output_defines): Remove.
21685
21686 * src/output.c (output_token_translations): Associate 'translate'
21687 table with a macro. No output to the table obstack.
21688 (output_gram): Same for 'rhs' and 'prhs'.
21689 (output_stos): Same for 'stos'.
21690 (output_rule_data): Same for 'r1' and 'r2'.
21691 (token_actions): Same for 'defact'.
21692 (goto_actions): Same for 'defgoto'.
21693 (output_base): Same for 'pact' and 'pgoto'.
21694 (output_table): Same for 'table'.
21695 (output_check): Same for 'check'.
21696
21697 * src/output.c (output_table_data): New function.
21698 (output_short_table): Remove.
21699 (output_short_or_char_table): Remove.
21700
21701 * src/output.c (output_parser): Replace most of the skeleton copy code
21702 with something new. Skeletons are now processed character by character
21703 rather than line by line, and Bison looks for '%%' macros. This is the
21704 first step in making Bison's output process (a lot) more flexible.
21705 (output_parser): Use the macro table.
21706
21707 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21708
21709 * src/main.c (main): Initialize the macro table.
21710
21711 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21712
21713 * src/lex.c (percent_table): Add tok_define.
21714 * src/lex.h: Add tok_define.
21715
21716 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21717
21718 * src/macrotab.c: New file.
21719 * src/macrotab.h: New file.
21720 * src/Makefile.am: Update.
21721
21722 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21723
21724 * lib/hash.c: New file.
21725 * lib/hash.h: New file.
21726 * lib/Makefile.am: Update.
21727
21728 2001-08-15 Akim Demaille <akim@epita.fr>
21729
21730 Version 1.28c.
21731
21732 2001-08-15 Marc Autret <autret_m@epita.fr>
21733
21734 * src/reader.c (readgram): Indent output macro YYSTYPE.
21735 (packsymbols): Likewise.
21736 (output_token_defines): Likewise.
21737 * src/files.c: Standardize.
21738 (compute_header_macro): New.
21739 (defines_obstack_save): New. Use compute_header_macro.
21740 (output_files): Update. Use defines_obstack_save.
21741
21742 2001-08-15 Akim Demaille <akim@epita.fr>
21743
21744 * doc/bison.texinfo (Table of Symbols): Document
21745 YYSTACK_USE_ALLOCA.
21746
21747 2001-08-15 Akim Demaille <akim@epita.fr>
21748
21749 * missing: Update from CVS Automake.
21750 * config/config.guess, config/config.sub, config/texinfo.tex:
21751 Update from gnu.org.
21752
21753 2001-08-15 Akim Demaille <akim@epita.fr>
21754
21755 * Makefile.maint: Sync with CVS Autoconf.
21756
21757 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21758
21759 * doc/bison.texinfo: Include GNU Free Documentation License from
21760 `fdl.texi'.
21761 * doc/fdl.texi: Add to package.
21762
21763 2001-08-14 Marc Autret <autret_m@epita.fr>
21764
21765 Turn on %{source,header}_extension features.
21766
21767 * src/lex.c (percent_table): Un-CPP out header_extension and
21768 source_extension.
21769 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21770 (compute_exts_from_src): Remove conditions. It restores priorities
21771 between options.
21772
21773 2001-08-14 Marc Autret <autret_m@epita.fr>
21774
21775 * src/files.c (compute_base_names): Add extensions computing when
21776 `--file-prefix' used.
21777 Standardize function calls.
21778
21779 2001-08-13 Marc Autret <autret_m@epita.fr>
21780
21781 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21782 defining it (defined but null disables alloca).
21783
21784 2001-08-13 Marc Autret <autret_m@epita.fr>
21785
21786 * src/bison.simple (_yy_memcpy): CPP reformat.
21787
21788 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21789
21790 * tests/atconfig.in (CPPFLAGS): Fix.
21791
21792 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21793
21794 * doc/bison.texinfo: Include GNU General Public License from
21795 `gpl.texi'.
21796 * doc/gpl.texi: Add to package.
21797
21798 2001-08-10 Marc Autret <autret_m@epita.fr>
21799
21800 * src/print_graph.h: Fix.
21801 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21802
21803 2001-08-10 Akim Demaille <akim@epita.fr>
21804
21805 * src/system.h: Provide default declarations for stpcpy, strndup,
21806 and strnlen.
21807
21808 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21809
21810 * doc/bison.texinfo (Locations): Update @$ stuff.
21811
21812 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21813
21814 * src/bison.simple (YYLLOC_DEFAULT): Update.
21815 (yyparse): Adjust.
21816
21817 2001-08-08 Marc Autret <autret_m@epita.fr>
21818
21819 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21820 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21821 Reported by Fabrice Bauzac.
21822
21823 2001-08-08 Marc Autret <autret_m@epita.fr>
21824
21825 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21826 * src/vcg.c (output_node): Fix.
21827 * src/vcg.h: Cleanup.
21828 * src/print_graph.c: Add comments.
21829 (node_output_size): New global variable. Simplify the formatting of
21830 the VCG graph output.
21831 (print_actions): Unused code is now used. It notifies the final state
21832 and no action states in the VCG graph. It also give the reduce actions.
21833 The `shift and goto' edges are red and the `go to state' edges are
21834 blue.
21835 Get the current node name and node_obstack by argument.
21836 (node_obstack): New variable.
21837 (print_state): Manage node_obstack.
21838 (print_core): Use node_obstack given by argument.
21839 A node is not only computed here but in print_actions also.
21840 (print_graph): CPP out useless code instead of commenting it.
21841
21842 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21843
21844 * tests/atconfig.in (CPPFLAGS): Fix.
21845
21846 2001-08-07 Akim Demaille <akim@epita.fr>
21847
21848 * src/print_graph.c (quote): New.
21849 (print_core): Use it.
21850
21851 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21852
21853 * src/vcg.c (complain.h): Include it.
21854 Unepitaize `return' invocations.
21855 [NDEBUG] (main): Remove.
21856 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21857 * src/files.c (open_files): Initialize graph_obstack.
21858 * src/print_graph.c (print_actions): CPP out useless code.
21859 (print_core): Don't output the last `\n' in labels.
21860 Use `quote'.
21861 * src/files.c (output_files): Output the VCG file.
21862 * src/main.c (main): Invoke print_graph ();
21863
21864 2001-08-06 Marc Autret <autret_m@epita.fr>
21865
21866 Automaton VCG graph output.
21867 Using option ``-g'' or long option ``--graph'', you can generate
21868 a gram_filename.vcg file containing a VCG description of the LALR (1)
21869 automaton of your grammar.
21870
21871 * src/main.c: Call to print_graph() function.
21872 * src/getargs.h: Update.
21873 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21874 (graph_flag): New flag.
21875 (longopts): Update.
21876 (getargs): Add case `g'.
21877 * src/files.c (graph_obstack): New obstack struct.
21878 (open_files): Initialize new obstack.
21879 (output_files): Saves graph_obstack if required.
21880 * src/files.h (graph_obstack): New extern declaration.
21881 * src/Makefile.am: Add new source files.
21882
21883 2001-08-06 Marc Autret <autret_m@epita.fr>
21884
21885 * src/print_graph.c, src/print_graph.h (graph): New.
21886 * src/vcg.h: New file.
21887 * src/vcg.c: New file, VCG graph handling.
21888
21889 2001-08-06 Marc Autret <autret_m@epita.fr>
21890
21891 Add of %source_extension and %header_extension which specify
21892 the source or/and the header output file extension.
21893
21894 * src/files.c (compute_base_names): Remove initialisation of
21895 src_extension and header_extension.
21896 (compute_exts_from_gf): Update.
21897 (compute_exts_from_src): Update.
21898 (output_files): Update.
21899 * src/reader.c (parse_header_extension_decl): New.
21900 (parse_source_extension_decl): New.
21901 (read_declarations): New case statements for the new tokens.
21902 * src/lex.c (percent_table): Add entries for %source_extension
21903 and %header_extension.
21904 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21905
21906 2001-08-06 Marc Autret <autret_m@epita.fr>
21907
21908 * configure.in: Bump to 1.28c.
21909 * doc/bison.texinfo: Texinfo thingies.
21910
21911 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21912
21913 * tests/atconfig.in (CPPFLAGS): Add.
21914 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21915
21916 2001-08-03 Akim Demaille <akim@epita.fr>
21917
21918 Version 1.28b.
21919
21920 2001-08-03 Akim Demaille <akim@epita.fr>
21921
21922 * tests/Makefile.am (check-local): Ship testsuite.
21923 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21924 Include `string.h'.
21925
21926 2001-08-03 Akim Demaille <akim@epita.fr>
21927
21928 * configure.in: Try using -Wformat when compiling.
21929
21930 2001-08-03 Akim Demaille <akim@epita.fr>
21931
21932 * configure.in: Bump to 1.28b.
21933
21934 2001-08-03 Akim Demaille <akim@epita.fr>
21935
21936 * src/complain.c: Adjust strerror_r portability issues.
21937
21938 2001-08-03 Akim Demaille <akim@epita.fr>
21939
21940 Version 1.28a.
21941
21942 2001-08-03 Akim Demaille <akim@epita.fr>
21943
21944 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21945 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21946 * src/getargs.c: Include complain.h.
21947 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21948 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21949
21950 2001-08-03 Akim Demaille <akim@epita.fr>
21951
21952 * src/reader.c (readgram): Display hidden chars in error messages.
21953
21954 2001-08-03 Akim Demaille <akim@epita.fr>
21955
21956 Update to gettext 0.10.39.
21957
21958 2001-08-03 Akim Demaille <akim@epita.fr>
21959
21960 * lib/strspn.c: New.
21961
21962 2001-08-01 Marc Autret <autret_m@epita.fr>
21963
21964 * doc/bison.texinfo: Update.
21965 * doc/bison.1 (mandoc): Update.
21966 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21967 * src/files.c: Support output files extensions computing.
21968 (src_extension): New static variable.
21969 (header_extension): New static variable.
21970 (tr): New function.
21971 (get_extension_index): New function, gets the index of an extension
21972 filename in a string.
21973 (compute_exts_from_gf): New function, computes extensions from the
21974 grammar file extension.
21975 (compute_exts_from_src): New functions, computes extensions from the
21976 C source file extension, file given by ``-o'' option.
21977 (compute_base_names): Update.
21978 (output_files): Update.
21979
21980 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21981
21982 * doc/bison.texi: Document @$.
21983 (Locations): New section.
21984
21985 2001-07-18 Akim Demaille <akim@epita.fr>
21986
21987 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21988 * config/prev-version.txt, config/move-if-change: New.
21989 * Makefile.am: Adjust.
21990
21991 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21992
21993 * src/bison.simple (yyparse): Suppress warning `comparaison
21994 between signed and unsigned'.
21995
21996 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21997
21998 * src/getargs.h (raw_flag): Remove.
21999 * src/getargs.c: Die on `-r'/`--raw'.
22000 * src/lex.c (parse_percent_token): Die on `%raw'.
22001 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22002 * tests/calc.at: Suppress test with option `--raw'.
22003
22004 2001-07-14 Akim Demaille <akim@epita.fr>
22005
22006 * config/: New.
22007 * configure.in: Require Autoconf 2.50.
22008 Update to gettext 0.10.38.
22009
22010 2001-03-16 Akim Demaille <akim@epita.fr>
22011
22012 * doc/bison.texinfo: ANSIfy the examples.
22013
22014 2001-03-16 Akim Demaille <akim@epita.fr>
22015
22016 * getargs.c (skeleton): New variable.
22017 (longopts): --skeleton is a new option.
22018 (shortopts, getargs): -S is a new option.
22019 * getargs.h: Declare skeleton.
22020 * output.c (output_parser): Use it.
22021
22022 2001-03-16 Akim Demaille <akim@epita.fr>
22023
22024 * m4/strerror_r.m4: New.
22025 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22026 * lib/error.h, lib/error.c: Update.
22027
22028 2001-03-16 Akim Demaille <akim@epita.fr>
22029
22030 * src/getargs.c (longopts): Clean up.
22031
22032 2001-02-21 Akim Demaille <akim@epita.fr>
22033
22034 * src/reader.c (gensym): `gensym_count' is your own.
22035 Use a static buf to create the symbol name, as token_buffer is no
22036 longer a buffer.
22037
22038 2001-02-08 Akim Demaille <akim@epita.fr>
22039
22040 * src/conflicts.c (conflict_report): Be sure not to append to res
22041 between two calls, which could happen if both first sprintf were
22042 skipped, but not the first cp += strlen.
22043
22044 2001-02-08 Akim Demaille <akim@epita.fr>
22045
22046 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22047 New, from fileutils 4.0.37.
22048 * configure.in: Require Autoconf 2.49c. I took some time before
22049 making this decision. This is the only way out for portability
22050 issues in Bison, it would mean way too much duplicate effort to
22051 import in Bison features implemented in 2.49c since 2.13.
22052 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22053
22054 2001-02-02 Akim Demaille <akim@epita.fr>
22055
22056 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22057 * lib/xalloc.h, lib/xmalloc.c: Update.
22058
22059 2001-01-19 Akim Demaille <akim@epita.fr>
22060
22061 Get rid of the ad hoc handling of token_buffer in the scanner: use
22062 the obstacks.
22063
22064 * src/lex.c (token_obstack): New.
22065 (init_lex): Initialize it. No longer call...
22066 (grow_token_buffer): this. Remove it.
22067 Adjust all the places which used it to use the obstack.
22068
22069 2001-01-19 Akim Demaille <akim@epita.fr>
22070
22071 * src/lex.h: Rename all the tokens:
22072 s/\bENDFILE\b/tok_eof/g;
22073 s/\bIDENTIFIER\b/tok_identifier/g;
22074 etc.
22075 Let them be enums, not #define, to ease debugging.
22076 Adjust all the code.
22077
22078 2001-01-18 Akim Demaille <akim@epita.fr>
22079
22080 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22081 * src/lex.c (maxtoken, grow_token_buffer): Static.
22082
22083 2001-01-18 Akim Demaille <akim@epita.fr>
22084
22085 Since we now use obstacks, more % directives can be enabled.
22086
22087 * src/lex.c (percent_table): Also accept `%yacc',
22088 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22089 `%debug'.
22090 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22091 instead of returning a token.
22092 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22093 * src/reader.c (read_declarations): Adjust.
22094 * src/files.c (open_files): Don't call `compute_base_names', don't
22095 compute `attrsfile' since they depend upon data which might be
22096 *in* the input file now.
22097 (output_files): Do it here.
22098 * src/output.c (output_headers): Document the fact that this patch
22099 introduces a guaranteed SEGV for semantic parsers.
22100 * doc/bison.texinfo: Document them.
22101 * tests/suite.at: Exercise these %options.
22102
22103 2000-12-20 Akim Demaille <akim@epita.fr>
22104
22105 Also handle the output file (--verbose) with obstacks.
22106
22107 * files.c (foutput): Remove.
22108 (output_obstack): New.
22109 Adjust all dependencies.
22110 * src/conflicts.c: Return a string.
22111 * src/system.h (obstack_grow_string): Rename as...
22112 (obstack_sgrow): this. Be ready to work with non literals.
22113 (obstack_fgrow4): New.
22114
22115 2000-12-20 Akim Demaille <akim@epita.fr>
22116
22117 * src/files.c (open_files): Fix the computation of short_base_name
22118 in the case of `-o foo.tab.c'.
22119
22120 2000-12-20 Akim Demaille <akim@epita.fr>
22121
22122 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22123 (copy_dollar): Now that everything uses obstacks, get rid of the
22124 FILE * parameters.
22125
22126 2000-12-20 Akim Demaille <akim@epita.fr>
22127
22128 * src/files.c (open_files): Actually the `.output' file is based
22129 on the short_base_name, not base_name.
22130 * tests/suite.at (Checking output file names): Adjust.
22131
22132 2000-12-20 Akim Demaille <akim@epita.fr>
22133
22134 * src/bison.s1: Remove, we now use directly...
22135 * src/bison.simple: this.
22136 * src/Makefile.am: Use pkgdata instead of data.
22137
22138 2000-12-20 Akim Demaille <akim@epita.fr>
22139
22140 * src/files.c (guard_obstack): New.
22141 (open_files): Initialize it.
22142 (output_files): Dump it...
22143 * src/files.h: Export it.
22144 * src/reader.c (copy_guard): Use it.
22145
22146 2000-12-19 Akim Demaille <akim@epita.fr>
22147
22148 * src/files.c (outfile, defsfile, actfile): Removed as global
22149 vars.
22150 (open_files): Don't compute them.
22151 (output_files): Adjust.
22152 (base_name, short_base_name): Be global.
22153 Adjust dependencies.
22154
22155 2000-12-19 Akim Demaille <akim@epita.fr>
22156
22157 * src/files.c (strsuffix): New.
22158 (stringappend): Be just like strcat but allocate.
22159 (base_names): Eve out from open_files.
22160 Try to simplify the rather hairy computation of base_name and
22161 short_base_name.
22162 (open_files): Use it.
22163 * tests/suite.at (Checking output file names): New test.
22164
22165 2000-12-19 Akim Demaille <akim@epita.fr>
22166
22167 * src/system.h (obstack_grow_literal_string): Rename as...
22168 (obstack_grow_string): this.
22169 * src/output.c (output_parser): Recognize `%% actions' instead of
22170 `$'.
22171 * src/bison.s1: s/$/%% actions/.
22172 * src/bison.hairy: Likewise.
22173
22174 2000-12-19 Akim Demaille <akim@epita.fr>
22175
22176 * src/output.c (output_parser): Compute the `#line' lines when
22177 there are.
22178 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22179 Suggested by Hans Aberg.
22180
22181 2000-12-19 Akim Demaille <akim@epita.fr>
22182
22183 Let the handling of the skeleton files be local to the procedures
22184 that use it.
22185
22186 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22187 longer static.
22188 (fparser, open_extra_files): Remove.
22189 (open_files, output_files): Don't take care of fparser.
22190 * src/files.h: Adjust.
22191 * src/output.c (output_parser): Open and close the file to the
22192 skeleton.
22193 * src/reader.c (read_declarations): When %semantic_parser, open
22194 fguard.
22195
22196 2000-12-19 Akim Demaille <akim@epita.fr>
22197
22198 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22199 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22200
22201 2000-12-19 Akim Demaille <akim@epita.fr>
22202
22203 * src/files.c (open_files): Yipee! We no longer need all the code
22204 looking for `/tmp' since we have no tmp file.
22205
22206 2000-12-19 Akim Demaille <akim@epita.fr>
22207
22208 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22209 New macros.
22210 * src/files.c (open_files): Less dependency on MSDOS etc.
22211
22212 2000-12-14 Akim Demaille <akim@epita.fr>
22213
22214 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22215 Provide a default definition.
22216 Use it when executing the default @ action.
22217 * src/reader.c (reader_output_yylsp): No longer include
22218 `timestamp' and `text' in the default YYLTYPE.
22219
22220 2000-12-12 Akim Demaille <akim@epita.fr>
22221
22222 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22223 (copy_guard): Quote the file names.
22224 Reported by Laurent Mascherpa.
22225
22226 2000-12-12 Akim Demaille <akim@epita.fr>
22227
22228 * src/output.c (output_headers, output_program, output): Be sure
22229 to escape special characters when outputting filenames.
22230 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22231 (output_headers): Don't depend on them, Use ACTSTR.
22232
22233 2000-11-17 Akim Demaille <akim@epita.fr>
22234
22235 * lib/obstack.h: Formatting changes.
22236 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22237 prevents type checking.
22238 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22239 cast the value to (void *): assigning a `foo *' to a `void *'
22240 variable is valid.
22241 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22242 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22243 append characters.
22244
22245 2000-11-17 Akim Demaille <akim@epita.fr>
22246
22247 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22248 as...
22249 (suite.m4, regression.m4, calc.m4): these.
22250 * tests/atgeneral.m4: Update from CVS Autoconf.
22251
22252 2000-11-17 Akim Demaille <akim@epita.fr>
22253
22254 * tests/regression.m4 (%union and --defines): New test,
22255 demonstrating a current bug in the obstack implementation.
22256
22257 2000-11-17 Akim Demaille <akim@epita.fr>
22258
22259 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22260 macros.
22261 Use them to declare the variables which are global or local to
22262 `yyparse'.
22263
22264 2000-11-17 Akim Demaille <akim@epita.fr>
22265
22266 * acconfig.h: Remove, no longer used.
22267
22268 2000-11-07 Akim Demaille <akim@epita.fr>
22269
22270 * src: s/Copyright (C)/Copyright/g.
22271
22272 2000-11-07 Akim Demaille <akim@epita.fr>
22273
22274 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22275 defining.
22276 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22277
22278 2000-11-07 Akim Demaille <akim@epita.fr>
22279
22280 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22281 Merge in a single CPP if/else.
22282
22283 2000-11-07 Akim Demaille <akim@epita.fr>
22284
22285 * src/output.c (output): Remove useless variables.
22286 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22287 argument `data' for consistency with the prototypes.
22288 Qualify it `const'.
22289 (obstack_copy, obstack_copy0): Rename the second argument as
22290 `address' for consistency. Qualify it `const'.
22291 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22292 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22293 `const' their input argument (`data' or `address').
22294 Adjust the corresponding macros to include `const' in casts.
22295
22296 2000-11-03 Akim Demaille <akim@epita.fr>
22297
22298 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22299 s/PFILE1/BISON_HAIRY/.
22300 Adjust dependencies.
22301
22302 2000-11-03 Akim Demaille <akim@epita.fr>
22303
22304 For some reason, this was not applied.
22305
22306 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22307 `unlink': it's no longer used.
22308
22309 2000-11-03 Akim Demaille <akim@epita.fr>
22310
22311 * src/files.c (skeleton_find): New function, eved out of...
22312 (open_files, open_extra_files): here.
22313
22314 2000-11-03 Akim Demaille <akim@epita.fr>
22315
22316 Don't use `atexit'.
22317
22318 * src/files.c (obstack_save): New function.
22319 (done): Rename as...
22320 (output_files): this.
22321 Use `obstack_save'.
22322 * src/main.c (main): Don't use `atexit' to register `done', since
22323 it no longer has to remove tmp files, just call `output_files'
22324 when there are no errors.
22325
22326 2000-11-02 Akim Demaille <akim@epita.fr>
22327
22328 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22329 `unlink': it's no longer used.
22330 * src/files.h: Formatting changes.
22331
22332 2000-11-02 Akim Demaille <akim@epita.fr>
22333
22334 Remove the last uses of mktemp and unlink/delete.
22335
22336 * src/files.c (fdefines, ftable): Removed.
22337 (defines_ostack, table_obstack): New.
22338 Adjust dependencies of the former into uses of the latter.
22339 * src/output.c (output_short_or_char_table, output_short_table):
22340 Convert to using obstacks.
22341 * src/reader.c (copy_comment2): Accept one FILE * and two
22342 obstacks.
22343 (output_token_defines, reader_output_yylsp): Use obstacks.
22344 * src/system.h (obstack_fgrow3): New.
22345 * po/POTFILES.in: Adjust.
22346
22347 2000-11-01 Akim Demaille <akim@epita.fr>
22348
22349 Change each use of `fattrs' into a use of `attrs_obstack'.
22350
22351 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22352 * src/files.c (fattrs): Remove.
22353 (attrs_obstack): New.
22354 Adjust all dependencies.
22355 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22356
22357 2000-11-01 Akim Demaille <akim@epita.fr>
22358
22359 Introduce obstacks.
22360 Change each use of `faction' into a use of `action_obstack'.
22361
22362 * lib/obstack.h, lib/obstack.c: New files.
22363 * src/files.c (faction): Remove.
22364 (action_obstack): New.
22365 Adjust all dependencies.
22366
22367 2000-10-20 Akim Demaille <akim@epita.fr>
22368
22369 * lib/quote.h (PARAMS): New macro. Use it.
22370
22371 2000-10-16 Akim Demaille <akim@epita.fr>
22372
22373 * src/output.c (output_short_or_char_table): New function.
22374 (output_short_table, output_token_translations): Use it.
22375 (goto_actions): Use output_short_table.
22376
22377 2000-10-16 Akim Demaille <akim@epita.fr>
22378
22379 * src/symtab.c (bucket_new): New function.
22380 (getsym): Use it.
22381
22382 * src/output.c (output_short_table): New argument to display the
22383 comment associated with the table.
22384 Adjust dependencies.
22385 (output_gram): Use it.
22386 (output_rule_data): Nicer output layout for YYTNAME.
22387
22388 2000-10-16 Akim Demaille <akim@epita.fr>
22389
22390 * src/lex.c (read_typename): New function.
22391 (lex): Use it.
22392 * src/reader.c (copy_dollar): Likewise.
22393
22394 2000-10-16 Akim Demaille <akim@epita.fr>
22395
22396 * src/reader.c (copy_comment2): Expect the input stream to be on
22397 the `/' which is suspected to open a comment, instead of being
22398 called after `//' or `/*' was read.
22399 (copy_comment, copy_definition, parse_union_decl, copy_action)
22400 (copy_guard): Adjust.
22401
22402 2000-10-16 Akim Demaille <akim@epita.fr>
22403
22404 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22405 `read_signed_integer'.
22406
22407 2000-10-16 Akim Demaille <akim@epita.fr>
22408
22409 * src/reader.c (copy_dollar): New function.
22410 (copy_guard, copy_action): Use it.
22411
22412 2000-10-16 Akim Demaille <akim@epita.fr>
22413
22414 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22415 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22416 New files, from Fileutils 4.0.27.
22417 * src/main.c (printable_version): Remove.
22418 * src/lex.c, src/reader.c: Use `quote'.
22419
22420 2000-10-04 Akim Demaille <akim@epita.fr>
22421
22422 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22423
22424 2000-10-04 Akim Demaille <akim@epita.fr>
22425
22426 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22427
22428 2000-10-04 Akim Demaille <akim@epita.fr>
22429
22430 When a literal string is used to define two different tokens,
22431 `bison -v' segfaults.
22432 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22433
22434 * tests/regression.m4: New file.
22435 Include the core of the sample provided by Piotr Gackiewicz.
22436 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22437 properly.
22438
22439 2000-10-04 Akim Demaille <akim@epita.fr>
22440
22441 * src/reader.c (parse_expect_decl): Keep `count' within the size
22442 of `buffer'.
22443 From Neil Booth.
22444
22445 2000-10-02 Paul Eggert <eggert@twinsun.com>
22446
22447 * bison.s1 (yyparse): Assign the default value
22448 unconditionally, to avoid a GCC warning and make the parser a
22449 tad smaller.
22450
22451 2000-10-02 Akim Demaille <akim@epita.fr>
22452
22453 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22454 options.
22455
22456 2000-10-02 Akim Demaille <akim@epita.fr>
22457
22458 * src/derives.c, src/print.c, src/reduce.c: To ease the
22459 translation, move some `\n' out of the translated strings.
22460
22461 2000-10-02 Akim Demaille <akim@epita.fr>
22462
22463 The location tracking mechanism is precious for parse error
22464 messages. Nevertheless, it is enabled only when `@n' is used in
22465 the grammar, which is a different issue (you can use it in error
22466 message, but not in the grammar per se). Therefore, there should
22467 be another means to enable it.
22468
22469 * src/getargs.c (getargs): Support `--locations'.
22470 (usage): Report it.
22471 * src/getargs.h (locationsflag): Export it.
22472 * src/lex.c (percent_table): Support `%locations'.
22473 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22474 with `locationsflag'.
22475 * doc/bison.texinfo: Document `--locations' and `%locations'.
22476 Sort the options.
22477 * tests/calc.m4: Test it.
22478
22479 For regularity of the names, replace each
22480 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22481 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22482 In addition replace each `flag' with `_flag'.
22483
22484 2000-10-02 Akim Demaille <akim@epita.fr>
22485
22486 Also test parse error messages, including with YYERROR_VERBOSE.
22487
22488 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22489 associative).
22490 Use it to check the computations.
22491 Use it to check `nonassoc' is honored.
22492 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22493 `--yyerror-verbose'.
22494 (_AT_CHECK_CALC): Adjust to this option.
22495 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22496
22497 2000-10-02 Akim Demaille <akim@epita.fr>
22498
22499 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22500 the latter demonstrates a flaw in the handling of non debugging
22501 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22502 was used in order to simplify:
22503
22504 #if YYDEBUG
22505 if (yydebug)
22506 {
22507 ...
22508 }
22509 #endif
22510
22511 into
22512
22513 if (yydebug)
22514 {
22515 ...
22516 }
22517
22518 unfortunately this leads to a CPP conflict when
22519 `--name-prefix=foo' is used since it produces `#define yydebug
22520 foodebug'.
22521
22522 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22523 (YYDPRINTF): New macro.
22524 Spread its use.
22525 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22526 the bison options.
22527 Also test `--verbose', `--defines' and `--name-prefix'.
22528
22529 2000-10-02 Akim Demaille <akim@epita.fr>
22530
22531 Improve the readability of the produced parsers.
22532
22533 * src/bison.s1: Formatting changes.
22534 Improve the comment related to the `$' mark.
22535 (yydefault): Don't fall through to `yyresume': `goto' there.
22536 * src/output.c (output_parser): When the `$' is met, skip the end
22537 of its line.
22538 New variable, `number_of_dollar_signs', to check there's exactly
22539 one `$' in the parser skeleton.
22540
22541 2000-10-02 Akim Demaille <akim@epita.fr>
22542
22543 * lib/xstrdup.c: New file, from the fileutils.
22544 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22545 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22546 instead of strlen + xmalloc + strcpy.
22547 * src/symtab.c (copys): Remove, use xstrdup instead.
22548
22549 2000-10-02 Akim Demaille <akim@epita.fr>
22550
22551 * src/gram.h (associativity): New enum type which replaces the
22552 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22553 `right_assoc', `left_assoc' and `non_assoc'.
22554 Adjust all dependencies.
22555 * src/reader.c: Formatting changes.
22556 (LTYPESTR): Don't define it, use it as a literal in
22557 `reader_output_yylsp'.
22558 * src/symtab.h (symbol_class): New enum type which replaces the
22559 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22560 `sunknown', `stoken and `snterm'.
22561
22562 2000-10-02 Akim Demaille <akim@epita.fr>
22563
22564 * src/getargs.c (fixed_outfiles): Rename as...
22565 (yaccflag): for consistency and accuracy.
22566 Adjust dependencies.
22567
22568 2000-10-02 Akim Demaille <akim@epita.fr>
22569
22570 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22571 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22572 difficult and introduced a lot of core dump. It turns out that
22573 Bison used an implementation of `xmalloc' based on `calloc', and
22574 at various places it does depend upon the initialization to 0. I
22575 have not tried to isolate the pertinent places, and all the former
22576 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22577 someone should address this issue.
22578
22579 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22580 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22581 files.
22582 Adjust dependencies.
22583 * src/warshall.h: New file.
22584 Propagate.
22585
22586 2000-10-02 Akim Demaille <akim@epita.fr>
22587
22588 Various anti-`extern in *.c' changes.
22589
22590 * src/system.h: Include `assert.h'.
22591
22592 2000-10-02 Akim Demaille <akim@epita.fr>
22593
22594 * src/state.h (nstates, final_state, first_state, first_shift)
22595 (first_reduction): Move their exportation from here...
22596 * src/LR0.h: to here.
22597 Adjust dependencies.
22598 * src/getargs.c (statisticsflag): New variable.
22599 Add support for `--statistics'.
22600 Adjust dependencies.
22601
22602 Remove a lot of now useless `extern' statements in most files.
22603
22604 2000-10-02 Akim Demaille <akim@epita.fr>
22605
22606 * src/LR0.h: New file.
22607 Propagate its use.
22608
22609 2000-10-02 Akim Demaille <akim@epita.fr>
22610
22611 * src/print.h: New file.
22612 Propagate its use.
22613 * src/print.c: Formatting and ordering changes.
22614 (verbose, terse): Replace with...
22615 (print_results): this new function.
22616 Adjust dependencies.
22617
22618 2000-10-02 Akim Demaille <akim@epita.fr>
22619
22620 * src/conflicts.c (conflict_report): New function.
22621 (conflict_log, verbose_conflict_log): Replace with...
22622 (print_conflicts): this function.
22623 Adjust dependencies.
22624 * src/conflicts.h: New file.
22625 Propagate its inclusion.
22626
22627 2000-10-02 Akim Demaille <akim@epita.fr>
22628
22629 * src/nullable.h: New file.
22630 Propagate its inclusion.
22631 * src/nullable.c: Formatting changes.
22632
22633 2000-10-02 Akim Demaille <akim@epita.fr>
22634
22635 * src/reduce.h: New file.
22636 Propagate its inclusion.
22637 * src/reduce.c: Topological sort and other formatting changes.
22638 (bool, TRUE, FALSE): Move their definition to...
22639 * src/system.h: here.
22640
22641 2000-10-02 Akim Demaille <akim@epita.fr>
22642
22643 * src/files.c: Formatting changes.
22644 (tryopen, tryclose, openfiles): Rename as...
22645 (xfopen, xfclose, open_files): this.
22646 (stringappend): static.
22647 * src/files.h: Complete the list of exported symbols.
22648 Propagate its use.
22649
22650 2000-10-02 Akim Demaille <akim@epita.fr>
22651
22652 * src/reader.h: New file.
22653 Propagate its use instead of tedious list of `extern' and
22654 prototypes.
22655 * src/reader.c: Formatting changes, topological sort,
22656 s/register//.
22657
22658 2000-10-02 Akim Demaille <akim@epita.fr>
22659
22660 * src/lex.h: Prototype `lex.c' exported functions.
22661 * src/reader.c: Adjust.
22662 * src/lex.c: Formatting changes.
22663 (safegetc): Rename as...
22664 (xgetc): this.
22665
22666 2000-10-02 Akim Demaille <akim@epita.fr>
22667
22668 * src/lalr.h: New file.
22669 Propagate its inclusion instead of prototypes and `extern'.
22670 * src/lalr.c: Formatting changes, topological sorting etc.
22671
22672 2000-10-02 Akim Demaille <akim@epita.fr>
22673
22674 * src/output.c (token_actions): Introduce a temporary array,
22675 YYDEFACT, that makes it possible for this function to use
22676 output_short_table.
22677
22678 2000-10-02 Akim Demaille <akim@epita.fr>
22679
22680 `user_toknums' is output as a `short[]' in `output.c', while it is
22681 defined as a `int[]' in `reader.c'. For consistency with the
22682 other output tables, `user_toknums' is now defined as a table of
22683 shorts.
22684
22685 * src/reader.c (user_toknums): Be a short table instead of an int
22686 table.
22687 Adjust dependencies.
22688
22689 Factor the short table outputs.
22690
22691 * src/output.c (output_short_table): New function.
22692 * src/output.c (output_gram, output_stos, output_rule_data)
22693 (output_base, output_table, output_check): Use it.
22694
22695 2000-10-02 Akim Demaille <akim@epita.fr>
22696
22697 * src/output.c (output): Topological sort of the functions, in
22698 order to get rid of the `static' prototypes.
22699 No longer use `register'.
22700 * src/output.h: New file.
22701 Propagate its inclusion in files explicitly prototyping functions
22702 from output.c.
22703
22704 2000-09-21 Akim Demaille <akim@epita.fr>
22705
22706 * src/atgeneral.m4: Update from Autoconf.
22707
22708 2000-09-21 Akim Demaille <akim@epita.fr>
22709
22710 * src/closure.h: New file.
22711 * src/closure.c: Formatting changes, topological sort over the
22712 functions, use of closure.h.
22713 (initialize_closure, finalize_closure): Rename as...
22714 (new_closure, free_closure): these. Adjust dependencies.
22715 * src/LR0.c: Formatting changes, topological sort, use of
22716 cloture.h.
22717 (initialize_states): Rename as...
22718 (new_states): this.
22719 * src/Makefile.am (noinst_HEADERS): Adjust.
22720
22721 2000-09-20 Akim Demaille <akim@epita.fr>
22722
22723 * src/acconfig.h: Don't protect config.h against multiple
22724 inclusion.
22725 Don't define PARAMS.
22726 * src/system.h: Define PARAMS.
22727 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22728 purpose of config.h. system.h must not try to fix wrong
22729 definitions in config.h.
22730
22731 2000-09-20 Akim Demaille <akim@epita.fr>
22732
22733 * src/derives.h: New file.
22734 * src/main.c, src/derives.h: Use it.
22735 Formatting changes.
22736 * src/Makefile.am (noinst_HEADERS): Adjust.
22737
22738 2000-09-20 Akim Demaille <akim@epita.fr>
22739
22740 * tests/atgeneral.m4: Update from Autoconf.
22741 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22742 (AT_CHECK_CALC): New macros.
22743 Use these macros to test bison with options `', `--raw',
22744 `--debug', `--yacc', `--yacc --debug'.
22745
22746 2000-09-19 Akim Demaille <akim@epita.fr>
22747
22748 * src/output.c: Formatting changes.
22749 * src/machine.h: Remove, leaving its contents in...
22750 * src/system.h: here.
22751 Include stdio.h.
22752 Adjust all dependencies on stdio.h and machine.h.
22753 * src/getargs.h: New file.
22754 Let all `extern' declarations about getargs.c be replaced with
22755 inclusion of `getargs.h'.
22756 * src/Makefile.am (noinst_HEADERS): Adjust.
22757
22758 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22759 scope.
22760 (yyerror): Returns void, not int.
22761 * doc/bison.texinfo: Formatting changes.
22762
22763 2000-09-19 Akim Demaille <akim@epita.fr>
22764
22765 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22766 portable.
22767
22768 2000-09-18 Akim Demaille <akim@epita.fr>
22769
22770 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22771 * src/Makefile.am (INCLUDES): Don't.
22772 Be ready to fetch headers in lib/.
22773
22774 2000-09-18 Akim Demaille <akim@epita.fr>
22775
22776 * doc/bison.texinfo: Update the copyright.
22777 ANSIfy and GNUify the examples.
22778 Remove the old menu.
22779
22780 2000-09-18 Akim Demaille <akim@epita.fr>
22781
22782 First set of tests: use the `calc' example from the documentation.
22783
22784 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22785 is defined only when YYDEBUG is.
22786 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22787 * src/files.c (tryopen, tryclose): Formatting changes.
22788 Move to the top and be static.
22789 * src/reader.c (read_signed_integer): Likewise.
22790 * tests/calc.m4: New file.
22791 * Makefile.am, suite.m4: Adjust.
22792 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22793
22794 2000-09-18 Akim Demaille <akim@epita.fr>
22795
22796 Add support for an Autotest test suite for Bison.
22797
22798 * m4/m4.m4, m4/atconfig.m4: New files.
22799 * m4/Makefile.am (EXTRA_DIST): Adjust.
22800 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22801 files.
22802 * src/getargs.c: Display a more standard --version message.
22803 * src/reader.c (reader): Formatting changes.
22804 No longer depend upon VERSION_STRING.
22805 * configure.in: No longer use `dnl'.
22806 Set up the test suite and the new directory `tests/.
22807 (VERSION_STRING): Remove.
22808
22809 2000-04-14 Akim Demaille <akim@epita.fr>
22810
22811 * src/reader.c (copy_comment2): New function, same as former
22812 `copy_comment', but outputs into two FILE *.
22813 (copy_comment): Use it.
22814 (parse_union_decl): Use it.
22815 (get_type, parse_start_decl): Use the same `invalid' message.
22816 (parse_start_decl, parse_union_decl): Use the same `multiple'
22817 message.
22818 (parse_union_decl, copy_guard, copy_action): Use the same
22819 `unmatched' message.
22820 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22821
22822 2000-03-31 Akim Demaille <akim@epita.fr>
22823
22824 * src/files.c (tryopen, tryclose): Move to the top.
22825 Be static.
22826
22827 2000-03-31 Akim Demaille <akim@epita.fr>
22828
22829 * src/main.c (main): Don't call `done', exit does it.
22830
22831 2000-03-31 Akim Demaille <akim@epita.fr>
22832
22833 * allocate.c: s/return (foo)/return foo/.
22834 * lalr.c: Likewise.
22835 * LR0.c: Likewise.
22836 * output.c: Likewise.
22837 * reader.c: Likewise.
22838 * symtab.c: Likewise.
22839 * vmsgetargs.c: Likewise.
22840
22841 2000-03-31 Akim Demaille <akim@epita.fr>
22842
22843 Clean up the error reporting functions.
22844
22845 * src/report.c: New file.
22846 * src/report.h: Likewise.
22847 * src/Makefile.am: Adjust.
22848 * m4/error.m4: New file.
22849 * m4/Makefile.am: Adjust.
22850 * configure.in (jm_PREREQ_ERROR): Call it.
22851 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22852 Remove.
22853 (fatal, fatals): Remove. All callers use complain.c::fatal.
22854 (warn, warni, warns, warnss, warnss): Remove. All callers use
22855 complain.c::complain.
22856 (toomany): Remove, use fatal instead.
22857 * src/files.c (done): No argument, use complain_message_count.
22858 * src/main.c (main): Register `done' to `atexit'.
22859
22860 * src/getargs.c (usage): More `fputs', less `fprintf'.
22861
22862 2000-03-28 Akim Demaille <akim@epita.fr>
22863
22864 * lib/: New directory.
22865 * Makefile.am (SUBDIRS): Adjust.
22866 * configure.in: Adjust.
22867 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22868 useless.
22869 * src/alloca.c: Moved to lib/.
22870 * src/getopt.c: Likewise.
22871 * src/getopt1.c: Likewise.
22872 * src/getopt.h: Likewise.
22873 * src/ansi2knr.c: Likewise.
22874 * src/ansi2knr.1: Likewise.
22875 * src/Makefile.am: Adjust.
22876 * lib/Makefile.am: New file.
22877
22878 2000-03-28 Akim Demaille <akim@epita.fr>
22879
22880 * src/getargs.c (usage): Refresh the help message.
22881
22882 2000-03-17 Akim Demaille <akim@epita.fr>
22883
22884 * src/getopt1.c: Updated from textutils 2.0e
22885 * src/getopt.c: Likewise.
22886 * src/getopt.h: Likewise.
22887
22888 2000-03-17 Akim Demaille <akim@epita.fr>
22889
22890 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22891 the file name, not the whole `#line LINE FILE'.
22892
22893 2000-03-17 Akim Demaille <akim@epita.fr>
22894
22895 On syntax errors, report the token on which we choked.
22896
22897 * src/bison.s1 (yyparse): In the label yyerrlab, when
22898 YYERROR_VERBOSE, add yychar in msg.
22899
22900 2000-03-17 Akim Demaille <akim@epita.fr>
22901
22902 * src/reader.c (copy_at): New function.
22903 (copy_guard): Use it.
22904 (copy_action): Use it.
22905
22906 2000-03-17 Akim Demaille <akim@epita.fr>
22907
22908 Be kind to translators, save some useless translations.
22909
22910 * src/main.c (banner): New function.
22911 (fatal_banner): Use it.
22912 (warn_banner): Use it.
22913
22914 2000-03-17 Akim Demaille <akim@epita.fr>
22915
22916 * src/reader.c (copy_definition): Use copy_string and
22917 copy_comment. Removed now unused `match', `ended',
22918 `cplus_comment'.
22919 (copy_comment, copy_string): Moved, to be visible from
22920 copy_definition.
22921
22922 2000-03-17 Akim Demaille <akim@epita.fr>
22923
22924 * src/reader.c (copy_string): Declare `static inline'. No
22925 problems with inline, since it is checked by configure.
22926 (copy_comment): Likewise.
22927
22928 2000-03-17 Akim Demaille <akim@epita.fr>
22929
22930 * src/reader.c (packsymbols): Formatting changes.
22931
22932 2000-03-17 Akim Demaille <akim@epita.fr>
22933
22934 * src/reader.c (copy_comment): New function, factored out from:
22935 (copy_action): Use it. Removed now unused `match', `ended',
22936 `cplus_comment'.
22937 (copy_guard): Likewise.
22938
22939 2000-03-17 Akim Demaille <akim@epita.fr>
22940
22941 * src/reader.c (copy_string): New function, factored out from:
22942 (copy_action): Use it.
22943 (copy_guard): Likewise.
22944
22945 2000-03-17 Akim Demaille <akim@epita.fr>
22946
22947 Change the handling of @s so that they behave exactly like $s.
22948 There is now a pseudo variable @$ (readble and writable), location
22949 of the lhs of the rule (by default ranging from the location of
22950 the first symbol of the rhs, to the location of the last symbol,
22951 or, if the rhs is empty, YYLLOC).
22952
22953 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22954 yyval.
22955 (yyparse): When providing a default semantic action, provide a
22956 default location action.
22957 (after the $): No longer change `*YYLSP', just stack YYLOC the
22958 same way you stack YYVAL.
22959 * src/reader.c (read_declarations): Use warns.
22960 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22961 (copy_action, case '@'): Likewise.
22962 Use a standard error message, to save useless work from
22963 translators.
22964
22965 2000-03-17 Akim Demaille <akim@epita.fr>
22966
22967 * src/bison.s1: Formatting and cosmetics changes.
22968 * src/reader.c: Likewise.
22969 Update the Copyright notice.
22970
22971 2000-03-17 Akim Demaille <akim@epita.fr>
22972
22973 * src/bison.s1 (#line): All set to `#line' only, since the
22974 Makefile now handles them.
22975
22976 2000-03-16 Akim Demaille <akim@epita.fr>
22977
22978 * src/output.c (output_rule_data): Output the documentation of
22979 some of the tables.
22980 (Copyright notice): Update.
22981 Formatting changes.
22982
22983 2000-03-16 Akim Demaille <akim@epita.fr>
22984
22985 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22986 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22987 One `#if YYDEBUG' remains, since it uses variables which are
22988 defined only if `YYDEBUG != 0'.
22989
22990 2000-03-16 Akim Demaille <akim@epita.fr>
22991
22992 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22993 and related variables so that the similarities are highlighted.
22994
22995 2000-03-16 Akim Demaille <akim@epita.fr>
22996
22997 * src/bison.s1: Properly indent CPP directives.
22998
22999 2000-03-16 Akim Demaille <akim@epita.fr>
23000
23001 * src/bison.s1: Properly indent the `alloca' CPP section.
23002
23003 2000-03-16 Akim Demaille <akim@epita.fr>
23004
23005 Do not hard code values of directories in `configure.in'.
23006 Update the `configure' tool chain.
23007
23008 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23009 src/makefile.am.
23010 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23011 (AC_OUTPUT): Add m4/Makefile.
23012 Bump to bison 1.28a, 1.29 has never been released.
23013 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23014 handled via src/Makefile.am.
23015 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23016 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23017 autoheader.
23018 * Makefile.am (SUBDIRS): Add m4.
23019 (ACLOCAL_AM_FLAGS): New variable.
23020 (AUTOMAKE_OPTIONS): Add check-news.
23021 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23022 the proper line number and file name.
23023 (DEFS): Propagate the location of bison library files and of the
23024 locale files.
23025 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23026 builddir.
23027 * acinclude.m4: Remove, replaced by the directory m4.
23028 * m4/Makefile.am (EXTRA_DIST): New variable.
23029 * m4/gettext.m4: New file, from the fileutils.
23030 * m4/lcmessage.m4: Likewise
23031 * m4/progtest.m4: Likewise.
23032 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23033
23034 2000-03-10 Akim Demaille <akim@epita.fr>
23035
23036 * src/closure.c:
23037 Formatting changes of various comments.
23038 Respect the GNU coding standards at various places.
23039 Don't use `_()' when no translation is needed.
23040
23041 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23042
23043 * src/files.c:
23044 OS/2 honors TMPDIR environment variable.
23045
23046 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23047
23048 * doc/bison.texinfo: Tweaked spelling and grammar.
23049 Updated ISBN.
23050 Removed reference to price of printed copy.
23051 Mention BISON_SIMPLE and BISON_HAIRY.
23052
23053 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23054
23055 * configure.in, NEWS:
23056 Bison 1.29 released.
23057
23058 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23059
23060 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23061 Added reference card.
23062
23063 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23064
23065 * po/ru.po: Added Russian translation.
23066
23067 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23068
23069 * configure.in: Added Russian translation.
23070
23071 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23072
23073 * configure.in, NEWS, README:
23074 Released version 1.28.
23075
23076 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23077
23078 * src/system.h:
23079 Squashed redefinition warning on some systems.
23080
23081 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23082 Have configure build version string instead of relying on ANSI string
23083 concatentation.
23084
23085 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23086
23087 * po/POTFILES.in: Got rid of version.c.
23088
23089 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23090
23091 * acconfig.h, configure.in:
23092 Have configure build version string instead of relying on ANSI string
23093 concatentation.
23094
23095 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23096
23097 * doc/bison.1:
23098 Dropped mention of `+' for long-named options.
23099
23100 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23101
23102 * src/files.c: Added <unistd.h> for unlink().
23103
23104 * src/Makefile.am, src/system.h:
23105 I18n fixes.
23106
23107 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23108
23109 * README: Added a FAQ list.
23110
23111 * configure.in, acconfig.h:
23112 I18n fixes.
23113
23114 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23115
23116 * doc/FAQ, doc/Makefile.am:
23117 Added a FAQ list.
23118
23119 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23120
23121 * src/alloc.h, src/symtab.h, src/version.c:
23122 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23123
23124 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23125
23126 * src/.cvsignore, src/Makefile.am:
23127 Reorganized: sources in `src', documentation in `doc'.
23128
23129 * src/lex.c (literalchar):
23130 fixed the code for escaping double quotes (thanks
23131 Jonathan Czisny.)
23132
23133 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23134
23135 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23136 Adjusted paths to reflect directory reorganization.
23137
23138 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23139
23140 * doc/.cvsignore, doc/Makefile.am:
23141 Reorganized: sources in `src', documentation in `doc'.
23142
23143 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23144
23145 * configure.in:
23146 Updated AC_INIT file to reflect directory reorganization.
23147
23148 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23149 Reorganized: sources in `src', documentation in `doc'.
23150
23151 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23152
23153 * src/allocate.c:
23154 Don't declare calloc() and realloc() if not necessary.
23155
23156 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23157
23158 * configure.in, acconfig.h, acinclude.m4:
23159 Don't declare calloc() and realloc() if not necessary.
23160
23161 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23162
23163 * po/.cvsignore: Added i18n support.
23164
23165 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23166
23167 * acconfig.h, configure.in, Makefile.am:
23168 Added i18n support.
23169
23170 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23171
23172 * src/bison.s1: Fixed #line numbers.
23173
23174 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23175
23176 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23177 Added PO files from Translation Project.
23178
23179 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23180
23181 * Makefile.am:
23182 Added support for non-ANSI compilers (ansi2knr).
23183
23184 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23185
23186 * configure.in: Bumped version number to 1.27.
23187
23188 * Makefile.am:
23189 Added `bison.simple' to list of files removed by `make distclean'.
23190
23191 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23192
23193 * src/files.c, src/files.h:
23194 Defined locations of parser files in config.h instead of Makefile.
23195
23196 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23197
23198 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23199 Defined locations of parser files in config.h instead of Makefile.
23200
23201 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23202
23203 * Makefile.am:
23204 Removed inappropriate use of $< macro.
23205
23206 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23207
23208 * po/Makefile.in.in, po/POTFILES.in:
23209 Add `po' directory skeleton.
23210
23211 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23212
23213 * README: Document help-bison list.
23214
23215 * configure.in: Add check for mkstemp().
23216
23217 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23218
23219 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23220 Hush a few compiler warnings.
23221
23222 * src/files.c:
23223 Add tryclose(), which verifies that fclose was successful.
23224 Hush a couple of compiler warnings.
23225
23226 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23227
23228 * Makefile.am, OChangeLog:
23229 ChangeLog is now automatically generated. Include the old version as
23230 OChangeLog.
23231
23232 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23233
23234 * 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:
23235 Update FSF address.
23236
23237 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23238
23239 * doc/bison.texinfo: Fix formatting glitch.
23240
23241 * doc/bison.texinfo: Update FSF address.
23242
23243 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23244
23245 * acconfig.h: Update FSF address.
23246
23247 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23248
23249 * src/system.h:
23250 Don't define PACKAGE here, since config.h defines it.
23251
23252 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23253
23254 * src/reader.c: Update copyright date.
23255
23256 * src/main.c:
23257 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23258 favor of output directly to stderr (avoids buffer overruns).
23259
23260 * src/reader.c: Some checks for premature EOF.
23261
23262 * 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:
23263 Use prototypes if the compiler understands them.
23264
23265 * src/files.c: Honor TMPDIR on Unix hosts.
23266 Use prototypes if the compiler understands them.
23267
23268 * src/reader.c:
23269 Fix a couple of buffer overrun bugs.
23270 Use prototypes if the compiler understands them.
23271
23272 * src/system.h: Include unistd.h and ctype.h.
23273 Use #ifdef instead of #if for NLS symbols.
23274
23275 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23276
23277 * doc/bison.texinfo:
23278 Delete comment "consider using @set for edition number, etc..." since
23279 we now are doing so.
23280
23281 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23282
23283 * configure.in:
23284 Use prototypes if the compiler understands them.
23285
23286 * NEWS: Document 1.26 highlights.
23287
23288 * Makefile.am: Require Automake 1.3 or later.
23289
23290 * acconfig.h:
23291 Use prototypes if the compiler understands them.
23292
23293 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23294
23295 * src/version.c:
23296 Use VERSION symbol from automake for version number.
23297
23298 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23299
23300 * acconfig.h, configure.in, version.cin:
23301 Use VERSION symbol from automake for version number.
23302
23303 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23304
23305 * Makefile.am:
23306 Distribute original version of simple parser (bison.s1), not built
23307 version (bison.simple).
23308
23309 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23310
23311 * doc/bison.texinfo: Add info dir entry.
23312
23313 * doc/bison.texinfo:
23314 Let automake put version number into documentation.
23315
23316 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23317
23318 * src/bison.cld, src/build.com, src/vmshlp.mar:
23319 Add non-RCS files from /gd/gnu/bison.
23320
23321 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23322
23323 * doc/bison.1:
23324 Document the BISON_HAIRY and BISON_SIMPLE variables.
23325
23326 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23327
23328 * src/version.c: Build version.c automatically.
23329
23330 * src/reader.c:
23331 Fix token numbering (used to start at 258, not 257).
23332
23333 * src/system.h: Include config.h.
23334
23335 * src/getargs.c: Update bug report address.
23336
23337 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23338 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23339
23340 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23341
23342 * Makefile.am:
23343 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23344
23345 * configure.in, version.cin:
23346 Build version.c automatically.
23347
23348 * AUTHORS: Add AUTHORS file.
23349
23350 * README: Update bug report address.
23351
23352 * bison.simple:
23353 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23354
23355 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23356 Add automake stuff.
23357
23358 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23359
23360 * doc/bison.texinfo: Clean up some formatting.
23361
23362 1998-05-05 Richard Stallman <rms@gnu.org>
23363
23364 * doc/bison.texinfo:
23365 Explain better why to make a pure parser.
23366
23367 1998-01-05 Richard Stallman <rms@gnu.org>
23368
23369 * src/files.c (openfiles):
23370 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23371 find a temporary directory, if possible. Do not unlink files while
23372 they are open.
23373
23374 1997-08-25 Richard Stallman <rms@gnu.org>
23375
23376 * src/reader.c (stack_offset;):
23377 Change some warni to warns.
23378
23379 * src/lex.c (literalchar): Use warns, not warni.
23380
23381 1997-06-28 Richard Stallman <rms@gnu.org>
23382
23383 * src/bison.s1: Add a Bison version comment.
23384
23385 * src/main.c (fatal, warn, berror):
23386 Use program_name.
23387
23388 1997-06-28 Richard Stallman <rms@gnu.org>
23389
23390 * Makefile.in (bison_version): New variable.
23391 (dist): Use that variable.
23392 (bison.s1): Substitute the Bison version into bison.simple.
23393
23394 * bison.simple: Add a Bison version comment.
23395
23396 1997-06-18 Richard Stallman <rms@gnu.org>
23397
23398 * src/main.c (fatal, warn, berror):
23399 Make error messages standard.
23400 (toomany): Improve error message text.
23401
23402 * 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:
23403 new.h renamed to alloc.h.
23404
23405 1997-06-18 Richard Stallman <rms@gnu.org>
23406
23407 * Makefile.in: new.h renamed to alloc.h.
23408
23409 1997-05-24 Richard Stallman <rms@gnu.org>
23410
23411 * src/lex.c (literalchar):
23412 Fix the code for escaping \, " and '.
23413
23414 (lex): Avoid trouble when there are many chars
23415 to discard in a char literal with just several chars in it.
23416
23417 1997-05-17 Richard Stallman <rms@gnu.org>
23418
23419 * src/bison.s1:
23420 Use malloc, if using alloca is troublesome.
23421 (YYSTACK_USE_ALLOCA): New flag macro.
23422 Define it for some systems and compilers.
23423 (YYSTACK_ALLOC): New macro.
23424 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23425 If it was malloc'd, free it.
23426
23427 1997-05-17 Richard Stallman <rms@gnu.org>
23428
23429 * bison.simple:
23430 Use malloc, if using alloca is troublesome.
23431 (YYSTACK_USE_ALLOCA): New flag macro.
23432 Define it for some systems and compilers.
23433 (YYSTACK_ALLOC): New macro.
23434 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23435 If it was malloc'd, free it.
23436
23437 1997-04-23 Richard Stallman <rms@gnu.org>
23438
23439 * src/bison.s1:
23440 (alloca) [__hpux]: Always define as __builtin_alloca.
23441
23442 1997-04-23 Richard Stallman <rms@gnu.org>
23443
23444 * bison.simple:
23445 (alloca) [__hpux]: Always define as __builtin_alloca.
23446
23447 1997-04-22 Richard Stallman <rms@gnu.org>
23448
23449 * src/bison.s1:
23450 [__hpux]: Include alloca.h (right for HPUX 10)
23451 instead of declaring alloca (right for HPUX 9).
23452
23453 * src/bison.s1 (__yy_memcpy):
23454 Declare arg `count' as unsigned int.
23455 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23456
23457 1997-04-22 Richard Stallman <rms@gnu.org>
23458
23459 * bison.simple:
23460 [__hpux]: Include alloca.h (right for HPUX 10)
23461 instead of declaring alloca (right for HPUX 9).
23462
23463 * bison.simple (__yy_memcpy):
23464 Declare arg `count' as unsigned int.
23465 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23466
23467 1997-01-03 Richard Stallman <rms@gnu.org>
23468
23469 * src/allocate.c: [__STDC__ or _MSC_VER]:
23470 Declare calloc and realloc to return void *.
23471
23472 1997-01-02 Richard Stallman <rms@gnu.org>
23473
23474 * src/system.h:
23475 [_MSC_VER]: Include stdlib.h and process.h.
23476 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23477
23478 * src/main.c (main): Return FAILURE as a value.
23479 (printable_version): Declare arg as int, not char.
23480
23481 1997-01-02 Richard Stallman <rms@gnu.org>
23482
23483 * Makefile.in (dist):
23484 Explicitly check for symlinks, and copy them.
23485
23486 1996-12-19 Richard Stallman <rms@gnu.org>
23487
23488 * src/files.c:
23489 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23490
23491 1996-12-18 Paul Eggert <eggert@gnu.org>
23492
23493 * src/bison.s1 (yyparse):
23494 If __GNUC__ and YYPARSE_PARAM are both defined,
23495 declare yyparse to have a void * argument.
23496
23497 1996-12-18 Paul Eggert <eggert@gnu.org>
23498
23499 * bison.simple (yyparse):
23500 If __GNUC__ and YYPARSE_PARAM are both defined,
23501 declare yyparse to have a void * argument.
23502
23503 1996-12-17 Richard Stallman <rms@gnu.org>
23504
23505 * src/reduce.c (nbits): Add some casts.
23506
23507 1996-08-12 Richard Stallman <rms@gnu.org>
23508
23509 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23510
23511 1996-08-12 Richard Stallman <rms@gnu.org>
23512
23513 * bison.simple: Test _MSDOS as well as _MSDOS_.
23514
23515 1996-07-31 Richard Stallman <rms@gnu.org>
23516
23517 * src/bison.s1:
23518 [__sun && __i386]: Include alloca.h.
23519
23520 1996-07-31 Richard Stallman <rms@gnu.org>
23521
23522 * bison.simple:
23523 [__sun && __i386]: Include alloca.h.
23524
23525 1996-07-30 Richard Stallman <rms@gnu.org>
23526
23527 * src/bison.s1: Comment change.
23528
23529 * src/bison.s1: Test _MSDOS_, not MSDOS.
23530
23531 1996-07-30 Richard Stallman <rms@gnu.org>
23532
23533 * bison.simple: Comment change.
23534
23535 * bison.simple: Test _MSDOS_, not MSDOS.
23536
23537 1996-06-01 Richard Stallman <rms@gnu.org>
23538
23539 * 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:
23540 Insert `_' macro around many string constants.
23541
23542 * src/main.c:
23543 Insert `_' macro around many string constants.
23544
23545 (main): Call setlocale, bindtextdomain and textdomain.
23546
23547 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23548 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23549 [ENABLE_NLS]: Include libintl.h.
23550 [ENABLE_NLS] (gettext): Define.
23551 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23552 (N_, PACKAGE, LOCALEDIR): New macros.
23553
23554 1996-06-01 Richard Stallman <rms@gnu.org>
23555
23556 * POTFILES.in: New file.
23557
23558 * Makefile.in (allocate.o):
23559 Define target explicitly.
23560
23561 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23562 (LDFLAGS): Set to @LDFLAGS@.
23563 (configure): Run autoconf only if preceding `cd' succeeds.
23564 (bison.s1): Redirect output to temporary file then move the
23565 temporary to the target, rather than redirecting directly to bison.s1.
23566 (clean): Remove config.status and config.log.
23567 (distclean): Don't remove config.status here.
23568
23569 1996-05-12 Richard Stallman <rms@gnu.org>
23570
23571 * src/bison.s1:
23572 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23573
23574 1996-05-12 Richard Stallman <rms@gnu.org>
23575
23576 * bison.simple:
23577 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23578
23579 1996-05-11 Richard Stallman <rms@gnu.org>
23580
23581 * src/bison.s1 (__yy_memcpy):
23582 Really reorder the args, as was supposedly done on Feb 14 1995.
23583 (yyparse): Calls changed accordingly.
23584
23585 1996-05-11 Richard Stallman <rms@gnu.org>
23586
23587 * Makefile.in (dist): Don't use $(srcdir).
23588
23589 * bison.simple (__yy_memcpy):
23590 Really reorder the args, as was supposedly done on Feb 14 1995.
23591 (yyparse): Calls changed accordingly.
23592
23593 1996-01-27 Richard Stallman <rms@gnu.org>
23594
23595 * src/output.c (output_rule_data):
23596 Test YYERROR_VERBOSE in the conditional
23597 around the definition of ttyname.
23598
23599 1995-12-29 Richard Stallman <rms@gnu.org>
23600
23601 * src/bison.s1:
23602 Fix line numbers in #line commands.
23603
23604 1995-12-29 Richard Stallman <rms@gnu.org>
23605
23606 * bison.simple:
23607 Fix line numbers in #line commands.
23608
23609 1995-12-27 Richard Stallman <rms@gnu.org>
23610
23611 * src/bison.s1 (YYPARSE_PARAM_DECL):
23612 In C++, make it always null.
23613 (YYPARSE_PARAM_ARG): New macro.
23614 (yyparse): Use YYPARSE_PARAM_ARG.
23615
23616 1995-12-27 Richard Stallman <rms@gnu.org>
23617
23618 * bison.simple (YYPARSE_PARAM_DECL):
23619 In C++, make it always null.
23620 (YYPARSE_PARAM_ARG): New macro.
23621 (yyparse): Use YYPARSE_PARAM_ARG.
23622
23623 1995-11-29 Richard Stallman <rms@gnu.org>
23624
23625 * doc/bison.texinfo:
23626 Describe literal string tokens, %raw, %no_lines, %token_table.
23627
23628 1995-11-29 Daniel Hagerty <hag@gnu.org>
23629
23630 * doc/bison.texinfo: Fixed update date
23631
23632 1995-10-16 Richard Stallman <rms@gnu.org>
23633
23634 * src/version.c: Version 1.25.
23635
23636 1995-10-16 Richard Stallman <rms@gnu.org>
23637
23638 * NEWS: *** empty log message ***
23639
23640 1995-10-16 Richard Stallman <rms@gnu.org>
23641
23642 * doc/bison.1, doc/bison.rnh:
23643 Add new options.
23644
23645 1995-10-15 Richard Stallman <rms@gnu.org>
23646
23647 * src/vmsgetargs.c, src/getargs.c:
23648 Added -n, -k, and -raw switches.
23649 (noparserflag, toknumflag, rawtoknumflag): New variables.
23650
23651 * src/symtab.h (SALIAS):
23652 New #define for adding aliases to %token.
23653 (struct bucket): Added `alias' field.
23654
23655 * src/reduce.c (reduce_grammar):
23656 Revise error message.
23657 (print_notices): Remove final `.' from error message.
23658
23659 * src/reader.c (reader_output_yylsp):
23660 New function.
23661 (readgram): Use `#if 0' around code that accepted %command
23662 inside grammar rules: The documentation doesn't allow it,
23663 and it will fail since the %command processors scan for the next %.
23664 (parse_token_decl): Extended the %token
23665 declaration to allow a multi-character symbol as an alias.
23666 (parse_thong_decl): New function.
23667 (read_declarations): Added %thong declarations.
23668 (read_declarations): Handle NOOP to deal with allowing
23669 % declarations as another means to specify the flags.
23670 (readgram): Allow %prec prior to semantics embedded in a rule.
23671 (skip_to_char, read_declarations, copy_definition)
23672 (parse_token_decl, parse_start_decl, parse_type_decl)
23673 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23674 (get_type_name, copy_guard, copy_action, readgram)
23675 (get_type, packsymbols): Revised most error messages.
23676 Changed `fatal' to `warnxxx' to avoid aborting for error.
23677 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23678 (read_declarations): Improve the error message for
23679 an invalid character. Do not abort.
23680 (read_declarations, copy_guard, copy_action): Use
23681 printable_version to avoid unprintable characters in printed output.
23682 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23683 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23684 Allow the type of a non-terminal can be given
23685 more than once, as long as all specifications give the same type.
23686
23687 * src/output.c:
23688 (output_headers, output_trailers, output, output_gram)
23689 (output_rule_data): Implement noparserflag variable.
23690 Implement toknumflag variable.
23691 (output): Call reader_output_yylsp to output LTYPESTR.
23692
23693 * src/main.c (main):
23694 If reader sees an error, don't process the grammar.
23695 (fatals): Updated to not use VARARGS1.
23696 (printable_version, int_to_string, warn, warni, warns, warnss)
23697 (warnsss): New error reporting functions. Avoid abort for error.
23698
23699 * src/lex.h:
23700 Added THONG and NOOP for alias processing.
23701 Added SETOPT for the new code that allows setting options with %flags.
23702
23703 * src/lex.c:
23704 Include getopt.h. Add some extern decls.
23705 (safegetc): New function to deal with EOF gracefully.
23706 (literalchar); new function to deal with reading \ escapes.
23707 (lex): Use literalchar.
23708 (lex): Implemented "..." tokens.
23709 (literalchar, lex, parse_percent_token): Made tokenbuffer
23710 always contain the token. This includes growing the token
23711 buffer while reading an integer.
23712 (parse_percent_token): Replaced if-else statement with percent_table.
23713 (parse_percent_token): Added % declarations as another
23714 way to specify the flags -n, -l, and -r. Also added hooks for
23715 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23716 major changes to files.c.
23717 (lex) Retain in the incoming stream a character following
23718 an incorrect '/'.
23719 (skip_white_space, lex): Revised most error messages
23720 and changed fatal to warn to avoid aborting.
23721 (percent_table): Added %thong declarations.
23722
23723 * src/gram.h: Comment changes.
23724
23725 * src/files.c (openfiles, open_extra_files, done):
23726 Add faction flag
23727 and actfile file. Handle noparserflag. Both for -n switch.
23728
23729 * src/conflicts.c (resolve_sr_conflict):
23730 Remove use of alloca.
23731
23732 1995-06-01 Jim Meyering <meyering@gnu.org>
23733
23734 * doc/bison.texinfo: *** empty log message ***
23735
23736 1995-05-06 Richard Stallman <rms@gnu.org>
23737
23738 * src/bison.s1: Comment change.
23739
23740 1995-05-06 Richard Stallman <rms@gnu.org>
23741
23742 * bison.simple: Comment change.
23743
23744 1995-05-03 Richard Stallman <rms@gnu.org>
23745
23746 * src/version.c: Version now 1.24.
23747
23748 * src/bison.s1: Change distribution terms.
23749
23750 * src/version.c: Version now 1.23.
23751
23752 1995-05-03 Richard Stallman <rms@gnu.org>
23753
23754 * doc/bison.texinfo:
23755 Rewrite "Conditions for Using Bison".
23756 Update version to 1.24.
23757
23758 1995-05-03 Richard Stallman <rms@gnu.org>
23759
23760 * bison.simple: Change distribution terms.
23761
23762 1995-02-23 Richard Stallman <rms@gnu.org>
23763
23764 * src/files.c: Test __VMS_POSIX as well as VMS.
23765
23766 1995-02-14 Jim Meyering <meyering@gnu.org>
23767
23768 * src/bison.s1 (__yy_memcpy):
23769 Renamed from __yy_bcopy to avoid
23770 confusion. Reverse FROM and TO arguments to be consistent with
23771 those of memcpy.
23772
23773 1995-02-14 Jim Meyering <meyering@gnu.org>
23774
23775 * bison.simple (__yy_memcpy):
23776 Renamed from __yy_bcopy to avoid
23777 confusion. Reverse FROM and TO arguments to be consistent with
23778 those of memcpy.
23779
23780 1994-11-10 David J. MacKenzie <djm@gnu.org>
23781
23782 * NEWS: reformat
23783
23784 * NEWS: New file.
23785
23786 * Makefile.in (DISTFILES): Include NEWS.
23787
23788 * Makefile.in (DISTFILES):
23789 Include install-sh, not install.sh.
23790
23791 * configure.in: Update to Autoconf v2 macro names.
23792
23793 1994-10-05 David J. MacKenzie <djm@gnu.org>
23794
23795 * Makefile.in: fix typo
23796
23797 * Makefile.in (prefix, exec_prefix):
23798 Let configure set them.
23799
23800 1994-09-28 David J. MacKenzie <djm@gnu.org>
23801
23802 * Makefile.in: Set datadir to $(prefix)/share.
23803
23804 1994-09-15 Richard Stallman <rms@gnu.org>
23805
23806 * src/bison.s1:
23807 Update copyright notice and GPL version.
23808
23809 1994-09-15 Richard Stallman <rms@gnu.org>
23810
23811 * bison.simple:
23812 Update copyright notice and GPL version.
23813
23814 1994-07-12 Richard Stallman <rms@gnu.org>
23815
23816 * src/reduce.c, src/reader.c:
23817 entered into RCS
23818
23819 1994-05-05 David J. MacKenzie <djm@gnu.org>
23820
23821 * Makefile.in: entered into RCS
23822
23823 1994-03-26 Richard Stallman <rms@gnu.org>
23824
23825 * src/bison.s1: entered into RCS
23826
23827 1994-03-26 Richard Stallman <rms@gnu.org>
23828
23829 * bison.simple: entered into RCS
23830
23831 1994-03-25 Richard Stallman <rms@gnu.org>
23832
23833 * src/main.c: entered into RCS
23834
23835 1994-03-24 Richard Stallman <rms@gnu.org>
23836
23837 * src/conflicts.c: entered into RCS
23838
23839 1994-01-02 Richard Stallman <rms@gnu.org>
23840
23841 * Makefile.in: *** empty log message ***
23842
23843 1993-11-21 Richard Stallman <rms@gnu.org>
23844
23845 * src/bison.s1: *** empty log message ***
23846
23847 1993-11-21 Richard Stallman <rms@gnu.org>
23848
23849 * doc/bison.texinfo: entered into RCS
23850
23851 * doc/bison.texinfo: *** empty log message ***
23852
23853 1993-11-21 Richard Stallman <rms@gnu.org>
23854
23855 * bison.simple: *** empty log message ***
23856
23857 1993-10-25 David J. MacKenzie <djm@gnu.org>
23858
23859 * doc/bison.texinfo: *** empty log message ***
23860
23861 1993-10-19 Richard Stallman <rms@gnu.org>
23862
23863 * src/bison.s1: *** empty log message ***
23864
23865 1993-10-19 Richard Stallman <rms@gnu.org>
23866
23867 * bison.simple: *** empty log message ***
23868
23869 1993-10-14 Richard Stallman <rms@gnu.org>
23870
23871 * src/bison.s1: *** empty log message ***
23872
23873 1993-10-14 Richard Stallman <rms@gnu.org>
23874
23875 * bison.simple: *** empty log message ***
23876
23877 1993-09-14 David J. MacKenzie <djm@gnu.org>
23878
23879 * doc/bison.texinfo: *** empty log message ***
23880
23881 1993-09-13 Noah Friedman <friedman@gnu.org>
23882
23883 * Makefile.in: *** empty log message ***
23884
23885 1993-09-10 Richard Stallman <rms@gnu.org>
23886
23887 * src/conflicts.c: *** empty log message ***
23888
23889 * src/system.h: entered into RCS
23890
23891 1993-09-10 Richard Stallman <rms@gnu.org>
23892
23893 * doc/bison.1: entered into RCS
23894
23895 1993-09-06 Noah Friedman <friedman@gnu.org>
23896
23897 * src/version.c: entered into RCS
23898
23899 1993-09-06 Noah Friedman <friedman@gnu.org>
23900
23901 * Makefile.in: *** empty log message ***
23902
23903 1993-07-30 David J. MacKenzie <djm@gnu.org>
23904
23905 * Makefile.in: *** empty log message ***
23906
23907 1993-07-24 Richard Stallman <rms@gnu.org>
23908
23909 * src/bison.s1: *** empty log message ***
23910
23911 1993-07-24 Richard Stallman <rms@gnu.org>
23912
23913 * bison.simple: *** empty log message ***
23914
23915 1993-07-08 David J. MacKenzie <djm@gnu.org>
23916
23917 * Makefile.in: *** empty log message ***
23918
23919 1993-07-04 Richard Stallman <rms@gnu.org>
23920
23921 * src/bison.s1: *** empty log message ***
23922
23923 1993-07-04 Richard Stallman <rms@gnu.org>
23924
23925 * bison.simple: *** empty log message ***
23926
23927 1993-06-26 David J. MacKenzie <djm@gnu.org>
23928
23929 * src/getargs.c: entered into RCS
23930
23931 1993-06-26 David J. MacKenzie <djm@gnu.org>
23932
23933 * doc/bison.texinfo: *** empty log message ***
23934
23935 * doc/bison.1: New file.
23936
23937 1993-06-25 Richard Stallman <rms@gnu.org>
23938
23939 * src/getargs.c: New file.
23940
23941 1993-06-16 Richard Stallman <rms@gnu.org>
23942
23943 * src/bison.s1: *** empty log message ***
23944
23945 1993-06-16 Richard Stallman <rms@gnu.org>
23946
23947 * bison.simple: *** empty log message ***
23948
23949 1993-06-03 Richard Stallman <rms@gnu.org>
23950
23951 * src/bison.s1: New file.
23952
23953 1993-06-03 Richard Stallman <rms@gnu.org>
23954
23955 * doc/bison.texinfo: *** empty log message ***
23956
23957 1993-06-03 Richard Stallman <rms@gnu.org>
23958
23959 * bison.simple: New file.
23960
23961 1993-05-19 Richard Stallman <rms@gnu.org>
23962
23963 * doc/bison.texinfo: New file.
23964
23965 1993-05-07 Noah Friedman <friedman@gnu.org>
23966
23967 * Makefile.in: *** empty log message ***
23968
23969 1993-04-28 Noah Friedman <friedman@gnu.org>
23970
23971 * src/reader.c: *** empty log message ***
23972
23973 1993-04-23 Noah Friedman <friedman@gnu.org>
23974
23975 * src/alloc.h: entered into RCS
23976
23977 1993-04-20 David J. MacKenzie <djm@gnu.org>
23978
23979 * src/version.c: *** empty log message ***
23980
23981 * src/files.c, src/allocate.c:
23982 entered into RCS
23983
23984 * src/reader.c: *** empty log message ***
23985
23986 * src/lex.c: entered into RCS
23987
23988 * src/conflicts.c: New file.
23989
23990 * src/symtab.c: entered into RCS
23991
23992 * src/alloc.h: New file.
23993
23994 * src/LR0.c: entered into RCS
23995
23996 1993-04-18 Noah Friedman <friedman@gnu.org>
23997
23998 * src/reader.c: New file.
23999
24000 * src/version.c: *** empty log message ***
24001
24002 1993-04-18 Noah Friedman <friedman@gnu.org>
24003
24004 * Makefile.in: *** empty log message ***
24005
24006 1993-04-17 Noah Friedman <friedman@gnu.org>
24007
24008 * Makefile.in: *** empty log message ***
24009
24010 1993-04-15 Richard Stallman <rms@gnu.org>
24011
24012 * src/main.c, src/files.c:
24013 New file.
24014
24015 1993-04-15 Noah Friedman <friedman@gnu.org>
24016
24017 * configure.in: entered into RCS
24018
24019 * configure.in: *** empty log message ***
24020
24021 * configure.in: New file.
24022
24023 1993-04-14 Richard Stallman <rms@gnu.org>
24024
24025 * Makefile.in: New file.
24026
24027 1993-04-13 Richard Stallman <rms@gnu.org>
24028
24029 * src/version.c: New file.
24030
24031 1993-03-25 Richard Stallman <rms@gnu.org>
24032
24033 * src/output.c: entered into RCS
24034
24035 1992-09-25 Richard Stallman <rms@gnu.org>
24036
24037 * configure.bat: entered into RCS
24038
24039 1992-06-22 Richard Stallman <rms@gnu.org>
24040
24041 * src/vmsgetargs.c: entered into RCS
24042
24043 1992-06-22 Richard Stallman <rms@gnu.org>
24044
24045 * doc/bison.rnh: entered into RCS
24046
24047 1992-04-20 David J. MacKenzie <djm@gnu.org>
24048
24049 * README: entered into RCS
24050
24051 1992-01-22 Richard Stallman <rms@gnu.org>
24052
24053 * src/machine.h: entered into RCS
24054
24055 1991-12-21 Richard Stallman <rms@gnu.org>
24056
24057 * src/lalr.c, src/closure.c:
24058 entered into RCS
24059
24060 1991-12-20 Richard Stallman <rms@gnu.org>
24061
24062 * src/state.h: entered into RCS
24063
24064 1991-12-18 Richard Stallman <rms@gnu.org>
24065
24066 * src/print.c, src/nullable.c, src/derives.c:
24067 entered into RCS
24068
24069 1991-11-03 David J. MacKenzie <djm@gnu.org>
24070
24071 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24072 entered into RCS
24073
24074 1988-09-09 Richard Stallman <rms@gnu.org>
24075
24076 * src/bison.hairy: entered into RCS
24077
24078 1987-12-16 Richard Stallman <rms@gnu.org>
24079
24080 * REFERENCES: entered into RCS
24081
24082
24083 -----
24084
24085 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
24086 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24087 2008, 2009 Free Software Foundation, Inc.
24088
24089 Copying and distribution of this file, with or without
24090 modification, are permitted provided the copyright notice and this
24091 notice are preserved.