]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Fix mail address in ChangeLog.
[bison.git] / ChangeLog
... / ...
CommitLineData
12009-07-31 Alex Rozenman <rozenman@gmail.com>
2
3 Fix --enable-gcc-warnings problems.
4 * src/reader.c: Adjust variable names.
5 * src/scan-code.l: Fix prototypes and adjust names.
6 * src/named-ref.c: Remove redundant "if".
7
82009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9
10 Fix a --enable-gcc-warnings problem.
11 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
12 variable.
13
142009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
15
16 Warn about character literals not of length one.
17 * NEWS (2.5): Document.
18 * src/scan-gram.l (INITIAL): Remove comment that we don't check
19 the length.
20 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
21 * tests/input.at (Bad character literals): New test group.
22
232009-07-24 Alex Rozenman <rozenman@gmail.com>
24
25 Fix some memory leaks.
26 * src/named-ref.c: Add a pointer check (named_ref_free).
27 * src/scan-code.l: New function (variant_table_free). Called in
28 code_scanner_free.
29 * src/symlist.c: Call to named_ref_free (symbol_list_free).
30
312009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
32
33 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
34
352009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
36
37 Some M4 cleanup in the testsuite.
38 Suggested by Eric Blake at
39 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
40 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
41 complicate the code by distinguishing between a missing value
42 and an empty string value for an optional argument. This fix is
43 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
44 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
45 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
46 arguments are not needed because of the following changes.
47 Fix stale comments.
48 Bison developers should use GNU M4 and should not use
49 POSIXLY_CORRECT when building the test suite, so do not
50 complicate the code by avoiding $10 and above.
51 Do not quote an empty string value for an optional argument, and
52 do not distinguish between a missing value and an empty string
53 value.
54
552009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
56
57 Revert unnecessary column realignment in --help output.
58 Reported by Akim Demaille at
59 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
60 * src/getargs.c (usage): Here.
61
622009-07-04 Alex Rozenman <rozenman@gmail.com>
63
64 Alphabetical order in src/local.mk.
65 * src/local.mk: Adjust.
66
672009-07-04 Alex Rozenman <rozenman@gmail.com>
68
69 Style changes and factoring.
70 * src/named-ref.h: Add comments.
71 * src/parse-gram.y: Readability and style changes.
72 * src/reader.c: Factoring: assign_named_ref function.
73 * src/scan-code.l: Factoring and style changes. Rename
74 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
75 Use "unsigned" type for variant index. Improve readablity.
76 * src/scan-gram.l: Change error messages and add comments.
77 * src/symlist.h: symbol_list_null: New function decl.
78 * src/symlist.c: symbol_list_null: Implement here.
79 * tests/named-refs.at: Adjust for new error messages.
80
812009-06-29 Eric Blake <ebb9@byu.net>
82
83 scan-code: avoid compiler warnings
84 * src/scan-code.l (parse_named_ref): Use correct specifiers.
85
862009-06-29 Akim Demaille <demaille@gostai.com>
87
88 build: avoid concurrent extraction of calc++.
89 * examples/calc++/Makefile.am (calc.stamp): New.
90 Depend on it to create the sources of calc++ so that concurrent
91 builds don't launch several "extexi" in parallel.
92 Not only this is inefficient, this also builds incorrect sources
93 with several extractions mixed together.
94
952009-06-29 Akim Demaille <demaille@gostai.com>
96
97 parse.error: fix.
98 * data/bison.m4: Move code related to specific variables after the
99 definition of the variable-maintaining macros so that we don't
100 "invoke" b4_percent_define_check_values before it is defined.
101
1022009-06-29 Akim Demaille <demaille@gostai.com>
103
104 variables: parse.error
105
106 Implement, document, and test the replacement of %error-verbose
107 by %define parse.error "verbose".
108 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
109 values of the parse.error variable.
110 Make "simple" its default value.
111 Check the valid values.
112 * src/parse-gram.y: Use %define parse.error.
113 (PERCENT_ERROR_VERBOSE): New token.
114 Support it.
115 * src/scan-gram.l: Support %error-verbose.
116
117 * doc/bison.texinfo (Decl Summary): Replace the documentation of
118 %define error-verbose by that of %define parse.error.
119 * NEWS: Document it.
120
121 * tests/actions.at, tests/calc.at: Use parse.error instead of
122 %error-verbose.
123
1242009-06-27 Alex Rozenman <rozenman@gmail.com>
125
126 Implement support for named symbol references.
127 * src/parse-gram.y: Add new syntax (named_ref.opt).
128 * src/reader.c: Store named refs in symbol lists.
129 * src/reader.h: New argument for symbol_append and
130 action_append functions.
131 * src/scan-code.h: Add new field (named_ref) into
132 code_props data structure. Keeps named ref of midrule
133 actions.
134 * src/scan-code.l: Support for named refs in semantic
135 action code. New function 'parse_named_ref'.
136 * src/scan-gram.l: Support bracketed id.
137 * src/symlist.c: Store named refs in symbol lists.
138 * src/symlist.h: New field in symbol list: named_ref.
139 * src/named-ref.h: New file, a struct for named_ref.
140 * src/named-ref.cp: New file, named_ref_new function.
141 * src/local.mk: Add two new files.
142 * tests/testsuite.at: Include new test group:
143 * tests/named-refs.at: this new file.
144
1452009-06-25 Akim Demaille <demaille@gostai.com>
146
147 hash: check insertion for memory exhaustion.
148 * src/uniqstr.c (uniqstr_new): New.
149
1502009-06-24 Akim Demaille <demaille@gostai.com>
151
152 variables: rename namespace as api.namespace.
153 Discussed in
154 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
155
156 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
157 New.
158 (b4_percent_define_use): New.
159 Use it where applicable.
160 * data/c++.m4: Replace uses of the variable "namespace" by
161 "api.namespace".
162 Default the latter to the former.
163 * doc/bison.texinfo (Decl Summary): Document "namespace" as
164 obsolete.
165 Document api.namespace.
166 Use @samp to document %define uses, keep @code for identifiers.
167 * NEWS: Likewise.
168 * tests/c++.at, tests/input.at: Test api.namespace instead of
169 namespace. (The tests passed with namespace.)
170
1712009-06-11 Akim Demaille <demaille@gostai.com>
172
173 style changes.
174 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
175 * src/print-xml.c: Style changes.
176 * tests/conflicts.at: Comment changes.
177
1782009-06-11 Akim Demaille <demaille@gostai.com>
179
180 xml: beware of user strings used to give a %prec to rules.
181 * tests/conflicts.at (%prec with user strings): New.
182 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
183 XML output.
184
1852009-06-11 Akim Demaille <demaille@gostai.com>
186
187 hash: check insertion for memory exhaustion.
188 * src/muscle-tab.c (muscle_insert, muscle_grow)
189 * src/state.c (state_hash_insert): Check the return value of
190 hash_insert.
191
1922009-06-11 Akim Demaille <demaille@gostai.com>
193
194 tests: honor TESTSUITEFLAGS in every check target.
195 * tests/local.mk (RUN_TESTSUITE): New.
196 (check-local, installcheck-local, maintainer-check-g++)
197 (maintainer-check-posix, maintainer-check-valgrind): Use it.
198
1992009-06-10 Akim Demaille <demaille@gostai.com>
200
201 deterministic test suite.
202 Some consistency checks on symbols are performed after all the
203 symbols were read, by an iteration over the symbol table. This
204 traversal is nondeterministic, which can be a problem for test
205 cases.
206 Avoid this.
207 Addresses another form of nondeterminism reported by Joel E. Denny.
208 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
209
210 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
211 test in two.
212 Use different file names for the three tests to make the
213 maintenance easier.
214
2152009-06-10 Akim Demaille <demaille@gostai.com>
216
217 gnulib: update.
218 * gnulib: Update to latest.
219 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
220 * m4/.gitignore: Regen.
221 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
222 Call xalloc_die on hash_insert failures.
223 Requested by the new __warn_unused_result__ attribute of
224 hash_insert.
225
2262009-06-10 Akim Demaille <demaille@gostai.com>
227
228 deterministic user-token-number redeclaration errors.
229 Address nondeterminism reported by Joel E. Denny.
230 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
231
232 * src/uniqstr.h: Comment changes.
233 * src/location.h (boundary_cmp, location_cmp): New.
234 * src/symtab.c (user_token_number_redeclaration): New.
235 (symbol_translation): Use it.
236 * tests/input.at (Numbered tokens): Adjust the expected output.
237
2382009-05-25 Akim Demaille <demaille@gostai.com>
239
240 build: avoid ignored errors.
241 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
242 errors, they pollute the output.
243
2442009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
245
246 Convert multiple variable definition warnings to complaints.
247 * NEWS (2.5): Add a new entry for that change.
248 * doc/bison.texinfo (Decl Summary): Update %define entry.
249 (Bison Options): Update -D/--define/-F/--force-define entry.
250 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
251 * src/muscle-tab.h (muscle_percent_define_insert): Update
252 comments.
253 * tests/input.at (`%define errors'): Update.
254 (`%define, --define, --force-define'): Update.
255
2562009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
257
258 -F/--force-define and relative %define/-D/--define priorities.
259 * NEWS (2.5): Add documentation to -D/--define entry.
260 * build-aux/cross-options.pl: Hard-code association of
261 --force-define with %define.
262 * doc/bison.texinfo (Decl Summary): In %define entry,
263 cross-reference command-line options.
264 (Bison Options): Add documentation to -D/--define entry.
265 (Option Cross Key): Widen column for --force-define row.
266 * src/getargs.c (usage): Document -F/--force-define. Realign
267 options in output.
268 (short_options, long_options, getargs): Parse -F/--force-define,
269 and update muscle_percent_define_insert invocations.
270 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
271 (muscle_percent_define_insert): Add argument with that type.
272 * src/muscle-tab.c (muscle_percent_define_insert): Implement
273 -F/--force-define behavior and priorities.
274 (muscle_percent_define_ensure): Update
275 muscle_percent_define_insert invocation.
276 * src/parse-gram.y (prologue_declaration): Update
277 muscle_percent_define_insert invocations.
278 * tests/input.at (`%define, --define'): Rename to...
279 (`%define, --define, --force-define'): ... this and extend.
280
2812009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
282
283 Update some comments to make sense for -D.
284 * data/bison.m4 (b4_check_user_names): In header comments, say
285 "user occurrence" instead of "grammar occurrence".
286 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
287 (muscle_percent_code_grow): Likewise just for consistency.
288
2892009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
290
291 * data/c++.m4 (b4_namespace_close): Simplify slightly.
292
2932009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
294
295 Handle a trailing `:' in a user-supplied C++ namespace better.
296 * data/c++.m4 (b4_namespace_close): Don't let it be printed
297 among the closing braces here. This fix might make the
298 generated code easier to debug, but otherwise it should be
299 insignificant because a trailing `:' is a C++ error already.
300
3012009-05-19 Akim Demaille <demaille@gostai.com>
302
303 remove useless variable.
304 * src/getargs.c (skeleton_arg): Remove now useless variable.
305 Should help the compiler see that this printf-like call is sane.
306
3072009-05-15 Akim Demaille <demaille@gostai.com>
308
309 Rename token.prefix as api.tokens.prefix.
310 Discussed here.
311 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
312
313 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
314 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
315 (token.prefix): Rename as...
316 (api.tokens.prefix): this.
317
3182009-05-11 Akim Demaille <demaille@gostai.com>
319
320 doc: use C++ headers.
321 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
322 headers.
323
3242009-05-11 Akim Demaille <demaille@gostai.com>
325
326 doc: token.prefix
327 * doc/bison.simple (Decl Summary): Document token.prefix.
328 (Calc++ Parser): Various fixes.
329 Formatting changes.
330 Use token.prefix.
331 Introduce a macro TOKEN to shorten the code and make it more
332 readable.
333 (Calc++ Scanner): Adjust.
334 * NEWS (Variable token.prefix): New.
335
3362009-05-04 Akim Demaille <demaille@gostai.com>
337
338 bison: catch bad symbol names.
339 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
340 * tests/input.at: Adjust.
341
3422009-05-04 Akim Demaille <demaille@gostai.com>
343
344 identifiers: dashes are letters.
345 Dashes can now start identifiers (symbols and directives).
346
347 * src/scan-gram.l ({letter}): Add dash.
348 ({id}): Remove it.
349 * tests/input.at (Symbols): Adjust.
350 Remove stray comment.
351 * tests/regression.at (Invalid inputs): Adjust error message.
352 * doc/bison.texinfo (Symbols): Update.
353
3542009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
355
356 Declare %code to be a permanent feature.
357 * NEWS (2.4.2): Here.
358 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
359 experimental.
360 (Decl Summary): Likewise.
361
3622009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
363
364 Convert underscores to dashes in some %define variable names.
365 For now, just api.push-pull and lr.keep-unreachable-states.
366 Maintain old names for backward compatibility.
367 * NEWS (2.5): Document.
368 * data/c.m4 (b4_identification): Update comment.
369 * data/yacc.c: Update access.
370 * doc/bison.texinfo: Update.
371 * etc/bench.pl.in (bench_push_parser): Update use.
372 * src/files.c (tr): Move to...
373 * src/getargs.c, src/getargs.h (tr): ... here because I can't
374 think of a better place to expose it. My logic is that, for all
375 uses of tr so far, command-line arguments can be involved, and
376 getargs.h is already included.
377 * src/main.c (main): Update access.
378 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
379 variable names to new variable names before assigning value.
380 * src/reader.c (reader): Update setting default.
381 * tests/calc.at: Update uses.
382 * tests/conflicts.at (Unreachable States After Conflict
383 Resolution): Update use.
384 * tests/input.at (%define enum variables): Update use.
385 (%define backward compatibility): New test group.
386 * tests/push.at: Update uses.
387 * tests/reduce.at: Update uses.
388 * tests/torture.at: Update uses.
389
3902009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
391
392 Set all front-end %define defaults in one place.
393 * src/main.c (main): Move lr.keep_unreachable_states default...
394 * src/reader.c (reader): ... to here.
395
3962009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
397
398 Rename lr.default_reductions to lr.default-reductions.
399 * NEWS (2.5): Here.
400 * doc/bison.texinfo: Here.
401 * src/lalr.c (initialize_LA): Here.
402 * src/print.c (print_reductions): Here.
403 * src/reader.c (reader): Here.
404 * src/tables.c (action_row): Here.
405 * tests/input.at (%define enum variables): Here.
406 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
407
4082009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
409
410 Pacify ./configure --enable-gcc-warnings.
411 * tests/input.at (Symbols): Prototype yyerror and yylex.
412
4132009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
414
415 Document how `%define "var" "value"' is not M4-friendly.
416 * src/parse-gram.y (variable): In comments here.
417
4182009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
419
420 Clean up recent patches a little.
421 Reported by Akim Demaille.
422 * doc/bison.texinfo (Understanding): Fix typos.
423 * src/print.c (print_reductions): Don't use negated variable.
424
4252009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
426
427 List accepted values for a %define enum variable with an invalid value.
428 Suggested by Akim Demaille at
429 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
430 * data/bison.m4 (_b4_percent_define_check_values): Implement.
431 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
432 * tests/input.at (%define lr.default_reductions invalid values): Merge
433 into...
434 (%define enum variables): ... here, and update output.
435
4362009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
437
438 Rename "default rule" to "default reduction".
439 This includes changing variable names in code, changing
440 comments, and renaming %define lr.default_rules to %define
441 lr.default_reductions.
442 * NEWS (2.5): Update IELR documentation.
443 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
444 documentation.
445 * data/glr.c, data/lalr1.java: Sync copyright dates.
446 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
447 and lr.type documentation. Make some other wording
448 improvements.
449 (Glossary): Adjust cross-references and Default Reduction
450 definition.
451 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
452 Remove a confusing comment pointed out by Akim Demaille.
453 (initialize_LA): Adjust code.
454 * src/print-xml.c (print_reductions): Adjust code.
455 * src/print.c (print_reductions): Adjust code.
456 * src/reader.c (reader): Adjust code.
457 * src/tables.c (action_row): Adjust code.
458 (token_actions): Adjust code.
459 * src/tables.h: Adjust YYDEFACT documentation.
460 * tests/input.at (%define lr.default_rules invalid values):
461 Rename test group to...
462 (%define lr.default_reductions invalid values): ... this, and
463 update grammar file and expected output.
464 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
465 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
466
4672009-04-21 Akim Demaille <demaille@gostai.com>
468
469 tests: check the use of dashes and periods in symbols.
470 * tests/input.at (Symbol): New test group.
471
4722009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
473
474 Document %define lr.type and lr.default_rules.
475 * NEWS (2.5): Add an entry.
476 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
477 besides just LALR(1) and GLR(1).
478 * doc/bison.texinfo (Introduction): Likewise.
479 (Language and Grammar): Bison is no longer limited to LALR(1)
480 restrictions.
481 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
482 when trying to distinguish from GLR. Talk about LR(1) grammars
483 rather than LALR(1) grammars.
484 (Decl Summary): In %define api.push_pull entry, say it applies
485 to deterministic parsers in C rather than LALR(1) parsers in C.
486 Add lr.default_rules entry.
487 Add lr.type entry.
488 (Mystery Conflicts): Bison is no longer limited to LALR(1)
489 restrictions.
490 (Generalized LR Parsing): Same changes as for the previous GLR
491 section.
492 (Memory Management): Say deterministic rather than LALR(1).
493 (Understanding): Correct some bison output.
494 Index discussion of "accepting state".
495 Say deterministic rather than LALR(1).
496 (Bison Options): In --yacc entry, say deterministic rather than
497 LALR(1).
498 In --report, --graph, and --xml entries, just don't mention
499 LALR(1).
500 (C++ Parsers): Say deterministic rather than LALR(1).
501 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
502 (Glossary): Add Accepting State, Consistent State, Default Rule,
503 and IELR(1) definitions.
504 In Generalized LR (GLR) definition, make same changes as in
505 previous GLR sections.
506 In LALR(1) definition, say Bison uses LALR(1) by default rather
507 than implying Bison is limited to LALR(1).
508 (LocalWords): Add IELR.
509
5102009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
511
512 Finish implementing %define lr.type.
513 Its value can be "LALR", "IELR", or "canonical LR".
514 * lib/timevar.def (TV_IELR_PHASE1): New var.
515 (TV_IELR_PHASE2): New var.
516 (TV_IELR_PHASE3): New var.
517 (TV_IELR_PHASE4): New var.
518 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
519 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
520 Sbitset.h, ielr.h, and ielr.c.
521 * src/getargs.h, src/getargs.c (enum trace, trace_args,
522 trace_types): Add trace_ielr.
523 * src/lalr.h, src/lalr.c (ngotos): Export it.
524 (F): Rename to...
525 (goto_follows): ... this, update all uses, and export it.
526 (set_goto_map): Export it.
527 (map_goto): Export it.
528 (compute_lookahead_tokens): Don't free goto_follows yet. Now
529 handled in ielr.
530 (initialize_LA): Export it. Move lookback allocation to...
531 (lalr): ... here because, for canonical LR, initialize_LA must
532 be invoked but lookback and much of the rest of LALR isn't
533 needed.
534 * main.c (main): Instead of lalr, invoke ielr, which invokes
535 lalr.
536 * src/reader.c (reader): Default lr.type to "LALR".
537 Default lr.default_rules to "accepting" if lr.type is "canonical
538 LR". Leave the default as "all" otherwise.
539 Check for a valid lr.type value.
540 * src/state.h, src/state.c (struct state_list): Add state_list
541 member.
542 (state_new): Initialize state_list member to NULL.
543 (state_new_isocore): New function, exported.
544 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
545 exercises all values of lr.type.
546 (GNU AWK Grammar): Rename test group to...
547 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
548 AT_TEST_EXISTING_GRAMMAR.
549 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
550 (GNU pic Grammar): Rename test group to...
551 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
552 AT_TEST_EXISTING_GRAMMAR.
553 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
554 all values of lr.type.
555 (Single State Split): New test groups using AT_TEST_LR_TYPE.
556 (Lane Split): Likewise.
557 (Complex Lane Split): Likewise.
558 (Split During Added Lookahead Propagation): Likewise.
559
5602009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
561
562 Add new files for IELR and canonical LR implementation.
563 * src/AnnotationList.c: New.
564 * src/AnnotationList.h: New.
565 * src/InadequacyList.c: New.
566 * src/InadequacyList.h: New.
567 * src/Sbitset.c: New.
568 * src/Sbitset.h: New.
569 * src/ielr.c: New.
570 * src/ielr.h: New.
571
5722009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
573
574 Implement %define lr.default_rules.
575 Its value describes the states that are permitted to contain
576 default rules: "all", "consistent", or "accepting".
577 * src/reader.c (reader): Default lr.default_rules to "all".
578 Check for a valid lr.default_rules value.
579 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
580 is "accepting", then only mark the accepting state as
581 consistent.
582 (initialize_LA): Tell state_lookahead_tokens_count whether
583 lr.default_rules is "accepting".
584 * src/tables.c (action_row): If lr.default_rules is not "all",
585 then disable default rules in inconsistent states.
586 * src/print.c (print_reductions): Use this opportunity to
587 perform some assertions about whether lr.default_rules was
588 obeyed correctly.
589 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
590 helps with checking the parser tables for a grammar.
591 * tests/input.at (%define lr.default_rules invalid values): New
592 test group.
593 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
594 AT_TEST_TABLES_AND_PARSE.
595 (`no %define lr.default_rules'): New test group generated by
596 AT_TEST_LR_DEFAULT_RULES.
597 (`%define lr.default_rules "all"'): Likewise.
598 (`%define lr.default_rules "consistent"'): Likewise.
599 (`%define lr.default_rules "accepting"'): Likewise.
600
6012009-04-20 Akim Demaille <demaille@gostai.com>
602
603 Formatting change.
604
6052009-04-20 Akim Demaille <demaille@gostai.com>
606
607 bison: factoring.
608 * src/output.c (token_definitions_output): Use symbol_id_get
609 instead of duplicating its logic.
610 * TODO (YYERRCODE): Extend.
611
6122009-04-20 Akim Demaille <demaille@gostai.com>
613
614 variables: prefer error-verbose to error_verbose.
615 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
616 instead of error_verbose.
617 * src/scan-gram.l (%error-verbose): Map to the error-verbose
618 variable.
619 * doc/bison.texinfo: Promote %define error-verbose instead of
620 %error-verbose.
621 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
622
6232009-04-15 Akim Demaille <demaille@gostai.com>
624
625 variables: accept dashes.
626 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
627 underscores.
628 * src/scan-gram.l ({id}): Also accept dashes after the initial
629 letter.
630 ({directive}): Use {id}.
631 * src/parse-gram.y: Comment and formatting changes.
632 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
633 symbols.
634 * src/complain.h, src/complain.c (yacc_at): New.
635 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
636 symbol names.
637 * src/output.c (token_definitions_output): Do not #define token
638 names with dashes.
639
6402009-04-20 Akim Demaille <demaille@gostai.com>
641
642 Consistently refer to Yacc, not YACC.
643 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
644
6452009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
646
647 Pacify make maintainer-check-posix.
648 * tests/input.at (%define, --define): Move bison command-line
649 options before grammar file name.
650
6512009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
652
653 Document semicolon warnings.
654 * NEWS (2.5): Here.
655
6562009-04-14 Akim Demaille <demaille@gostai.com>
657
658 variables: use `parse.assert' instead of `assert'.
659 * TODO (assert): Remove.
660 * data/bison.m4 (b4_assert_if): Replace with...
661 (b4_parse_assert_if): this.
662 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
663 * doc/bison.texinfo (Decl Summary): Document parse.assert.
664
6652009-04-14 Akim Demaille <demaille@gostai.com>
666
667 variables: use `parse.trace' instead of `debug'.
668 * src/getargs.c (getargs): Map -t to %define trace.parse.
669 * src/scan-gram.l (%debug): Map to %define trace.parse.
670 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
671 names to `_' in macro names.
672 (b4_debug_if): Replace with...
673 (b4_parse_trace_if): this.
674 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
675 * data/yacc.c: Adjust.
676 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
677 Use @code to label the variable list.
678 Document the variable parse.trace.
679 (Tracing): Promote the parse.trace variable.
680 * TODO: %printer is not documented.
681
6822009-04-14 Akim Demaille <demaille@gostai.com>
683
684 doc: minor fixes.
685 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
686 (Table of Symbols): Remove duplicate entry for %debug.
687
6882009-04-10 Eric Blake <ebb9@byu.net>
689
690 submodules: update to latest
691 * submodules/autoconf: Use latest upstream Autoconf.
692
6932009-04-06 Eric Blake <ebb9@byu.net>
694
695 Work around autoconf 2.63b bug in testsuite.
696 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
697 autoconf bug related to # in test.
698
6992009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
700
701 * NEWS (2.5): New section. Describe new -D/--define feature.
702
7032009-04-06 Akim Demaille <demaille@gostai.com>
704
705 Regen.
706 * src/parse-gram.h, src/parse-gram.c: Regen.
707
7082009-04-06 Akim Demaille <demaille@gostai.com>
709
710 rename muscle_tab.* as muscle-tab.* for consistency.
711 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
712 * src/muscle-tab.h, src/muscle-tab.c: these.
713 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
714 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
715
7162009-04-06 Akim Demaille <demaille@gostai.com>
717
718 Makefile: introduce $(BISON).
719 * src/local.mk (BISON): New.
720 (YACC): Use it.
721
7222009-04-06 Akim Demaille <demaille@gostai.com>
723
724 parser: handle %locations as %define locations.
725 * src/getargs.h, src/getargs.c (locations_flag): Remove.
726 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
727 to set "locations" to true.
728 * src/output.c (prepare): Don't output "locations".
729 * src/scan-gram.l (%locations): Handle it as a %<flag>.
730 * src/parse-gram.y: It's no longer a token.
731 Don't handle it.
732 * data/bison.m4 (b4_locations_if): Define it with
733 b4_percent_define_if_define.
734 * data/c.m4, data/glr.cc: Adjust.
735
7362009-04-06 Akim Demaille <demaille@gostai.com>
737
738 Regen.
739 * src/parse-gram.c: Regen.
740
7412009-04-06 Akim Demaille <demaille@gostai.com>
742
743 muscle: factor the handling of obsolete of obsolete directives.
744 Suggested by Joel E. Denny.
745
746 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
747 New, extracted from...
748 * src/parse-gram.y (prologue_declaration: pure-parser): here.
749 Remove it.
750 (prologue_declaration: "%<flag>"): Use
751 muscle_percent_define_ensure.
752 (%error-verbose, %pure-parser): No longer tokens.
753 * src/scan-gram.l (pure-parser): Return as a %<flag>.
754
7552009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
756
757 Fix options documentation.
758 * build-aux/cross-options.pl: As in --help output, write optional
759 arguments as [=ARG] not =[ARG].
760 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
761
7622009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
763
764 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
765 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
766 requirements for a correct m4 are stricter.
767 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
768 * configure.ac: Update to use AC_PROG_GNU_M4.
769 Reported by Eric Blake.
770
7712009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
772
773 Help with updating web manual.
774 * HACKING: Incorporate instructions from gnulib/doc/README.
775 * bootstrap.conf (gnulib_modules): Add gendocs.
776
7772009-04-03 Akim Demaille <demaille@gostai.com>
778
779 Regen.
780 * src/parse-gram.h, src/parse-gram.c: Regen.
781
7822009-04-03 Akim Demaille <demaille@gostai.com>
783
784 Factor %FLAG at scan level.
785 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
786 definitions and associated rules, replaced by....
787 (PERCENT_FLAG): this new token type, and rule.
788 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
789 Use it for %debug and %error-verbose.
790
7912009-04-03 Akim Demaille <demaille@gostai.com>
792
793 Regen.
794 * src/parse-gram.h, src/parse-gram.c: Regen.
795
7962009-04-03 Akim Demaille <demaille@gostai.com>
797
798 Treat %debug as %define debug.
799 * data/bison.m4 (b4_debug_if): New.
800 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
801 * data/lalr1.java: Use it instead of b4_debug_flag.
802 * src/getargs.h, src/getargs.c (debug_flag): Remove.
803 * src/output.c (prepare): Don't output it.
804 * src/parse-gram.y: Treat %debug as %define debug.
805
8062009-04-03 Akim Demaille <demaille@gostai.com>
807
808 Treat %error-verbose as %define error_verbose.
809 This allows to pass -Derror_verbose on the command line. Better
810 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
811 ERROR_VERBOSE being defined as false or true.
812 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
813 on b4_percent_define_ifdef, for does not check the defined value,
814 but only whether the symbol is defined, rely on
815 b4_percent_define_flag_if, so that a value of "false" is processed
816 as a false.
817 If not defined, define the flag to "false".
818 (b4_error_verbose_if): New.
819 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
820 b4_error_verbose_flag.
821 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
822 * src/output.c (prepare): Don't output it.
823 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
824
8252009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
826
827 Fix strange %define locations for default values.
828 Reported by Akim Demaille at
829 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
830 and discussed again starting at
831 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
832 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
833 because location information is bogus.
834 Use angle brackets to delimit fake file name because square brackets
835 look like underexpanded m4. Choose a better fake file name.
836 Use negative line numbers.
837 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
838 * src/location.c (location_print): If line for a boundary is negative,
839 only print that boundary's file name.
840 * src/location.h: Document that.
841 * tests/skeletons.at (%define Boolean variables: invalid skeleton
842 defaults): Update output.
843
8442009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
845
846 Pacify ./configure --enable-gcc-warnings.
847 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
848 in lib won't compile with it.
849 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
850
8512009-03-31 Akim Demaille <demaille@gostai.com>
852
853 bootstrap: --help to stdout.
854 * bootstrap (usage): Don't send --help to stderr.
855 Use a here doc instead of a long string.
856
8572009-03-31 Akim Demaille <demaille@gostai.com>
858
859 bootstrap: README-hacking no longer exists
860 * bootstrap (checkout_only_file): Set to HACKING.
861
8622009-03-26 Akim Demaille <demaille@gostai.com>
863
864 doc: merge HACKING and README-hacking.
865 Two files is confusing.
866 Reported by Alexandre Duret-Lutz.
867
868 * README-hacking: Merge into...
869 * HACKING (Working from the repository): here.
870
8712009-03-26 Akim Demaille <demaille@gostai.com>
872
873 doc: update README-hacking.
874 * README-hacking: We now use git and git submodules.
875 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
876
8772009-03-26 Akim Demaille <demaille@gostai.com>
878
879 lalr1.cc: avoid GCC 4.3 warnings.
880 GCC 4.3 now warns about "a || b && c" and asks for explicit
881 parentheses.
882 Reported by Alexandre Duret-Lutz.
883 * data/location.cc: Update copyright years.
884 (Position::operator==): Use parens to make precedence explicit.
885 Compare lines and columns first, as they are more likely to be
886 different, and they are faster to compare.
887
8882009-03-26 Akim Demaille <demaille@gostai.com>
889
890 gnulib: update.
891 * gnulib: Update to latest.
892 * src/local.mk (AM_CFLAGS): Move to...
893 * Makefile.am: here.
894 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
895 AM_CFLAGS.
896
8972009-03-02 Akim Demaille <demaille@gostai.com>
898
899 Comment changes.
900
9012009-03-02 Akim Demaille <demaille@gostai.com>
902
903 Share b4_yytranslate_define.
904 * data/lalr1.cc (b4_yytranslate_define): Move to...
905 * data/c++.m4: here.
906
9072009-03-02 Akim Demaille <demaille@gostai.com>
908
909 Use locations in the variant example.
910 Yes, this obfuscates the point of this example, variants only.
911 But glr.cc cannot work (yet?) without locations. This change
912 makes it easier to use this example with glr.cc.
913
914 * examples/variant.yy (assert): %define it.
915 (locations): Request them.
916 (yylex): Bind the location to the stage.
917
9182009-03-02 Akim Demaille <demaille@gostai.com>
919
920 Dub make_TOKEN as a public type interface.
921 * data/c++.m4 (b4_symbol_constructor_declare)
922 (b4_symbol_constructor_define): New empty stubs.
923 (b4_public_types_declare, b4_public_types_define): Use them.
924 * data/lalr1.cc (b4_symbol_constructor_declare)
925 (b4_symbol_constructor_declare_)
926 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
927 Move to...
928 * data/variant.hh: here.
929 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
930 needed.
931 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
932 b4_symbol_constructor_declare, as it is now done by
933 b4_public_types_define and b4_public_types_declare.
934
9352009-03-02 Akim Demaille <demaille@gostai.com>
936
937 Coding style changes.
938 * data/lalr1.cc (b4_symbol_constructor_declaration_)
939 (b4_symbol_constructor_declarations)
940 (b4_symbol_constructor_definition_)
941 (b4_symbol_constructor_definitions)
942 (b4_yytranslate_definition): Rename as...
943 (b4_symbol_constructor_declare_)
944 (b4_symbol_constructor_declare)
945 (b4_symbol_constructor_define_)
946 (b4_symbol_constructor_define)
947 (b4_yytranslate_define): these.
948 * data/variant.hh (b4_variant_definition): Rename as...
949 (b4_variant_define): this.
950
9512009-03-02 Akim Demaille <demaille@gostai.com>
952
953 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
954 * data/bison.m4 (b4_percent_define_if_define): New.
955 * data/c++.m4 (b4_variant_if): Move to...
956 * data/bison.m4: Here, using b4_percent_define_if_define.
957 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
958 * data/bison.m4: Here, using b4_percent_define_if_define.
959
9602009-03-02 Akim Demaille <demaille@gostai.com>
961
962 Dub symbol_type_base as a public type.
963 * data/c++.m4 (b4_public_types_declare): Now define
964 symbol_type_base and symbol_type.
965 (b4_public_types_define): New.
966 In both cases, the definitions are taken verbatim from lalr1.cc.
967 * data/lalr1.cc: Adjust.
968
9692009-03-02 Akim Demaille <demaille@gostai.com>
970
971 b4_public_types_declare.
972 * data/c++.m4 (b4_public_types_declare): New.
973 * data/glr.cc, data/lalr1.cc: Use it.
974
9752009-03-02 Akim Demaille <demaille@gostai.com>
976
977 b4_semantic_type_declare.
978 * data/c++.m4 (b4_semantic_type_declare): New.
979 Factors and generalizes what was in glr.cc and lalr1.cc.
980 * data/variant.hh (b4_semantic_type_declare): Redefine it for
981 variants.
982 * data/lalr1.cc, data/glr.cc: Use it.
983
9842009-02-26 Akim Demaille <demaille@gostai.com>
985
986 Upgrade gnulib.
987 * gnulib: Upgrade from master.
988 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
989 Regen.
990
9912009-02-25 Akim Demaille <demaille@gostai.com>
992
993 Remove useless arguments.
994 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
995 relevant.
996
9972009-02-25 Akim Demaille <demaille@gostai.com>
998
999 Comment changes.
1000 * data/lalr1.cc: here.
1001
10022009-02-25 Akim Demaille <demaille@gostai.com>
1003
1004 Fix glr.cc's debug level handling.
1005 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
1006 glr.c which is used.
1007 (debug_level, set_debug_level): Adjust.
1008
10092009-02-25 Akim Demaille <demaille@gostai.com>
1010
1011 Copyright years.
1012 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1013
10142009-02-25 Akim Demaille <demaille@gostai.com>
1015
1016 Style changes.
1017 * etc/bench.pl.in (generate_grammar_list): Consitently use
1018 location_type, not yy::location.
1019
10202009-02-25 Akim Demaille <demaille@gostai.com>
1021
1022 Comment change.
1023 * data/lalr1.cc: here.
1024
10252009-02-19 Akim Demaille <demaille@gostai.com>
1026
1027 Make yyparser::error public.
1028 * data/lalr1.cc: here.
1029 There is no good reason to keep it private (and it is convenient
1030 to use it from the scanner for instance). It is already public in
1031 glr.cc.
1032
10332009-02-19 Akim Demaille <demaille@gostai.com>
1034
1035 Comment changes.
1036 * data/glr.cc: here.
1037
10382009-02-19 Akim Demaille <demaille@gostai.com>
1039
1040 Remove trailing blanks.
1041 The epilogue has its own ending \n, no need to add another.
1042
1043 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1044 epilogue.
1045 * data/glr.cc: dnl when extending the epilogue.
1046 Remove stray "private:".
1047
10482009-02-19 Akim Demaille <demaille@gostai.com>
1049
1050 Use b4_c_modern.
1051 * data/c.m4 (b4_c_function_decl): Here.
1052
10532009-02-19 Akim Demaille <demaille@gostai.com>
1054
1055 Comment changes.
1056 * data/lalr1.cc: here.
1057
10582009-02-19 Akim Demaille <demaille@gostai.com>
1059
1060 Extract variant.hh
1061 * data/variant.hh: New, extracted from...
1062 * data/lalr1.cc: here.
1063 Adjust.
1064 * data/local.mk: Adjust.
1065
10662009-02-19 Akim Demaille <demaille@gostai.com>
1067
1068 Extract stack.hh from lalr1.cc.
1069 * data/stack.hh: New.
1070 * data/lalr1.cc: Extract from here.
1071 * data/local.mk: Adjust.
1072
10732009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1074
1075 Add reminder about uploading public key to keys.gnupg.net.
1076 * HACKING (Release Procedure): Here.
1077
10782009-01-28 Akim Demaille <demaille@gostai.com>
1079
1080 * NEWS: Update information about 2.4.1 and 2.4.2.
1081
10822008-11-04 Akim Demaille <demaille@gostai.com>
1083
1084 Reformat NEWS.
1085 * NEWS: Use more outline-mode markup.
1086 Suggested by Jim Meyering.
1087
10882009-01-08 Akim Demaille <demaille@gostai.com>
1089
1090 Fix grep portability issues.
1091 Grep on Solaris does not support -q.
1092 Reported by Summum Bonum.
1093
1094 * NEWS: Add a stub for 2.4.2.
1095 * THANKS: Add Summum Bonum.
1096 * tests/atlocal.in (EGREP): New.
1097 (CC, CXX, XSLTPROC): Make it possible to override them via
1098 envvars.
1099 * tests/java.at: Use $EGREP instead of egrep.
1100 Use AT_CHECK's ignore instead of grep's -q.
1101
11022008-12-11 Akim Demaille <demaille@gostai.com>
1103
1104 Pass the token type to yysyntax_error.
1105 * data/yacc.c (yysyntax_error): Take the transated token instead
1106 of the raw number.
1107 Adjust callers.
1108 * TODO: Update.
1109
11102008-12-11 Akim Demaille <demaille@gostai.com>
1111
1112 Formatting changes.
1113 * data/glr.c: Formatting changes.
1114
11152008-12-11 Akim Demaille <demaille@gostai.com>
1116
1117 Propagate i18n changes into glr.c.
1118 * TODO: Update.
1119 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1120 building the error message format dynamically.
1121 * data/lalr1.java: Formatting changes.
1122
11232008-12-11 Akim Demaille <demaille@gostai.com>
1124
1125 Use testsuite -C.
1126 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1127 Solves problems when top_srcdir is an absolute path.
1128 Suggested by Eric Blake.
1129 * configure.ac: Require Autoconf 2.62.
1130
11312008-12-11 Akim Demaille <demaille@gostai.com>
1132
1133 Simplify the i18n of the error messages.
1134 * data/lalr1.cc: Comment changes.
1135 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1136 lalr1.cc instead of building dynamically the format string.
1137
11382008-12-08 Akim Demaille <demaille@gostai.com>
1139
1140 Fix portability issue in the test suite.
1141 * tests/local.at (AT_MATCHES_CHECK): New.
1142 Based on Perl instead of Sed. Sed has too many portability
1143 pitfalls, not ever Sed is GNU Sed.
1144 * tests/actions.at (Fix user actions without a trailing semicolon):
1145 Use it.
1146
11472008-12-08 Akim Demaille <demaille@gostai.com>
1148
1149 Update data/README.
1150 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1151
11522008-12-08 Akim Demaille <demaille@gostai.com>
1153
1154 Install autoconf as a submodule to get m4sugar.
1155 * .gitmodules: Add submodules/autoconf.
1156 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1157 submodules/autoconf.
1158
11592008-12-08 Akim Demaille <demaille@gostai.com>
1160
1161 Test token.prefix in all the skeletons.
1162 * data/java.m4 (b4_token_enum): Use the token.prefix.
1163 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1164 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1165 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1166 * tests/java.at: Comment changes.
1167 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1168 (Java parser class and package names): Add token.prefix check.
1169
11702008-12-08 Akim Demaille <demaille@gostai.com>
1171
1172 Fix regeneration of atconfig.
1173 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1174 remove it: now that there is no tests/Makefile.am, the top-level
1175 Makefile properly updates atconfig when needed.
1176
11772008-12-07 Di-an Jan <dianj@freeshell.org>
1178
1179 Implement the FIXME that ends an user action with a semicolon
1180 if it seems necessary.
1181 * src/scan-code.l (flex rules section): Flag cpp directive from
1182 any `#' to the first unescaped end-of-line. Semicolon is not
1183 needed after `;', `{', '}', or cpp directives and is needed after
1184 any other token (whitespaces and comments have no effect).
1185 * tests/actions.at (Fix user actions without a trailing semicolon):
1186 New test.
1187 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1188 to make user actions complete statements.
1189 Adjust column numbers in error messages.
1190 * tests/regression.at (Fix user actions without a trailing semicolon):
1191 Remove. Covered by new test.
1192
11932008-12-07 Akim Demaille <demaille@gostai.com>
1194
1195 Update gnulib.
1196 * gnulib: Update from master.
1197
11982008-12-05 Eric Blake <ebb9@byu.net>
1199
1200 Avoid compiler warning.
1201 * src/output.c (muscle_insert_item_number_table): Delete unused
1202 function.
1203
12042008-12-02 Eric Blake <ebb9@byu.net>
1205
1206 Build testsuite with newer autoconf.
1207 * tests/output.at (m4_expand): Don't override in newer autoconf,
1208 where the underlying implementation changed.
1209 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1210 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1211 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1212 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1213 since some of them contain unbalanced ')'.
1214
12152008-12-01 Akim Demaille <demaille@gostai.com>
1216
1217 Use b4_symbol for printers and destructors everywhere.
1218 * data/bison.m4 (b4_symbol_action_location): New.
1219 * data/c.m4 (b4_symbol_actions): Remove.
1220 Adjust all callers to use by b4_symbol_foreach and the corresponding
1221 b4_symbol_printer/destructor macro.
1222 * data/glr.cc: Adjust.
1223 * data/lalr1.java: Adjust the %destructor sanity check.
1224 * src/output.c (symbol_code_props_output): Remove, we no longer
1225 need the b4_symbol_printers/destructors tables.
1226
12272008-12-01 Akim Demaille <demaille@gostai.com>
1228
1229 Use b4_symbol_case_.
1230 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1231 b4_symbol_case_.
1232
12332008-12-01 Akim Demaille <demaille@gostai.com>
1234
1235 Move b4_symbol based macro to bison.m4.
1236 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1237 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1238 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1239 (b4_type_foreach): Move to...
1240 * data/bison.m4: Here.
1241 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1242 b4_symbol_value_template instead of b4_symbol_value.
1243
12442008-12-01 Akim Demaille <demaille@gostai.com>
1245
1246 b4_symbol/type_foreach.
1247 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1248 Use them.
1249
12502008-12-01 Akim Demaille <demaille@gostai.com>
1251
1252 Use the symbol properties to output the printer/destructor for lalr1.cc.
1253 Instead of defining complex list of tuples to define various
1254 properties of the symbols, we now prefer to define symbols as
1255 "structs" in m4: using the symbol key (its number), and the
1256 property name, b4_symbol gives it value. Use this to handle
1257 destructors and printers.
1258
1259 * src/output.c (CODE_PROP): New.
1260 (prepare_symbol_definitions): Use it to define the printer and
1261 destructor related attributes of the symbols.
1262 * data/lalr1.cc (b4_symbol_actions): Rename as...
1263 (b4_symbol_action): this.
1264 Use b4_symbol instead of 6 arguments.
1265 (b4_symbol_printer, b4_symbol_destructor): New.
1266 Use them instead of b4_symbol_actions.
1267
12682008-12-01 Akim Demaille <demaille@gostai.com>
1269
1270 Avoid capturing variables too easily.
1271 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
1272 v__ and p__ instead of v and p.
1273
12742008-12-01 Akim Demaille <demaille@gostai.com>
1275
1276 Remove spurious empty line before syncline.
1277 * data/bison.m4 (b4_syncline): Don't output an empty line before
1278 the output.
1279
12802008-11-26 Akim Demaille <demaille@gostai.com>
1281
1282 Convert lib/Makefile.am into lib/local.mk.
1283 The real problem is rather gnulib.mk, which itself is extracted
1284 from a Makefile.am that gnulib expects to the "recursive". The
1285 tool prefix-gnulib-mk converts such a gnulib.mk to be
1286 non-recursive. Also, some AC_SUBST variables need to be adjusted.
1287
1288 * etc/prefix-gnulib-mk: New.
1289 * bootstrap (slurp): Use it to convert further gnulib.mk.
1290 No longer try to avoid re-creation of lib/gnulib.mk as the changes
1291 are deeper.
1292 * lib/Makefile.am: Rename as...
1293 * lib/local.mk: this.
1294 Adjust to be prefixed.
1295 * Makefile.am, configure.ac: Adjust.
1296 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
1297
12982008-11-26 Akim Demaille <demaille@gostai.com>
1299
1300 s/_FLAGS/FLAGS/.
1301 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1302 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1303 Reported by Eric Blake.
1304
13052008-11-26 Akim Demaille <demaille@gostai.com>
1306
1307 Use b4_parser_tables_define in glr.cc.
1308 * data/glr.c: Use b4_parser_tables_define instead of defining the
1309 (deterministic integral) tables by hand.
1310
13112008-11-26 Akim Demaille <demaille@gostai.com>
1312
1313 Use b4_parser_tables_define in Java.
1314 * data/java.m4 (b4_typed_parser_table): Rename as...
1315 (b4_typed_parser_table_define): this, for consistency.
1316 Accept a comment as $4.
1317 Move $2 into yy*_.
1318 (b4_integral_parser_table): Rename as...
1319 (b4_integral_parser_table_define): this.
1320 * data/lalr1.java: Adjust all uses.
1321 Use b4_parser_tables_define instead of generation by hand.
1322
13232008-11-26 Akim Demaille <demaille@gostai.com>
1324
1325 Prepare the convergence bw C style and Java table generation.
1326 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1327 (b4_tables_define): Rename as...
1328 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1329 (b4_parser_tables_define): these.
1330 * data/c.m4 (b4_table_define): Rename as...
1331 (b4_integral_parser_table_define): this.
1332 * data/lalr1.cc: Adjust.
1333 (b4_table_define, b4_table_declare): Rename as...
1334 (b4_integral_parser_table_define)
1335 (b4_integral_parser_table_declare): these.
1336 (yyrline_): Move the comment where it is actually used.
1337 * data/yacc.c: Adjust.
1338 (yyrline): Use b4_integral_parser_table_define.
1339
13402008-11-26 Akim Demaille <demaille@gostai.com>
1341
1342 Regen.
1343 * src/parse-gram.h, src/parse-gram.c: Regen.
1344
13452008-11-26 Akim Demaille <demaille@gostai.com>
1346
1347 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1348 * data/lalr1.cc (b4_tables_map): Move to...
1349 * data/bison.m4: here.
1350 Update the comment for yytable during the flight.
1351 (b4_tables_declare, b4_tables_define): New.
1352 * data/lalr1.cc: Use them.
1353 * data/c.m4 (b4_table_define): New.
1354 * data/yacc.c: Use b4_tables_define instead of output the tables
1355 by hand.
1356 * tests/regression.at (Web2c Actions): Adjust the expected output,
1357 the order of the tables changed.
1358
13592008-11-26 Akim Demaille <demaille@gostai.com>
1360
1361 Get rid of (yy)rhs and (yy)prhs.
1362 These tables are no longer needed in the parsers, and they don't seem to
1363 be useful. They are not documented either.
1364
1365 * src/output.c (prepare_rules): Get rid of rhs and prhs.
1366 Adjust the computation of (yy)r2.
1367
13682008-11-26 Akim Demaille <demaille@gostai.com>
1369
1370 Rule length is unsigned.
1371 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
1372
13732008-11-26 Akim Demaille <demaille@gostai.com>
1374
1375 Get rid of lalr1-split.cc.
1376 It was no longer maintainer.
1377
1378 * data/lalr1-split.cc: Remove.
1379 * etc/bench.pl.in (bench_fusion_parser): Remove.
1380 Adjust.
1381
13822008-11-26 Akim Demaille <demaille@gostai.com>
1383
1384 Use yy* consistently.
1385 * data/glr.c: Now that yyrhs no longer exists as a global
1386 variable, rename local "rhs" variables into "yyrhs" for
1387 consistency.
1388
13892008-11-25 Akim Demaille <demaille@gostai.com>
1390
1391 Get rid of yyrhs and yyprhs in glr.c.
1392 * data/glr.c (yyrhs, yyprhs): Remove.
1393 Instead, use the state stack and yystos.
1394
13952008-11-25 Akim Demaille <demaille@gostai.com>
1396
1397 Flag glr tests.
1398 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
1399 as an Autotest keyword.
1400
14012008-11-25 Akim Demaille <demaille@gostai.com>
1402
1403 Prefer TESTSUITE_FLAGS.
1404 TESTSUITEFLAGS is barely readable.
1405
1406 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
1407 for backward compatibility.
1408 Use the former instead of the latter.
1409
14102008-11-25 Akim Demaille <demaille@gostai.com>
1411
1412 Get rid of yyrhs and yyprhs in larl1.java.
1413 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
1414 (yy_reduce_print): Rather, use yystos_ and the state stack.
1415
14162008-11-25 Akim Demaille <demaille@gostai.com>
1417
1418 Formatting changes.
1419
14202008-11-25 Akim Demaille <demaille@gostai.com>
1421
1422 Get rid of yyrhs and yyprhs in yacc.c.
1423 They were used to get the symbol types, given a rule number, when
1424 displaying the top of the stack before a reduction. But the
1425 symbol type is available from the state stack. This has two be
1426 benefits: two tables less in the parser (making it smaller), and a
1427 more consistent use of the three stacks which will help to fuse
1428 them.
1429
1430 * data/yacc.c (yyprhs, yyrhs): Remove.
1431 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
1432 (yy_reduce_print): Take yyssp as argument.
1433 Use it, together with yystos, to get the symbol type.
1434 * tests/regression.at (Web2c Report): Remove these tables from the
1435 expected output.
1436
14372008-11-25 Akim Demaille <demaille@gostai.com>
1438
1439 b4_tables_map.
1440 The point is to factor the generation of the tables across skeletons.
1441 This is language dependant.
1442
1443 * data/c.m4 (b4_comment_): New.
1444 Should be usable to define how to generate tables independently of
1445 the language.
1446 (b4_c_comment): New.
1447 (b4_comment): Bounce to b4_c_comment.
1448 Now support $2 = [PREFIX] for indentation.
1449 * data/lalr1.cc (b4_table_declare): Don't output a comment if
1450 there is no comment.
1451 Indent it properly when there is one.
1452 Output the ending semicolon.
1453 (b4_table_define): Space changes.
1454 Output the ending semicolon.
1455 (b4_tables_map): New.
1456 Use it twice instead of declaring and defining the (integral)
1457 tables by hand.
1458
14592008-11-25 Akim Demaille <demaille@gostai.com>
1460
1461 b4_table_declare.
1462 * data/lalr1.cc (b4_table_declare): New.
1463 Use it to declare the tables defined with b4_table_define.
1464 (b4_table_define): Declare a third arg to match b4_table_declare
1465 signature.
1466 Move all the comments around invocations of b4_table_define into
1467 the invocations itselves.
1468 Move things around to have the order for declarations and
1469 definitions.
1470
14712008-11-25 Akim Demaille <demaille@gostai.com>
1472
1473 Formatting changes.
1474 * data/lalr1.java: here.
1475
14762008-11-25 Akim Demaille <demaille@gostai.com>
1477
1478 b4_args is more general than only C++.
1479 * data/lalr1.cc (b4_args, _b4_args): Move to...
1480 * data/bison.m4: here.
1481
14822008-11-21 Di-an Jan <dianj@freeshell.org>
1483
1484 Implement no-XXX arguments for --warnings, --report, --trace.
1485 * src/getargs.c (flags_argmatch): Handles no-XXX.
1486 Fix typo in doxygen comment.
1487
14882008-11-21 Akim Demaille <demaille@gostai.com>
1489
1490 Display the changes in cross-options.texi.
1491 * build-aux/cross-options.pl ($sep): New, to separate items.
1492 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
1493 changes.
1494
14952008-11-20 Di-an Jan <dianj@freeshell.org>
1496
1497 Improves options in the manual.
1498 * doc/bison.texinfo (-g, -x): Add space before argument.
1499 (Option Cross Key): Implement FIXME: listing directives also.
1500 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1501 (Short Option): Special case -d. Put arguments inside @option.
1502 (Bison Directive): Add column, automatically extracted from
1503 src/scan-gram.l (actual name passed as the first argument)
1504 with special case for %define.
1505 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
1506 to build-aux/cross-options.pl.
1507 * src/getargs.c (usage): Document limitations of cross-options.pl.
1508 * src/scan-gram.l: Likewise.
1509
15102008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1511
1512 Fix unexpanded macros in GLR defines file.
1513 Reported by Csaba Raduly at
1514 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1515 * THANKS (Csaba Raduly): Add.
1516 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1517 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1518 lexer in a separate module that includes the defines file.
1519 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
1520 source.
1521 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1522 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1523 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1524 (AT_DATA_SOURCE_PROLOGUE): New.
1525 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1526 (AT_DATA_SOURCE): New.
1527 (AT_FULL_COMPILE): Extend to support an additional source file.
1528
15292008-11-18 Akim Demaille <demaille@gostai.com>
1530
1531 More TODO.
1532 * TODO: More short term issues.
1533
15342008-11-18 Akim Demaille <demaille@gostai.com>
1535
1536 Regen.
1537 * src/parse-gram.h, src/parse-gram.c: Regen.
1538
15392008-11-18 Akim Demaille <demaille@gostai.com>
1540
1541 Use b4_subtract where possible.
1542 * data/lalr1.cc (b4_subtract): Move to...
1543 * data/bison.m4: here.
1544 * data/glr.c (b4_rhs_data): Use it.
1545 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
1546
15472008-11-18 Akim Demaille <demaille@gostai.com>
1548
1549 Remove incorrect mode specification.
1550 * data/glr.cc: Don't pretend it's C code.
1551
15522008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1553
1554 Simplify last patch slightly.
1555 * src/getargs.c (getargs): Here.
1556
15572008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1558
1559 Fix last warning from --enable-gcc-warnings.
1560 * src/getargs.c (getargs): Don't assign const address to non-const
1561 pointer.
1562
15632008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1564
1565 Don't let maintainer-*-check targets force a version update.
1566 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1567 handled.
1568
15692008-11-17 Di-an Jan <dianj@freeshell.org>
1570
1571 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1572 Align menus. Adjust word wrapping. Use node names for menu names.
1573 (Examples): Don't abbreviate node names.
1574 (LocalWords): Remove abbreviations.
1575 (Copying): Make description a sentence.
1576 (Java Action Features): Remove period to match the rest of menu.
1577
15782008-11-17 Di-an Jan <dianj@freeshell.org>
1579
1580 Handles several --enable-gcc-warnings.
1581 * src/getargs.c (command_line_location): Set parameters to void.
1582 * src/output.c (symbol_type_name_cmp): Make static.
1583 (symbols_by_type_name): Set parameters to void.
1584 (symbol_definitions_output): Remove unused parameter. Rename as...
1585 (prepare_symbol_definitions): this.
1586 (muscles_output): Move symbol_definitions_output to...
1587 (output): here as prepare_symbol_definitions.
1588 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
1589 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
1590
15912008-11-17 Di-an Jan <dianj@freeshell.org>
1592
1593 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
1594 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
1595
15962008-11-16 Akim Demaille <demaille@gostai.com>
1597
1598 Add missing $(EXEEXT).
1599 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
1600 "src/bison$(EXEEXT)".
1601 Reported by Di-an Jan.
1602
16032008-11-15 Akim Demaille <demaille@gostai.com>
1604
1605 * TODO: Update.
1606
16072008-11-15 Akim Demaille <demaille@gostai.com>
1608
1609 Formatting changes.
1610 * tests/input.at: here.
1611
16122008-11-15 Akim Demaille <demaille@gostai.com>
1613
1614 Remove duplicate header inclusion.
1615 * src/LR0.c: here.
1616
16172008-11-15 Akim Demaille <demaille@gostai.com>
1618
1619 * src/parse-gram.h, src/parse-gram.c: Regen.
1620
16212008-11-15 Akim Demaille <demaille@gostai.com>
1622
1623 Support parametric types.
1624
1625 There are two issues to handle: first scanning nested angle
1626 bracket pairs to support types such as std::pair< std::string,
1627 std::list<std::string> > >.
1628
1629 Another issue is to address idiosyncracies of C++: do not glue two
1630 closing angle brackets together (otherwise it's operator>>), and
1631 avoid sticking blindly a TYPE to the opening <, as it can result
1632 in '<:' which is a digraph for '['.
1633
1634 * src/scan-gram.l (brace_level): Rename as...
1635 (nesting): this.
1636 (SC_TAG): New.
1637 Implement support for complex tags.
1638 (tag): Accept
1639 , but not <.
1640 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
1641 (b4_symbol_variant): Leave space around types as parameters.
1642 * examples/variant.yy: Use nested template types and leading ::.
1643 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
1644 Rename as...
1645 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
1646 * tests/c++.at: Test parametric types.
1647
16482008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1649
1650 Test token.prefix.
1651 This is not sufficient, but we test at least that the make_SYMBOL
1652 interface is not affected by token.prefix. A more general test
1653 will be implemented when the support of token.prefix is generalized
1654 to more skeletons.
1655
1656 * tests/c++.at: One more variant test, using token.prefix.
1657
16582008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1659
1660 Test the make_TOKEN interface.
1661 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
1662 Factor the common code in yylex.
1663 Use it to test "%define lex_symbol".
1664
16652008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1666
1667 Formatting change.
1668
16692008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1670
1671 Simplify code for variants bench marks.
1672 * etc/bench.pl.in (&generate_grammar_list): Define and use
1673 location_type.
1674 Factor the common code in yylex.
1675
16762008-11-15 Akim Demaille <demaille@gostai.com>
1677
1678 Better error message.
1679 * bootstrap (find_tool): Fix the error message.
1680
16812008-11-15 Akim Demaille <demaille@gostai.com>
1682
1683 Update variant.yy to newest interface.
1684 * examples/variant.yy: Define lex_symbol.
1685 Adjust.
1686
16872008-11-15 Akim Demaille <demaille@gostai.com>
1688
1689 Don't use locations in variant.yy.
1690 * examples/variant.yy: Adjust to not using locations.
1691
16922008-11-15 Akim Demaille <demaille@gostai.com>
1693
1694 Comment changes.
1695 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
1696 comments for the license.
1697
16982008-11-15 Akim Demaille <demaille@gostai.com>
1699
1700 Remove tests/Makefile.am.
1701 * tests/Makefile.am: Rename as...
1702 * tests/local.mk: this.
1703 * Makefile.am, configure.ac: Adjust.
1704 * Makefile.am (DISTCLEANFILES): Define.
1705 (maintainer-check, maintainer-xml-check, maintainer-push-check):
1706 Remove, we no longer need to bounce to the real targets.
1707
17082008-11-15 Akim Demaille <demaille@gostai.com>
1709
1710 Comment changes.
1711
17122008-11-15 Akim Demaille <demaille@gostai.com>
1713
1714 djgpp/local.mk.
1715 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
1716 * djgpp/local.mk: this new file.
1717
17182008-11-15 Akim Demaille <demaille@gostai.com>
1719
1720 Remove doc/Makefile.am.
1721 * doc/Makefile.am: Rename as...
1722 * doc/local.mk: this.
1723 Adjust paths
1724 * Makefile.am, configure.ac: Adjust.
1725 * Makefile.am (MOSTLYCLEANFILES): New.
1726 * src/local.mk: Adjust.
1727
17282008-11-15 Akim Demaille <demaille@gostai.com>
1729
1730 Move sc_tight_scope into maint.mk.
1731 It does not work, and I don't know how it was supposed to work: it
1732 seems to be looking for sources in the build tree. I just moved
1733 it at a better place, fixing it is still required.
1734
1735 * src/local.mk (echo): Remove.
1736 (sc_tight_scope): Move to...
1737 * maint.mk: here.
1738
17392008-11-15 Akim Demaille <demaille@gostai.com>
1740
1741 Regen.
1742 * src/parse-gram.h, src/parse-gram.h: Regen.
1743
17442008-11-15 Akim Demaille <demaille@gostai.com>
1745
1746 Remove src/Makefile.am.
1747 * src/Makefile.am: Rename as...
1748 * src/local.mk: this.
1749 Prefix all the paths with src/.
1750 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
1751 (AM_CPPFLAGS): Find find in builddir/src.
1752 (YACC): Move the flags into...
1753 (AM_YFLAGS): here.
1754 * maint.mk (sc_tight_scope): Disable.
1755 It used to bounce to the version in src/Makefile.am which is now
1756 part of this very Makefile.
1757 * Makefile.am, configure.ac: Adjust.
1758 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
1759 include "..." to find files "here": we are no longer in src/, so
1760 qualify the includes with src/.
1761 * doc/Makefile.am (PREPATH): No longer include the top_builddir
1762 prefix.
1763 (.x.1): Adjust to be able to create src/foo from the top level
1764 Makefile, instead of going bounce to src/Makefile the creation of
1765 foo.
1766
17672008-11-15 Akim Demaille <demaille@gostai.com>
1768
1769 Remove useless variable.
1770 * doc/Makefile.am (srcsrcdir): Remove.
1771
17722008-11-15 Akim Demaille <demaille@gostai.com>
1773
1774 Remove data/Makefile.am.
1775 * data/Makefile.am: Rename as...
1776 * data/local.mk: this.
1777 Adjust paths.
1778 * Makefile.am, configure.ac: Adjust.
1779
17802008-11-15 Akim Demaille <demaille@gostai.com>
1781
1782 Remove etc/Makefile.am.
1783 * etc/Makefile.am: Rename as...
1784 * etc/local.mk: this.
1785 Adjust.
1786 * Makefile.am, configure.ac: Adjust.
1787
17882008-11-15 Akim Demaille <demaille@gostai.com>
1789
1790 Remove examples/local.mk.
1791 examples/calc++/Makefile.am might be interesting to keep as is, since
1792 it is an example in itself.
1793
1794 * examples/Makefile.am: Rename as...
1795 * examples/local.mk: this.
1796 Adjust.
1797 * Makefile.am, configure.ac: Adjust.
1798
17992008-11-15 Akim Demaille <demaille@gostai.com>
1800
1801 Remove build-aux/Makefile.am.
1802 Recursive Makefiles are really way too slow, let's get rid of some of
1803 them.
1804
1805 * build-aux/Makefile.am: Rename as...
1806 * build-aux/local.mk: this.
1807 Adjust paths.
1808 * Makefile.am, configure.ac: Adjust.
1809
18102008-11-15 Akim Demaille <demaille@gostai.com>
1811
1812 Provide convenience constructors for locations and positions.
1813 * data/location.cc (position::position): Accept file, line and
1814 column as arguments with default values.
1815 Always qualify initial line and column literals as unsigned.
1816 (location::location): Provide convenience constructors.
1817
18182008-11-15 Akim Demaille <demaille@gostai.com>
1819
1820 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
1821 token type.
1822 Using template buys us nothing, and makes it uselessly complex to
1823 construct a symbol. Besides, it could not be generalized to other
1824 languages, while make_FOO would work in C/Java etc.
1825
1826 * data/lalr1.cc (b4_symbol_): New.
1827 (b4_symbol): Use it.
1828 (b4_symbol_constructor_declaration_)
1829 (b4_symbol_constructor_definition_): Instead of generating
1830 specializations of an overloaded template function, just generate
1831 several functions whose names are forged from the token names
1832 without the token.prefix.
1833 (b4_symbol_constructor_declarations): Generate them for all the
1834 symbols, not just by class of symbol type, now that instead of
1835 specializing a function template by the token, we generate a
1836 function named after the token.
1837 (b4_symbol_constructor_specialization_)
1838 (b4_symbol_constructor_specializations): Remove.
1839 * etc/bench.pl.in: Adjust to this new API.
1840
18412008-11-13 Akim Demaille <demaille@gostai.com>
1842
1843 %define token.prefix.
1844 Provide a means to add a prefix to the name of the tokens as
1845 output in the generated files. Because of name clashes, it is
1846 good to have such a prefix such as TOK_ that protects from names
1847 such as EOF, FILE etc. But it clutters the grammar itself.
1848
1849 * data/bison.m4 (token.prefix): Empty by default.
1850 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
1851 * data/lalr1.cc (b4_symbol): Ditto.
1852
18532008-11-13 Akim Demaille <demaille@gostai.com>
1854
1855 Compute at M4 time some of the subtractions.
1856 * data/lalr1.cc (b4_subtract): New.
1857 (b4_rhs_data): Use it.
1858
18592008-11-13 Akim Demaille <demaille@gostai.com>
1860
1861 symbol::token.
1862 This allows the user to get the type of a token returned by yylex.
1863
1864 * data/lalr1.cc (symbol::token): New.
1865 (yytoknum_): Define when %define lex_symbol, independently of
1866 %debug.
1867 (yytoken_number_): Move into...
1868 (symbol::token): here, since that's the only use.
1869 The other one is YYPRINT which was not officially supported
1870 by lalr1.cc, and anyway it did not work since YYPRINT uses this
1871 array under a different name (yytoknum).
1872
18732008-11-13 Akim Demaille <demaille@gostai.com>
1874
1875 YYERRCODE.
1876 * TODO (YYERRCODE): Mention the case of $undef.
1877
18782008-11-13 Akim Demaille <demaille@gostai.com>
1879
1880 TODO: YYPRINT.
1881 * TODO (YYPRINT): New.
1882
18832008-11-13 Akim Demaille <demaille@gostai.com>
1884
1885 Comment changes.
1886 * data/lalr1.cc, data/yacc.c: Fix the description of the
1887 yytranslate and yytoknum tables.
1888
18892008-11-13 Akim Demaille <demaille@gostai.com>
1890
1891 Define make_symbol in the header.
1892 To reach good performances these functions should be inlined (yet
1893 this is to measure precisely). To this end they must be available
1894 to the caller.
1895
1896 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
1897 location_type with the class name.
1898 Since will now be output in the header, declare "inline".
1899 No longer use b4_symbol_constructor_specializations, but
1900 b4_symbol_constructor_definitions in the header.
1901 Don't call it in the *.cc file.
1902
19032008-11-13 Akim Demaille <demaille@gostai.com>
1904
1905 Define yytranslate in the header for lex_symbol.
1906 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
1907 into the header file when using %define lex_symbol.
1908 (yytranslate_): Declare inline.
1909
19102008-11-13 Akim Demaille <demaille@gostai.com>
1911
1912 Define the constructors of symbol_type in
1913 b4_symbol_constructor_definitions.
1914 The constructors are called by the make_symbol functions, which a
1915 forthcoming patch will move elsewhere. Hence the interest of
1916 putting them together.
1917
1918 The stack_symbol_type does not need to be moved, it is used only
1919 by the parser.
1920
1921 * data/lalr1.cc: Move symbol_type and symbol_base_type
1922 constructors into...
1923 (b4_symbol_constructor_definitions): here.
1924 Adjust.
1925
19262008-11-13 Akim Demaille <demaille@gostai.com>
1927
1928 Make it easier to move the definition of yytranslate_.
1929 Forthcoming changes will make it possible to use yytranslate_
1930 from outside the parser implementation file.
1931
1932 * data/lalr1.cc (b4_yytranslate_definition): New.
1933 Use it.
1934
19352008-11-13 Akim Demaille <demaille@gostai.com>
1936
1937 Remove useless class specification.
1938 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1939 to refer to the class name to use a type defined by the class for
1940 arguments of member functions.
1941
19422008-11-13 Akim Demaille <demaille@gostai.com>
1943
1944 Finer input type for yytranslate.
1945 This patch is debatable: the tradition expects yylex to return an int
1946 which happens to correspond to token_number (which is an enum). This
1947 allows for instance to return characters (such as '*' etc.). But this
1948 goes against the stronger typing I am trying to have with the new
1949 lex interface which return a symbol_type. So in this case, feed
1950 yytranslate_ with a token_type.
1951
1952 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1953 expect a token_type.
1954
19552008-11-13 Akim Demaille <demaille@gostai.com>
1956
1957 Honor lex-params in %define lex_symbol mode.
1958 * data/lalr1.cc: Use b4_lex_param.
1959
19602008-11-13 Akim Demaille <demaille@gostai.com>
1961
1962 Simplify names.
1963 * src/output.c (symbol_definitions_output): Rename symbol
1964 attributes type_name and has_type_name as type and has_type.
1965 * data/lalr1.cc: Adjust uses.
1966
19672008-11-13 Akim Demaille <demaille@gostai.com>
1968
1969 Use b4_type_names for the union type.
1970 The union used to compute the size of the variant used to iterate
1971 over the type of all the symbols, with a lot of redundancy. Now
1972 iterate over the lists of symbols having the same type-name.
1973
1974 * data/lalr1.cc (b4_char_sizeof_): New.
1975 (b4_char_sizeof): Use it.
1976 Adjust to be called with a list of numbers instead of a single
1977 number.
1978 Adjust its caller for new-line issues.
1979
19802008-11-13 Akim Demaille <demaille@gostai.com>
1981
1982 Define the "identifier" of a symbol.
1983 Symbols may have several string representations, for instance if
1984 they have an alias. What I call its "id" is a string that can be
1985 used as an identifier. May not exist.
1986
1987 Currently the symbols which have the "tag_is_id" flag set are
1988 those that don't have an alias. Look harder for the id.
1989
1990 * src/output.c (is_identifier): Move to...
1991 * src/symtab.c (is_identifier): here.
1992 * src/symtab.h, src/symtab.c (symbol_id_get): New.
1993 * src/output.c (symbol_definitions_output): Use it to define "id"
1994 and "has_id".
1995 Remove the definition of "tag_is_id".
1996 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
1997 "tag_is_id" were used to produce code.
1998 We still use "tag" for documentation.
1999
20002008-11-11 Akim Demaille <demaille@gostai.com>
2001
2002 Locations are no longer required by lalr1.cc.
2003 * data/lalr1.cc (_b4_args, b4_args): New.
2004 Adjust all uses of locations to make them optional.
2005 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
2006 (AT_CHECK_NAMESPACE): Check the use of locations.
2007 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
2008 without locations with lalr1.cc.
2009 Test these cases.
2010 * tests/output.at: Check lalr1.cc with and without location
2011 support.
2012 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2013 Don't use locations.
2014
20152008-11-11 Akim Demaille <demaille@gostai.com>
2016
2017 AT_FULL_COMPILE.
2018 * tests/local.at (AT_FULL_COMPILE): New.
2019 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2020
20212008-11-11 Akim Demaille <demaille@gostai.com>
2022
2023 Support parens in calc++.
2024 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2025 * examples/calc++/test (run): Check the expected output.
2026 Adjust callers.
2027 Check parens too.
2028
20292008-11-11 Akim Demaille <demaille@gostai.com>
2030
2031 Simplify lalr1.cc since %defines is mandatory.
2032 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2033
20342008-11-11 Akim Demaille <demaille@gostai.com>
2035
2036 TODO: yyfmt.
2037 * TODO (yysyntax_error): New item.
2038
20392008-11-11 Akim Demaille <demaille@gostai.com>
2040
2041 Prefer M4 to CPP.
2042 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2043 YYERROR_VERBOSE.
2044
20452008-11-11 Akim Demaille <demaille@gostai.com>
2046
2047 Support i18n of the parse error messages.
2048 * TODO (lalr1.cc/I18n): Remove.
2049 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2050 error messages, as done in yacc.c.
2051 Stay within the yy* pseudo namespace.
2052
20532008-11-11 Akim Demaille <demaille@gostai.com>
2054
2055 More TODO.
2056 * TODO (single stack, yysyntax_error): New.
2057
20582008-11-11 Akim Demaille <demaille@gostai.com>
2059
2060 Make it possible to return a symbol_type from yylex.
2061 * data/lalr1.cc (b4_lex_symbol_if): New.
2062 (parse): When lex_symbol is defined, expected yylex to return the
2063 complete lookahead.
2064 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2065 yylex interface.
2066 (bench_variant_parser): Exercise it.
2067
20682008-11-11 Akim Demaille <demaille@gostai.com>
2069
2070 Remove useless bench case.
2071 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2072 no longer used.
2073
20742008-11-11 Akim Demaille <demaille@gostai.com>
2075
2076 Improve display of directives.
2077 * etc/bench.pl.in (parse_term): Don't add useless eol.
2078
20792008-11-11 Akim Demaille <demaille@gostai.com>
2080
2081 Use string_cast in the bench.
2082 * etc/bench.pl.in (generate_grammar_list): Define and use
2083 string_cast.
2084
20852008-11-11 Akim Demaille <demaille@gostai.com>
2086
2087 Replace yychar with a Boolean.
2088 * data/lalr1.cc (parse::yychar): Replace by...
2089 (parse::yyempty): this.
2090
20912008-11-11 Akim Demaille <demaille@gostai.com>
2092
2093 Factor the tables.
2094 * TODO: New item.
2095
20962008-11-11 Akim Demaille <demaille@gostai.com>
2097
2098 Let yytranslate handle the eof case.
2099 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2100 Adjust callers.
2101 No longer expect yychar to be equal to yyeof_, rather, test the
2102 lookahead's (translated) kind.
2103
21042008-11-11 Akim Demaille <demaille@gostai.com>
2105
2106 yychar cannot be empty in yyerrlab.
2107 * TODO (yychar == yyempty_): New.
2108 * data/lalr1.cc: Remove the handling of this case.
2109 This eases forthcoming changes related to yychar and yytranslate.
2110
21112008-11-11 Akim Demaille <demaille@gostai.com>
2112
2113 Bench: syntactic sugar for %define/#define.
2114 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2115 (&bench_push_parser, bench_variant_parser): Use this feature.
2116 (&eat): New.
2117 Use it.
2118
21192008-11-11 Akim Demaille <demaille@gostai.com>
2120
2121 Less memory pressure on the "list" bench.
2122 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2123 the values, to limit memory pressure.
2124
21252008-11-11 Akim Demaille <demaille@gostai.com>
2126
2127 Introduce make_symbol.
2128 make_symbol provides a means to construct a full symbol (kind,
2129 value, location) in a single shot. It is meant to be a Symbol
2130 constructor, parameterized by the symbol kind so that overloading
2131 would prevent incorrect kind/value pairs. Unfortunately
2132 parameterized constructors do not work well in C++ (unless the
2133 parameter also appears as an argument, which is not acceptable),
2134 hence the use of a function instead of a constructor.
2135
2136 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2137 (b4_symbol_constructor_declarations)
2138 (b4_symbol_constructor_specialization_)
2139 (b4_symbol_constructor_specializations)
2140 (b4_symbol_constructor_definition_)
2141 (b4_symbol_constructor_definitions): New.
2142 Use them where appropriate to generate declaration, declaration of
2143 the specializations, and implementations of the templated
2144 overloaded function "make_symbol".
2145 (variant::variant): Always define a default ctor.
2146 Also provide a copy ctor.
2147 (symbol_base_type, symbol_type): New ctor overloads for value-less
2148 symbols.
2149 (symbol_type): Now public, so that functions such as yylex can use
2150 it.
2151
21522008-11-11 Akim Demaille <demaille@gostai.com>
2153
2154 Inform m4 whether a tag is a valid id.
2155 * src/output.c (is_identifier): New.
2156 (symbol_definitions_output): Use it to define tag_is_id.
2157 But maybe this should be done at m4 level?
2158
21592008-11-11 Akim Demaille <demaille@gostai.com>
2160
2161 Test 214 was failing: it greps with a pattern containing [ ]*
2162 which obviously meant to catch spaces and tabs, but contained only
2163 spaces. Tabulations in sources are a nuisance, so to simplify the
2164 matter, get rid of all the tabulations in the Java sources. The
2165 other skeletons will be treated equally later.
2166
2167 * data/java.m4, data/lalr1.java: Untabify.
2168 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2169 tabulations are no longer generated.
2170
21712008-11-11 Paolo Bonzini <bonzini@gnu.org>
2172
2173 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2174 * configure.ac: Adjust usage.
2175 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2176 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2177 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2178
21792008-11-10 Di-an Jan <dianj@freeshell.org>
2180
2181 Workaround Java's ``code too large'' problem for parser tables
2182 in most cases, by using one function per initialization.
2183 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2184 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2185 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2186 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2187 (yytname_): Use b4_typed_parser_table.
2188 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2189 ``code too large'' error.
2190
21912008-11-10 Di-an Jan <dianj@freeshell.org>
2192
2193 * NEWS: Document them.
2194
2195 General Java skeleton improvements.
2196 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2197 using gcj < 4.3 in the testsuite, according to comments in
2198 gnulib/m4/javacomp.m4.
2199 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2200 location_type, position_type): Remove extraneous brackets from
2201 b4_percent_define_default.
2202 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2203 m4_define and m4_define_default.
2204 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2205 which marks the end of user code with appropriate syncline, like all
2206 the other skeletons.
2207 (b4_user_post_prologue): Add. Don't silently drop.
2208 (yylex): Remove.
2209 (parse): Inline yylex.
2210 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2211 (%{...%}): Fix typo of %code imports.
2212 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2213
2214 Support annotations on parser class with %define annotations.
2215 * data/lalr1.java (annotations): Add to parser class modifier.
2216 * doc/bison.texinfo (Java Parser Interface): Document
2217 %define annotations.
2218 (Java Declarations Summary): Document %define annotations.
2219 * tests/java.at (Java parser class modifiers): Test annotations.
2220
2221 Do not generate code for %error-verbose unless requested.
2222 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2223 Make private. Make conditional on %error-verbose.
2224 (getErrorVerbose, setErrorVerbose): New.
2225 (yytnamerr_): Make conditional on %error-verbose.
2226 (yysyntax_error): Make some code conditional on %error-verbose.
2227 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2228 about %error-verbose having no effect.
2229 (getErrorVerbose, setErrorVerbose): Document.
2230
2231 Move constants for token names to Lexer interface.
2232 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2233 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2234 (parse): Qualify EOF to Lexer.EOF.
2235 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2236 EOF and token names to Java Lexer Interface.
2237 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2238
2239 Make yyerror public.
2240 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2241 (yyerror): Change to public. Add Javadoc comments. Use longer
2242 parameter names. Make the body rather than the declarator
2243 conditional on %locations.
2244 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2245
2246 Allow user to add code to the constructor with %code init.
2247 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2248 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2249 Add %code init to the front of the constructor body.
2250 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2251 and %define init_throws.
2252 (Java Declarations Summary): Document %code init and
2253 %define init_throws.
2254 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2255 (Java constructor init and init_throws): Add tests.
2256
22572008-11-10 Akim Demaille <demaille@gostai.com>
2258
2259 Update TODO.
2260 * TODO (-D): is implemented.
2261 (associativity): Same precedence must have the same associativity.
2262 For instance, how can a * b / c be parsed if * is %left and / is
2263 %right?
2264 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2265
22662008-11-10 Akim Demaille <demaille@gostai.com>
2267
2268 Formatting changes.
2269
22702008-11-10 Akim Demaille <demaille@gostai.com>
2271
2272 More information about the symbols.
2273 * src/output.c (type_names_output): Document all the symbols,
2274 including those that don't have a type-name.
2275 (symbol_definitions_output): Define "is_token" and
2276 "has_type_name".
2277 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
2278 type-name, now that they are defined too in b4_type_names.
2279
22802008-11-10 Akim Demaille <demaille@gostai.com>
2281
2282 Regen.
2283
22842008-11-10 Akim Demaille <demaille@gostai.com>
2285
2286 Make parser::yytranslate static.
2287 Small speedup (1%) on the list grammar. And makes yytranslate_
2288 available in non member functions.
2289
2290 * data/lalr1.cc (yytranslate_): Does not need to be a instance
2291 function.
2292
22932008-11-10 Akim Demaille <demaille@gostai.com>
2294
2295 Avoid trailing spaces.
2296 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
2297 * data/lalr1.cc: Don't indent before rule and symbol actions, as
2298 they can be empty, and anyway this incorrectly indents the first
2299 action.
2300
23012008-11-10 Akim Demaille <demaille@gostai.com>
2302
2303 Comment changes.
2304
23052008-11-10 Akim Demaille <demaille@gostai.com>
2306
2307 Use "enum" for integral constants.
2308 This is just nicer to read, I observed no speedup.
2309
2310 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2311 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2312 (yyuser_token_number_max_, yyundef_token_): Move into...
2313 (yytranslate_): here.
2314
23152008-11-10 Akim Demaille <demaille@gostai.com>
2316
2317 Shortcuts in bench directives.
2318 * etc/bench.pl.in (parse_dirs): New.
2319 Use it.
2320 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2321 Create the benches in "benches/".
2322
23232008-11-10 Akim Demaille <demaille@gostai.com>
2324
2325 Formatting changes.
2326 * data/lalr1.cc: here.
2327
23282008-11-10 Akim Demaille <demaille@gostai.com>
2329
2330 Adjust verbose message to using emacs.
2331 * etc/bench.pl.in: Inform compilation-mode when we change the
2332 directory.
2333 (generate_grammar_list): Recognize %define "variant" in addition
2334 to %define variant.
2335
23362008-11-10 Akim Demaille <demaille@gostai.com>
2337
2338 Classify symbols by type-name.
2339 * src/uniqstr.h (UNIQSTR_CMP): New.
2340 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2341 (type_names_output): New.
2342 (muscles_output): Use it.
2343 * data/lalr1.cc (b4_symbol_action_): Remove.
2344 (b4_symbol_case_, b4_type_action_): New.
2345 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2346
23472008-11-10 Akim Demaille <demaille@gostai.com>
2348
2349 Change the handling of the symbols in the skeletons.
2350 Before we were using tables which lines were the symbols and which
2351 columns were things like number, tag, type-name etc. It is was
2352 difficult to extend: each time a column was added, all the numbers had
2353 to be updated (you asked for colon $2, not for "tag"). Also, it was
2354 hard to filter these tables when only a subset of the symbols (say the
2355 tokens, or the nterms, or the tokens that have and external number
2356 *and* a type-name) was of interest.
2357
2358 Now instead of monolithic tables, we define one macro per cell. For
2359 instance "b4_symbol(0, tag)" is a macro name which contents is
2360 self-decriptive. The macro "b4_symbol" provides easier access to
2361 these cells.
2362
2363 * src/output.c (type_names_output): Remove.
2364 (symbol_numbers_output, symbol_definitions_output): New.
2365 (muscles_output): Call them.
2366 (prepare_symbols): Define b4_symbols_number.
2367
23682008-11-10 Akim Demaille <demaille@gostai.com>
2369
2370 --trace=muscles
2371 * src/getargs.h, src/getargs.c (trace_muscle): New.
2372 (trace_types, trace_args): Support it.
2373 * src/output.c (output_skeleton): Use it.
2374
23752008-11-10 Akim Demaille <demaille@gostai.com>
2376
2377 muscles_output.
2378 * src/output.c (muscles_output): New, extracted from...
2379 (output_skeleton): here.
2380 Adjust.
2381
23822008-11-10 Akim Demaille <demaille@gostai.com>
2383
2384 Formatting changes.
2385
23862008-11-10 Akim Demaille <demaille@gostai.com>
2387
2388 Update the variant example.
2389 * examples/variant.yy: Formatting changes.
2390 One stage build.
2391
23922008-11-10 Akim Demaille <demaille@gostai.com>
2393
2394 Support constructor with an argument.
2395 This improves the "list" bench by 2%.
2396
2397 * data/lalr1.cc (variant::build): Add an overloaded version with
2398 an argument.
2399 * tests/c++.at (AT_CHECK_VARIANT): Check it.
2400
24012008-11-10 Akim Demaille <demaille@gostai.com>
2402
2403 Test variants.
2404 * tests/c++.at (AT_CHECK_VARIANTS): New.
2405 Use it with and without %define assert.
2406
24072008-11-10 Akim Demaille <demaille@gostai.com>
2408
2409 Add %precedence support.
2410 Unfortunately it is not possible to reuse the %prec directive. This
2411 is because to please POSIX, we do not require to end the rules with a
2412 semicolon. As a result,
2413
2414 foo: bar %prec baz
2415
2416 is ambiguous: either a rule which precedence is that of baz, or a rule,
2417 and then a declaration of the precedence of the token baz.
2418
2419 * doc/bison.texinfo: Document %precedence.
2420 (Precedence Only): New.
2421 * src/assoc.h, src/assoc.c (precedence_assoc): New.
2422 * src/conflicts.c (resolve_sr_conflict): Support it.
2423 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
2424 Parse it.
2425 * tests/calc.at: Use %precedence for NEG.
2426 * tests/conflicts.at (%precedence does not suffice)
2427 (%precedence suffices): New tests.
2428
24292008-11-09 Akim Demaille <demaille@gostai.com>
2430
2431 Make benches in a sub dirs.
2432 * etc/bench.pl.in ($dir): New.
2433 Use it.
2434 Check the use of constructors with an argument.
2435 (bench_variant_parser): Fix.
2436
24372008-11-09 Akim Demaille <demaille@gostai.com>
2438
2439 fix eof condition
2440
24412008-11-09 Akim Demaille <demaille@gostai.com>
2442
2443 Fix --help.
2444
24452008-11-09 Akim Demaille <demaille@gostai.com>
2446
2447 Require the generation of parse-gram.output.
2448 * src/Makefile.am (YACC): Pass --report=all.
2449
24502008-11-09 Akim Demaille <demaille@gostai.com>
2451
2452 Formatting changes.
2453
24542008-11-09 Akim Demaille <demaille@gostai.com>
2455
2456 Update TODO.
2457 * TODO: Remove obsolete items.
2458 Update others.
2459
24602008-11-09 Akim Demaille <demaille@gostai.com>
2461
2462 Enhance bench.pl.
2463 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
2464 (@token, $grammar, $bench): New.
2465 (generate_grammar_variant): Rename as...
2466 (generate_grammar_list): this.
2467 (generate_grammar): Adjust.
2468 (bench_grammar): Rename as...
2469 (bench): this.
2470 Use it in the various bench-marking routines.
2471 (-b, -g): New options.
2472
24732008-11-09 Akim Demaille <demaille@gostai.com>
2474
2475 Use a static hierarchy for symbols in the C++ parser.
2476 * data/lalr1.cc (symbol_base_type, symbol_type)
2477 (stack_symbol_type): Make it a static hierarchy.
2478 Adjust dependencies.
2479
24802008-11-09 Akim Demaille <demaille@gostai.com>
2481
2482 bench.pl -d, --directive.
2483 * etc/bench.pl.in (@directive): New.
2484 (&bench_grammar): Use it.
2485 (&bench_list_grammar): New, to provide access to the "variant"
2486 grammar.
2487 Use it.
2488 (getopts): Support -d, --directive.
2489
24902008-11-09 Akim Demaille <demaille@gostai.com>
2491
2492 Use inline for small operations.
2493 * data/lalr1.cc (symbol_base_type, symbol_type)
2494 (stack_symbol_type): Declare constructor and other operations as
2495 inline.
2496 (yy_destroy_): Inline.
2497
24982008-11-09 Akim Demaille <demaille@gostai.com>
2499
2500 Introduce a hierarchy for symbols.
2501 * data/lalr1.cc (symbol_base_type, symbol_type): New.
2502 (data_type): Rename as...
2503 (stack_symbol_type): this.
2504 Derive from symbol_base_type.
2505 (yy_symbol_value_print_): Merge into...
2506 (yy_symbol_print_): this.
2507 Rename as...
2508 (yy_print_): this.
2509 (yydestruct_): Rename as...
2510 (yy_destroy_): this.
2511 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
2512 (parser::parse): yyla is now of symbol_type.
2513 Use its type member instead of yytoken.
2514
25152008-11-09 Akim Demaille <demaille@gostai.com>
2516
2517 Rename data_type and stack_symbol_type.
2518 * data/lalr1.cc (data_type): Rename as...
2519 (stack_symbol_type): this.
2520
25212008-11-09 Akim Demaille <demaille@gostai.com>
2522
2523 Handle semantic value and location together.
2524 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
2525 yydata.value and yydata.location.
2526 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
2527 (YY_SYMBOL_PRINT): Now take semantic value and location as a
2528 single arg.
2529 Adjust all callers.
2530 (yydestruct_): New overload for a stack symbol.
2531
25322008-11-09 Akim Demaille <demaille@gostai.com>
2533
2534 Push a complete symbol, not connected parts.
2535 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
2536 state, value and location.
2537 Adjust callers.
2538
25392008-11-09 Akim Demaille <demaille@gostai.com>
2540
2541 Agregate yylval and yylloc.
2542 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
2543 (parser::yyla): this.
2544
25452008-11-09 Akim Demaille <demaille@gostai.com>
2546
2547 Rely on the state stack to display reduction traces.
2548 To display rhs symbols before a reduction, we used information
2549 about the rule reduced, which required the tables yyrhs and
2550 yyprhs. Now use rely only on the state stack to get the same
2551 information.
2552
2553 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
2554 Use them.
2555 (parser::yyrhs_, parser::yyprhs_): Remove.
2556 (parser::yy_reduce_print_): Use the state stack.
2557
25582008-11-09 Akim Demaille <demaille@gostai.com>
2559
2560 Fuse yyval and yyloc into yylhs.
2561 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
2562 yylhs.
2563 (parse): Replace yyval and yyloc with yylhs.value and
2564 yylhs.location.
2565 After a user action, compute yylhs.state earlier.
2566 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
2567 fresh error_token.
2568
25692008-11-09 Di-an Jan <dianj@freeshell.org>
2570
2571 Remove unused variable.
2572 * src/output.c (type_names_output): Remove unused variable sep.
2573
25742008-11-09 Paolo Bonzini <bonzini@gnu.org>
2575
2576 Change tests/output.at quoting.
2577 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
2578 expanding arguments.
2579
25802008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2581
2582 Don't add a semicolon to actions for %skeleton or %language.
2583 It breaks Java test cases as reported by Akim Demaille.
2584 * src/scan-code.l: Implement.
2585
25862008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2587
2588 Clean up %skeleton and %language priority implementation.
2589 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2590 remove static qualifier because others will soon need to see it.
2591 (language_prio): Likewise.
2592 (getargs): Use command_line_prio rather than 0.
2593 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2594 enum fields.
2595 (skeleton_prio): Extern it.
2596 (language_prio): Extern it.
2597 * src/parse-gram.y: Use grammar_prio rather than 1.
2598
25992008-11-07 Akim Demaille <demaille@gostai.com>
2600
2601 Moving push traces into yypush_.
2602 * data/lalr1.cc (yypush_): Now takes a optional trace message.
2603 Adjust all uses.
2604
26052008-11-07 Akim Demaille <demaille@gostai.com>
2606
2607 The single-stack C++ parser is now the standard one.
2608 * data/lalr1.cc: Rename as...
2609 * data/lalr1-split.cc: this.
2610 * data/lalr1-fusion.cc: Rename as...
2611 * data/lalr1.cc: this.
2612 * etc/bench.pl.in: Adjust.
2613
26142008-11-07 Akim Demaille <demaille@gostai.com>
2615
2616 Avoid empty-if warnings.
2617 Reported by Quentin Hocquet.
2618
2619 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
2620 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
2621
26222008-11-07 Akim Demaille <demaille@gostai.com>
2623
2624 Pass command line location to skeleton_arg and language_argmatch.
2625 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2626 The location argument is now mandatory.
2627 Adjust all dependencies.
2628 (getargs): Use command_line_location.
2629
26302008-11-07 Akim Demaille <demaille@gostai.com>
2631
2632 -D, --define.
2633 * src/getargs.c (usage): Document -D.
2634 Fix help string for --locations.
2635 (command_line_location): New.
2636 (short_options, long_options, getargs): Support -D, --define.
2637 (getargs): Move -d support at the right place.
2638 * doc/bison.texinfo (Bison Options): Update.
2639 * tests/input.at (%define, --define): New.
2640
26412008-11-07 Akim Demaille <demaille@gostai.com>
2642
2643 Initialize the muscle table before parsing the command line.
2644 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2645 (getargs): Define file_name.
2646 * src/main.c (main): Initialize muscle_tab before calling
2647 getargs.
2648 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2649 its value is not available yet.
2650
26512008-11-07 Akim Demaille <demaille@gostai.com>
2652
2653 Locations without columns for command line arguments.
2654 * src/location.c (location_print): Don't display negative columns.
2655 * src/location.h: Document this.
2656
26572008-11-07 Akim Demaille <demaille@gostai.com>
2658
2659 Fix --help.
2660 * src/getargs.c (usage): Fix help string for -W.
2661
26622008-11-07 Akim Demaille <demaille@gostai.com>
2663
2664 Handle more general types of option arguments.
2665 * build-aux/cross-options.pl: The argument ends at the first
2666 space, not the first non-symbol character.
2667 Use @var for each word appearing the argument description.
2668
26692008-11-07 Akim Demaille <demaille@gostai.com>
2670
2671 Destroy the variants that remain on the stack in case of error.
2672 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
2673 destructor.
2674 Display the value only if yymsg is nonnull.
2675 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
2676
26772008-11-07 Akim Demaille <demaille@gostai.com>
2678
2679 Add "%define assert" to variants.
2680 This is used to help the user catch cases where some value gets
2681 ovewritten by a new one. This should not happen, as this will
2682 probably leak.
2683
2684 Unfortunately this uncovered a bug in the C++ parser itself: the
2685 lookahead value was not destroyed between two calls to yylex. For
2686 instance if the previous lookahead was a std::string, and then an int,
2687 then the value of the std::string was correctly taken (i.e., the
2688 lookahead was now an empty string), but std::string structure itself
2689 was not reclaimed.
2690
2691 This is now done in variant::build(other&) (which is used to take the
2692 value of the lookahead): other is not only stolen from its value, it
2693 is also destroyed. This incurs a new performance penalty of a few
2694 percent, and union becomes faster again.
2695
2696 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
2697 (b4_variant_if): New.
2698 (variant::built): New.
2699 Use it whereever the status of the variant changes.
2700 * etc/bench.pl.in: Check the penalty of %define assert.
2701
27022008-11-07 Akim Demaille <demaille@gostai.com>
2703
2704 Use "%define variant" in bench.pl.
2705 * etc/bench.pl.in: No longer use the pseudo directive %variants,
2706 just use %define variants.
2707
27082008-11-07 Akim Demaille <demaille@gostai.com>
2709
2710 Regen.
2711 * src/parse-gram.h, src/parse-gram.c: Regen.
2712
27132008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2714
2715 Fix user actions without a trailing semicolon.
2716 Reported by Sergei Steshenko at
2717 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2718 * THANKS (Sergei Steshenko): Add.
2719 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2720 * tests/regression.at (Fix user actions without a trailing semicolon):
2721 New test case.
2722
27232008-11-04 Akim Demaille <demaille@gostai.com>
2724
2725 Use b4_copyright_years.
2726 * data/yacc.c (b4_copyright_years): New.
2727 Fix its value according to the comments in the file.
2728 Use it and undefine it.
2729
27302008-11-04 Akim Demaille <demaille@gostai.com>
2731
2732 Formatting changes.
2733 * data/lalr1-fusion.cc, src/parse-gram.y: here.
2734
27352008-11-04 Akim Demaille <demaille@gostai.com>
2736
2737 Formatting changes.
2738 * data/lalr1-fusion.cc: here.
2739
27402008-11-04 Akim Demaille <demaille@gostai.com>
2741
2742 Use strict on bench.pl.
2743 * etc/bench.pl.in (&run, &generate_grammar): New.
2744 Rename the grammar generating functions for consistency.
2745 Change the interface so that the list of benches to run is passed
2746 as (optionless) arguments.
2747 (&compile): Use &run.
2748
27492008-11-04 Akim Demaille <demaille@gostai.com>
2750
2751 Remove spurious initial empty lines.
2752 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2753 * data/yacc.c: End the @output lines with an @.
2754
27552008-11-04 Akim Demaille <demaille@gostai.com>
2756
2757 Improve the display of sizes.
2758 * etc/bench.p.in: Higher precision.
2759 Sort by decreasing size.
2760
27612008-11-04 Akim Demaille <demaille@gostai.com>
2762
2763 Don't memcpy C++ structures.
2764 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
2765 arguments.
2766 (variant::build): New overload for
2767 copy-construction-that-destroys.
2768 (variant::swap): New.
2769 (parser::yypush_): Use it in variant mode.
2770
27712008-11-04 Akim Demaille <demaille@gostai.com>
2772
2773 Better defaults for bench.pl.
2774 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
2775 default values.
2776 Adjust &verbose uses.
2777 (-q, --quiet): New.
2778
27792008-11-04 Akim Demaille <demaille@gostai.com>
2780
2781 Make variant.yy more complex.
2782 std::list cannot be copied via memcpy, they are more demanding than
2783 std::string. Use one std::list to strengthen the test.
2784
2785 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
2786 Adjust.
2787 Create a list of strings, instead of a single large string.
2788
27892008-11-04 Akim Demaille <demaille@gostai.com>
2790
2791 bench.pl --bench.
2792 * etc/bench.pl.in (--bench, $bench): New.
2793
27942008-11-04 Akim Demaille <demaille@gostai.com>
2795
2796 Sort methods.
2797 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
2798 Define it after as().
2799
28002008-11-04 Akim Demaille <demaille@gostai.com>
2801
2802 Useless parens.
2803 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
2804
28052008-11-04 Akim Demaille <demaille@gostai.com>
2806
2807 Issue missing synclines after user actions.
2808 * data/c.m4 (b4_case): Issue synclines on the output file.
2809
28102008-11-04 Akim Demaille <demaille@gostai.com>
2811
2812 Remove trailing empty line.
2813 * data/lalr1-fusion.cc: Don't add an empty line after the user's
2814 epilogue.
2815
28162008-11-04 Akim Demaille <demaille@gostai.com>
2817
2818 Fix output of copyright years.
2819 * data/bison.m4 (b4_copyright): Fix the indentation of the
2820 copyright year paragraph.
2821 Use b4_copyright_years when no years are given.
2822 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
2823 (b4_copyright_years): New.
2824 Use it.
2825
28262008-11-04 Akim Demaille <demaille@gostai.com>
2827
2828 Avoid the spurious initial empty line.
2829 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
2830 the end of @output request to suppress the empty line that
2831 results.
2832
28332008-11-04 Akim Demaille <demaille@gostai.com>
2834
2835 Remove parser::rhs_number_type.
2836 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
2837 (yyrhs_): Use b4_table_define.
2838
28392008-11-04 Akim Demaille <demaille@gostai.com>
2840
2841 Fix iteration type.
2842 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
2843
28442008-11-04 Akim Demaille <demaille@gostai.com>
2845
2846 Factor the declaration of the integer tables.
2847 * data/lalr1-fusion.cc (b4_table_define): New.
2848 Use it.
2849
28502008-11-03 Akim Demaille <demaille@gostai.com>
2851
2852 Fix indentation of tables in lalr1.cc
2853 * data/lalr1-fusion.cc: Fix the indentation.
2854
28552008-11-03 Akim Demaille <demaille@gostai.com>
2856
2857 Destroy the lhs symbols after reduction.
2858 * data/lalr1-fusion.cc (parse): After the user action, when in
2859 variant mode, destroy the lhs symbols.
2860
28612008-11-03 Akim Demaille <demaille@gostai.com>
2862
2863 Simplify yysyntax_error_ use.
2864 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
2865 type, but make it unnamed in the declaration when it is not used.
2866
28672008-11-03 Akim Demaille <demaille@gostai.com>
2868
2869 Let yy::variant::build return an lvalue.
2870 * data/lalr1-fusion.cc (variant::build): Return a reference to the
2871 object.
2872
28732008-11-03 Akim Demaille <demaille@gostai.com>
2874
2875 Define yy::variant only when needed.
2876 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
2877 used.
2878
28792008-11-03 Akim Demaille <demaille@gostai.com>
2880
2881 Bench the three-stack lalr1.cc.
2882 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
2883 one-stack one.
2884
28852008-11-03 Akim Demaille <demaille@gostai.com>
2886
2887 Fail on parse error in calc++.
2888 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2889 status.
2890 * examples/calc++/test ($me, $number, $exit, run): New.
2891 Use them to propagate errors to the exit status.
2892
28932008-11-03 Akim Demaille <demaille@gostai.com>
2894
2895 Don't specify the skeleton twice in the example.
2896 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
2897 file does what is needed.
2898
28992008-11-03 Akim Demaille <demaille@gostai.com>
2900
2901 bench: Improve output.
2902 * etc/bench.pl.in (bench_grammar): Tune the printf format.
2903
29042008-11-03 Akim Demaille <demaille@gostai.com>
2905
2906 bench: check impact of %debug on variants.
2907 * etc/bench.pl.in (variant_grammar): Fix the computation of
2908 $variant.
2909 Generate a grammar file that can work with or without %debug.
2910 Do use the @directive.
2911 (bench_variant_parser): Check impact of %debug.
2912 (@directives): Rename all the occurrences to...
2913 (@directive): this, for consistency.
2914
29152008-11-03 Akim Demaille <demaille@gostai.com>
2916
2917 bench: report the size too.
2918 * etc/bench.pl.in ($iterations): Defaults to -3.
2919 (&bench_grammar): Require hireswallclock.
2920 Compute and display the size of the result.
2921 More comments.
2922
29232008-11-03 Akim Demaille <demaille@gostai.com>
2924
2925 bench: More use of the verbosity level.
2926 * etc/bench.pl.in ($verbose, &verbose): New.
2927 Use them.
2928 More POD documentation.
2929
29302008-11-03 Akim Demaille <demaille@gostai.com>
2931
2932 bench.pl: a command line interface
2933 * etc/bench.pl.in: More doc.
2934 Some fixes in the documentation.
2935 ($cflags, $iterations, &help, &getopt): New.
2936 Use them.
2937 (&variant_grammar): Let the number of stages be 10 times what is
2938 specified.
2939
29402008-11-03 Akim Demaille <demaille@gostai.com>
2941
2942 Bench the use of Boost.Variants.
2943 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2944 New.
2945 (&compile): Be ready to compile C++ parsers.
2946 (&bench_push_parser): Move debug information to the outermost
2947 level.
2948 * THANKS: Add Michiel De Wilde.
2949
29502008-11-03 Akim Demaille <demaille@gostai.com>
2951
2952 bench.pl: Pass directives as a list instead of as a string.
2953 * etc/bench.pl.in (&directives): New.
2954 (&triangular_grammar, &calc_grammar): Use it to format the Bison
2955 directives.
2956 (&triangular_grammar): Do use the directives (were ignored).
2957 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2958 directives.
2959
29602008-11-03 Akim Demaille <demaille@gostai.com>
2961
2962 Improve genericity of bench.pl.
2963 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2964 argument.
2965 (&bench_push_parser): New.
2966 Call it.
2967
29682008-11-03 Akim Demaille <demaille@gostai.com>
2969
2970 Add documentation to bench.pl.
2971 * etc/bench.pl.in: Comment changes.
2972
29732008-11-03 Akim Demaille <demaille@gostai.com>
2974
2975 Fuse the three stacks into a single one.
2976
2977 In order to make it easy to perform benchmarks to ensure that
2978 there are no performance loss, lalr1.cc is forked into
2979 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
2980 lalr1.cc.
2981
2982 Meanwhile, to make sure that lalr1-fusion.cc is correctly
2983 exercized by the test suite, the user must install a symbolic link
2984 from lalr1.cc to it.
2985
2986 Instead of having three stacks (state, value, location), use a
2987 stack of triples. This considerably simplifies the code (and it
2988 will be easier not to require locations as currently does the C++
2989 parser), and also gives a 10% speedup according to
2990 etc/bench (probably mainly since memory allocation is done once
2991 instead of three times).
2992
2993 Another motivation is to make it easier to destruct properly
2994 semantic values: now that they are bound to their state (hence
2995 symbol type) it will be easier to call the appropriate destructor.
2996
2997 These changes should probably benefit the C parser too.
2998
2999 * data/lalr1.cc: Copy as...
3000 * data/lalr1-fusion.cc: this new file.
3001 (b4_rhs_value, b4_rhs_location): New definitions overriding those
3002 from c++.m4.
3003 (state_stack_type, semantic_stack_type, location_stack_type)
3004 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
3005 (data_type, stack_type, yystack_): New.
3006 (YYLLOC_DEFAULT, yypush_): Adjust.
3007 (yyerror_range): Now based on data_type, not location_type.
3008
30092008-11-03 Akim Demaille <demaille@gostai.com>
3010
3011 Push the state, value, and location at the same time.
3012 This is needed to prepare a forthcoming patch that fuses the three
3013 stacks into one.
3014
3015 * data/lalr1.cc (parser::yypush_): New.
3016 (parser::yynewstate): Change the semantics: instead of arriving to
3017 this label when value and location have been pushed, but yystate
3018 is to be pushed on the state stack, now the three of them must
3019 have been pushed before. yystate still must be the new state.
3020 This allows to use yypush_ everywhere instead of individual
3021 handling of the stacks.
3022
30232008-11-03 Akim Demaille <demaille@gostai.com>
3024
3025 Prefer references to pointers.
3026 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3027 definition to use references instead of pointers.
3028 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3029 Take the value and location as references.
3030 Adjust callers.
3031
30322008-11-03 Akim Demaille <demaille@gostai.com>
3033
3034 stack::size instead of stack::height.
3035 * data/lalr1.cc (stack::height): Rename as...
3036 (stack::size): this.
3037 Fix the output type.
3038 Comment changes.
3039
30402008-11-03 Akim Demaille <demaille@gostai.com>
3041
3042 Use variants to support objects as semantic values.
3043 This patch was inspired by work by Michiel De Wilde. But he used
3044 Boost variants which (i) requires Boost on the user side, (ii) is
3045 slow, and (iii) has useless overhead (the parser knows the type of
3046 the semantic value there is no reason to duplicate this
3047 information as Boost.Variants do).
3048
3049 This implementation reserves a buffer large enough to store the
3050 largest objects. yy::variant implements this buffer. It was
3051 implemented with Quentin Hocquet.
3052
3053 * src/output.c (type_names_output): New.
3054 (output_skeleton): Invoke it.
3055 * data/c++.m4 (b4_variant_if): New.
3056 (b4_symbol_value): If needed, provide a definition for variants.
3057 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3058 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3059 (b4_char_sizeof, yy::variant): New.
3060 (parser::parse): If variants are requested, define
3061 parser::union_type, parser::variant, change the definition of
3062 semantic_type, construct $$ before running the user action instead
3063 of performing a default $$ = $1.
3064 * examples/variant.yy: New.
3065 Based on an example by Michiel De Wilde.
3066
30672008-11-03 Akim Demaille <demaille@gostai.com>
3068
3069 Parameterize the extraction of semantic values.
3070 To make future changes easier, no longer rely on ".TYPE" being the
3071 way to get a semantic value.
3072
3073 * data/c.m4 (b4_symbol_value): New.
3074 Use it.
3075 * data/c++.m4, data/yacc.c: Use it.
3076 * data/glr.c: Use b4_symbol_value.
3077 (b4_rhs_data): New.
3078 Use it.
3079
30802008-11-03 Akim Demaille <demaille@gostai.com>
3081
3082 Prepare easier M4 changes.
3083 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3084 future changes.
3085
30862008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3087
3088 Initiate further development.
3089 * NEWS: Create an empty section for new entries.
3090 * gnulib: Update submodule to HEAD.
3091
30922008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3093
3094 * NEWS: Version 2.4.
3095
30962008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3097
3098 Prepare for next release.
3099 * NEWS: Briefly mention changes since 2.3b.
3100 * README: Say GNU m4 1.4.6, which we've been requiring in release
3101 announcements already, not 1.4.3, which breaks the build.
3102
31032008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3104
3105 Say %language is experimental.
3106 We're thinking of extending it's effect on output file naming. See the
3107 thread at
3108 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3109 * NEWS: Say it's experimental.
3110 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3111 recommend it over %skeleton for now.
3112 (Bison Options): Likewise.
3113 (C++ Bison Interface): Use %skeleton not %language.
3114 (Calc++ Parser): Use %skeleton not %language.
3115 * src/getargs.c (usage): Say it's experimental.
3116
31172008-11-01 Di-an Jan <dianj@freeshell.org>
3118 Paolo Bonzini <bonzini@gnu.org>
3119
3120 Support all Java parser class modifiers.
3121 * data/java.m4 (b4_percent_define_get3): New.
3122 (b4_final_if, b4_strictfp_if): New.
3123 * data/lalr1.java (final, strictfp, extends, implements): Support.
3124 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3125 documentation.
3126 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3127 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3128 (AT_CHECK_JAVA_GREP): New.
3129 (Java parser class modifiers): New test.
3130 (Java parser class extends and implements): New test.
3131
3132 Model exception propagation better with throws and lex_throws.
3133 * data/java.m4 (b4_list2): New.
3134 (throws): Change default.
3135 * data/lalr1.java (yyaction): Add throws.
3136 (parse): Add lex_throws in addition to throws.
3137 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3138 * tests/java.at (Java throws specifications): New test.
3139
3140 Improve documentation for Java parsers.
3141 * doc/bison.texinfo (Java Parsers): Add subsections.
3142 Don't quote first argument of %define.
3143 (Java Bison Interface): Document output files. Move documentation
3144 of parser class and merge into Java Parser Interface. Document
3145 features that error out. Document directives with no effect.
3146 Move note about Javadoc higher.
3147 (Java Semantic Values): Explicitly mention stype.
3148 Document that generic types cannot be used.
3149 (Java Location Values): Use @deftypeivar. Document constructors.
3150 Correct return value for toString.
3151 (Java Parser Interface): List undocumented constants/fields.
3152 Move documentation of fields added by %parse-param closer to list
3153 of members. Document that token names are added as fields.
3154 Document constructors accurately. Remove error method.
3155 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3156 Interface. Describe %code lexer and yylex accutately.
3157 Remove documentation that does not match the code.
3158 (Java Action Features): New.
3159 (Java Differences): Add reference. Add item on semantic values.
3160 Add note about @{ ... @}. Clarify %% epilogue placement.
3161 (Java Declarations Summary): New.
3162
3163 Fix Java skeleton.
3164 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3165 (b4_remove_comma): Quote test argument.
3166 (b4_identification): Remove "bison" field.
3167 * tests/java.at (Java parser class and package names): New test.
3168 (Java %parse-param and %lex-param): New test.
3169 (Java stype, position_class and location_class): New test.
3170
31712008-10-31 Di-an Jan <dianj@freeshell.org>
3172
3173 * data/lalr1.jave: Update copyright years.
3174 (YYParser): Correct name of "generated from" file in Javadoc:
3175 use b4_file_name instead of @ofile@.
3176 (Location constructor): Correct Javadoc parameter name.
3177 (yylloc): Add missing opening m4 quote after b4_location_if.
3178 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3179 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3180 (YYParser constructor): Correct Javadoc parameter name.
3181
31822008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3183
3184 Always put auxiliary code files in the same dir as other output files.
3185 * src/files.c (compute_file_name_parts): When the user specifies
3186 --output but not --file-prefix, extract the directory prefix from the
3187 file prefix not from the grammar file name. This affects the location
3188 of files like location.hh generated by the C++ skeleton. The includes
3189 in the other output files require this fix.
3190 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3191 for expected output files.
3192 (Output files): Add a test for the above.
3193
31942008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3195
3196 * gnulib: Update submodule to HEAD.
3197
31982008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3199
3200 Update copyright year.
3201 * src/files.c: Here.
3202
32032008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3204
3205 Don't overwrite the input file.
3206 * src/files.c (output_file_name_check): Fatal error if using input file
3207 for output.
3208 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3209 argument.
3210 (Conflicting output files): Add test.
3211
32122008-10-28 Akim Demaille <demaille@gostai.com>
3213
3214 Space changes.
3215 * data/lalr1.cc: Formatting changes.
3216
32172008-10-28 Akim Demaille <demaille@gostai.com>
3218
3219 Don't define debugging functions when !YYDEBUG.
3220 * data/lalr1.cc (debug_stream, set_debug_stream)
3221 (debug_level_type, debug_level, set_debug_level): Don't
3222 declare them when YYDEBUG is not defined.
3223 The implementation are already YYDEBUG-aware.
3224
32252008-10-28 Akim Demaille <demaille@gostai.com>
3226
3227 Prefer "continue" for empty loop bodies.
3228 * etc/bench.pl.in: Use "continue" instead of {}.
3229
32302008-10-28 Akim Demaille <demaille@gostai.com>
3231
3232 Space and comments changes.
3233 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3234 * data/c.m4, data/lalr1.cc: Space changes.
3235
32362008-10-28 Akim Demaille <demaille@gostai.com>
3237
3238 Make gnulib a submodule.
3239 * gnulib: New.
3240 * .gitmodules (gnulib): New.
3241
32422008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3243
3244 Fix yyerror_range for user-defined location type in C++. Reported by
3245 Georg Sauthoff at
3246 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3247 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3248 * THANKS (Georg Sauthoff): Add.
3249
32502008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3251
3252 Update several administrative files mainly to facilitate releasing.
3253 * HACKING (Administrivia): Make the git-merge-changelog notes more
3254 helpful.
3255 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3256 (Release Procedure): Update for git and add numerous details that were
3257 previously missing.
3258 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3259 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3260 that announcements don't claim we bootstrapped with whatever bison
3261 happened to be in PATH. Add flex as a bootstrap tool.
3262 * Makefile.maint: Remove, previously replaced by maint.mk.
3263 * Makefile.cfg: Remove, and migrate settings to...
3264 * cfg.mk: ... here for the sake of `make announcement'.
3265 * bootstrap.conf (gnulib_modules): Add announce-gen.
3266 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3267 Berry.
3268
32692008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3270
3271 Small but important bugfixes for the Java skeleton.
3272 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3273 (yy_symbol_print): Call toString on yyvaluep.
3274
32752008-08-29 Akim Demaille <demaille@gostai.com>
3276
3277 Clarify UPDATED use.
3278 * doc/bison.texinfo: It refers to the last edition of this file,
3279 not to the release date of Bison.
3280 Reported by Joel E. Denny.
3281
32822008-08-29 Akim Demaille <demaille@gostai.com>
3283
3284 * README: Update FAQ pointer.
3285 Reported by Joel E. Denny.
3286
32872008-08-27 Eric Blake <ebb9@byu.net>
3288
3289 Resync m4sugar from autoconf.
3290 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3291 (m4_init): Adjust to latest m4.git changes.
3292 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3293 effects.
3294 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3295 (_m4_list_cmp): Reduce side effects.
3296
32972008-08-27 Akim Demaille <demaille@gostai.com>
3298
3299 Check yyerrok in calc.at.
3300 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3301 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3302 expected.
3303
33042008-08-27 Akim Demaille <demaille@gostai.com>
3305
3306 Support yyerrok in lalr1.cc.
3307 YYBACKUP is still to import back into lalr1.cc.
3308 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3309
33102008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3311
3312 For maintainer-check*, don't recompile for a $(VERSION) update.
3313 * cfg.mk: New file.
3314 (_is-dist-target): Override the one in GNUmakefile.
3315 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3316
33172008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3318
3319 Update for recent change to gnulib.
3320 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3321 string.h now.
3322
33232008-08-15 Eric Blake <ebb9@byu.net>
3324
3325 Remaining m4sugar merge from autoconf.
3326 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3327 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3328 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3329 * src/output.c (output_skeleton): Tell m4 how to find it.
3330
3331 Partial m4sugar merge from autoconf: m4_map.
3332 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3333 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3334 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3335 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3336 for empty list.
3337 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3338 Likewise.
3339 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3340 declares it.
3341
33422008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3343
3344 Keep .version and PACKAGE_VERSION in sync.
3345 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3346 dependency, and add comments justifying this in more detail. Discussed
3347 starting at
3348 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3349
33502008-08-06 Eric Blake <ebb9@byu.net>
3351
3352 Partial m4sugar merge from autoconf: m4_shiftn.
3353 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3354 (m4_shift2, m4_shift3): New macros.
3355 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3356 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3357 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3358 * data/java.m4 (b4_remove_comma): Likewise.
3359
3360 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3361 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3362 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3363 (m4_init): Consolidate wrapped text into single m4_wrap.
3364 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3365 in wrapped text.
3366
33672008-08-05 Eric Blake <ebb9@byu.net>
3368
3369 Partial m4sugar merge from autoconf: builtins, version.m4.
3370 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3371 (m4_prepend): Remove, as it is unused and inherently quadratic,
3372 whereas m4_append is linear in newer m4.
3373 (m4_mkstemp): New builtin.
3374 (m4_symbols): Make rename conditional.
3375 (m4_version_prereq): Ensure fatal error if used in bison, which
3376 intentionally lacks version.m4.
3377
3378 Fix comments in m4sugar.
3379 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3380
33812008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3382
3383 Update for recent .gitignore fix in Gnulib.
3384 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3385 anchored .gitignore entries.
3386
33872008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3388
3389 Set gnu or gnits strictness.
3390 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3391 development and gnits strictness for releases. Based on Eric Blake's
3392 suggestion at
3393 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3394
33952008-07-31 Paolo Bonzini <bonzini@gnu.org>
3396
3397 * NEWS: Clarify documentation of %language.
3398
33992008-07-31 Paolo Bonzini <bonzini@gnu.org>
3400
3401 Support usage of git-merge-changelog.
3402 * .gitattributes: New.
3403 * HACKING: Document usage of git-merge-changelog.
3404 * bootstrap: Install git-merge-changelog entries in .git/config
3405 if appropriate.
3406
34072008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3408
3409 Remove remaining dependence on CVS Id keyword.
3410 * ChangeLog: For the sake of people still using CVS, don't use dollars
3411 when mentioning Id.
3412 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3413 unusual anyway.
3414 * data/xslt/xml2dot.xsl: Likewise.
3415 * data/xslt/xml2text.xsl: Likewise.
3416 * data/xslt/xml2xhtml.xsl: Likewise.
3417 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3418 * doc/Makefile.am (neutralize): Remove, no longer needed.
3419 (.x.1): Don't use neutralize.
3420 (edit): Don't substitute for ID.
3421 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3422
34232008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3424
3425 Fix dependence on computed configure variables.
3426 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3427 $(top_srcdir)/configure.ac so that changes to computed variables, such
3428 as PACKAGE_VERSION, are seen.
3429 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3430
34312008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3432
3433 Update copyright dates for recent changes.
3434 * Makefile.am: Here.
3435 * src/Makefile.am: Here.
3436 * src/reduce.c: Here.
3437 * tests/reduce.at: Here.
3438
34392008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3440
3441 Use git-version-gen for version names between releases.
3442 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3443 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3444 * .prev-version: New.
3445 * .version.in: Remove.
3446 * ChangeLog: Remove the Id previously used for capturing the CVS
3447 revision.
3448 * GNUmakefile: Remove, now copied from Gnulib.
3449 * Makefile.am: Add code suggested by comments in
3450 build-aux/git-version-gen.
3451 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3452 .prev-version, and .version.
3453 * NEWS (2.3b+): Rename to...
3454 (?.?): ... this because we're dropping the "+" version naming scheme,
3455 but, in general, we still can't be sure of our next release name.
3456 * bootstrap: Add a quick hack to remove from .gitignore the
3457 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3458 entry. This should really be fixed in gnulib instead.
3459 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3460 * configure.ac (AC_INIT): Set version name by invoking
3461 build-aux/git-version-gen.
3462 (AC_CONFIG_FILES): Remove .version, now generated by
3463 build-aux/git-version-gen.
3464 * maint.mk: New, copied from coreutils.
3465 * doc/.cvsignore (bison.1): Add.
3466 * doc/.gitignore (/bison.1): Add.
3467 * doc/bison.1: Remove, generated.
3468 * src/.cvsignore (revision.c): Remove.
3469 * src/.gitignore (/revision.c): Remove.
3470 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3471 (BUILT_SOURCES): Remove revision.c.
3472 (revision.c): Remove.
3473 * src/getargs.c (version): Don't print revision after the VERSION.
3474 * src/revision.h: Remove.
3475
34762008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3477
3478 Fix untranslatable composition of sentences. Reported by Goran
3479 Uddeborg at
3480 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3481 * THANKS (Goran Uddeborg): Add.
3482 * src/reduce.c (reduce_print): Report the number of nonterminals and
3483 rules useless in the grammar in separate sentences.
3484 * tests/reduce.at (Useless Rules): Update output.
3485 (Reduced Automaton): Likewise.
3486 (Underivable Rules): Likewise.
3487 (Empty Language): Likewise.
3488
34892008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3490
3491 Fix some .gitignore and .cvsignore problems.
3492 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3493 (insert_vc_ignore): ... this new function, which prepends `/' to all
3494 .gitignore entries before passing them to insert_sorted_if_absent.
3495 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3496 .cvsignore files are maintained even though Bison developers run
3497 bootstrap while using Git.
3498 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3499 unneeded by Bison.
3500 (gnulib): Add.
3501 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3502 unneeded. Reported by Eric Blake.
3503 * lib/.gitignore (/*~): Add.
3504 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3505 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3506 Blake.
3507 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3508
35092008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3510
3511 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3512 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3513 * bootstrap.conf (gnulib_modules): Add unsetenv.
3514 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3515 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3516 (/setenv.m4): Add.
3517 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3518 the first argument because it may become position-dependent, and unset
3519 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3520 Add comments explaining these issues in more detail.
3521
35222008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3523
3524 Add .gitignore everywhere based on .cvsignore.
3525 * .gitignore: New.
3526 * build-aux/.gitignore: New.
3527 * data/.gitignore: New.
3528 * doc/.gitignore: New.
3529 * etc/.gitignore: New.
3530 * examples/.gitignore: New.
3531 * examples/calc++/.gitignore: New.
3532 * lib/.gitignore: New.
3533 * m4/.gitignore: New.
3534 * po/.gitignore: New.
3535 * runtime-po/.gitignore: New.
3536 * src/.gitignore: New.
3537 * tests/.gitignore: New.
3538
35392008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3540
3541 * NEWS (2.3b+): New section, empty for now.
3542 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3543
35442008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3545
3546 * NEWS (2.3b): Update release date since there has been a delay in
3547 getting the announcements and tarballs out.
3548
35492008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3550
3551 * NEWS: Version 2.3b.
3552 * configure.ac (AC_INIT): Likewise.
3553 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3554
35552008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3556
3557 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3558 been doing it for years.
3559 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3560 (Release Procedure): Add FIXME about make alpha being unmaintained.
3561
35622008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3563
3564 * data/yacc.c: Reformat m4 a little for readability.
3565 * src/lalr.c (build_relations): Correct comment.
3566
35672008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3568
3569 DJGPP specific issue.
3570 * djgpp/config.sed: Fixes required to run configure scripts generated
3571 by autoconf 2.62.
3572
35732008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3574
3575 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3576 coordinator@translationproject.org.
3577
35782008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3579
3580 * THANKS: Add Eric Blake.
3581
35822008-04-23 Eric Blake <ebb9@byu.net>
3583
3584 Revert prior patch, by working around autoconf regression.
3585 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3586 ("Output file name: ("): Uncomment test.
3587 ("Output file name: )"): Likewise.
3588 Based on an idea from Noah Misch.
3589
35902008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3591
3592 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3593 2.61. Reported by Juan Manuel Guerrero at
3594 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3595 * tests/output.at ("Output file name: ("): Comment out test case for
3596 now.
3597 ("Output file name: )"): Likewise.
3598
35992008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3600
3601 * GNUmakefile: Update git-version-gen invocation so make dist
3602 succeeds.
3603
36042008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3605
3606 Update to the current gnulib CVS repository, and fix trigraph handling
3607 in Bison.
3608 * bootstrap: Update gnulib CVS repository URL.
3609 (symlink_to_dir): Encapsulate the code that guarantees the destination
3610 directory exists into...
3611 (check_dst_dir): ... this new function, and...
3612 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3613 fail when copying files into lib/uniwidth/.
3614 * src/output.c (prepare_symbols): When writing yytname muscles, where
3615 symbol names will be encoded in C-string literals, tell quotearg to
3616 escape trigraphs. This used to be the default in gnulib.
3617 * tests/regression.at (Token definitions): Because of the change in
3618 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3619 escapes trigraphs in symbol names. Thus, yytname no longer has
3620 trigraphs unnecessarily doubly escaped. Update test case output.
3621 Extend test case to be sure Bison's own error messages will no longer
3622 have trigraphs in symbol names unnecessarily escaped once.
3623
36242008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3625
3626 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3627 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3628 * .cvsignore: Add .version.
3629 * .version.in: New.
3630 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3631 * configure.ac (AC_CONFIG_FILES): Add .version.
3632 * build-aux/.cvsignore: Add git-version-gen.
3633
36342008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3635
3636 * NEWS (2.3a+): Mention that -g now takes an argument.
3637 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3638 consistency. Update the -g and -x entries now that they take
3639 arguments. Use brackets to indicate optional arguments.
3640 * src/getargs.c (usage): Explain the relationship between arguments of
3641 long and short options more completely. Document --defines and -d
3642 separately since the former takes an argument but, for POSIX Yacc, the
3643 latter does not.
3644 (short_options): Let -W take an optional argument like --warnings.
3645 (getargs): Sort cases.
3646
36472008-02-28 Akim Demaille <demaille@gostai.com>
3648
3649 * doc/bison.texinfo: Fix a few typos.
3650
36512008-02-28 Akim Demaille <akim@epita.fr>
3652
3653 * doc/bison.texinfo (Bison Options): Document -W.
3654 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3655
36562008-02-28 Akim Demaille <akim@epita.fr>
3657
3658 * src/getargs.c (short_options): Split and sort for readability.
3659 -g and -x take optional arguments, just like their long options.
3660 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3661 understand.
3662 Fix the handling of $opt which resulted in all the argument to be
3663 considered as optional.
3664
36652008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3666
3667 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3668 say its interface is experimental.
3669 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3670 Java.
3671 (Bison Options): In the -L and --language entry, mention Java.
3672 (Java Bison Interface): Say the interface is experimental.
3673 * src/getargs.c (usage): Mention -L and --language.
3674
3675 * NEWS (2.3a+): Say the push parsing interface is experimental.
3676 * doc/bison.texinfo (Push Decl): Likewise.
3677 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3678 (Push Parser Function): Likewise.
3679 (Pull Parser Function): Likewise.
3680 (Parser Create Function): Likewise.
3681 (Parser Delete Function): Likewise.
3682 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3683 yypull_parse, and yypush_parse entries.
3684
3685 * NEWS (2.3a+): Mention XML support, and say the schema is
3686 experimental.
3687 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3688 * src/getargs.c (usage): Say the XML schema is experimental.
3689
3690 * NEWS (2.3a+): Say option instead of flag.
3691
36922008-02-21 Wojciech Polak <polak@gnu.org>
3693
3694 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3695 text.
3696
36972008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3698
3699 Fix impure push parser compile error reported by Bob Rossi at
3700 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3701 * data/yacc.c: Clean up whitespace in the output a little.
3702 (yypstate_allocated): Define for impure push parsers regardless of
3703 whether the pull interface is also requested.
3704 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3705 check impure push parsers without the pull interface.
3706
3707 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3708 yyerror takes arguments specified by %parse-param while yypstate_new
3709 does not.
3710 * doc/bison.texinfo (Parser Create Function): Document that
3711 yypstate_new returns 0 for multiple impure parser instances.
3712 * tests/push.at (Push Parsing: Multiple impure instances): Update
3713 expected stderr output.
3714
37152008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3716
3717 * runtime-po/POTFILES.in (push.c): Remove.
3718
37192008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3720
3721 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3722 * data/push.c: Rename to...
3723 * data/yacc.c: ... this, overwriting it.
3724 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3725 `%push-pull-parser' -> `%define api.push_pull "both"'.
3726 Remove old yacc.c tests, and update push.c tests to yacc.c.
3727
37282008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3729
3730 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3731 `"%code top" blocks' instead of `%code "top" blocks'.
3732 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3733 Clean up whitespace in the output a little.
3734
37352008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3736
3737 Fix documentation problems reported by Tim Josling at
3738 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3739 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3740 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3741 integers. Explain the effect of literal string aliases on error
3742 messages. Copy token 0 documentation from the C++ skeleton
3743 documentation.
3744
37452008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3746
3747 Accept a token number in a %left, %right, or %nonassoc for POSIX
3748 conformance. Reported by Tim Josling at
3749 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3750 * NEWS (2.3a+): Mention.
3751 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3752 and code numbers are treated by precedence declarations.
3753 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3754 of symbols.1.
3755 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3756 of symbol.
3757 (symbol.prec): New, just like symbol but allows INT.
3758 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3759 longer holds.
3760 * tests/regression.at (Token number in precedence declaration): New
3761 test case.
3762
37632008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3764
3765 DJGPP specific issues.
3766 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3767 be changed. Copyright timestamp adjusted.
3768 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3769 be changed. Copyright timestamp adjusted.
3770 * djgpp/config.site: Copyright timestamp adjusted.
3771 * djgpp/config_h.sed: Copyright timestamp adjusted.
3772 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3773 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3774 filename translation list.
3775 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3776 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3777 files shall be created. Before trying to use the temp dir where the
3778 environment variable points to check that the dir really exists. If
3779 not default to the cwd as temp dir. Copyright timestamp adjusted.
3780 * djgpp/subpipe.h: Copyright timestamp adjusted.
3781 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3782
37832008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3784
3785 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3786
37872008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3788
3789 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3790 Problem reported by Claudio Saavedra in
3791 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3792
37932008-01-05 Wojciech Polak <polak@gnu.org>
3794
3795 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3796 document's title with the input grammar file name.
3797
37982007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3799
3800 Automate regression testing of the XML/XSLT implementation. Discussed
3801 starting at
3802 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3803 * configure.ac (XSLTPROC): New substitution.
3804 * Makefile.am (maintainer-xml-check): New phony target invoking...
3805 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3806 invoking make maintainer-check with BISON_TEST_XML=1.
3807 * tests/atlocal.in (XSLTPROC): New.
3808 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3809 not to report reachable memory when Bison is expected to have a
3810 non-zero exit status and (2) to compare XML/XSLT output with --graph
3811 and --report=all output for every working grammar when
3812 BISON_TEST_XML=1.
3813 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3814 (AT_BISON_CHECK_XML): New.
3815 (AT_QUELL_VALGRIND): New.
3816 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3817 (AT_CHECK): ... don't redefine this since this was the old way to
3818 quell Valgrind.
3819 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3820 AT_BISON_CHECK invocations.
3821 * tests/c++.at: Likewise.
3822 * tests/calc.at: Likewise.
3823 * tests/conflicts.at: Likewise.
3824 * tests/cxx-type.at: Likewise.
3825 * tests/existing.at: Likewise.
3826 * tests/glr-regression.at: Likewise.
3827 * tests/headers.at: Likewise.
3828 * tests/input.at: Likewise.
3829 * tests/java.at: Likewise.
3830 * tests/output.at: Likewise.
3831 * tests/push.at: Likewise.
3832 * tests/reduce.at: Likewise.
3833 * tests/regression.at: Likewise.
3834 * tests/sets.at: Likewise.
3835 * tests/skeletons.at: Likewise.
3836 * tests/synclines.at: Likewise.
3837 * tests/torture.at: Likewise.
3838 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3839 tends to hang xsltproc.
3840 (Big horizontal): Likewise.
3841
38422007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3843
3844 In XML output, remove redundant class attribute on symbol element.
3845 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3846 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3847 look up a symbol to determine whether it's a nonterminal or terminal.
3848 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3849 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3850
3851 Add prec/assoc information to XML output.
3852 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3853 %prec, add a percent_prec attribute.
3854 * src/print-xml.c (print_grammar): For each terminal that has a
3855 precedence or associativity, add a prec or assoc attribute.
3856 (xml_indent): New.
3857 (xml_puts): Use xml_indent.
3858 (xml_printf): Use xml_indent.
3859 * src/print-xml.h (xml_indent): Prototype.
3860
3861 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3862 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3863
38642007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3865
3866 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3867 (bison:ruleByNumber): ... this for clarity.
3868 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3869 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3870 (xsl:template match="reduction"): Update.
3871 (xsl:template match="item"): Update.
3872 (xsl:template match="reduction"): Update.
3873
3874 In the XML output, don't print the list of rules where symbols appear.
3875 Compute it in XSLT instead. Discussed at
3876 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3877 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3878 (bison:ruleByRhs): New.
3879 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3880 bison:ruleByRhs.
3881 (xsl:template match="terminal/rule"): Remove.
3882 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3883 bison:ruleByRhs.
3884 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3885 Remove.
3886 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3887 bison:ruleByRhs and mode="number-link" for rule template.
3888 (xsl:template match="terminal/rule"): Remove.
3889 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3890 bison:ruleByRhs and mode="number-link" for rule template.
3891 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3892 Rewrite as...
3893 (xsl:template match="rule" mode="number-link"): ... this.
3894 * src/print-xml.c (print_grammar): Don't print the list of rules.
3895
38962007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3897
3898 Don't let --report affect XML output; always print all information.
3899 Discussed at
3900 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3901 * src/conflicts.c (log_resolution): Implement.
3902 * src/print-xml.c (print_core): Implement.
3903 (print_state): Implement.
3904 (print_xml): Implement.
3905
3906 * NEWS (2.3a+): Fix quotes.
3907 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3908 don't let %verbose clear the list specified by --report.
3909
39102007-11-26 Akim Demaille <akim@epita.fr>
3911
3912 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3913
39142007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3915
3916 In the XML output, list useless and unused symbols and rules with the
3917 useful ones and add a "usefulness" attribute. Discussed starting at
3918 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3919 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3920 (grammar_rules_print_xml): Print all rules instead of just those
3921 useful in the grammar, and add a "usefulness" attribute.
3922 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3923 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3924 (print_grammar): Print all nonterminals instead of just useful ones,
3925 and add a "usefulness" attribute to nonterminals and terminals.
3926 (print_xml): Don't print a separate "reductions" or
3927 "rules-useless-in-parser" element.
3928 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3929 (reduce_xml): Remove.
3930 (reduce_token_unused_in_grammar): New.
3931 (reduce_nonterminal_useless_in_grammar): New.
3932 * src/reduce.h (reduce_xml): Remove prototype.
3933 (reduce_token_unused_in_grammar): Add prototype.
3934 (reduce_nonterminal_useless_in_grammar): Add prototype.
3935 * data/xslt/xml2text.xsl: Update for XML changes.
3936 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3937 * tests/reduce.at (Useless Terminals): Update output.
3938 (Useless Rules): Update output.
3939 (Reduced Automaton): Update output.
3940
3941 Say "Terminals unused in grammar" instead of "Unused terminals".
3942 * NEWS (2.3a+): Update.
3943 * doc/bison.texinfo (Understanding): Update example output.
3944 * src/reduce.c (reduce_output): Implement.
3945 * data/xslt/xml2text.xsl: Implement.
3946 * data/xslt/xml2xhtml.xsl: Implement.
3947
39482007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3949
3950 Accept --report-file=FILE to override the default `.output' filename.
3951 * NEWS (2.3a+): Mention.
3952 * doc/bison.texinfo (Bison Options): Add an entry.
3953 * src/files.c (compute_output_file_names): Don't override
3954 spec_verbose_file if already set.
3955 * src/getargs.c (usage): Document --report-file.
3956 (REPORT_FILE_OPTION): New anonymous enum member.
3957 (long_options): Add entry for it.
3958 (getargs): Add case for it setting spec_verbose_file.
3959
3960 * build-aux/cross-options.pl: Don't record a short option just because
3961 there's an arg.
3962 * doc/.cvsignore: Add yacc.1.
3963
39642007-11-14 Akim Demaille <akim@epita.fr>
3965
3966 * doc/yacc.1.in: New.
3967 * configure.ac, doc/Makefile.am: Adjust.
3968 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3969 config.h symbol.
3970 Use AC_SUBST for assignments too.
3971 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3972
39732007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3974
3975 * src/gram.c: Remove comments that duplicate comments in gram.h.
3976
3977 When reporting useless rules and nonterminals, say "useless in grammar"
3978 instead of "useless", and say "useless in parser" instead of "never
3979 reduced". Discussed starting at
3980 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3981 * NEWS (2.3a+): Mention this change.
3982 * data/xslt/xml2text.xsl: Update output text and expected input XML
3983 element names to match changes below.
3984 * data/xslt/xml2xhtml.xsl: Likewise.
3985 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3986 Contents: "Rules useless in parser due to conflicts".
3987 * doc/bison.texinfo (Decl Summary): Reword a little.
3988 (Understanding): Update example output for changes below.
3989 * src/gram.c: (rule_useful_p): Rename to...
3990 (rule_useful_in_grammar_p): ... this.
3991 (rule_useless_p): Rename to...
3992 (rule_useless_in_grammar_p): ... this.
3993 (rule_never_reduced_p): Rename to...
3994 (rule_useless_in_parser_p): ... this.
3995 (grammar_rules_print): Update for renames.
3996 (grammar_rules_print_xml): Update for renames.
3997 (grammar_rules_never_reduced_report): Rename to...
3998 (grammar_rules_useless_report): ... this since it is used for either
3999 kind of useless rule.
4000 * src/gram.h: Reword comments and update function names in prototypes.
4001 * src/main.c (main): Say "rule useless in parser due to conflicts".
4002 * src/print-xml.c (print_rules_never_reduced): Rename to...
4003 (print_rules_useless_in_parser): ... this, and rename output XML
4004 element "rules-never-reduced" to "rules-useless-in-parser".
4005 (print_xml): Update for rename.
4006 * src/print.c (print_results): Say "Rules useless in parser due to
4007 conflicts".
4008 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4009 (nonterminals_reduce): Say "nonterminal useless in grammar".
4010 (reduce_output): Say "Nonterminals useless in grammar".
4011 Say "Rules useless in grammar".
4012 (reduce_xml): Rename output XML element "useless" to
4013 "useless-in-grammar".
4014 (reduce_print): Don't report the count of grammatically useless rules
4015 as "rules never reduced" just because %yacc is specified.
4016 In the correct report of this count, say nonterminal(s) and rule(s)
4017 "useless in grammar".
4018 * tests/conflicts.at (S/R in initial): Update expected output.
4019 (Defaulted Conflicted Reduction): Likewise.
4020 (Unreachable States After Conflict Resolution): Likewise.
4021 * tests/existing.at (GNU pic Grammar): Likewise.
4022 * tests/reduce.at (Useless Nonterminals): Likewise.
4023 (Useless Rules): Likewise.
4024 (Reduced Automaton): Likewise.
4025 (Underivable Rules): Likewise.
4026 (Empty Language): Likewise.
4027
40282007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4029
4030 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4031 here document and before the EOF so that BSD's implementation of Bourne
4032 shell doesn't parse the delimiter as part of the here document.
4033 * doc/.cvsignore: Add cross-options.texi.
4034 * src/getargs.c (usage): Add a blank line after the warning categories.
4035
40362007-11-08 Paolo Bonzini <bonzini@gnu.org>
4037
4038 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4039
40402007-11-05 Akim Demaille <akim@epita.fr>
4041
4042 Remove Id: from bison.1.
4043 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4044 (perl -0777 -pi -e 's/\.PP\nId): New.
4045 (.x.1): Use it to ignore the version control revision.
4046
40472007-11-05 Akim Demaille <demaille@gostai.com>
4048
4049 * build-aux/Makefile.am: Ship cross-options.pl.
4050 * doc/Makefile.am: Always refer to cross-options.texi with
4051 $(srcdir).
4052 (MAINTAINERCLEANFILES): Add it.
4053
40542007-11-04 Akim Demaille <demaille@gostai.com>
4055
4056 Generate the long/short option cross-table.
4057 * build-aux/cross-options.pl: New.
4058 * doc/Makefile.am (cross-options.texi): New.
4059 * doc/bison.texinfo: Use it.
4060
40612007-11-04 Akim Demaille <demaille@gostai.com>
4062
4063 Generate bison.1 using help2man.
4064 * doc/common.x, doc/bison.x: New.
4065 * doc/Makefile.am (bison.1, .x.1): New.
4066 The code is taken from autoconf-2.61/man/Makefile.am.
4067 * configure.ac: Look for help2man.
4068
40692007-11-04 Akim Demaille <demaille@gostai.com>
4070
4071 Complete --help.
4072 * src/getargs.c (usage): Document -W, make it clear that -d,
4073 -g and -x have optional arguments.
4074
40752007-11-04 Akim Demaille <demaille@gostai.com>
4076
4077 Find sha1sum when named gsha1sum.
4078 * bootstrap (find_tool): New.
4079 ($SHA1SUM): New.
4080
40812007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4082
4083 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4084 at
4085 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4086 * NEWS (2.3a+): Mention.
4087 * data/bison.m4 (b4_pure_if): Don't define it here.
4088 * data/c.m4 (b4_identification): Depend on individual skeletons to
4089 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4090 values of the %define variables api.pure or api.push_pull. Define
4091 YYPURE, YYPUSH, and YYPULL accordingly.
4092 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4093 glr.cc has already defined b4_pure_flag.
4094 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4095 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4096 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4097 * doc/bison.texinfo (Pure Decl): Update.
4098 (Push Decl): Update.
4099 (Decl Summary): Add api.pure to %define entry.
4100 In %pure-parser entry, say it's deprecated and reference %define.
4101 (Pure Calling): Update.
4102 (Error Reporting): Update.
4103 (C++ Scanner Interface): Update.
4104 (How Can I Reset the Parser): Update.
4105 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4106 reference %define.
4107 * src/getargs.c (pure_parser): Remove global variable.
4108 * src/getargs.h (pure_parser): Remove extern.
4109 * src/output.c (prepare): Don't define pure_flag muscle.
4110 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4111 wrapper around `%define api.pure'.
4112 * tests/calc.at (Simple LALR Calculator): Update.
4113 (Simple GLR Calculator): Update.
4114 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4115 Update.
4116 (GLR: Resolve ambiguity, pure, locations): Update.
4117 (GLR: Merge conflicting parses, pure, no locations): Update.
4118 (GLR: Merge conflicting parses, pure, locations): Update.
4119 * tests/glr-regression.at (Uninitialized location when reporting
4120 ambiguity): Update
4121 * tests/input.at (Unused %define api.pure): New test case.
4122 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4123 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4124 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4125
41262007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4127
4128 %define push_pull -> %define api.push_pull. Discussed starting at
4129 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4130 * data/push.c: Expect the new name.
4131 * data/yacc.c: Likewise.
4132 * doc/bison.texinfo (Push Decl): Update.
4133 (Decl Summary): Update %define entry.
4134 (Push Parser Function): Update.
4135 (Pull Parser Function): Update.
4136 (Parser Create Function): Update.
4137 (Parser Delete Function): Update.
4138 * tests/calc.at (Simple LALR Calculator): Update.
4139 * tests/input.at (%define enum variables): Update.
4140 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4141 (Push Parsing: Multiple impure instances): Update.
4142 (Push Parsing: Unsupported Skeletons): Update.
4143 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4144 (Exploding the Stack Size with Malloc): Update.
4145
4146 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4147 other entries some.
4148
41492007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4150
4151 For the XML output's terminal element, rename @number to @token-number,
4152 and add @symbol-number. In the nonterminal element, rename @number to
4153 @symbol-number. Discussed starting at
4154 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4155 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4156 renames.
4157 (xsl:template match="nonterminal"): Likewise.
4158 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4159 (xsl:template match="nonterminal"): Likewise.
4160 * src/print-xml.c (print_grammar): Implement.
4161
41622007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4163
4164 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4165 2007-10-11 change, the child elements here are items not rules.
4166 (xsl:template match="item"): New.
4167 (xsl:template match="rule"): Update for new reduced itemset.
4168 (xsl:template match="point"): Remove.
4169 (xsl:template match="empty"): For consistency with --graph, don't
4170 output "/* empty */".
4171 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4172 line-wrap, don't pass a negative value as first-line-length since this
4173 won't work with the following changes.
4174 (xsl:template name="line-wrap"): Simplify slightly.
4175 (xsl:template name="ws-search"): Eliminate recursion.
4176 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4177 set next to an item whose dot is not at the end of the RHS even if it
4178 happens to be associated with the same rule.
4179
41802007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4181
4182 Add %define lr.keep_unreachable_states.
4183 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4184 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4185 * src/main.c (main): Implement it.
4186 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4187 Extend to test it, and fix a typo.
4188
41892007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4190
4191 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4192 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4193 the example .output text.
4194 * tests/regression.at (Extra lookahead sets in report): Improve wording
4195 of comments.
4196
41972007-10-17 Wojciech Polak <polak@gnu.org>
4198
4199 * src/print-xml.c (print_grammar): Renamed
4200 <terminal> and <nonterminal> attributes:
4201 "type" to "number" and "symbol" to "name".
4202 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4203 Use new attribute names.
4204 (xsl:template match="nonterminal"): Likewise.
4205 * data/xslt/xml2xhtml.xsl: Likewise.
4206
42072007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4208
4209 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4210 (Option Cross Key): Likewise.
4211
4212 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4213 next to an item whose dot is not at the end of the RHS even if it
4214 happens to be associated with the same rule.
4215 * src/print.c (print_core): Likewise.
4216 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4217 (Resolved SR Conflicts): Update output.
4218 * tests/regression.at (Extra lookahead sets in report): New test case.
4219
42202007-10-11 Wojciech Polak <polak@gnu.org>
4221
4222 * src/print-xml.c (print_core): Remove item set
4223 redundancy.
4224 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4225 Improve processing time. Suggested by Joel E. Denny.
4226 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4227 Write xsl:param "required" attribute as comment.
4228 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4229 (xsl:template match="rule"): Support new reduced itemset.
4230 (xsl:template match="point"): Remove.
4231 * data/xslt/xml2xhtml.xsl: Likewise.
4232
42332007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4234
4235 * src/getargs.c (version): Update copyright year.
4236
42372007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4238
4239 Make xml2dot.xsl and --graph produce the same output.
4240 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4241 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4242 escaped later.
4243 (xsl:template name="output-node"): Use the new escape template instead
4244 of the string-replace template directly.
4245 (xsl:template name="output-edge"): Likewise.
4246 (xsl:template name="escape"): New, escapes backslashes and newlines in
4247 addition to quotation marks.
4248 * src/graphviz.c (start_graph, output_node, output_edge): Add
4249 whitespace to output for legibility.
4250
4251 Make xml2text.xsl and --report produce the same output, and remove the
4252 XML "conflicts" element since a conflict summary is easily extracted
4253 from the automaton.
4254 * data/xslt/bison.xsl: New.
4255 (xsl:template match="state" mode="bison:count-conflicts): New.
4256 * data/xslt/xml2text.xsl: Import bison.xsl.
4257 (xsl:template match="bison-xml-report"): Instead of styling the
4258 "conflicts" element, style the "automaton" element with mode
4259 "conflicts". Unlike the former, the latter lists S/R and R/R
4260 conflicts for a state on the same line.
4261 (xsl:template match="conflicts"): Remove.
4262 (xsl:template match="conflict"): Remove.
4263 (xsl:template match="terminal"): Line-wrap the list of rules in which
4264 the terminal is used.
4265 (xsl:template match="nonterminal"): Likewise for nonterminals.
4266 (xsl:template match="automaton" mode="conflicts"): New.
4267 (xsl:template match="state" mode="conflicts"): New.
4268 (xsl:template name="line-wrap"): New.
4269 (xsl:template name="ws-search"): New.
4270 * data/xslt/xml2xhtml.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."
4274 (xsl:template match="conflicts"): Remove.
4275 (xsl:template match="conflict"): Remove.
4276 (xsl:template match="automaton" mode="conflicts"): New.
4277 (xsl:template match="state" mode="conflicts): New.
4278 * src/conflicts.c (conflicts_output_xml): Remove.
4279 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4280 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4281 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4282 the corresponding XSLT is easier. Also, never wrap between a word and
4283 the comma that follows it.
4284
42852007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4286
4287 Improve C++ namespace support. Discussed starting at
4288 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4289 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4290 b4_namespace_close): New macros that interpret the %define variable
4291 "namespace" so its value can contain "::" to indicate nested
4292 namespaces.
4293 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4294 the above macros.
4295 * data/lalr1.cc (b4_namespace): Likewise.
4296 * data/location.cc (b4_namespace): Likewise.
4297 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4298 inside a new table in the general %define entry. Document `%define
4299 namespace' there as well. Point the %name-prefix entry to it since it
4300 explains it more completely in the case of C++.
4301 (C++ Bison Interface): Mention `%define namespace' instead of
4302 %name-prefix.
4303 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4304 entry suffices.
4305 * tests/c++.at (Relative namespace references): New test case.
4306 (Absolute namespace references): New test case.
4307 (Syntactically invalid namespace references): New test case.
4308 * tests/input.at (C++ namespace reference errors): New test case.
4309
43102007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4311
4312 Add syncline support and location accessor to internal %define
4313 interfaces.
4314 * data/bison.m4 (b4_percent_define_get_loc): New.
4315 (b4_percent_define_get_syncline): New.
4316 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4317 (b4_percent_define_default): Record defining location as line 1 rather
4318 than 0 for the sake of synchronizing #line's, and define
4319 b4_percent_define_syncline(VARIABLE).
4320 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4321 * src/muscle_tab.c (muscle_syncline_grow): New.
4322 (muscle_code_grow): Use muscle_syncline_grow.
4323 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4324 define b4_percent_define_syncline(VARIABLE).
4325 (muscle_percent_define_get_loc): New.
4326 (muscle_percent_define_get_syncline): New.
4327 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4328 remove some unused variables.
4329 (muscle_percent_define_default): Record defining location as line 1
4330 rather than 0 for the sake of synchronizing #line's, and define
4331 b4_percent_define_syncline(VARIABLE).
4332 (muscle_percent_define_check_values): Use
4333 muscle_percent_define_get_loc.
4334 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4335 (muscle_percent_define_get_syncline): Prototype.
4336 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4337 defaults): Update output for location change.
4338 (Complaining during macro argument expansion): Extend to test
4339 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4340
43412007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4342
4343 Fix some error-reporting macro bugs.
4344 * data/bison.m4 (b4_cat): New.
4345 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4346 to stdout so they don't become arguments to other macros. Update
4347 comments and add examples.
4348 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4349 add examples.
4350 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4351 after printing the error directive so that M4 doesn't report subsequent
4352 problems that are induced by this problem.
4353 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4354 instead of just in them. Recognize @\n in both places. Both expand to
4355 the empty string. Needed by b4_cat.
4356 * tests/skeletons.at (Complaining during macro argument expansion):
4357 New test case.
4358 (Fatal errors make M4 exit immediately): New test case.
4359
43602007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4361
4362 Implement --print-datadir.
4363 * src/getargs.c (usage): Mention.
4364 (PRINT_DATADIR_OPTION): New anonymous enum member.
4365 (long_options): Add entry for it.
4366 (getargs): Add case for it calling compute_pkgdatadir.
4367 * src/output.c (output_skeleton): Encapsulate data directory
4368 computation from here...
4369 (prepare): ... and from here...
4370 (compute_pkgdatadir): ... into this new function.
4371 * src/output.h (compute_pkgdatadir): Prototype.
4372
43732007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4374
4375 * src/print-xml.c (escape_bufs): New static global variable
4376 replacing...
4377 (xml_escape_n): ... the static local variable buf here.
4378 (print_xml): Free memory for escape_bufs.
4379 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4380
43812007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4382
4383 Replace `%push-parser' and `%push-pull-parser' with
4384 `%define push_pull "push"' and `%define push_pull "both"'.
4385 `%define push_pull "pull"' is the default.
4386 * doc/bison.texinfo (Push Decl, Push Parser Function,
4387 Pull Parser Function, Parser Create Function, Parser Delete Function):
4388 Update declarations.
4389 (Decl Summary, Table of Symbols): Replace %push-parser and
4390 %push-pull-parser entries with a %define push_pull entry.
4391 * data/bison.m4 (b4_percent_define_check_values): New macro.
4392 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4393 definitions...
4394 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4395 definitions...
4396 * data/push.c: ... to here and compute them from the value of the
4397 %define variable push_pull.
4398 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4399 parsing requests here...
4400 * data/yacc.c: ... hack this to switch to push.c any time
4401 b4_use_push_pull_flag or the %define variable push_pull is set. This
4402 will go away when we mv push.c yacc.c.
4403 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4404 push parsing is not supported since unused %define variables are
4405 reported anyway.
4406 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4407 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4408 comments for consistency with b4_percent_define_check_values.
4409 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4410 muscles.
4411 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4412 Remove.
4413 (prologue_declaration): Remove %push-parser and %push-pull-parser
4414 rules.
4415 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4416 * tests/calc.at: Update declarations.
4417 * tests/input.at (%define enum variables): New test case.
4418 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4419 declaration.
4420 (Push Parsing: Multiple impure instances): Update declaration.
4421 (Push Parsing: Unsupported Skeletons): New test case.
4422 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4423 declaration.
4424 (Exploding the Stack Size with Malloc): Update declaration.
4425
44262007-09-24 Wojciech Polak <polak@gnu.org>
4427
4428 Add XSLT transformations.
4429
4430 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4431 * data/xslt/xml2text.xsl: Transform XML into plain text.
4432 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4433 * data/Makefile.am (xsltdir): New variable.
4434 (dist_xslt_DATA): Add xslt/*.xsl files.
4435
44362007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4437
4438 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4439 Problem reported by Wojciech Polak.
4440 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4441 (xml_printf): Undo change I made on 21 September; that is,
4442 indent 2 spaces, not 1.
4443
44442007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4445
4446 Pacify ./configure --enable-gcc-warnings.
4447 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4448 `char const *' instead of `char *'.
4449 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4450 local variable `sep'.
4451
44522007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4453
4454 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4455 elsewhere.
4456 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4457 (xml_printf): Indent just 1 space for level.
4458 (e_char, xlate_char): Remove.
4459 (xml_escape_string): Rewrite to avoid undefined behavior (used
4460 storage that was freed from the stack).
4461 (xml_escape_n): Don't bother checking for subscript error.
4462
44632007-09-21 Wojciech Polak <polak@gnu.org>
4464
4465 Add Bison XML Automaton Report.
4466
4467 Add support for an -x option to generate an XML report.
4468 It is not documented yet.
4469 * src/print-xml.c: New file.
4470 * src/print-xml.h: Likewise.
4471 * lib/timevar.def (TV_XML): New var.
4472 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4473 * src/conflicts.c: Include print-xml.h.
4474 (solved_conflicts_xml_obstack): New var.
4475 (log_resolution, conflicts_solve, conflicts_free):
4476 Add support for XML report.
4477 (conflicts_output_val): New function.
4478 * src/conflicts.h (conflicts_output_val): New decl.
4479 * src/files.c (spec_xml_file): New var.
4480 (compute_output_file_names, output_file_names_free): Add XML support.
4481 * src/files.h (spec_xml_file): New decl.
4482 * src/getargs.c (xml_flag): New var.
4483 (usage, short_options, long_options, getargs): Add XML support.
4484 * src/getargs.h (xml_flag): New decl.
4485 * src/gram.c: Include print-xml.h.
4486 (rule_lhs_print_xml, rule_rhs_print_xml):
4487 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4488 New functions.
4489 * src/gram.h: Declare external ones.
4490 * src/main.c: Include print-xml.h.
4491 (main): Add XML support.
4492 * src/reduce.c: Include print-xml.h.
4493 (reduce_xml): New function.
4494 * src/reduce.h: Declare it.
4495 * src/state.c: Include print-xml.h.
4496 (state_new): Add XML support.
4497 (state_rule_lookahead_tokens_print_xml): New function.
4498 * src/state.h: Declare it.
4499 (struct state): New member solved_conflicts_xml.
4500 * src/symtab.c (symbol_class_get_string): New function.
4501 * src/symtab.h: Declare it.
4502
45032007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4504
4505 * GNUmakefile: Switch to coreutils's version.
4506 * bootstrap: Likewise.
4507 * Makefile.cfg: Adjust to new GNUmakefile.
4508 * README-hacking: Likewise.
4509
4510 Import from gnulib:
4511
4512 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4513 Bruno Haible <bruno@clisp.org>
4514
4515 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4516 and is a script that invokes bison. Tighten the code. Add comments.
4517
45182007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4519
4520 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4521 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4522 * doc/bison.texinfo (Decl Summary): Fix.
4523 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4524 * tests/input.at (Boolean %define variables): Update output.
4525 * tests/skeletons.at (%define boolean variables: invalid skeleton
4526 defaults): Rename to...
4527 (%define Boolean variables: invalid skeleton defaults): ... this and
4528 update output.
4529
45302007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4531
4532 In impure push mode, don't allow more than one yypstate to be allocated
4533 since multiple impure parsers would corrupt yynerrs.
4534 * data/push.c (yypstate_allocated): New static global variable
4535 initialized to 0.
4536 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4537 exhaustion if yypstate_allocated is 1, but still return 2.
4538 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4539 already 1. Otherwise, set it to 1.
4540 (yypstate_delete): Set it to 0.
4541 * tests/push.at (Push Parsing: Multiple impure instances): New test
4542 case.
4543
45442007-08-17 Bob Rossi <bob@brasko.net>
4545
4546 * doc/bison.texinfo (Push Decl): Document the push parser.
4547 (Table of Symbols): Ditto.
4548 (Pure Decl): Ditto.
4549 (Decl Summary): Ditto.
4550 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4551 Parser Create Function, Parser Delete Function):
4552 Add new push parser symbols.
4553 (Table of Symbols): Document push-parser, push-pull-parser,
4554 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4555
45562007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4557
4558 Update to GPLv3.
4559 * doc/gpl-3.0.texi: New file.
4560 * doc/gpl.texi: Remove.
4561 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4562 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4563 * README-hacking, TODO, bootstrap, bootstrap.conf:
4564 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4565 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4566 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4567 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4568 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4569 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4570 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4571 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4572 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4573 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4574 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4575 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4576 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4577 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4578 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4579 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4580 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4581 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4582 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4583 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4584 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4585 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4586 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4587 * src/complain.c, src/complain.h, src/conflicts.c:
4588 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4589 * src/files.h, src/flex-scanner.h, src/getargs.c:
4590 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4591 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4592 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4593 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4594 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4595 * src/print.c, src/print.h, src/print_graph.c:
4596 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4597 * src/reduce.h, src/relation.c, src/relation.h:
4598 * src/revision.h, src/scan-code.h, src/scan-code.l:
4599 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4600 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4601 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4602 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4603 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4604 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4605 * tests/existing.at, tests/glr-regression.at:
4606 * tests/headers.at, tests/input.at, tests/java.at:
4607 * tests/local.at, tests/output.at, tests/push.at:
4608 * tests/reduce.at, tests/regression.at, tests/sets.at:
4609 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4610 * tests/torture.at:
4611 Update to GPLv3.
4612
46132007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4614
4615 Get rid of broken %no-parser, -n, and --no-parser implementation and
4616 documentation.
4617 * TODO: Don't mention them.
4618 * doc/bison.1: Likewise.
4619 * doc/bison.texinfo (Decl Summary): Likewise.
4620 (Bison Options): Likewise.
4621 (Option Cross Key): Likewise.
4622 * src/getargs.c (no_parser_flag): Remove global variable.
4623 (usage): Don't print description of -n and --no-parser.
4624 (long_options): Remove --no-parser entry here.
4625 (getargs): Remove -n case in the switch here.
4626 * src/getargs.h (no_parser_flag): Remove extern.
4627 * tests/regression.at (Web2c Actions): Remove comment that mentions
4628 --no-parser.
4629
46302007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4631
4632 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4633 name user variables starting with `yy'. Just pass NULL instead of a
4634 dummy local &yylval to yypush_parse.
4635 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4636 starting with `yy'.
4637
46382007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4639
4640 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4641 true since it's then always used regardless of whether yyoverflow is
4642 defined. Reported by Christian Burger at
4643 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4644 * THANKS: Add Christian Burger.
4645
4646 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4647 node names: say "Decl Summary" not "Bison Declaration Summary".
4648
46492007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4650
4651 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4652 determine whether this function has already complained about an invalid
4653 value for a %define boolean variable, don't check whether Bison has
4654 ever examined the value. As written, the check was a tautology.
4655 Instead, record and check for this complaint using a separate muscle.
4656
46572007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4658
4659 Fix push parsing memory leak reported by Brandon Lucia at
4660 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4661 * THANKS: Add Brandon Lucia.
4662 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4663 but the parse never completed and thus freed it.
4664 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4665 * tests/testsuite.at: Include push.at.
4666 * test/push.at: New.
4667 (Push Parsing: Memory Leak for Early Deletion): New test case.
4668
46692007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4670
4671 Improve handling of multiple S/R conflicts in the same state and of S/R
4672 conflicts involving multiple reductions.
4673 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4674 set for a state here or Bison will abort if it is reassigned on a
4675 later conflicted reduction in the same state.
4676 Similarly, don't finalize and assign the solved conflicts report here
4677 or it will be lost if it is reassigned on a later conflicted reduction
4678 in the same state.
4679 (set_conflicts): Instead, assign them both here after all S/R conflicts
4680 in the state have been fully examined.
4681 * src/print.c (shift_set): Rename to...
4682 (no_reduce_set): ... this.
4683 (print_reductions): Update for rename, and add %nonassoc error action
4684 tokens to no_reduce_set so that, when printing the first remaining
4685 reduction on an error action token, the reduction is enclosed in
4686 brackets.
4687 (print_results): Update for rename.
4688 * tests/conflicts.at (Solved conflicts report for multiple reductions
4689 in a state): New test case.
4690 (%nonassoc error actions for multiple reductions in a state): New test
4691 case.
4692
4693 * src/main.c (main): Don't depend on C99 features.
4694
46952007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4696
4697 * build-aux/.cvsignore: Add compile.
4698 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4699 uniwidth.
4700
47012007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4702
4703 * bootstrap (slurp): Create target directories that don't exist.
4704 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4705
47062007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4707
4708 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4709 than item number.
4710 * closure.c (closure): Likewise.
4711 * state.h (reductions): Comment sorting of rules.
4712 (state): Comment sorting of items.
4713
47142007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4715
4716 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4717 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4718 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4719 definition in order to avoid Gnulib headers since we don't use config.h
4720 here.
4721 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4722 rather than AT_DATA so that config.h is included.
4723
47242007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4725
4726 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4727 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4728 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4729 and so that YYFPRINTF is guaranteed to be defined here.
4730
47312007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4732
4733 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4734 with...
4735 (muscle_percent_define_check_values): ... this more helpful function.
4736 Again, it's not used yet, but it will be.
4737 * src/muscle_tab.h: Likewise.
4738
4739 Improve some comments in parser table construction.
4740 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4741 (generate_states): Don't mention ruleset, which is internal to closure.
4742 * src/closure.c (closure): Explain sorting of core and itemset, which
4743 is required for this function to behave correctly.
4744 * src/closure.h (closure): Mention sorting.
4745
47462007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4747
4748 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4749 move the check for disabled transitions to an aver since conflict
4750 resolution hasn't happened yet.
4751
4752 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4753 labels a state as inconsistent just because it has error transitions.
4754 The original form of this check appeared in revision 1.1 of lalr.c,
4755 which was committed on 1991-12-21. Now (at least), changing the
4756 consistency label on such a state appears to have no useful effect in
4757 any of the places it is examined, which I enumerate below. The key
4758 point to understanding each item in this enumeration is that a state
4759 with an error transition is labelled consistent in the first place only
4760 if it has no rules, so the check cannot matter for states that have
4761 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4762 to try to identify its conflicts, and a state must have *rules* to have
4763 conflicts. (2) Labelling a state as inconsistent will affect how
4764 action_row sets the default *rule* for the state. (3) Labelling a
4765 state as inconsistent will cause build_relations to add lookback edges
4766 to *rules* in that state.
4767 * src/state.h (struct state): Word the comment for member consistent
4768 more carefully.
4769
47702007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4771
4772 Don't depend on C99 features.
4773 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4774 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4775 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4776 * src/state.c (state_mark_reachable_states): Fix for-loop.
4777 (state_remove_unreachable_states): Fix for-loop.
4778
4779 Don't widen struct state with member reachable just to temporarily
4780 record reachability. Instead, use a local bitset.
4781 * src/state.h (struct state): Remove member.
4782 * src/state.c (state_new): Don't initialize it.
4783 (state_mark_reachable_states): Rename to...
4784 (state_record_reachable_states): ... this, and use bitset.
4785 (state_remove_unreachable_states): Use bitset.
4786
47872007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4788
4789 * src/Makefile.am (yacc): Quote target action commands properly so
4790 that the yacc script isn't corrupt. Reported by Hans Aberg at
4791 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4792
4793 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4794 the case of pure parsers. Reported by Frans Englich at
4795 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4796 * THANKS: Add Frans Englich.
4797
4798 * NEWS (2.3a+): In the %code entry, reference section `Bison
4799 Declaration Summary' from the manual now since the %code summary has
4800 moved there.
4801 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4802 in the rules section must be terminated by semicolons.
4803
48042007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4805
4806 Extend the front-end API for %define variables to more completely
4807 mirror the back-end. This will be useful in the future.
4808 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4809 Update comments to mention the new front-end counterparts of these
4810 macros.
4811 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4812 for muscle_string_decode and muscle_location_decode.
4813 (muscle_string_decode): New static function.
4814 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4815 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4816 functions.
4817 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4818 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4819 implementation more closely.
4820 (muscle_percent_define_invalid_value): New function.
4821 * src/muscle_tab.h (muscle_percent_define_get,
4822 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4823 Prototype.
4824
48252007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4826
4827 * NEWS (2.3a+): Mention yesterday's state-removal change.
4828 (2.3a): Remove the %language entry, which was added after 2.3a.
4829 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4830 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4831 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4832 tests/existing.at: Update copyright date.
4833
48342007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4835
4836 If conflict resolution makes states unreachable, remove those states,
4837 report rules that are then unused, and don't report conflicts in those
4838 states.
4839 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4840 New global function.
4841 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4842 function.
4843 * src/main.c (main): After conflict resolution, remove the unreachable
4844 states and update all data structures that reference states by number.
4845 * src/state.c (state_new): Initialize each state's reachable member to
4846 false.
4847 (state_mark_reachable_states): New static function.
4848 (state_remove_unreachable_states): New global function.
4849 * src/state.h (struct state): Add member bool reachable.
4850 (state_remove_unreachable_states): Prototype.
4851 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4852 New test case.
4853 * tests/existing.at (GNU pic Grammar): Update test case output now that
4854 an unused rule is discovered.
4855
48562007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4857
4858 Minor code cleanup in parser table construction.
4859 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4860 (new_itemsets, save_reductions): Update for rename to nitemset.
4861 * src/closure.c (nritemset): Rename to...
4862 (nitemset): ... this since the "r" appears to meaningless and isn't
4863 used in the comments.
4864 (closure): Update for rename.
4865 * src/closure.h (nritemset): Update extern to...
4866 (nitemset): ... this.
4867 * src/lalr.c (LA): Fix a typo in comments.
4868 * src/print.c (print_core): Update for rename to nitemset.
4869 * src/print_graph.c (print_graph): Likewise.
4870 * src/state.h: Fix some typos in header comments.
4871
48722007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4873
4874 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4875 still sticks to ASCII. Sorry!
4876
4877 * README-hacking: New file, taken mostly from coreutils, with changes
4878 for Bison. Contains much of the contents of:
4879 * README-cvs: Remove.
4880 * bootstrap: Sync from gnulib.
4881 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4882 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4883
48842007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4885
4886 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4887 Setzer.
4888 (Java Differences): Fix some typos.
4889 * THANKS: Add Sebastian Setzer.
4890
48912007-03-07 Paolo Bonzini <bonzini@gnu.org>
4892
4893 * data/java.m4 (b4_single_class_if): Remove.
4894 (b4_abstract_if): Look at "%define abstract".
4895 (b4_lexer_if): New.
4896 (b4_union_name): Rename...
4897 (b4_yystype): ... to this. Map to "%define stype".
4898 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4899 b4_maybe_throws): Fix quoting.
4900 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4901 * data/lalr1.java (Lexer interface): Always define.
4902 (Lexer interface within parser class): Remove.
4903 (YYLexer class): New, used when "%code lexer" is present.
4904 (constructor): When "%code lexer" is used, pass %lex-param
4905 to the lexer constructor.
4906 (yylex, yyparse): Remove %lex-param from method invocations
4907 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4908
4909 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4910 abstract". Rename "%define union_name" to "%define stype".
4911 Rename method names according to previous patch.
4912 (Java Scanner Interface): Describe "%code lexer" instead of
4913 "%pure-parser" and "%define single_class".
4914 (Java Differences): Mention "%code lexer".
4915
4916 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4917 Include scanner here, using macros from tests/local.at.
4918 (AT_DATA_CALC_Y): Remove final argument.
4919 (_AT_CHECK_JAVA_CALC): Likewise.
4920 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4921 of %locations and %error-verbose.
4922 (main): Test with and without %lex-param.
4923 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4924 (AT_BISON_OPTION_POPDEFS): Pop it.
4925
49262007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4927
4928 DJGPP spefic issue. Inhibit the use of disallowed characters for
4929 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4930 and concern testsuite case 46.
4931 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4932 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4933 * djgpp/config.bat: Inhibit the use of disallowed characters.
4934
49352007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4936
4937 Miscellaneous %define and %code cleanup.
4938 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4939 values are interpreted.
4940 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4941 documentation a little more.
4942 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4943 muscle_percent_define_insert, muscle_percent_code_grow): New
4944 functions/macros.
4945 * src/muscle_tab.h (muscle_percent_define_insert,
4946 muscle_percent_code_grow): Prototype.
4947 * src/parse-gram.y (prologue_declaration): Use
4948 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4949 %define and %code directives.
4950
4951 Make it easy to share %define boolean variables between the front-end
4952 and back-end. Though not used yet, this will be useful in the future.
4953 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4954 Bison uses of names rather than just skeleton uses of names.
4955 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4956 b4_percent_define_skeleton_variables(VARIABLE) to
4957 b4_percent_define_bison_variables(VARIABLE).
4958 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4959 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4960 b4_percent_code_bison_qualifiers(QUALIFIER).
4961 (b4_check_user_names_wrap): Update for renames.
4962 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4963 muscle_percent_define_default): New functions mimicking
4964 b4_percent_define_flag_if and b4_percent_define_default.
4965
4966 For %define variables, report locations for invalid values and
4967 redefinitions.
4968 * data/bison.m4 (b4_percent_define_flag_if): Read
4969 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4970 value for VARIABLE.
4971 (b4_percent_define_default): Save a special location in
4972 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4973 must later be reported as invalid.
4974 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4975 functions.
4976 (muscle_percent_define_insert): Record the location of VARIABLE in
4977 muscle percent_define_loc(VARIABLE), and use it to report the previous
4978 location for a redefinition.
4979 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4980 (muscle_percent_define_default): Update like b4_percent_define_default.
4981 (muscle_grow_user_name_list): Rename to...
4982 (muscle_user_name_list_grow): ... this for consistency and use
4983 muscle_location_grow.
4984 * src/muscle_tab.h (muscle_location_grow): Prototype.
4985 * tests/input.at (%define errors): Update expected output.
4986 * tests/skeletons.at (%define boolean variables: invalid skeleton
4987 defaults): New test case.
4988
49892007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4990
4991 * src/print.c (lookahead_set, state_default_rule): Remove.
4992 (print_reductions): Replace state_default_rule invocation with
4993 equivalent use of yydefact, which was computed in token_actions in
4994 tables.c.
4995 (print_results): Don't allocate lookahead_set.
4996
49972007-02-27 Paolo Bonzini <bonzini@gnu.org>
4998
4999 * data/lalr1.java: Prefix all private members with yy.
5000
50012007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5002
5003 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5004 Sebastien Fricker at
5005 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5006 * THANKS: Add Sebastien Fricker.
5007 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5008 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5009 accept a variable number of arguments.
5010
50112007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5012
5013 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5014
50152007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5016
5017 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5018 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5019 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5020
50212007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5022
5023 Undo my 2007-02-07 change, switching back to the c-strcase module
5024 introduced in the 2007-02-03 change. Bruno Haible reported that
5025 the 2007-02-07 change would be dangerous in Turkish if we add a
5026 language whose name contains "i", since "i" is not lowercase "I"
5027 in Turkish.
5028 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5029 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5030 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5031 * m4/.cvsignore: Remove strcase.m4.
5032 * src/getargs.c: Revert 2007-02-07 change, as follows.
5033 Include c-strcase.h.
5034 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5035
50362007-02-11 Bruno Haible <bruno@clisp.org>
5037
5038 Enable the Java related testsuite tests when the only Java compiler
5039 found is a gcj < 4.3. Discussed at
5040 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5041 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5042
50432007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5044
5045 * data/Makefile.am: Update copyright date.
5046 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5047 yypstate_new returns NULL.
5048 (yypstate_new): Return NULL if malloc does.
5049 * src/reader.c (packgram): Move translation of rule actions from the
5050 beginning of packgram to...
5051 (check_and_convert_grammar): ... here right before packgram is invoked
5052 so it's easier to write more complete comments, and remove redundant
5053 code.
5054
50552007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5056
5057 As in semantic actions, make @$ in %initial-action, %destructor, and
5058 %printer imply %locations.
5059 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5060 scanning @$.
5061 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5062 (@$ in %initial-action implies %locations,
5063 @$ in %destructor implies %locations,
5064 @$ in %printer implies %locations): ... these new test cases.
5065
50662007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5067
5068 Undo most of the 2007-02-03 change, switching to the strcase module
5069 now that gnulib strcase has been fixed.
5070 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5071 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5072 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5073 * m4/.cvsignore: Add strcase.m4.
5074 * src/getargs.c: Revert 2007-02-03 change, as follows.
5075 Don't include c-strcase.h.
5076 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5077 strcasecmp has "unspecified behavior" outside the POSIX locale,
5078 but it works fine in practice if at least one argument is ASCII,
5079 as is the case in Bison.
5080
50812007-02-07 Paolo Bonzini <bonzini@gnu.org>
5082
5083 * tests/java.at: Skip tests if only one of javac/java is present.
5084 Reported by Joel E. Denny.
5085 * tests/atlocal.in: Adjust copyright years.
5086
50872007-02-05 Paolo Bonzini <bonzini@gnu.org>
5088
5089 * data/lalr1.java (Stack): Work around old verifiers that disallow
5090 access to the private fields of an inner class, from the outer class.
5091 We can make Stack's fields public because user code doesn't have access
5092 to the instance of Stack used by parse(). Reported by Paul Eggert.
5093
50942007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5095
5096 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5097 the right spot for these files?
5098 * bootstrap.conf (gnulib_modules): Add c-strcase.
5099 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5100 c-strncasecmp.c.
5101 * src/getargs.c: Include c-strcase.h.
5102 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5103 to avoid unspecified behavior.
5104
51052007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5106
5107 * doc/bison.texinfo (Decl Summary): Correct typo.
5108
51092007-01-30 Paolo Bonzini <bonzini@gnu.org>
5110
5111 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5112 Complain if the value does not match empty, "true" or "false".
5113 * data/c++.m4: Adjust default definitions of %define variables.
5114 * data/java.m4: Adjust default definitions of %define variables.
5115 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5116 to above behavior.
5117 * tests/input.at (Boolean %define variables): Test new behavior.
5118
51192007-01-29 Paolo Bonzini <bonzini@gnu.org>
5120
5121 * NEWS: Mention java.
5122 * TODO: Remove things that are done.
5123 * bootstrap.conf: Add javacomp-script and javaexec-script.
5124 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5125
5126 * data/Makefile.am: Add new files.
5127 * data/java-skel.m4: New.
5128 * data/java.m4: New.
5129 * data/lalr1.java: New.
5130
5131 * doc/bison.texinfo: Put "A Complete C++ Example" under
5132 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5133 under Other Languages.
5134
5135 * src/getargs.c (valid_languages): Add Java.
5136 * src/getargs.h (struct bison_language): Update size of string fields.
5137
5138 * tests/Makefile.am: Add java.at.
5139 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5140 * tests/java.at: New.
5141 * tests/testsuite.at: Include it.
5142
51432007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5144
5145 Clean up.
5146 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5147 at_directive_argv arguments so these no longer have to be global
5148 variables. Also, update the implementation for the following changes.
5149 (fail_for_at_directive_too_many_args,
5150 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5151 (at_directive_name): Remove as at_directive_argv[0] will be used for
5152 this now.
5153 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5154 for the directive name.
5155 (at_directive_argc, at_directive_argv): Make these local within
5156 skel_lex instead of global.
5157 (INITIAL): Update directive start action for above changes.
5158 (SC_AT_DIRECTIVE_ARG): Rename to...
5159 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5160 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5161 (scan_skel): Move yylex_destroy to...
5162 (skel_scanner_free): ... here.
5163 * tests/skeletons.at (installed skeleton file name): Rename to...
5164 (installed skeleton file names): ... this.
5165
51662007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5167
5168 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5169 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5170 Summary" not "Directives".
5171 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5172 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5173 since the former is now the more complete one.
5174 (Prologue Alternatives): Likewise and do the same for %defines.
5175 (Table of Symbols): Add summary of %code, add summary of %define, and
5176 move full %code documentation to...
5177 (Decl Summary): ... here for consistency with other entries in these
5178 sections.
5179 Move %define entry in order to keep this list alphabetized.
5180 Reword %define entry a little to put less emphasis on the skeleton
5181 concept, which most users shouldn't have to think about.
5182
51832007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5184
5185 Adjust to recent gnulib changes.
5186 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5187 Add string.h, string_.h, unistd_.h, wchar_.h.
5188 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5189 * src/system.h: Don't include <stpcpy.h>; this is now done by
5190 <string.h>.
5191
51922007-01-23 Paolo Bonzini <bonzini@gnu.org>
5193
5194 Simplify implementation of unqualified %code, implement macros for
5195 uniform treatment of boolean %define flags. Document %define.
5196 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5197 b4_percent_code_ifdef): New.
5198 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5199 * data/c++.m4: Define default value for global_tokens_and_yystype.
5200 * data/glr.cc: Likewise.
5201 * data/location.cc: Use b4_percent_define_flag_if.
5202
5203 * doc/bison.texinfo (Decl Summary): Document %define.
5204
5205 * src/parse-gram.y (Unqualified %code): Change muscle name to
5206 b4_percent_code().
5207 (content.opt): Default to empty.
5208
52092007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5210
5211 Implement support for relative and absolute skeleton file names.
5212 Discussed starting at
5213 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5214 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5215 (Bison Options): Document in --skeleton entry.
5216 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5217 full_skeleton can't necessarily hold all of pkgdatadir.
5218 If the specified skeleton file name contains a `/', don't prepend
5219 pkgdatadir.
5220 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5221 file name contains a `/', prepend the grammar file directory.
5222 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5223 * skeletons.at: New file.
5224 (relative skeleton file names): New test case.
5225 (installed skeleton file names): New test case.
5226 * tests/testsuite.at: Include skeletons.at.
5227
5228 * bootstrap: Update copyright to 2007.
5229
52302007-01-17 Paolo Bonzini <bonzini@gnu.org>
5231
5232 * bootstrap: Remove occurrences of .#bootmp from the files.
5233
52342007-01-17 Akim Demaille <akim@epita.fr>
5235
5236 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5237 nonterminals.
5238 Use per-type %printer.
5239
52402007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5241
5242 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5243 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5244 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5245 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5246 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5247 tests/glr-regression.at, tests/input.at, tests/local.at,
5248 tests/output.at, tests/torture.at: Update copyright to 2007.
5249
52502007-01-16 Akim Demaille <akim@epita.fr>
5251
5252 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5253 error code.
5254 (Calc++ Scanner): Exit with failure if we can't open the input
5255 file.
5256 Accept "-" standing for stdin.
5257 (Calc++ Top Level): Print the result only if the parsing was
5258 successful.
5259
52602007-01-16 Akim Demaille <akim@epita.fr>
5261
5262 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5263
52642007-01-15 Paolo Bonzini <bonzini@gnu.org>
5265 and Joel E. Denny <jdenny@ces.clemson.edu>
5266
5267 Clean up %define and %code implementation in M4 some. Most
5268 importantly, rename all related macros to be in the b4_percent_define
5269 and b4_percent_code namespaces. Also, complete support for `.' in
5270 %define variable names and %code qualifiers.
5271 * data/bison.m4 (b4_check_user_names): Check for special
5272 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5273 m4_foreach loops.
5274 (b4_get_percent_define, b4_get_percent_code): Rename to...
5275 (b4_percent_define_get, b4_percent_code_get): ... these.
5276 Extend documentation with examples.
5277 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5278 b4_percent_define_skeleton_variables and
5279 b4_percent_code_skeleton_qualifiers.
5280 Expect any value for the %define variable `foo' to be stored in the
5281 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5282 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5283 expect any unqualified %code blocks to be stored in a macro named
5284 `b4_percent_code_unqualified'.
5285 Use m4_indir so that %define variable names and %code qualifiers can
5286 contain `.', which is allowed by the grammar parser.
5287 (b4_percent_define_default): New macro to set a default value for a
5288 %define variable.
5289 (m4_wrap): Update wrapped code, and fix some underquoting.
5290 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5291 Expect grammar uses of %define variables and %code qualifiers to be
5292 defined in b4_percent_define_user_variables and
5293 b4_percent_code_user_qualifiers.
5294 * data/c++.m4: Use b4_percent_define_default rather than
5295 m4_define_default. Fix some underquoting. Skeleton usage of %define
5296 variable define_location_comparison now implies skeleton usage of
5297 %define variable filename_type.
5298 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5299 data/push.c, data/yacc.c: Update macro names.
5300 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5301 muscle names.
5302
53032007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5304
5305 DJGPP specific issues.
5306
5307 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5308 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5309
53102007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5311
5312 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5313 run parsers in all tests so that Valgrind is invoked during
5314 maintainer-check-valgrind.
5315 (Duplicate representation of merged trees): Free all semantic values.
5316 (Duplicated user destructor for lookahead): Likewise.
5317
53182007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5319
5320 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5321 command-line prefix.
5322 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5323 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5324 miss Valgrind messages.
5325 (Exploding the Stack Size with Malloc): Likewise.
5326
53272007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5328
5329 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5330 locals. Reported by Juan Manuel Guerrero at
5331 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5332 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5333 Fix some indentation also.
5334 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5335 explaining this issue.
5336
53372007-01-09 Paolo Bonzini <bonzini@gnu.org>
5338 and Joel E. Denny <jdenny@ces.clemson.edu>
5339
5340 Simplify union and prologue handling, and escape union and lex/parse
5341 params with digraphs.
5342 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5343 values to the empty string since these are no longer guaranteed
5344 initialized by the front-end.
5345 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5346 braces around b4_user_stype since this is no longer done by the
5347 front-end.
5348 * src/files.c, src/files.h (pre_prologue_obstack,
5349 post_prologue_obstack): Remove.
5350 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5351 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5352 with digraphs. This fixes lex params and parse params.
5353 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5354 * src/output.c (prepare): Remove muscle insertion of the prologues.
5355 (output): Remove freeing of pre_prologue_obstack and
5356 post_prologue_obstack.
5357 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5358 than prologue_augment for prologue parsing so you don't need prologue
5359 obstacks.
5360 (grammar_declaration): For %union RHS, use `braceless' instead of
5361 "{...}" so that braces are already stripped and code is escaped with
5362 digraphs.
5363 * src/reader.c (prologue_augment): Remove.
5364 (reader): Remove initialization of pre_prologue_obstack and
5365 post_prologue_obstack.
5366 * src/reader.h (prologue_augment): Remove.
5367
5368 * data/c.m4: Remove stray parenthesis.
5369
53702007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5371
5372 Remove quotes from variables names in %define directives and from
5373 qualifiers in %code directives, and restrict the characters that are
5374 allowed in them to M4-friendly ones. For %define, continue to support
5375 the quoted form as a deprecated feature. Discussed starting at
5376 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5377 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5378 %code.
5379 * doc/bison.texinfo (Prologue Alternatives): Update.
5380 (Decl Summary): In %defines entry, update mention of `%code requires'
5381 and `%code provides'.
5382 (C++ Location Values): Update %define uses.
5383 (Calc++ Parser Interface): Likewise.
5384 (Calc++ Parser): Likewise, and update `%code requires' uses.
5385 (Table of Symbols): Update %code documentation.
5386 * src/parse-gram.y (prologue_declaration): For %define variables, use
5387 `variable' instead of `STRING'.
5388 (grammar_declaration): For %code qualifiers, use `ID' instead of
5389 `STRING'.
5390 (variable): New nonterminal that takes an `ID' or a `STRING'.
5391 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5392 and %define uses.
5393 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5394 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5395 (%define errors): Update %define uses.
5396
53972007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5398
5399 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5400 instead of muscle_insert for %define values so that M4-special
5401 characters are replaced with digraphs.
5402 * tests/input.at (%define errors): Extend to check weird values.
5403
54042007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5405
5406 Instead of having skeletons declare all valid %define variables and
5407 %code qualifiers, provide macros that retrieve the associated values
5408 and build these lists automatically. Thus Bison will now warn when a
5409 variable or qualifier is not used by the skeleton in the current
5410 invocation regardless of whether it might sometimes be used by that
5411 skeleton in other invocations. Also, move all %define value macros to
5412 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5413 form, which is replaced by %code.
5414 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5415 (b4_check_user_names): ... this, and change the series of valid name
5416 arguments to a single list argument for names used in the skeleton
5417 similar to the existing list argument for names used in the grammar.
5418 Warn instead of complaining.
5419 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5420 values and %code code, to format %code code properly, and to build
5421 lists of all %define variables and %code qualifiers used in the
5422 skeleton: b4_skeleton_percent_define_variables and
5423 b4_skeleton_percent_code_qualifiers.
5424 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5425 Remove, and...
5426 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5427 the skeleton names lists can finish building first. In place of
5428 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5429 expect the lists b4_user_percent_define_variables and
5430 b4_user_percent_code_qualifiers.
5431 * data/c++.m4: Where setting default values for b4_parser_class_name,
5432 b4_location_type, b4_filename_type, b4_namespace, and
5433 b4_define_location_comparison, update their names to the
5434 b4_percent_define_ namespace.
5435 * data/glr.c: Don't use b4_check_percent_define_variables and
5436 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5437 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5438 (b4_parser_class_name, b4_namespace): Define these using
5439 b4_get_percent_define for parser_class_name and namespace.
5440 * data/location.cc: Use b4_get_percent_define.
5441 * data/push.c: Don't use b4_check_percent_define_variables and
5442 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5443 * data/yacc.c: Likewise, and don't call m4_exit in
5444 b4_use_push_for_pull_if or m4_wrap code will never execute.
5445 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5446 Rename to...
5447 (muscle_grow_user_name_list): ... this for consistency with the
5448 terminology used in bison.m4.
5449 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5450 %define variable names, and rename muscle used_percent_define_variables
5451 to user_percent_define_variables.
5452 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5453 user_percent_code_qualifiers.
5454 (content): Remove.
5455 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5456 {CODE} form is no longer accepted.
5457 * tests/input.at (Reject bad %code qualifiers): Rename to...
5458 (Reject unused %code qualifiers): ... this, and update test output.
5459 (%define error): Update test output.
5460
54612007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5462
5463 Check for unrecognized %define variables similar to checking for
5464 unrecognized %code qualifiers. Check for redefined %define variables.
5465 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5466 generalizes...
5467 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5468 (b4_check_percent_define_variables): New, also wraps it.
5469 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5470 variables using b4_check_percent_define_variables.
5471 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5472 all those exercised in the test suite and all those listed in the
5473 `Default values' section of c++.m4. Are there others?
5474 * data/push.c, data/yacc.c: Declare no valid %define variables.
5475 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5476 similar to muscle_find, but it works even when the muscle stores a
5477 const value.
5478 (muscle_grow_used_name_list): New function for constructing the used
5479 name list muscles that b4_check_for_unrecognized_names requires.
5480 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5481 %define'd more than once. Define the b4_used_percent_define_variables
5482 muscle with muscle_grow_used_name_list.
5483 (grammar_declaration): Abbreviate %code code with
5484 muscle_grow_used_name_list.
5485 * tests/input.at (%define errors): New.
5486
54872007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5488
5489 Provide warn_at, complain_at, and fatal_at function callbacks to the
5490 skeletons, and use this for %code qualifier complaints.
5491 * data/bison.m4 (b4_error_at): New, invoked by...
5492 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5493 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5494 @fatal_at(...@) directives.
5495 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5496 qualifiers in b4_used_percent_code_qualifiers and to use
5497 b4_complain_at.
5498 * src/location.c, src/location.h (boundary_set_from_string): New global
5499 function.
5500 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5501 function.
5502 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5503 to b4_used_percent_code_qualifiers.
5504 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5505 function.
5506 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5507 (lineno): Rename to...
5508 (out_lineno): ... this so I don't misunderstand it again.
5509 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5510 here; these newlines are in the input but not the output file.
5511 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5512 (at_directive_perform): ... this new static function, and add handling
5513 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5514 directives.
5515 * tests/input.at (Reject bad %code qualifiers): Update test output with
5516 locations and extend.
5517
5518 * tests/output.at (Output file name: [, Output file name: ]): Remove
5519 bogus comment about these tests failing.
5520
55212007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5522
5523 Clean up b4_check_percent_code_qualifiers a little.
5524 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5525 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5526 documentation and add examples.
5527 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5528 qualifiers here.
5529
55302007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5531
5532 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5533 unreliable -- especially when they're hidden inside another macro.
5534 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5535 data/c.m4: Remove m4_divert(-1).
5536 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5537 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5538 m4_divert_push(0) and m4_divert_pop(0).
5539 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5540 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5541 pushed and popped by m4sugar, should be first on the stack.
5542
5543 Provide warn, complain, and fatal function callbacks to the skeletons.
5544 This provides more flexibility than m4_fatal, improves the error
5545 message format, and captures messages for translation. Discussed
5546 starting at
5547 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5548 * data/bison.m4 (b4_error): New, invoked by...
5549 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5550 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5551 directives. Because these M4 macros might be called when the current
5552 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5553 the previous removal of uses of m4_divert, which caused trouble.
5554 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5555 m4_fatal to report unrecognized %code qualifiers.
5556 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5557 push parser requests.
5558 * data/glr.c: Use b4_complain instead of m4_fatal to report
5559 non-deterministic push parser requests.
5560 Update @output usage to @output(...@) form.
5561 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5562 report missing %defines. Update @output usage to @output(...@) form.
5563 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5564 @output(...@) form.
5565 * src/main.c (main): Invoke skel_scanner_free.
5566 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5567 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5568 obstack_for_string from flex-scanner.h.
5569 (YY_DECL): Use to declare skel_lex static.
5570 (decode_at_digraphs): Remove; now handled in the new
5571 SC_AT_DIRECTIVE_ARG start condition.
5572 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5573 functions.
5574 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5575 at_directive_argv): New static globals.
5576 (INITIAL): Use fail_for_invalid_at.
5577 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5578 recognize the start of a generalized `@directive(...@)' form and
5579 start...
5580 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5581 directive args (using the new obstack_for_string), to decode the
5582 contained @ diagraphs, and to perform the directive. It recognizes
5583 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5584 @output(...@).
5585 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5586 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5587 `@,'.
5588 (scan_skel): Initialize obstack_for_string on the first call.
5589 (skel_scanner_free): New function to free obstack_for_string.
5590 * tests/input.at (Reject bad %code qualifiers): Update test output.
5591
55922007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5593
5594 Consolidate the 4 prologue alternative directives (%code, %requires,
5595 %provides, and %code-top) into a single %code directive with an
5596 optional qualifier field. Discussed at
5597 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5598 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5599 alternatives.
5600 * doc/bison.texinfo (Prologue Alternatives): Update.
5601 (Decl Summary): Update to %code "requires" and %code "provides".
5602 (Calc++ Parser): Update to %code "requires".
5603 (Table of Symbols): Remove entries for %requires, %provides, and
5604 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5605 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5606 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5607 which are skeleton-specific.
5608 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5609 declare what %code qualifiers it supports and to complain if any other
5610 qualifiers were used in the grammar.
5611 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5612 and b4_user_code([b4_percent_code_provides]) in place of
5613 b4_user_requires and b4_user_provides.
5614 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5615 Add b4_user_code([b4_percent_code_top]) and
5616 b4_user_code([b4_percent_code]).
5617 Invoke b4_check_percent_code_qualifiers.
5618 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5619 PERCENT_REQUIRES): Remove.
5620 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5621 %requires. Rewrite the %code RHS as the unqualified form defining the
5622 muscle b4_percent_code. Add another RHS for the qualified %code form,
5623 which defines muscles of the form b4_percent_code_QUALIFIER and the
5624 b4_used_percent_code_qualifiers muscle.
5625 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5626 PERCENT_REQUIRES): Remove.
5627 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5628 %code "requires" and %code "provides".
5629 * tests/input.at (Reject bad %code qualifiers): New.
5630
56312007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5632
5633 Use the new code_props interface for destructors and printers.
5634 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5635 printer_location members, and change the type of the destructor and
5636 printer members to code_props.
5637 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5638 symbol_printer_get, semantic_type_destructor_set,
5639 semantic_type_printer_set, default_tagged_destructor_set,
5640 default_tagless_destructor_set, default_tagged_printer_set,
5641 default_tagless_printer_set): Use code_props in arguments and return
5642 types in place of char const * and location.
5643 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5644 since the locations are now contained in the return of
5645 symbol_destructor_get and symbol_printer_get.
5646 * src/output.c (symbol_destructors_output, symbol_printers_output):
5647 Replace with...
5648 (symbol_code_props_output): ... this to eliminate duplicate code.
5649 (output_skeleton): Update to use symbol_code_props_output.
5650 * src/reader.c (symbol_should_be_used): Update use of
5651 symbol_destructor_get.
5652 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5653 Update uses of the various _destructor_set and _printer_set functions.
5654 * src/symtab.c: (default_tagged_destructor_location,
5655 default_tagless_destructor_location, default_tagged_printer_location,
5656 default_tagless_printer_location): Remove since we...
5657 (default_tagged_destructor, default_tagless_destructor,
5658 default_tagged_printer, default_tagless_printer): ... change the type
5659 of these to code_props.
5660 (symbol_new, semantic_type_new, symbol_destructor_set,
5661 semantic_type_destructor_set, symbol_destructor_get,
5662 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5663 symbol_check_alias_consistency, default_tagged_destructor_set,
5664 default_tagless_destructor_set, default_tagged_printer_set,
5665 default_tagless_printer_set): Update.
5666 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5667 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5668 code_props members.
5669 (symbol_print): Use SYMBOL_CODE_PRINT.
5670
56712007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5672
5673 Use the new code_props interface for rule actions.
5674 * src/symlist.h (symbol_list): Replace action, action_location, and
5675 used members with a code_props action_props member.
5676 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5677 grammar_midrule_action, grammar_current_rule_merge_set,
5678 grammar_current_rule_symbol_append, packgram): Update.
5679 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5680 * src/scan-code.l (handle_action_dollar): Update.
5681 (translate_rule_action): Remove, no longer used.
5682 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5683
56842007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5685
5686 Use the new code_props interface in parse-gram.y.
5687 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5688 Update all uses of translate_* functions to use the new code_props
5689 interface and to use gram_scanner_last_string_free and
5690 code_scanner_last_string_free where possible.
5691 (grammar_declaration): symbol_list_destructor_set and
5692 symbol_list_printer_set now perform the translation, so don't do it
5693 here. Use gram_scanner_last_string_free where possible.
5694 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5695 translate_code): Remove, no longer used.
5696 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5697 symbol_list_printer_set): Perform code translation here rather than
5698 depending on the caller to do so.
5699
5700 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5701 * src/scan-gram.h (gram_last_string): Remove declaration.
5702 * src/scan-gram.l (last_string): Declare it static.
5703
57042007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5705
5706 Encapsulate code properties and related functionality for the various
5707 destructors, printers, and actions into a code_props structure and
5708 interface. This patch merely implements code_props in scan-code.h and
5709 scan-code.l. Future patches will rewrite other modules to use it.
5710 Discussed starting at
5711 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5712 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5713 consistently initialize const structs that have an empty location
5714 field.
5715 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5716 to ensure consistency.
5717 * src/scan-code.h (code_props): New structure.
5718 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5719 function, macro, and const global variable for initializing a
5720 code_props with no code.
5721 (code_props_plain_init, code_props_symbol_action_init,
5722 code_props_rule_action_init, code_props_translate_code): The rest of
5723 the new code_props functional interface. Among other things, the init
5724 functions set the code_props kind field so that
5725 code_props_translate_code will know whether to behave like
5726 translate_symbol_action, translate_rule_action, or translate_code.
5727 These old translate functions must remain until all other modules are
5728 updated to use the new code_props interface.
5729 (code_scanner_last_string_free): New function similar to
5730 gram_scanner_last_string_free.
5731 (code_scanner_free): Add documentation.
5732 * src/scan-code.l: Implement the new interface.
5733 (code_lex): Make it static, add a code_props* argument, and remove the
5734 rule argument.
5735 (last_string): New static global similar to the one in scan-gram.l.
5736 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5737 instead of rule.
5738 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5739 code_props since Bison may one day use this information for destructors
5740 and printers.
5741 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5742 (handle_action_dollar): Use symbol_list_n_get and set used flag
5743 directly since symbol_list_n_used_set is removed.
5744 (translate_action): Add a code_props* argument and remove the rule,
5745 action, and location arguments. Pass the code_props* on to code_lex.
5746 (translate_rule_action, translate_symbol_action, translate_code):
5747 Rewrite as wrappers around the new code_props interface.
5748 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5749 it would eventually need to break the encapsulation of code_props.
5750
57512007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5752
5753 * etc/.cvsignore: New.
5754
57552007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5756
5757 Add maintainer-push-check to run maintainer-check using push parsing in
5758 place of pull parsing where available.
5759 * Makefile.am (maintainer-push-check): New.
5760 * data/bison.m4 (b4_use_push_for_pull_if): New.
5761 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5762 appropriately based on their existing values.
5763 (yypush_parse): Don't print push-parser-specific diagnostics if push
5764 parsing is being used in place of pull parsing.
5765 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5766 push.c.
5767 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5768 variable, and insert b4_use_push_for_pull_flag into muscles.
5769 * tests/Makefile.am (maintainer-push-check): New.
5770
57712006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5772
5773 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5774 (whether successful or failed) so that yypush_parse can be invoked
5775 again to start a new parse using the same yypstate.
5776 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5777 check multiple yypull_parse invocations on the same yypstate. For pull
5778 mode, extend to check multiple yyparse invocations.
5779 (Exploding the Stack Size with Alloca): Extend to try with
5780 %push-pull-parser.
5781 (Exploding the Stack Size with Malloc): Likewise.
5782
5783 * tests/calc.at (Simple LALR Calculator): Don't specify
5784 %skeleton "push.c" since %push-pull-parser implies that now.
5785 * tests/headers.at (export YYLTYPE): Don't check for the push
5786 declarations. Otherwise, this test case can't be used to see if push
5787 mode can truly emulate pull mode.
5788 * tests/input.at (Torturing the Scanner): Likewise.
5789 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5790 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5791 AT_YACC_IF, which now includes the case of push mode since %skeleton
5792 need not be used for push mode. This will be more intuitive once
5793 push.c is renamed to yacc.c.
5794
57952006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5796
5797 For push mode, convert yyparse from a macro to a function, invoke yylex
5798 instead of passing a yylexp argument to yypull_parse, and don't
5799 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5800 Discussed starting at
5801 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5802 * data/bison.m4 (b4_pull_if): New.
5803 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5804 * data/push.c: Improve M4 quoting a little.
5805 (b4_generate_macro_args, b4_parenthesize): Remove.
5806 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5807 any time a pull parser is requested.
5808 Don't #define this as a wrapper around yypull_parse. Instead, when
5809 both push and pull are requested, make it a function that does that
5810 same thing.
5811 (yypull_parse): If there's a b4_prefix, #define this to
5812 b4_prefix[pull_parse] when both push and pull are requested.
5813 Don't define this as a function unless both push and pull are
5814 requested.
5815 Remove the yylexp argument and hard-code yylex invocation instead.
5816 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5817 %push-parser.
5818 * src/getargs.c (pull_parser): New global initialized to true.
5819 * getargs.h (pull_parser): extern it.
5820 * src/output.c (prepare): Insert pull_flag muscle.
5821 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5822 (prologue_declaration): Set both push_parser and pull_parser = true for
5823 %push-pull-parser. Set push_parser = true and pull_parser = false for
5824 %push-parser.
5825 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5826 %push-parser since there's no backward-compatibility concern here.
5827 Scan %push-pull-parser.
5828 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5829 instead of %push-parser.
5830 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5831 prototype it in the module that calls yyparse.
5832 * tests/input.at (Torturing the Scanner): Likewise.
5833 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5834
58352006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5836
5837 Update etc/bench.pl. Optimize push mode a little (the yyn change
5838 deserves most of the credit).
5839 * Makefile.am (SUBDIRS): Add etc subdirectory.
5840 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5841 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5842 yytoken, yyval, and yyloc declarations to...
5843 (yyparse or yypush_parse): ... here to improve performance. For
5844 yypush_parse invocations after the first, be sure to assign yyn its old
5845 value again.
5846 (yypstate_new): Don't bother initializing the yyresult field since the
5847 initial value isn't used.
5848 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5849 remove the #define that, in push mode, set it to yyps->NAME.
5850 * etc/Makefile.am: New.
5851 * etc/bench.pl: Remove and build it instead from...
5852 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5853 "tests/bison" from the build directory by default rather than just
5854 invoking "bison" from $PATH.
5855 (calc_grammar): Update push parser code: don't declare yylval globally,
5856 don't define yyparse_wrapper, and don't #define yyparse.
5857 (bench_grammar): Update to check all working combinations of yacc.c,
5858 push.c, impure, pure, pull, and push.
5859
58602006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5861
5862 For push mode, add pull wrappers around yypush_parse.
5863 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5864 (yypull_parse): New function wrapping yypush_parse.
5865 (yyparse): New #define wrapping yypull_parse.
5866 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5867 is declared.
5868 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5869 prototype yylex in the module that calls yyparse, and don't prototype
5870 yyparse there. Otherwise, the yyparse expansion won't compile.
5871 * tests/input.at (Torturing the Scanner): Likewise.
5872
58732006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5874
5875 Enable push parsers to operate in impure mode. Thus, %push-parser no
5876 longer implies %pure-parser. The point of this change is to move
5877 towards being able to test the push parser code by running the entire
5878 test suite as if %push-parser had been declared.
5879 * data/push.c (yypush_parse): For impure mode, remove the
5880 yypushed_char, yypushed_val, and yypushed_loc arguments.
5881 Instead, declare these as local variables initialized to the global
5882 yychar, yylval, and yylloc.
5883 For the first yypush_parse invocation only, restore the initial values
5884 of these global variables when it's time to read a token since they
5885 have been overwritten.
5886 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5887 %push-parser.
5888 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5889 %pure-parser along with %push-parser since this test case was designed
5890 for pure push parsers.
5891 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5892 (AT_YACC_OR_PUSH_IF): New.
5893 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5894 add a note that it's still wrong for some cases (as it has been for a
5895 while).
5896 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5897 %push-parser no longer implies %pure-parser.
5898
58992006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5900
5901 Remove some unnecessary differences between the pull parser code and
5902 the push parser code. This patch enables yynerrs in push mode.
5903 * data/push.c: Reformat M4 a little.
5904 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5905 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5906 because push mode is on. Instead, if pure mode is on, move yynerrs
5907 to...
5908 (b4_declare_parser_state_variables): ... here.
5909 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5910 to yyps->NAME so it can be used in yypush_parse.
5911 (yypush_parse): Don't omit uses of yynerrs in push mode.
5912
59132006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5914
5915 Fix bug such that the first pushed token's value and location are
5916 sometimes overwritten (sometimes by %initial-action) before being used.
5917 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5918 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5919 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5920 more closely mimic the pull parser logic.
5921 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5922 time to read a token, which is after any initialization of yylval and
5923 yylloc.
5924 (gottoken): Rename label to...
5925 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5926 user namespace.
5927
59282006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5929
5930 Rearrange initialization of the parser state variables so that the
5931 skeleton doesn't have to have a copy for pull mode and another for push
5932 mode. This patch also fixes at least a bug such that yylloc was not
5933 initialized (with b4_location_initial_line and
5934 b4_location_initial_column) upon calling yypush_parse. However, that
5935 initialization now overwrites the first token's location;
5936 %initial-action assigning @$ already did the same thing, and both bugs
5937 will be fixed in a later patch.
5938 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5939 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5940 yyss, yyvs, yyls, and yystacksize.
5941 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5942 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5943 yylsp.
5944 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5945 yyps->NAME so it can be used in yypush_parse.
5946 (yyparse or yypush_parse): For yypush_parse, don't print the
5947 "Starting parse" diagnostic for invocations after the first.
5948 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5949 yypush_parse, only do it for the first invocation.
5950 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5951 initialization to occur in yypush_parse but only on the first
5952 invocation.
5953
59542006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5955
5956 * data/push.c: Add CPP guards around push parser declarations in both
5957 the header and the code file.
5958 In the code file, move the push parser declarations to the same place
5959 they appear in the header file.
5960 Clean up the M4 some, especially the inconsistent underquoting in
5961 some b4_c_function_def and b4_c_function_decl uses.
5962
59632006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5964
5965 Encapsulate the push parser state variables into an M4 macro so the
5966 push skeleton doesn't have to list them again for pull mode's yyparse.
5967 For push mode, remove yypush_parse's local equivalents of these
5968 variables to eliminate unnecessary copying between the two sets at
5969 run-time. This patch also fixes at least a bug related to multiple
5970 %initial-action invocations in push mode.
5971 * data/push.c (b4_declare_parser_variables): Rename to...
5972 (b4_declare_scanner_communication_variables): ... this for clarity and
5973 update both uses.
5974 (b4_declare_yyparse_variables): Remove and move its contents to the one
5975 spot where it was invoked.
5976 (b4_declare_parser_state_variables): New macro containing the parser
5977 state variables required by push mode.
5978 (struct yypstate): Replace all fields but yynew with
5979 b4_declare_parser_state_variables.
5980 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5981 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5982 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5983 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5984 parser state variable declarations with
5985 b4_declare_parser_state_variables.
5986 Don't initialize parser state variables when calling yypush_parse since
5987 yypstate_new already does that.
5988 Invoke the user's initial action only upon the first yypush_parse
5989 invocation.
5990 Remove all code that copies between the local parser state variables
5991 and the yypstate.
5992
59932006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5994
5995 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5996 prevent a name collision in a future patch where these names will
5997 sometimes be #define'd.
5998 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5999 since it no longer has the same name as the existing argument.
6000 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6001
60022006-12-19 Paolo Bonzini <bonzini@gnu.org>
6003 and Joel E. Denny <jdenny@ces.clemson.edu>
6004
6005 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6006 that the argument is case-insensitive, and there's no `=' here.
6007 For the %skeleton entry, mention that %language is better.
6008 (Bison Options): Likewise for --language and --skeleton. Move the
6009 --skeleton entry so that the `Tuning the parser' section is sorted
6010 alphabetically on long options.
6011 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6012 %language directive in detail here; cross-reference the %language
6013 documentation instead.
6014 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6015 `%require "2.3b"' so that the example is always up-to-date.
6016 (Table of Symbols): Add entries for %language and %skeleton.
6017 * examples/extexi (normalize): Instead of replacing every %require
6018 argument with the current Bison version, just substitute for
6019 `@value{VERSION}'. This guarantees that we're testing what actually
6020 appears in the documentation.
6021 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6022 rather than `@VERSION@'.
6023
60242006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6025
6026 * NEWS: Reword the %language news a bit, and put it earlier.
6027
6028 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6029 Rewrite to simplify the logic.
6030 (language_argmatch): Likewise.
6031 (program_name): We now own this var.
6032 * src/getargs.h (struct bison_language): Use char[] rather than
6033 const char *.
6034
6035 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6036 Java is supported.
6037 * src/complain.c (program_name): Remove decl; no longer needed.
6038 * src/main.c (program_name): Remove; now belongs to getargs.
6039
60402006-12-18 Paolo Bonzini <bonzini@gnu.org>
6041
6042 * NEWS: Document %language.
6043
6044 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6045
6046 * data/c-skel.m4, data/c++-skel.m4: New files.
6047 * data/glr.c: Complain on push parsers.
6048
6049 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6050 over %skeleton.
6051 (Decl Summary): Document %language and %skeleton.
6052 (Command line): Document -L.
6053
6054 * examples/extexi: Rewrite %require directive.
6055 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6056
6057 * src/files.c (compute_exts_from_gc): Look in language structure
6058 for .y extension.
6059 (compute_file_name_parts): Check whether .tab should be added.
6060 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6061 (language, skeleton_arg, language_argmatch): New.
6062 (long_options): Add --language.
6063 (getargs): Use skeleton_arg, add -L/--language.
6064 * src/getargs.h: Include location.h.
6065 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6066 * src/output.c (prepare): Pick default skeleton from struct language.
6067 Don't dispatch C skeletons here.
6068 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6069 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6070 * src/scan-gram.l ("%language"): New rule.
6071
6072 * tests/calc.at: Test %skeleton and %language.
6073 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6074 (AT_GLR_IF): Look for %skeleton "glr.cc".
6075 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6076 (AT_YACC_IF): Reject %language.
6077
60782006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6079
6080 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6081 since it wasn't used; only the typedef name 'semantic_type' is needed.
6082 Also, omit trailing white space.
6083
6084 * bootstrap: Sync from coreutils.
6085 (gnulib_extra_files): Add build-aux/announce.gen.
6086 (slurp): Adjust .gitignore files like .cvsignore files.
6087 * build-aux/announce-gen: Remove from CVS, since bootstrap
6088 now creates this.
6089
60902006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6091
6092 Make %push-parser imply %pure-parser. This fixes several bugs; see
6093 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6094 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6095 pure_parser = true.
6096 * data/push.c: Don't bother testing b4_push_if when deciding whether
6097 to expand b4_declare_parser_variables globally.
6098 (yypush_parse): Likewise in here.
6099
6100 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6101 (yy_reduce_print): Reformat M4 for readability.
6102
61032006-12-15 Bob Rossi <bob@brasko.net>
6104 and Joel Denny <jdenny@ces.clemson.edu>
6105
6106 * data/push.c (yypstate): Add typedef, and update all uses of
6107 struct yypstate to just yypstate.
6108 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6109
61102006-12-14 Bob Rossi <bob@brasko.net>
6111
6112 * data/push.c (yypush_parse): Declare prototype regardless of
6113 %locations option.
6114
61152006-12-14 Bob Rossi <bob@brasko.net>
6116
6117 * data/push.c (yyparse): Remove the prototype and the #define when in
6118 push-parser mode.
6119
61202006-12-13 Bob Rossi <bob@brasko.net>
6121
6122 * data/push.c (yypstate_init): Rename to...
6123 (yypstate_new): ... this and use b4_c_function_def.
6124 (yypstate_delete): New.
6125 (yypush_parse): Change parameters yynval and yynlloc to be const.
6126 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6127 yypstate_delete functions.
6128
61292006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6130
6131 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6132 strange test case titles. Reported by Bob Rossi.
6133
61342006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6135
6136 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6137 of potential ambiguities in GLR grammers.
6138
61392006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6140
6141 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6142 `bison ', use m4_index instead of m4_substr since chopping up a string
6143 containing M4-special characters causes problems here.
6144
6145 Fix a couple of bugs related to special characters in user-specified
6146 file names, and make it easier for skeletons to compute output file
6147 names with the same file name prefix as Bison-computed output file
6148 names.
6149 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6150 b4_parser_file_name and b4_spec_defines_file instead of
6151 @output_parser_name@ and @output_header_name@, which are now redundant.
6152 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6153 b4_parser_file_name, b4_spec_defines_file, and the new
6154 @basename(FILENAME@) instead of @output_parser_name@ and
6155 @output_header_name@, which inappropriately escaped the file names as
6156 C string literals.
6157 * src/files.c (all_but_ext): Remove static qualifier.
6158 (compute_output_file_names): Move `free (all_but_ext)' to...
6159 (output_file_names_free): ... here since all_but_ext is needed later.
6160 * src/files.h (all_but_ext): Extern.
6161 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6162 exactly what MUSCLE_INSERT_STRING used to do.
6163 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6164 characters are escaped properly.
6165 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6166 all_but_ext.
6167 For pkgdatadir muscle, maintain previous functionality by using
6168 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6169 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6170 digraphs would never be expanded. Hopefully no one has M4-special
6171 characters in his Bison installation path.
6172 * src/scan-skel.l: Don't parse @output_header_name@ and
6173 @output_parser_name@ anymore since they're now redundant.
6174 In @output, use decode_at_digraphs.
6175 Parse a new @basename command that invokes last_component.
6176 (decode_at_digraphs): New.
6177 (BASE_QPUTS): Remove unused.
6178 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6179 (Output file name): New tests.
6180
61812006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6182
6183 Warn about output files that are generated by the skeletons and that
6184 conflict with other output files.
6185 * data/glr.c: Don't generate the header file here when glr.cc does.
6186 * src/files.c (file_names, file_names_count): New static globals.
6187 (compute_output_file_names): Invoke output_file_name_check for files
6188 not generated by the skeletons and remove existing checks.
6189 (output_file_name_check): New function that warns about conflicting
6190 output file names.
6191 (output_file_names_free): Free file_names.
6192 * src/files.h (output_file_name_check): Declare.
6193 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6194 the skeletons.
6195 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6196 (Conflicting output files): New tests.
6197
61982006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6199
6200 * doc/bison.texinfo: Fix a couple of typos.
6201
62022006-12-08 Bob Rossi <bob@brasko.net>
6203
6204 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6205 Rename to...
6206 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6207 update all uses.
6208 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6209 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6210 local pv.
6211 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6212 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6213
62142006-12-07 Bob Rossi <bob@brasko.net>
6215 and Joel Denny <jdenny@ces.clemson.edu>
6216
6217 * data/push.c (yypvarsinit): Change return type from void* to struct
6218 yypvars*. No longer cast to void* on return.
6219 (struct yypvars): Remove yylen since it need not be remembered between
6220 yypushparse invocations.
6221 (yypushparse): Don't copy between yylen and pv->yylen.
6222
62232006-12-05 Bob Rossi <bob@brasko.net>
6224
6225 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6226 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6227 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6228 (struct yypvars): Remove b4_declare_parser_variables.
6229 (yypvarsinit): Remove init code for removed variables.
6230 (global scope): Do not declare b4_declare_parser_variables if
6231 push or pure mode.
6232 (yypushparse): Add b4_declare_parser_variables.
6233 Init new local variables, and remove init code for removed
6234 yypvars variables.
6235 (yyparse): Delete.
6236 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6237 and yyparse for other modes.
6238 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6239 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6240 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6241 (AT_PURE_LEX_IF): True if pure or push parser.
6242
62432006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6244
6245 Document Yacc prologue alternatives and default %destructor's and
6246 %printer's as experimental. Don't mention Java yet. Discussed at
6247 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6248 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6249 (2.3a): Annotate this entry to say the old forms of these features were
6250 also experimental.
6251 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6252 Table of Symbols): Say they're experimental. Comment out any mention
6253 of Java (we'll want this back eventually).
6254
62552006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6256
6257 Support a file name argument to %defines. Deprecate `=' in
6258 %file-prefix, %name-prefix, and %output. Discussed at
6259 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6260 * NEWS (2.3a+): Mention.
6261 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6262 form of %defines, and remove `=' from entries for %file-prefix,
6263 %name-prefix, and %output.
6264 * src/parse-gram.y (prologue_declaration): Implement.
6265 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6266 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6267 all but one occurrence of %name-prefix.
6268 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6269 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6270 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6271 occurrence of each of %file-prefix and %output. Add check for %defines
6272 with argument.
6273 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6274 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6275 Remove the `=' from %output.
6276
62772006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6278
6279 Don't escape $ in test case titles since Autoconf 2.61 now does that
6280 correctly.
6281 * tests/actions.at (Default %printer and %destructor are not for error
6282 or $undefined): Here.
6283 (Default %printer and %destructor are not for $accept): Here.
6284 * tests/input.at (Invalid $n and @n): Here.
6285
62862006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6287
6288 Rename <!> to <>. Discussed starting at
6289 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6290 * NEWS (2.3a+): Update.
6291 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6292 Update.
6293 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6294 * src/scan-gram.l (INITIAL): Implement.
6295 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6296 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6297 comment.
6298 * tests/actions.at (Default tagless %printer and %destructor,
6299 Default tagged and per-type %printer and %destructor,
6300 Default %printer and %destructor are not for error or $undefined,
6301 Default %printer and %destructor are not for $accept,
6302 Default %printer and %destructor for mid-rule values): Update.
6303 * tests/input.at (Default %printer and %destructor redeclared,
6304 Unused values with default %destructor): Update.
6305
63062006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6307
6308 Don't let %prec take a nonterminal.
6309 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6310 token.
6311 * tests/input.at (%prec takes a token): New test checking that %prec
6312 won't take a nonterminal.
6313
63142006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6315
6316 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6317 it was double-quoted.
6318 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6319 grammar is maintained with Bison's highest standards.
6320 * src/getargs.c: Fix some typos in Doxygen comments.
6321
63222006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6323
6324 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6325 later. Reported by Paul Eggert in
6326 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6327 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6328 * src/scan-code.l (translate_action): Don't bother invoking
6329 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6330 (code_scanner_free): Instead of invoking
6331 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6332 which frees more.
6333 * src/scan-gram.l (gram_scanner_free): Likewise.
6334 * src/scan-skel.l (scan_skel): Likewise.
6335
63362006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6337
6338 * src/files.c (tr): Change return type to void.
6339 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6340 has been called previously for the same key.
6341 (muscle_find): Return storage instead of value so that
6342 --enable-gcc-warnings doesn't produce warnings that the return discards
6343 const. aver that the value and storage are the same since storage
6344 could potentially be NULL when value is not.
6345 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6346 same as 0.
6347
63482006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6349
6350 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6351 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6352 us a slightly cleaner distribution, and also works.
6353 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6354 gnulib changes.
6355
63562006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6357 and Paul Eggert <eggert@cs.ucla.edu>
6358
6359 Don't let Bison leak memory except when it complains.
6360 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6361 (spec_defines_file, dir_prefix): Now char *, not const char *,
6362 since they are freed.
6363 * src/files.c: Likewise.
6364 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6365 Likewise.
6366 (tr): Now operates in-place. All uses changed.
6367 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6368 values.
6369 (compute_file_name_parts, compute_output_file_names): Don't store
6370 read-only data in variables that will be freed.
6371 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6372 src_extension, and header_extension.
6373 (output_file_names_free): New public function to free
6374 spec_verbose_file, spec_graph_file, spec_defines_file,
6375 parser_file_name, and dir_prefix.
6376 * src/getargs.c (getargs): Don't store read-only data in variables that
6377 will be freed.
6378 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6379 (which previously existed but was unused), and quotearg_free.
6380 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6381 * src/muscle_tab.c: Likewise.
6382 (muscle_entry): Make the value char const *,
6383 and add a new storage member that is char * and can be freed.
6384 (muscle_entry_free): New private function.
6385 (muscle_init): Use it instead of free.
6386 (muscle_insert, muscle_grow): Update and use new storage member.
6387 (muscle_code_grow): Free the string passed to muscle_grow
6388 since it's not needed anymore.
6389 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6390 add a new `char *code' member.
6391 ("{...}"): Declare semantic type as code.
6392 * src/scan-code.h (translate_rule_action):
6393 (translate_symbol_action, translate_code, translate_action): Return
6394 `char const *' rather than `char *' since external code should not free
6395 these strings.
6396 * src/scan-code.l: Likewise.
6397 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6398 which is "{...}" in the parser.
6399 * tests/Makefile.am (maintainer-check-valgrind): Set
6400 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6401 Valgrind.
6402 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6403 complain.
6404 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6405 expecting a non-zero exit status sets --leak-check=summary and
6406 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6407 this case, and we don't want to hear about it.
6408
64092006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6410
6411 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6412 instead of from the template, to simplify configuration a bit.
6413 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6414 and m4/wint_t.m4, as they are needed with the latest gnulib.
6415
64162006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6417
6418 Disable unset/unused mid-rule value warnings by default, and recognize
6419 --warnings=midrule-values to enable them. Discussed starting at
6420 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6421 * NEWS (2.3a+): Mention.
6422 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6423 warnings): Add entry for midrule-values subargument.
6424 * src/reader.c (symbol_should_be_used): Don't return true just because
6425 the value is a set/used mid-rule value unless
6426 --warnings=midrule-values was specified.
6427 * tests/input.at (Unused values, Unused values before symbol
6428 declarations): Run tests with and without --warnings=midrule-values.
6429
6430 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6431 than LIST_FREE directly.
6432
64332006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6434
6435 Finish implementing --warnings=error, which should not be implied by
6436 --warnings=all (or by its synonyms -W and --warnings without
6437 subarguments).
6438 * src/complain.c (set_warning_issued): New function to report that
6439 warnings are being treated as errors and to record an error if so.
6440 Invoke...
6441 (warn_at, warn): ... here.
6442 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6443 "error - warnings are errors" does not appear above "all - all of the
6444 above".
6445 (getargs): For -W and --warnings without subarguments, don't let
6446 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6447 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6448
64492006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6450
6451 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6452 empty subargument list. For example: `bison --warnings= parser.y'.
6453
64542006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6455
6456 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6457 the parser header file so that gcc doesn't warn.
6458
64592006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6460
6461 Split the default %destructor/%printer into two kinds: <*> and <!>.
6462 Discussed starting at
6463 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6464 * NEWS (2.3a+): Mention.
6465 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6466 previous change today related to mid-rules.
6467 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6468 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6469 (TYPE_TAG_ANY): Add as <*>.
6470 (TYPE_TAG_NONE): Add as <!>.
6471 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6472 for <*> and <!>.
6473 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6474 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6475 * src/symlist.c (symbol_list_default_new): Split into tagged and
6476 tagless versions.
6477 (symbol_list_destructor_set, symbol_list_printer_set): Split
6478 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6479 SYMLIST_DEFAULT_TAGLESS.
6480 * src/symlist.h: Update symbol_list_default*_new prototypes.
6481 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6482 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6483 * src/symtab.c (default_destructor, default_destructor_location,
6484 default_printer, default_printer_location): Split each into tagged and
6485 tagless versions.
6486 (symbol_destructor_get, symbol_destructor_location_get,
6487 symbol_printer_get, symbol_printer_location_get): Implement tagged
6488 default and tagless default cases.
6489 (default_destructor_set, default_printer_set): Split each into tagged
6490 and tagless versions.
6491 * src/symtab.h: Update prototypes.
6492 * tests/actions.at (Default %printer and %destructor): Rename to...
6493 (Default tagless %printer and %destructor): ... this, and extend.
6494 (Per-type %printer and %destructor): Rename to...
6495 (Default tagged and per-type %printer and %destructor): ... this, and
6496 extend.
6497 (Default %printer and %destructor for user-defined end token): Extend.
6498 (Default %printer and %destructor are not for error or $undefined):
6499 Update.
6500 (Default %printer and %destructor are not for $accept): Update.
6501 (Default %printer and %destructor for mid-rule values): Extend.
6502 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6503 (Unused values with default %destructor): Extend.
6504
65052006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6506
6507 Don't apply the default %destructor/%printer to an unreferenced midrule
6508 value. Mentioned at
6509 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6510 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6511 like $@n instead of just @n so that the default %destructor/%printer
6512 logic doesn't see them as user-defined symbols.
6513 (symbol_is_dummy): Check for both forms of the name.
6514 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6515 name for which the midrule value is referenced in any action.
6516 * tests/actions.at (Default %printer and %destructor for mid-rule
6517 values): New test.
6518 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6519 for change to dummy symbol names.
6520
65212006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6522
6523 Warn about unset midrule $$ if the corresponding $n is used.
6524 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6525 $n usage.
6526 (packgram): Before invoking grammar_rule_check on any rule, make sure
6527 all actions have already been scanned in order to set `used' flags.
6528 Otherwise, checking that a midrule's $$ is set will not always work
6529 properly because the midrule check must forward-reference the midrule's
6530 parent rule.
6531 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6532 warning.
6533
65342006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6535
6536 More improvements to the documentation of the prologue alternatives:
6537 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6538 Bison manual.
6539 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6540 some text to clarify the relative importance of the new directives and
6541 to show how these directives may be viewed as code labels.
6542
65432006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6544
6545 Similar to the recently removed %before-header, add %code-top as the
6546 alternative to the pre-prologue. Mentioned at
6547 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6548 Also, let the prologue alternatives appear in the grammar section.
6549 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6550 (prologue_declaration): Move the existing prologue alternatives to...
6551 (grammar_declaration): ... here and add %code-top.
6552 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6553
6554 Clean up and extend documentation for the prologue alternatives.
6555 * NEWS (2.3a+): Describe prologue alternatives.
6556 * doc/bison.texinfo (Prologue): Move discussion of prologue
6557 alternatives to...
6558 (Prologue Alternatives): ... this new section, and extend it to discuss
6559 all 4 directives in detail.
6560 (Table of Symbols): Clean up discussion of prologue alternatives and
6561 add %code-top.
6562
65632006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6564
6565 DJGPP specific issues.
6566
6567 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6568 config.bat accordingly.
6569 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6570 * djgpp/config.site: Likewise.
6571
65722006-10-16 Paolo Bonzini <bonzini@gnu.org>
6573
6574 Replace %*-header with %provides, %requires, %code. See discussion at
6575 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6576
6577 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6578 (b4_user_start_header): Remove.
6579 * data/glr.c: Use new macros instead of b4_*start_header
6580 and b4_*end_header.
6581 * data/glr.cc: Likewise.
6582 * data/lalr1.cc: Likewise.
6583 * data/push.c: Likewise.
6584 * data/yacc.c: Likewise.
6585
6586 * doc/bison.texinfo: Remove %before-header, rename
6587 %{start,end,after}-header to %requires, %provides, %code.
6588
6589 * src/parse-gram.y: Likewise (also rename token names accordingly).
6590 * src/scan-gram.l: Likewise.
6591 * tests/actions.at: Likewise.
6592
65932006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6594
6595 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6596 Problem reported by Joel E. Denny.
6597
65982006-10-14 Jim Meyering <jim@meyering.net>
6599
6600 (Sync from coreutils.)
6601 Work also when the working directory (with e.g. coreutils sources)
6602 is version controlled with git, rather than CVS.
6603 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6604 rather than CVS.
6605 In messages and comments, say e.g., "checked-out sources",
6606 rather than "CVS sources".
6607 (version_controlled_file): New function. Work for git as well as
6608 for CVS. Don't use grep's -q option.
6609 (slurp): Call it here, in place of CVS-specific code.
6610
66112006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6612
6613 Fix testsuite for ./configure --enable-gcc-warnings:
6614 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6615 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6616 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6617 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6618 * test/regression.at (Diagnostic that expects two alternatives):
6619 Likewise.
6620
66212006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6622
6623 * bootstrap.conf (gnulib_modules): Add config-h.
6624 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6625 worry about HAVE_CONFIG_H.
6626 * lib/abitset.c: Likewise.
6627 * lib/bitset.c: Likewise.
6628 * lib/bitset_stats.c: Likewise.
6629 * lib/bitsetv-print.c: Likewise.
6630 * lib/bitsetv.c: Likewise.
6631 * lib/ebitset.c: Likewise.
6632 * lib/get-errno.c: Likewise.
6633 * lib/lbitset.c: Likewise.
6634 * lib/subpipe.c: Likewise.
6635 * lib/timevar.c: Likewise.
6636 * lib/vbitset.c: Likewise.
6637 * lib/bitset.c: Include "bitset.h" first, to test interface.
6638 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6639 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6640 * lib/bitsetv.c: Include "bitsetv.h" first.
6641 * lib/get-errno.c: Include "get-errno.h" first.
6642 * m4/.cvsignore: Add config-h.m4.
6643 * tests/actions.at (Default %printer and %destructor for ...):
6644 Adjust expected line numbers in output to reflect removal of #if
6645 HAVE_CONFIG_H lines.
6646 * tests/glr-regression.at (Missed %merge type warnings when ...):
6647 Likewise.
6648 * tests/regression.at (Braced code in declaration in rules section):
6649 Likewise.
6650 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6651 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6652 Include <config.h> unconditionally.
6653
6654 * bootstrap: Sync from coreutils, as follows:
6655
6656 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6657
6658 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6659 variable was sometimes used without being initialized. This
6660 messed up the installation of the INSTALL file in some cases.
6661
6662 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6663
6664 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6665 --copy. Inspired by a suggestion from Bruno Haible.
6666
6667 2006-10-03 Jim Meyering <jim@meyering.net>
6668
6669 * bootstrap: Undo last change to this file, since now gnulib-tool
6670 sticks with the automake default in generating dependencies.
6671
66722006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6673
6674 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6675 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6676
6677 * doc/bison.1: Add copyright notice.
6678
6679 * data/glr.c: Don't include <stdarg.h>; not used.
6680
6681 * NEWS: The -g and --graph options now output graphs in Graphviz
6682 DOT format, not VCG format.
6683 * doc/bison.1: Likewise.
6684 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6685 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6686 of this change in
6687 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6688 * TODO: Remove Graphviz entry.
6689 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6690 remove vcg.c, vcg.h, vcg_defaults.h.
6691 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6692 * src/graphviz.c, src/graphviz.h: New files.
6693 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6694 * src/files.h: Make comment more generic.
6695 * src/main.c (main): Likewise.
6696 * src/print_graph.h: Likewise.
6697 * src/getargs.c (usage): Make usage description more generic.
6698 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6699 (static_graph, fgraph): Remove. All uses changed to pass
6700 arguments instead of sharing a static var.
6701 (print_core, print_actions, print_state, print_graph):
6702 Output graphviz format rather than VCG format.
6703 * tests/.cvsignore: Remove *.vcg; add *.dot.
6704 * tests/output.at: Expect *.dot files, not *.vcg files.
6705
6706 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6707 accommodates the 2006-10-08 change.
6708
67092006-10-11 Bob Rossi <bob@brasko.net>
6710
6711 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6712 (b4_yyssa, b4_yyerror_range): New macros.
6713 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6714 (yypvarsinit): Remove init of removed fields.
6715 (yypushparse): Remove use of removed fields; use new macros instead.
6716
67172006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6718
6719 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6720 in a push parser. Reindent slightly to match yacc.c better.
6721
67222006-10-11 Bob Rossi <bob@brasko.net>
6723
6724 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6725 yymsg_alloc fields.
6726 (yypvarsinit, yypushparse): Remove init of removed fields.
6727 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6728
67292006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6730
6731 * THANKS: Add Paolo Bonzini and Bob Rossi.
6732
67332006-10-08 Paolo Bonzini <bonzini@gnu.org>
6734
6735 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6736 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6737 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6738 b4_define_user_cde and uses): Remove.
6739 (b4_comment, b4_prefix, b4_sync_start): New.
6740 * data/bison.m4: New file, with most of the content removed from c.m4.
6741 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6742 * src/output.c (output_skeleton): Pass bison.m4.
6743 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6744 only if specified.
6745
67462006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6747
6748 Fix test failure reported by Tom Lane in
6749 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6750 and try to make such failures easier to catch in the future.
6751 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6752 that's now the caller's responsibility.
6753 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6754 Set yychar = YYEOF if it's negative.
6755 * tests/actions.at (yylex): Abort if asked to read past EOF.
6756 * tests/conflicts.at (yylex): Likewise.
6757 * tests/cxx-type.at (yylex): Likewise.
6758 * tests/glr-regression.at (yylex): Likewise.
6759 * tests/input.at (yylex): Likewise.
6760 * tests/regression.at (yylex): Likewise.
6761 * tests/torture.at (yylex): Likewise.
6762
67632006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6764
6765 Fix problems with translating English-language diagnostics.
6766 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6767 respect to bison-runtime pot generation. The YY_ stuff
6768 wasn't being captured.
6769 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6770 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6771 * runtime-po/POTFILES.in: Add data/push.c.
6772
67732006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6774
6775 Merge bootstrap changes from coreutils.
6776
6777 2006-09-28 Jim Meyering <jim@meyering.net>
6778
6779 Automatically generated dependencies are important even
6780 when all of the sources in a directory come from gnulib.
6781 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6782 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6783
6784 2006-09-23 Jim Meyering <jim@meyering.net>
6785
6786 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6787
6788 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6789
6790 * bootstrap: Add support for --force.
6791 (usage): New function. Describe usage less tersely.
6792 (CVS_only_file): New var.
6793
67942006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6795
6796 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6797 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6798 Adjust white space and comments to match GNU style better.
6799
68002006-09-20 Bob Rossi <bob@brasko.net>
6801
6802 * data/push.c (yyresult_get): Remove function.
6803 (YYPUSH_MORE): Add #define.
6804 (yypushparse): Modify return value.
6805
68062006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6807
6808 * stamp-h.in: Remove; no longer needed.
6809 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6810 Remove config.h, config.hin, intl (no longer created).
6811 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6812 stamp-h1.
6813
6814 Sync bootstrap from coreutils, as follows:
6815
6816 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6817
6818 * bootstrap (symlink_to_gnulib): New function.
6819 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6820 to copies-of-gnulib.
6821 (cp_mark_as_generated, slurp, gnulib_files):
6822 Avoid making a copy if it's the same as the old version.
6823 (gnulib_files): Add support for this variable (used by Bison).
6824
68252006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6826
6827 * src/getargs.c (usage): Rework to use conventions similar to
6828 coreutils, to make translation a bit easier and the code a bit
6829 smaller. Problem reported by Tim Van Holder.
6830
68312006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6832
6833 Use some of gnulib's new modules, taken from coreutils.
6834
6835 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6836 * bootstrap.conf: New file.
6837 (gnulib_modules): Add configmake, inttypes, unistd.
6838 (XGETTEXT_OPTIONS): Add complain, complain_at,
6839 fatal, fatal_at, warn, warn_at, unexpected_end.
6840 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6841 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6842 (gl_EARLY): Add.
6843 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6844 (gl_INIT): Add
6845 (GNULIB_AUTOCONF_SNIPPET): Remove.
6846 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6847 the pickiest.
6848 * lib/.cvsignore: Add inttypes_.h.
6849 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6850 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6851 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6852 no-longer-necessary initializations.
6853 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6854 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6855 use the unistd module.
6856 * src/system.h: Likewise.
6857 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6858 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6859 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6860 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6861 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6862 * src/system.h: Include inttypes.h unconditionally, now that we
6863 use the inttypes module. Don't bother to include stdint.h, since
6864 inttypes.h now does that for us.
6865 (LOCALEDIR): Remove, now that we use the configmake module.
6866 * src/getargs.c: Include configmake.h.
6867 * src/main.c: Likewise.
6868 * src/output.c: Likewise.
6869 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6870 not from $abs_top_builddir, since config.h moved.
6871
6872
6873 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6874 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6875
6876 * src/parse-gram.y (symbol_declaration): Don't put statements
6877 before declarations; it's not portable to C89.
6878 * src/scan-code.l (handle_action_at): Likewise.
6879
6880 * src/scan-code.l: Always initialize braces_level; the old code
6881 left it uninitialized and therefore had undefined behavior.
6882
6883 Don't attempt to redefine 'assert', since it runs afoul of
6884 systems where standard headers (mistakenly) include <assert.h>.
6885 Instead, define and use our own alternative, called 'aver'.
6886 * src/reader.c: Don't include assert.h, since we no longer
6887 use assert.
6888 * src/scan-code.l: Likewise.
6889 * src/system.h (assert): Remove, replacing with....
6890 (aver): New function, taking a bool arg. All uses changed.
6891 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6892 not merely an integer.
6893
68942006-09-15 Bob Rossi <bob@brasko.net>
6895
6896 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6897 * data/c.m4 (YYPUSH): New.
6898 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6899 * src/getargs.c (push_parser): New var.
6900 * src/getargs.h (push_parser): New declaration.
6901 * src/output.c (prepare): Add macro insertion of `push_flag'.
6902 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6903 (prologue_declaration): Parse %push-parser.
6904 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6905 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6906 list of removed lines from the traces observed.
6907 (AT_CHECK_CALC_LALR): Added push parser tests.
6908
69092006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6910
6911 * NEWS: Version 2.3a.
6912 * configure.ac (AC_INIT): Likewise.
6913
6914 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6915 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6916 due to header ordering dependencies. I don't know why the #define
6917 was there.
6918
6919 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6920 runtime cost when YYDEBUG is not defined, and so that some tests
6921 that used to fail now work. Problem and initial suggestion by
6922 Paolo Bonzini.
6923 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6924 * data/glr.cc (b4_parser_class_name):
6925 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6926 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6927 (yydebug_) [YYDEBUG]: New member.
6928 (yycdebug_): Now defined only if YYDEBUG.
6929 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6930 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6931 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6932 if YYYDEBUG.
6933 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6934 Define only if YYDEBUG.
6935 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6936 set_debug_level.
6937 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6938 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6939 AT_CHECK_CALC_GLR_CC that are working now.
6940
69412006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6942
6943 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6944 We don't need them in glr.cc, and glr.c defines them.
6945 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6946 assumes that defining it to anything is the same as defining
6947 it to 1. Problem reported by Paolo Bonzini.
6948
69492006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6950
6951 * data/c.m4 (b4_null, b4_case): Define.
6952 * src/output.c (prepare_symbols): Use b4_null.
6953 (user_actions_output): Use b4_case.
6954
69552006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6956
6957 * data/glr.c (b4_shared_declarations): Put start-header first,
6958 before any #includes that we generate, so that feature-test
6959 macros work. Problem reported by Michael Deutschmann in
6960 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6961 * data/lalr1.cc: Likewise.
6962 * doc/bison.texinfo (Prologue): Document that feature-test macros
6963 should be defined before any Bison declarations.
6964 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6965 that depend on location.hh after, not before, Bison decls, since
6966 we now include location.hh after the first user prologue.
6967
6968 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6969 Sander Brandenburg in
6970 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6971 Also, fix minor white space and comment issues.
6972 (Prologue): Mention that it's better to define feature-test macros
6973 before Bison declarations. Problem reported by Michael Deutschmann.
6974
6975 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6976 by Jim Meyering.
6977 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6978 This adjusts to recent gnulib changes.
6979
69802006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6981
6982 Finish implementation of per-type %destructor/%printer. Discussed
6983 starting at
6984 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6985 and
6986 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6987 * NEWS (2.3+): Add a description of this feature to the default
6988 %destructor/%printer description.
6989 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6990 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6991 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6992 list node contains a semantic type.
6993 * src/symtab.c, src/symtab.h: Extend with a table that associates
6994 semantic types with their %destructor's and %printer's.
6995 (semantic_type_from_uniqstr, semantic_type_get,
6996 semantic_type_destructor_set, semantic_type_printer_set): New functions
6997 composing the public interface of that table.
6998 (symbol_destructor_get, symbol_destructor_location_get,
6999 symbol_printer_get, symbol_printer_location_get): If there's no
7000 per-symbol %destructor/%printer, look up the per-type before trying
7001 the default.
7002 * tests/actions.at (Per-type %printer and %destructor): New test case.
7003 * tests/input.at (Default %printer and %destructor redeclared):
7004 Extend to check that multiple occurrences of %symbol-default in a
7005 single %destructor/%printer declaration is an error.
7006 (Per-type %printer and %destructor redeclared, Unused values with
7007 per-type %destructor): New test cases.
7008
70092006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7010
7011 Require default %destructor/%printer to be declared using
7012 %symbol-default instead of an empty symbol list, and start working on
7013 new per-type %destructor/%printer. Discussed at
7014 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7015 * NEWS (2.3+): Add %symbol-default to example.
7016 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7017 (Table of Symbols): Add entry for %symbol-default.
7018 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7019 (generic_symlist, generic_symlist_item): New nonterminals for creating
7020 a list in which each item is a symbol, semantic type, or
7021 %symbol-default.
7022 (grammar_declaration): Use generic_symlist in %destructor and %printer
7023 declarations instead of symbols.1 or an empty list.
7024 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7025 for changes to symbol_list.
7026 * src/reader.c: Update for changes to symbol_list.
7027 * src/scan-code.l: Likewise.
7028 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7029 * src/symlist.c, src/symlist.h: Extend such that a list node may
7030 represent a semantic type or a %symbol-default in addition to just an
7031 ordinary symbol. Add switched functions for setting %destructor's and
7032 %printer's.
7033 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7034 %destructor/%printer declarations.
7035
70362006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7037
7038 Whether the default %destructor/%printer applies to a particular symbol
7039 isn't a question of whether the user *declares* that symbol (in %token,
7040 for example). It's a question of whether the user by any means
7041 *defines* the symbol at all (by simply using a char token, for
7042 example). $end is defined by Bison whereas any other token with token
7043 number 0 is defined by the user. The error token is always defined by
7044 Bison regardless of whether the user declares it with %token, but we
7045 may one day let the user define error as a nonterminal instead.
7046 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7047 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7048 the meaning of "user-defined".
7049 * tests/actions.at (Default %printer and %destructor for user-declared
7050 end token): Rename to...
7051 (Default %printer and %destructor for user-defined end token): ...
7052 this.
7053
7054 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7055 computation of whether to apply the default, don't maintain a list of
7056 every Bison-defined symbol. Instead, just check for a first character
7057 of '$', which a user symbol cannot have, and check for the error token.
7058
70592006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7060
7061 Don't apply the default %destructor or %printer to the error token,
7062 $undefined, or $accept. This change fits the general rule that the
7063 default %destructor and %printer are only for user-declared symbols,
7064 and it solves several difficulties that are described in the new test
7065 cases listed below.
7066 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7067 * tests/actions.at (Default %printer and %destructor are not for error
7068 or $undefined, Default %printer and %destructor are not for $accept):
7069 New test cases.
7070
70712006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7072
7073 Allow %start after the first rule.
7074 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7075 when parsing the first rule.
7076 (check_and_convert_grammar): Search for it here after all grammar
7077 declarations have been parsed. Skip midrules, which have dummy LHS
7078 nonterminals.
7079 * src/symtab.c (symbol_is_dummy): New function.
7080 * src/symtab.h (symbol_is_dummy): Declare it.
7081 * tests/input.at (%start after first rule): New test.
7082
70832006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7084
7085 Redo some of the previous commit: add back the ability to use
7086 non-aliased/undeclared string literals since it might be useful to
7087 those declaring %token-table.
7088 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7089 commit: don't worry about complaints from symbols_pack.
7090 * src/symtab.c (symbol_new, symbol_class_set,
7091 symbol_check_alias_consistency): Undo changes in previous commit: count
7092 each string literal as a new symbol and token, assign it a symbol
7093 number, and don't complain about non-aliased string literals.
7094 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7095 and token counts but does still set aliased tokens to the same number,
7096 symbol_pack_processor now leaves empty slots in the symbols array.
7097 Remove those slots.
7098 * tests/regression.at (Undeclared string literal): Remove test case
7099 added in previous commit since non-aliased string literals are allowed
7100 again.
7101 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7102 remove unnecessary string literal declarations.
7103 * tests/sets.at (Firsts): Likewise.
7104
71052006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7106
7107 Don't allow an undeclared string literal, but allow a string literal to
7108 be used before its declaration.
7109 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7110 symbols_pack complained.
7111 * src/symtab.c (symbol_new): Don't count a string literal as a new
7112 symbol.
7113 (symbol_class_set): Don't count a string literal as a new token, and
7114 don't assign it a symbol number since symbol_make_alias does that.
7115 (symbol_make_alias): It's not necessary to decrement the symbol and
7116 token counts anymore. Don't assume that an alias declaration occurs
7117 before any uses of the identifier or string, and thus don't assert that
7118 one of them has the highest symbol number so far.
7119 (symbol_check_alias_consistency): Complain if there's a string literal
7120 that wasn't declared as an alias.
7121 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7122 symbol_pack asserts that every token has been assigned a symbol number
7123 although undeclared string literals have not.
7124 * tests/regression.at (String alias declared after use, Undeclared
7125 string literal): New test cases.
7126 (Characters Escapes, Web2c Actions): Declare string literals as
7127 aliases.
7128 * tests/sets.at (Firsts): Likewise.
7129
71302006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7131
7132 In the grammar scanner, STRING_FINISH unclosed constructs and return
7133 them to the parser in order to improve error messages.
7134 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7135 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7136 * tests/input.at (Unclosed constructs): New test case.
7137 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7138 seen.
7139
7140 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7141 unused global.
7142
71432006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7144
7145 Handle string aliases for character tokens correctly.
7146 * src/symtab.c (symbol_user_token_number_set): If the token has an
7147 alias, check and set its alias's user token number instead of its own,
7148 which is set to indicate the alias. Previously, every occurrence of
7149 the character token in the grammar overwrote that alias indicator with
7150 the character code.
7151 * tests/input.at (String aliases for character tokens): New test.
7152
71532006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7154
7155 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7156
71572006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7158
7159 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7160 to prevent failures when building on older platforms.
7161 Check for autopoint failure.
7162 Set XGETTEXT_OPTIONS to values that check for C format strings,
7163 so that translators are warned about them (this also helps
7164 prevent core dumps).
7165
7166 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7167 function, since it simplifies our code a bit.
7168
7169 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7170 rather than -W, so we don't get bogus warnings about sign comparisons.
7171 Add -Wpointer-arith, since that warning is useful (it reports code
7172 that does not conform to C89 and that some compilers reject).
7173 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7174 since it's no longer needed.
7175
71762006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7177
7178 Clean up scanners a bit.
7179 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7180 definitions so gcc won't warn when obstack_for_string is unused.
7181 * src/scan-code.l: config.h and system.h are already #include'd by
7182 scan-code-c.c, so get rid of them here.
7183 * src/scan-gram.l: Likewise.
7184 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7185 definitions rather than duplicating the rest of it.
7186 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7187
71882006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7189
7190 Suppress signed/unsigned comparison warnings for yycheck.
7191 * data/c.m4 (b4_safest_int_type): New macro.
7192 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7193 a signed int type, cast it to b4_safest_int_type first.
7194 * data/yacc.c: Likewise.
7195 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7196 also overwritten.
7197
71982006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7199
7200 * doc/bison.texinfo: Fix some typos.
7201
72022006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7203
7204 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7205 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7206
7207 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7208 the latest gnulib does this a different way.
7209 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7210 translation was patched, so stop omitting it.
7211
72122006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7213
7214 Enable declaration of default %printer/%destructor. Make the parser
7215 use these for all user-declared grammar symbols for which the user does
7216 not declare a specific %printer/%destructor. Thus, the parser uses it
7217 for token 0 if the user declares it but not if Bison generates it as
7218 $end. Discussed starting at
7219 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7220 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7221 and
7222 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7223 * NEWS (2.3+): Mention.
7224 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7225 declare a %destructor for a mid-rule's semantic value. It's just
7226 impossible to declare one specific to it.
7227 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7228 code. Describe default %destructor form.
7229 * src/parse-gram.y (grammar_declaration): Parse default
7230 %printer/%destructor declarations.
7231 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7232 and symbol_destructor_location_get rather than accessing the destructor
7233 and destructor_location members of struct symbol.
7234 (symbol_printers_output): Likewise but for %printer's.
7235 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7236 again.
7237 * src/symtab.c (default_destructor, default_destructor_location,
7238 default_printer, default_printer_location): New static global
7239 variables to record the default %destructor and %printer.
7240 (symbol_destructor_get, symbol_destructor_location_get,
7241 symbol_printer_get, symbol_printer_location_get): New functions to
7242 compute the appropriate %destructor and %printer for a symbol.
7243 (default_destructor_set, default_printer_set): New functions to set the
7244 default %destructor and %printer.
7245 * src/symtab.h: Prototype all those new functions.
7246 * tests/actions.at (Default %printer and %destructor): New test to
7247 check that the right %printer and %destructor are called, that they're
7248 not called for $end, and that $$ and @$ work correctly.
7249 (Default %printer and %destructor for user-declared end token): New
7250 test to check that the default %printer and %destructor are called for
7251 a user-declared end token.
7252 * tests/input.at (Default %printer and %destructor redeclared, Unused
7253 values with default %destructor): New tests to check related grammar
7254 warnings and errors.
7255
72562006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7257
7258 Clean up handling of %destructor for the end token (token 0).
7259 Discussed starting at
7260 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7261 and
7262 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7263
7264 Make the skeletons consistent in how they pop the end token and invoke
7265 its %destructor.
7266 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7267 state, which has token number 0, since this would invoke the
7268 %destructor for the end token.
7269 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7270 until after shifting the end token, or else it won't be popped.
7271 * data/yacc.c (yyparse): Likewise.
7272
7273 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7274 it's the end token. Upon termination, destroy an unshifted lookahead
7275 even when it's the end token.
7276 * data/lalr1.cc (yy::parser::parse): Likewise.
7277 * data/yacc.c (yyparse): Likewise.
7278
7279 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7280 value warnings for the end token when the user gives the end token a
7281 %destructor.
7282
7283 * tests/actions.at (Printers and Destructors): Test all the above.
7284
72852006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7286
7287 Update to latest gnulib and gettext versions.
7288 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7289 Add fopen-safer.
7290 (gnulib_files): Add m4/warning.m4. Don't worry about files
7291 overwritten by autopoint.
7292 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7293 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7294 rejects them.
7295 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7296 so that we can remove the intl files at a better time.
7297 (intl_files_to_remove): Remove aclocal.m4, since it gets
7298 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7299 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7300 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7301 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7302 Remove datarootdir hack; no longer needed.
7303 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7304 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7305 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7306 strdup.h.
7307 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7308 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7309
73102006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7311
7312 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7313 it with --assume-autoconf='latest-stable'.
7314
73152006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7316
7317 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7318 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7319 YYSTYPE' and `{'.
7320 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7321 those from muscle_tab.c since the old ones are misleading.
7322
73232006-07-13 Akim Demaille <akim@epita.fr>
7324
7325 Support %define "KEY" {VALUE}.
7326 * src/scan-code.h, src/scan-code.l (translate_action)
7327 (translate_rule_action, translate_symbol_action, translate_code):
7328 Return char *, not const char *.
7329 * src/parse-gram.y (declaration): Rename as...
7330 (prologue_declaration): this.
7331 (string_content): Remove this nonterminal, use STRING.
7332 (braceless, content, content.opt): New nonterminal.
7333 Use them.
7334 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7335 as value.
7336 * src/scan-gram.l (getargs.h): Don't include it.
7337
73382006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7339
7340 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7341 rather than a for-loop that declares a local bool variable. This
7342 should work around a compatibility problem with a Cray x1e C++
7343 compiler reported by Hung Nguyen in
7344 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7345 The for-loop was introduced in the 2004-11-17 change but I don't
7346 know why it was needed.
7347
73482006-07-12 Akim Demaille <akim@epita.fr>
7349
7350 * data/c.m4: Comment changes.
7351
73522006-07-10 Akim Demaille <akim@lrde.epita.fr>
7353
7354 * src/complain.c (error_message, ERROR_MESSAGE): New.
7355 To factor...
7356 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7357 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7358
73592006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7360
7361 * NEWS: Instead of %union, you can define and use your own union type
7362 YYSTYPE if your grammar contains at least one <type> tag.
7363 Your YYSTYPE need not be a macro; it can be a typedef.
7364 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7365 (Union Decl, Decl Summary): Document this.
7366 * data/glr.c (YYSTYPE): Implement this.
7367 * data/glr.cc (YYSTYPE): Likewise.
7368 * data/lalr1.cc (YYSTYPE): Likewise.
7369 * data/yacc.c (YYSTYPE): Likewise.
7370 * src/output.c (prepare): Output tag_seen_flag.
7371 * src/parse-gram.y (declaration, grammar_declaration):
7372 Use 'union_seen' rather than 'typed' to determine whether
7373 %union has been seen, since grammars can now be typed without
7374 %union.
7375 (symbol_declaration, type.opt, symbol_def):
7376 Keep track of whether a tag has been seen.
7377 * src/reader.c (union_seen, tag_seen): New vars.
7378 (typed): remove.
7379 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7380 * src/scan-code.l (untyped_var_seen): New variable.
7381 (handle_action_dollar): Adjust to above changes.
7382 (handle_action_dollar, handle_action_at):
7383 Improve overflow checking for outlandish numbers.
7384 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7385 avoid new diagnostics generated by above changes.
7386 * tests/regression.at (YYSTYPE typedef): Add test to check
7387 for type tags without %union.
7388
7389 * src/symlist.c (symbol_list_length): Return int, not unsigned
7390 int, since callers expect int. This may need to get revisited
7391 once we have proper integer overflow checking.
7392
7393 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7394 object is now static.
7395
7396 * src/getargs.c (flags_argmatch): Return void, not int,
7397 to pacify ./configure --enable-gcc-warnings.
7398
7399 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7400 since last_string is already defined to FLEX_PREFIX (last_string).
7401
74022006-07-09 Akim Demaille <akim@lrde.epita.fr>
7403
7404 Implement --warnings/-W.
7405 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7406 replaced by...
7407 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7408 Adjust callers.
7409 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7410 (warnings_args, warnings_types): New.
7411 (getargs, short_options, long_options): Accept -W/--warnings.
7412 Sort the options by alphabetical order, upper case letter right
7413 before its lower case.
7414
74152006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7416
7417 Change %merge result type clash warnings to errors. Discussed at
7418 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7419 * src/reader.c (record_merge_function_type): Use complain_at.
7420 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7421 declared later): Update test case results.
7422
74232006-07-09 Akim Demaille <akim@lrde.epita.fr>
7424
7425 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7426 to be in alphabetical order.
7427 (trace_args): Spelling fixes.
7428
74292006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7430
7431 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7432 so they don't collide with user-defined macros.
7433 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7434 this was never guaranteed, and now that we're using gnulib stdint,
7435 which defines int_fast16_t to long int, the problem is exposed.
7436
74372006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7438
7439 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7440 need the full POSIX semantics (and weren't implementing them
7441 anyway).
7442
7443 Adjust to Autoconf 2.60 and today's gnulib.
7444 * bootstrap (gnulib_modules): Add stdint.
7445 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7446 no longer copies it.
7447 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7448 since stdint needs the former and wcwidth (which is now required
7449 by mbswidth) needs the latter.
7450 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7451 work around a compatibility glitch between gettext 0.14.6 and
7452 Autoconf 2.60.
7453 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7454 Do not check for uintptr_t, since new stdint module does the right
7455 thing.
7456 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7457 Add stdint.h, stdint_.h, wcwidth.h.
7458 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7459 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7460 stdint.m4, wchar_t.m4, wcwidth.m4.
7461 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7462 usual order for ../lib/*.h files.
7463 (file_name_split): Use last_component, not base_name, to adjust
7464 to gnulib changes.
7465 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7466 for ../lib/*.h files.
7467 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7468 Define unconditionally, since we now assume the stdint module.
7469 * src/scan-skel.l: Include <dirname.h>.
7470 (BASE_QPUTS): Use last_component, not base_name.
7471 * src/system.h: Include <unlocked-io.h> in the usual order
7472 for ../lib/*.h files. Include <stdint.h> unconditionally,
7473 since we now use the stdint module.
7474 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7475 HAVE_UINTPTR_T, since we now use the stdint module.
7476 (base_name): Remove decl, since files now include <dirname.h>
7477 to get the decl.
7478
74792006-07-08 Akim Demaille <akim@lrde.epita.fr>
7480
7481 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7482 New, default to 1.
7483 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7484 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7485 default.
7486 * tests/calc.at: Adjust.
7487
74882006-07-08 Akim Demaille <akim@lrde.epita.fr>
7489
7490 * data/c.m4 (b4_basename): New.
7491 (b4_syncline): Also output the location of its invocation (from
7492 the skeleton).
7493 (b4_user_action, b4_define_user_action, b4_user_actions)
7494 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7495 (b4_user_stype): New.
7496 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7497
74982006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7499
7500 In the grammar file, the first column is 1 not 0 on the first line as
7501 on every other line.
7502 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7503 * tests/input.at (Torturing the Scanner): Update output.
7504
7505 * src/scan-gram.l (scanner_cursor): Declare it static.
7506
75072006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7508
7509 In warnings, say "previous declaration" rather than "first
7510 declaration".
7511 * src/symtab.c (redeclaration): Do that here.
7512 * src/reader.c (record_merge_function_type): In the case of a result
7513 type clash, report the previous declaration rather than the very first
7514 one in the grammar file.
7515 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7516 declared later): Add a third declaration to check this behavior.
7517 * tests/input.at (Incompatible Aliases): Update output.
7518
75192006-06-27 Akim Demaille <akim@epita.fr>
7520
7521 * doc/Doxyfile.in: New.
7522 * doc/Makefile.am: Use it.
7523 * src/lalr.h, src/symtab.h: Initial doxygenation.
7524
75252006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7526
7527 Don't miss %merge result type warnings just because the LHS types are
7528 declared after the %merge. This continues the effort of the previous
7529 patch.
7530 * src/reader.c (get_merge_function): Don't set the merger type yet.
7531 (record_merge_function_type): New function for setting the merger type
7532 and checking for clashes.
7533 (grammar_current_rule_merge_set): Set the location of the %merge for
7534 the current rule.
7535 (packgram): Invoke record_merge_function_type for each rule now that
7536 all symbol type declarations have been parsed.
7537 * src/reader.h (merger_list.type_declaration_location): New member
7538 storing the location of the first %merge from which the type for this
7539 merging function was derived.
7540 * src/symlist.h (symbol_list.merger_declaration_location): New member
7541 storing the location of a rule's %merge, if any.
7542 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7543 declared later): New test to catch the error fixed by the above patch.
7544
75452006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7546
7547 Get action warnings (grammar_rule_check) right even when symbol
7548 declarations appear after the rules. Discussed at
7549 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7550 and
7551 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7552 Don't mistake the type of $$ in a midrule to be that of its parent
7553 rule's $$.
7554 * src/reader.c (grammar_current_rule_end): Don't invoke
7555 grammar_rule_check yet since not all symbol declarations may have been
7556 parsed yet.
7557 (grammar_midrule_action): Likewise.
7558 Don't record whether the midrule's $$ has been used yet since actions
7559 haven't been translated yet.
7560 Record the midrule's parent rule and its RHS index within the parent
7561 rule.
7562 (grammar_current_rule_action_append): Don't translate the action yet
7563 since not all symbol declarations may have been parsed yet and, thus,
7564 warnings about types for $$, $n, @$, and @n can't be reported yet.
7565 (packgram): Translate the action and invoke grammar_rule_check now that
7566 all symbol declarations have been parsed.
7567 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7568 after parsing the entire grammar file, the symbol list here in the case
7569 of a midrule is actually the midrule's empty RHS, so reference its
7570 parent rule's RHS where necessary.
7571 On the other hand, now that you can already know it's a midrule, you
7572 aren't forced to think $$ has the same type as its parent rule's $$.
7573 (handle_action_at): In the case of a midrule, reference the parent rule
7574 where necessary.
7575 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7576 members.
7577 (symbol_list_length): Now that this is invoked after all rules have
7578 been parsed, a NULL symbol (rather than a NULL symbol list node)
7579 terminates a rule. symbol_list_print already does this correctly.
7580 * src/symlist.h (symbol_list.midrule_parent_rule,
7581 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7582 remember their relationships with their parents.
7583 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7584 fixed by the above patch.
7585 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7586 implementing...
7587 (Unused values): ... this old test case and...
7588 (Unused values before symbol declarations): ... this new test case.
7589 This one is the same as `Unused values' except that all symbol
7590 declarations appear after the rules in order to catch the rest of the
7591 errors fixed by the above patch.
7592
75932006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7594
7595 More cleanup.
7596 * src/reader.c (current_rule): Declare it static since it's no longer
7597 used outside this file.
7598 (grammar_current_rule_action_append): Remove redundant arguments from
7599 translate_rule_action invocation.
7600 * src/reader.h (current_rule): Remove this unused extern.
7601 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7602 * src/scan-code.l (translate_rule_action): Likewise.
7603
76042006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7605
7606 Clean up yesterday's patch.
7607 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7608 to...
7609 * src/reader.c (grammar_current_rule_action_append): ... here for
7610 consistency with grammar_current_rule_symbol_append.
7611 * tests/regression.at (Braced code in declaration in rules section):
7612 Make yyerror and yylex static as usual.
7613
76142006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7615
7616 Fix bug that mistakes braced code in a declaration in the rules section
7617 to be a rule action. Mentioned at
7618 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7619 * src/scan-gram.l: Move midrule action detection from the start of the
7620 scanning of any braced code to...
7621 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7622 action. For readability, use $2 and @2 rather than the equivalent
7623 global variables.
7624 * tests/regression.at (Braced code in declaration in rules section):
7625 New test to catch the error fixed by the above patch.
7626
7627 Work on code readability some.
7628 * src/scan-code.l (current_rule): Get rid of this misleading and
7629 redundant declaration: it's actually extern'ed in reader.h.
7630 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7631 translate_action): Add a rule argument and use it instead of the global
7632 current_rule.
7633 (translate_rule_action): This already receives current_rule through an
7634 argument, so pass it on to translate_action instead of assigning
7635 current_rule to current_rule.
7636 (translate_symbol_action, translate_code): Pass rule = NULL to
7637 translate_action.
7638
76392006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7640
7641 Rename %before-definitions to %start-header and %after-definitions to
7642 %end-header. Don't use these declarations to separate pre-prologue
7643 blocks from post-prologue blocks. Add new order-independent
7644 declarations %before-header and %after-header as alternatives to the
7645 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7646 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7647 * NEWS (2.3+): Update for these changes.
7648 * data/glr.c (b4_before_definitions): Update to...
7649 (b4_start_header): ... this.
7650 (b4_after_definitions): Update to...
7651 (b4_end_header): ... this.
7652 * data/glr.cc: Likewise.
7653 * data/lalr1.cc: Likewise.
7654 * data/yacc.c: Likewise.
7655 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7656 prologue blocks with %*-header declarations.
7657 (Calc++ Parser): Likewise.
7658 (Decl Summary): Update names.
7659 (Table of Symbols): Update description.
7660 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7661 (PERCENT_END_HEADER): ... this.
7662 (PERCENT_BEFORE_DEFINITIONS): Update to...
7663 (PERCENT_START_HEADER): ... this.
7664 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7665 (declaration): Update token names and m4 macro names.
7666 When parsing %end-header and %start-header, invoke translate_code
7667 before muscle_code_grow, and no longer set global booleans to remember
7668 whether these declarations have been seen.
7669 Parse new %after-header and %before-header.
7670 * src/reader.c (before_definitions, after_definitions): Remove.
7671 (prologue_augment): Accept a new bool argument to specify whether to
7672 augment the pre-prologue or post-prologue.
7673 * src/reader.h (before_definitions, after_definitions): Remove these
7674 extern's.
7675 (prologue_augment): Add new bool argument.
7676 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7677 (PERCENT_END_HEADER): ... this.
7678 (PERCENT_BEFORE_DEFINITIONS): Update to...
7679 (PERCENT_START_HEADER): ... this.
7680 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7681 * tests/actions.at (Printers and Destructors): Update names.
7682
76832006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7684
7685 Add comparison operators for C++ location classes. Discussed at
7686 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7687 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7688 declaration indicating whether filename_type has an operator==. If
7689 filename_type is `std::string', it defaults to `1', `0' otherwise.
7690 * data/location.cc: Iff b4_define_location_comparison is `1', add
7691 operator== and operator!= for class position and for class location.
7692
7693 Some minor fixes.
7694 * src/scan-action.l: Remove unused file.
7695 * src/symtab.c (symbol_printer_set): Use printer_location not
7696 destructor_location.
7697 * src/symtab.h (struct symbol): Replace incorrect source comment for
7698 printer members.
7699 * tests/input.at (Incompatible Aliases): Update output with correct
7700 printer location.
7701
77022006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7703
7704 Don't put the pre-prologue in the header file. For the yacc.c code
7705 file and the glr.c header and code files, move the pre-prologue before
7706 the token definitions. Add new %before-definitions and
7707 %after-definitions to declare code that will go in both the header file
7708 and code file. Discussed at
7709 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7710 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7711 and
7712 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7713 * NEWS (2.3+): Describe these changes.
7714 * data/glr.c (b4_pre_prologue): Move from within to before...
7715 (b4_shared_declarations): ... this.
7716 Add new b4_before_definitions before b4_token_enums.
7717 Add new b4_after_definitions at the end.
7718 * data/glr.cc (b4_pre_prologue): Replace with...
7719 (b4_before_definitions): ... this in the header file.
7720 (b4_after_definitions): New near the end of the header file.
7721 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7722 code file right before including the header file.
7723 (b4_before_definitions): New in the previous position of
7724 b4_pre_prologue in the header file.
7725 (b4_after_definitions): New near the end of the header file.
7726 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7727 (b4_token_enums_defines): In the code file, move to right before
7728 YYSTYPE for consistency with the header file.
7729 (b4_before_definitions): New right before b4_token_enums_defines in
7730 both the header and code file.
7731 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7732 header and code file.
7733 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7734 of prologues for %union dependencies.
7735 (Decl Summary): In %defines description, mention the effect of
7736 %before-definitions and %after-definitions on the header file.
7737 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7738 than in the pre-prologue so that make check succeeds.
7739 (Table of Symbols): Add entries for %before-definitions and
7740 %after-definitions.
7741 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7742 %before-definitions.
7743 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7744 (declaration): Parse those declarations and append to
7745 b4_before_definitions and b4_after_definitions, respectively.
7746 * src/reader.c (before_definitions, after_definitions): New bools to
7747 track whether those declarations have been seen.
7748 (prologue_augment): Add to the post-prologue if %union,
7749 %before-definitions, or %after-definitions has been seen.
7750 * src/reader.h (before_definitions, after_definitions): New extern's.
7751 * src/scan-gram.l: Scan the new declarations.
7752 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7753 prologue block in a %before-definitions or a %after-definitions based
7754 on whether the %union is declared.
7755 * tests/regression.at (Early token definitions with --yacc, Early token
7756 definitions without --yacc): Move tests for token definitions into the
7757 post-prologue since token names are no longer defined in the
7758 pre-prologue.
7759
77602006-06-20 Akim Demaille <akim@epita.fr>
7761
7762 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7763 (symbol_get): Use it.
7764 * src/parse-gram.y: Use it.
7765
77662006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7767
7768 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7769 build succeeds when configured with --enable-gcc-warnings.
7770
77712006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7772
7773 * src/parse-gram.y (char_name): New function.
7774 (CHAR, STRING, string_content): For %printer, properly escape.
7775 (ID): Prefer fputs to fprintf.
7776 (id): Reindent to be consistent with other rules.
7777 Properly quote char.
7778
7779 The Translation Project changed its way of publishing translations
7780 to maintainers. I haven't received any responses to my request
7781 for supporting the old way, or for documenting the new way. I
7782 have modified 'bootstrap' to use screen scraping
7783 (in this case, HTML scraping). This is unreliable and inelegant,
7784 but I don't see any better way. Yuck.
7785 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7786 (get_translations): New function, which uses HTML scraping to
7787 deduce locations of latest translations.
7788 Use this function to grab both bison and bison-runtime .po files.
7789 Don't bother priming the pump for the runtime-po domain any more,
7790 as it's now translated better than bison is.
7791
77922006-06-19 Akim Demaille <akim@epita.fr>
7793
7794 * src/scan-gram.l: No longer "parse" things after `%union' until
7795 `{'. Rather, return a single "%union" token.
7796 No longer make symbols: return strings, and leave the conversion
7797 to symbols to the parser.
7798 (SC_PRE_CODE, token_type): Remove.
7799 * src/parse-gram.y (%union): New field `character'.
7800 Sort tokens.
7801 (CHAR): New token.
7802 (ID, ID_COLON): Now that the scanner no longer makes them
7803 identifiers, adjust all uses to invoke symbol_get.
7804 (id_colon): New, wraps the conversion from string to symbol.
7805 (%union): Accept a possible union_name.
7806 (symbol): Now can be a char.
7807 * data/c.m4 (b4_union_name): Leave a default value.
7808 * data/glr.c, data/yacc.c: Use it.
7809
78102006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7811
7812 For associating token numbers with token names for "yacc.c", don't use
7813 #define statements unless `--yacc' is specified; always use enum
7814 yytokentype. Most important discussions start at:
7815 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7816 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7817 and
7818 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7819 * NEWS (2.3+): Mention.
7820 * data/c.m4 (b4_yacc_if): New.
7821 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7822 token #define's.
7823 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7824 on token name definitions.
7825 * src/getargs.c (usage): Capitalize `Yacc' in English.
7826 * src/output.c (prepare): Define b4_yacc_flag.
7827 * tests/regression.at (Early token definitions): Test that tokens names
7828 are defined before the pre-prologue not just before the post-prologue.
7829 Remove this test case and copy to...
7830 (Early token definitions with --yacc): ... this to test #define's.
7831 (Early token definitions without --yacc): ... and this to test enums.
7832
78332006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7834
7835 * NEWS: Reword the post-2.3 change to not be so optimistic about
7836 removing the old "look-ahead" spelling.
7837 Update previous look-ahead/lookahead change reports.
7838 * REFERENCES: look-ahead -> lookahead (since that's
7839 what he actually wrote).
7840 * doc/refcard.tex: look ahead -> lookahead,
7841 look-ahead -> lookahead
7842
78432006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7844
7845 For consistency, use `lookahead' instead of `look-ahead' or
7846 `look_ahead'. Discussed starting at
7847 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7848 and then at
7849 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7850 * NEWS: For the next release, note the change to `--report'.
7851 * TODO, doc/bison.1: Update English.
7852 * doc/bison.texinfo: Update English.
7853 (Understanding Your Parser, Bison Options): Document as
7854 `--report=lookahead' rather than `--report=look-ahead'.
7855 * src/conflicts.c: Update English in comments.
7856 (lookahead_set): Rename from look_ahead_set.
7857 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7858 (resolve_sr_conflict): Rename local look_ahead_tokens to
7859 lookahead_tokens, and update other uses.
7860 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7861 count_rr_conflicts, conflicts_free): Update uses.
7862 * src/getargs.c (report_args): Move "lookahead" before alternate
7863 spellings.
7864 (report_types): Update uses.
7865 (usage): For `--report' usage description, state `lookahead' spelling
7866 rather than `look-ahead'.
7867 * src/getargs.h (report.report_lookahead_tokens): Rename from
7868 report_look_ahead_tokens.
7869 * src/lalr.c: Update English in comments.
7870 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7871 (state_lookahead_tokens_count): Rename from
7872 state_look_ahead_tokens_count.
7873 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7874 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7875 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7876 Update other uses.
7877 Update English in output.
7878 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7879 * src/print.c: Update English in comments.
7880 (lookahead_set): Rename from look_ahead_set.
7881 (print_reduction): Rename argument lookahead_token from
7882 look_ahead_token.
7883 (print_core, state_default_rule, print_reductions, print_results):
7884 Update uses.
7885 * src/print_graph.c: Update English in comments.
7886 (print_core): Update uses.
7887 * src/state.c: Update English in comments.
7888 (reductions_new): Update uses.
7889 (state_rule_lookahead_tokens_print): Rename from
7890 state_rule_look_ahead_tokens_print, and update other uses.
7891 * src/state.h: Update English in comments.
7892 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7893 (state_rule_lookahead_tokens_print): Rename from
7894 state_rule_look_ahead_tokens_print.
7895 * src/tables.c: Update English in comments.
7896 (conflict_row, action_row): Update uses.
7897 * tests/glr-regression.at
7898 (Incorrect lookahead during deterministic GLR,
7899 Incorrect lookahead during nondeterministic GLR): Rename
7900 print_look_ahead to print_lookahead.
7901 * tests/torture.at: Update English in comments.
7902 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7903 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7904 (Many lookahead tokens): Update uses.
7905 * data/glr.c: Update English in comments.
7906 * lalr1.cc: Likewise.
7907 * yacc.c: Likewise.
7908 * src/conflicts.h: Likewise.
7909 * src/lalr.h: Likewise.
7910 * src/main.c: Likewise.
7911 * src/output.c: Likewise.
7912 * src/parse-gram.c: Likewise.
7913 * src/tables.h: Likewise.
7914 * tests/calc.at: Likewise.
7915
79162006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7917
7918 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7919
79202006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7921
7922 * TODO: Add request from Nelson H. F. Beebe to be able to install
7923 Bison without installing the yacc script.
7924
79252006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7926
7927 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7928 and yytext if they're already #define'd.
7929 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7930 * src/scan-code-c.c: ... here.
7931 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7932 <config.h>.
7933
79342006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7935
7936 Get Bison to build again when configured with --enable-gcc-warnings.
7937 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7938 missing #include's.
7939 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7940 loc argument as it shadows a global.
7941 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7942 invocation.
7943
7944 * src/.cvsignore: Add scan-code.c.
7945
79462006-06-07 Akim Demaille <akim@epita.fr>
7947
7948 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7949 to...
7950 * src/scan-code.l: here.
7951 * tests/input.at (Torturing the Scanner): Fix another location
7952 error.
7953
79542006-06-07 Akim Demaille <akim@epita.fr>
7955
7956 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7957
79582006-06-06 Akim Demaille <akim@epita.fr>
7959
7960 Extract the parsing of user actions from the grammar scanner.
7961 As a consequence, the relation between the grammar scanner and
7962 parser is much simpler. We can also split "composite tokens" back
7963 into simple tokens.
7964 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7965 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7966 rename as...
7967 * src/location.h, src/location.c (add_column_width)
7968 (location_compute): these.
7969 Fix the column count: the initial column is 0.
7970 (location_print): Be robust to ending column being 0.
7971 * src/location.h (boundary_set): New.
7972 * src/main.c: Adjust to scanner_free being renamed as
7973 gram_scanner_free.
7974 * src/output.c: Include scan-code.h.
7975 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7976 Use boundary_set.
7977 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7978 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7979 which is now, again, a separate token.
7980 Adjust all dependencies.
7981 Whereever actions with $ and @ are used, use translate_code.
7982 (action): Remove this nonterminal which is now useless.
7983 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7984 (grammar_current_rule_action_append): Use translate_code.
7985 (packgram): Bound check ruleno, itemno, and rule_length.
7986 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7987 (last_string, last_braced_code_loc, max_left_semantic_context)
7988 (scanner_initialize, scanner_free, scanner_last_string_free)
7989 (gram_out, gram_lineno, YY_DECL_): Move to...
7990 * src/scan-gram.h: this new file.
7991 (YY_DECL): Rename as...
7992 (GRAM_DECL): this.
7993 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7994 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7995 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7996 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7997 Move these declarations, and...
7998 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7999 these to...
8000 * src/flex-scanner.h: this new file.
8001 * src/scan-gram.l (rule_length, rule_length_overflow)
8002 (increment_rule_length): Remove.
8003 (last_braced_code_loc): Rename as...
8004 (gram_last_braced_code_loc): this.
8005 Adjust to the changes of the parser.
8006 Move all the handling of $ and @ into...
8007 * src/scan-code.l: here.
8008 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8009 (handle_action_dollar, handle_action_at): Move to...
8010 * src/scan-code.l: here.
8011 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8012 scan-code.h, scan-code-c.c, scan-gram.h.
8013 (EXTRA_bison_SOURCES): Add scan-code.l.
8014 (BUILT_SOURCES): Add scan-code.c.
8015 (yacc): Be robust to white spaces.
8016
8017 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8018 * tests/regression.at: Adjust the column numbers.
8019 * tests/regression.at: Adjust the error message.
8020
80212006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8022
8023 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8024 Use Akim's wording from
8025 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8026
80272006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8028
8029 Between Bison releases, manually append `+' to the previous Bison
8030 release number, and use that as a signal to automatically print the
8031 ChangeLog's CVS Id keyword from --version. Discussed starting at
8032 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8033 * ChangeLog: Add Id header.
8034 * configure.ac (AC_INIT): Append `+' to `2.3'.
8035 * src/.cvsignore: Add revision.c.
8036 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8037 (BUILT_SOURCES): Add revision.c.
8038 (revision.c): New target rule. This file defines a new global variable
8039 named revision. It initializes it with either the Id from ChangeLog
8040 or, if VERSION doesn't contain `+', with the empty string.
8041 * src/getargs.c (version): Print the value of revision.
8042 * src/revision.h: Extern revision.
8043
80442006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8045
8046 * NEWS: Version 2.3.
8047 * configure.ac (AC_INIT): Likewise.
8048
80492006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8050
8051 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8052 with no arguments, not as an object-like macro. This is for
8053 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8054 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8055 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8056 Document this.
8057
80582006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8059
8060 * src/getargs.c (usage): Back out yesterday's modification of the
8061 --help output so that we don't have to wait for translation before
8062 releasing 2.3.
8063
80642006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8065
8066 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8067 Problem reported by Akim Demaille.
8068
80692006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8070
8071 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8072
80732006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8074
8075 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8076 generated source code. Problem reported by Frans Englich in
8077 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8078
80792006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8080
8081 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8082 shell, not within 'make', so that 'make' by an ordinary builder
8083 (using GNU make) does not worry about configuring gzip. This also
8084 works around a bug reported independently by Keith Thompson and by
8085 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8086 stderr rather than stdout, messing up the build logs.
8087
80882006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8089
8090 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8091 to make sure that YYID will never be unused. This fixes a 'make
8092 maintainer-check' failure caused by the recent changes to the 'Trivial
8093 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8094 not used.
8095 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8096
80972006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8098
8099 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8100 state before an empty RHS is always resolved here. Only the location
8101 of that state is guaranteed to be resolved, and that's enough. This
8102 fixes the remaining bug reported by Derek M. Jones in
8103 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8104 * tests/glr-regression.at (Uninitialized location when reporting
8105 ambiguity): Test the above case.
8106 Also, the embedded comments in this test case claim it checks the case
8107 of an empty RHS that has inherited the initial location. However, the
8108 corresponding LHS was already resolved, so yyresolveLocations didn't
8109 actually have reason to modify it. Fix this by forcing
8110 nondeterministic operation at the beginning of the parse.
8111
81122006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8113
8114 * data/c.m4 (b4_yy_symbol_print_generate):
8115 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8116 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8117 of the bugs reported today by Derek M Jones in
8118 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8119 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8120 defined to be a type name without parens or brackets.
8121 (Location Type): Similarly for YYLTYPE.
8122 * tests/regression.at (Trivial grammars): Put in a test for this
8123 bug that will be caught by 'make maintainer-check' (though not,
8124 alas, by 'make check' unless your compiler is picky).
8125
81262006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8127
8128 * NEWS: Version 2.2.
8129 * configure.ac (AC_INIT): Likewise.
8130
81312006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8132
8133 * data/glr.c (yyreportTree): Make room in yystates for the state
8134 preceding the RHS. This fixes the segmentation fault reported by Derek
8135 M. Jones in
8136 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8137 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8138 to the user. Reported for yyreportTree by Derek M. Jones later in the
8139 same thread.
8140 * THANKS: Add Derek M. Jones.
8141 Update my email address.
8142 Fix typo in Steve Murphy's name.
8143
81442006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8145
8146 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8147 checking against YYLAST that caused the parser to miss a potential
8148 alternative in its diagnostic.
8149 Problem reported by Maria Jose Moron Fernandez in
8150 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8151 * data/lalr1.cc (yysyntax_error_): Likewise.
8152 * data/yacc.c (yysyntax_error): Likewise.
8153 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8154 tokens, in case we run into an older C compiler.
8155 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8156 Use them to check for the off-by-one error fixed above.
8157
8158 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8159 YYSIZE_T, not size_t.
8160 * tests/regression.at (Trivial grammars): New test, to catch
8161 the error fixed by the above patch.
8162
81632006-05-14 Akim Demaille <akim@lrde.epita.fr>
8164
8165 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8166 scheme.
8167 Reported by Steve Murphy.
8168
81692006-05-14 Akim Demaille <akim@lrde.epita.fr>
8170
8171 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8172 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8173
81742006-05-14 Akim Demaille <akim@lrde.epita.fr>
8175
8176 Implement --trace=m4.
8177 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8178 * src/output.c (output_skeleton): When set, pass -dV to m4.
8179
8180 Factor the handling of flags in m4.
8181 * src/output.c (prepare): Rename the muscle names debug, defines,
8182 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8183 * data/c.m4: Adjust.
8184 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8185 Use b4_define_flag_if to define other b4_FLAG_if macros.
8186 (b4_location_if): As a consequence, rename as...
8187 (b4_locations_if): this, for consistency.
8188 Adjust all the skeletons.
8189
81902006-05-14 Akim Demaille <akim@lrde.epita.fr>
8191
8192 * etc/bench.pm: Shorten bench names.
8193
81942006-05-14 Akim Demaille <akim@lrde.epita.fr>
8195
8196 * src/output.h, src/output.c (error_verbose): Move to...
8197 * src/getargs.h, src/getargs.c: here.
8198 Sort the flags.
8199 Adjust dependencies.
8200
82012006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8202
8203 * data/c.m4 (b4_copyright): Put the special exception for Bison
8204 skeletons here, so we don't have to put it in each skeleton. All
8205 uses changed. Suggested by Akim Demaille. Also, wrap the
8206 copyright notice, in case it is longer than 80 columns. Replace
8207 comma by newline after title.
8208
82092006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8210
8211 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8212 incompatibility, not a bug. Mention that it wasn't fixed as of
8213 flex 2.5.33.
8214
82152006-05-11 Akim Demaille <akim@lrde.epita.fr>
8216
8217 * examples/extexi: Enforce the precedence of concatenation over
8218 >>.
8219 Reported by Tommy Nordgren.
8220
82212006-05-11 Akim Demaille <akim@lrde.epita.fr>
8222
8223 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8224 with the member "token".
8225 Reported by Martin Nylin.
8226
82272006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8228
8229 * data/glr.c: Switch to Bison 2.2 special-exception language in
8230 the copyright notice. Use more-regular format for titles and
8231 copyright notices.
8232 * data/glr.cc: Likewise.
8233 * data/location.cc: Likewise.
8234 * data/yacc.cc: Likewise.
8235 * doc/bison.texinfo (Conditions): Document this.
8236 * NEWS: likewise. Upgrade version to 2.2.
8237
82382006-04-27 Akim Demaille <akim@lrde.epita.fr>
8239
8240 * data/glr.cc: Remove dead code.
8241
82422006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8243
8244 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8245 that variable and the line breaks the bootstrap. Problem reported
8246 by Juan M. Guerrero.
8247
82482006-04-24 Akim Demaille <akim@lrde.epita.fr>
8249
8250 * doc/bison.texinfo (Multiple start-symbols): New.
8251
82522006-04-24 Akim Demaille <akim@lrde.epita.fr>
8253
8254 * etc/README, etc/bench.pl: New.
8255
82562006-04-03 Akim Demaille <akim@lrde.epita.fr>
8257
8258 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8259 rule.
8260 Reported by Mickael Labau.
8261 * tests/input.at (Torturing the Scanner): Test it.
8262
82632006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8264
8265 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8266 Problem reported by Bob Rossi.
8267
82682006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8269
8270 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8271 and didn't really work.
8272 For the index, use @ifnotinfo, not @iftex.
8273 Minor cleanups of spacing and terminology.
8274
82752006-03-12 Akim Demaille <akim@lrde.epita.fr>
8276
8277 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8278 of AT_NAME_PREFIX when %name-prefix is not used.
8279
82802006-03-12 Akim Demaille <akim@lrde.epita.fr>
8281
8282 Apply --prefix to C++ skeletons too: they change the namespace.
8283 The test suite already exercize these cases.
8284 * data/c++.m4 (b4_namespace): New.
8285 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8286 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8287 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8288 * doc/bison.texinfo: Document it.
8289 (Option Cross Key): Use @multitable in all formats. It looks
8290 nicer, even in TeX outputs.
8291 (Rules): Use the same code whatever the output type is.
8292 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8293 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8294 * tests/calc.at: Use it, instead of hard coding `yy'.
8295
82962006-03-10 Akim Demaille <akim@lrde.epita.fr>
8297
8298 * TODO: Remove dead items.
8299
83002006-03-10 Akim Demaille <akim@lrde.epita.fr>
8301
8302 * doc/FAQ: Remove, merged into...
8303 * doc/bison.texinfo (FAQ): this.
8304 * doc/Makefile.am (EXTRA_DIST): Adjust.
8305
83062006-03-10 Akim Demaille <akim@lrde.epita.fr>
8307
8308 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8309 even if empty.
8310 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8311 * doc/bison.texinfo (Calc++ Scanner): Use it.
8312
83132006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8314
8315 Fix two nits reported by twlevo, plus one more that I discovered.
8316
8317 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8318 this is the usual Bison style.
8319 * src/location.h (location_print): Likewise.
8320
8321 * src/reader.h (token_name): Likewise.
8322
83232006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8324
8325 Fix some nits reported by twlevo.
8326 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8327 and "POSIX". Use more-modern syntax for URLs. Mention C++
8328 and ask for Java. Don't hardwire OS version numbers. Add
8329 copyright notice.
8330 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8331 * src/conflicts.c (solved_conflicts_obstack): Now static.
8332
83332006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8334
8335 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8336 page. Say "you can use it" not "you may use it" as on the web page;
8337 we're describing capabilities not granting permission.
8338
83392006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8340
8341 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8342 shadowing warnings. Use usual patter for iterating through RHS.
8343 * tests/glr-regression.at
8344 (Uninitialized location when reporting ambiguity):
8345 Modify yylex so that it uses its argument, rather than trying
8346 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8347 const char -> char const.
8348
8349 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8350 Don't use tabs inside commands; it messes up 'ps'.
8351 Problem reported by twlevo.
8352
83532006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8354
8355 * tests/glr-regression.at (Uninitialized location when reporting
8356 ambiguity): New test case.
8357 * data/glr.c (yyresolveLocations): New function, which uses
8358 YYLLOC_DEFAULT.
8359 (yyresolveValue): Invoke yyresolveLocations before reporting an
8360 ambiguity.
8361 * doc/bison.texinfo (Default Action for Locations): Note
8362 YYLLOC_DEFAULT's usage for ambiguity locations.
8363 (GLR Semantic Actions): Cross-reference those notes.
8364
83652006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8366
8367 * tests/glr-regression.at (Leaked semantic values when reporting
8368 ambiguity): Remove unnecessary union and type declarations.
8369 (Leaked lookahead after nondeterministic parse syntax error): New test
8370 case.
8371 * data/glr.c (yyparse): Check for zero stacks remaining before
8372 attempting to shift the lookahead so that you don't lose it.
8373
83742006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8375
8376 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8377 * tests/glr-regression.at (Leaked semantic values when reporting
8378 ambiguity): New test case.
8379 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8380 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8381 now unnecessary yystackp parameter.
8382 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8383 destructors can be called.
8384
8385 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8386 in existing testcases.
8387
83882006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8389
8390 Don't leak semantic values for parent RHS when a user action cuts the
8391 parser, and clean up related code a bit.
8392 * tests/glr-regression.at (Leaked merged semantic value if user action
8393 cuts parse): Rename to...
8394 (Leaked semantic values if user action cuts parse): ... this. Add check
8395 for leaked parent RHS values.
8396 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8397 between an unresolved state (non-empty chain of semantic options) and
8398 an incomplete one (signaled by an empty chain).
8399 (yyresolveStates): Document the interface. Move all manipulation of a
8400 successfully or unsuccessfully resolved yyGLRState to...
8401 (yyresolveValue): ... here so that yyresolveValue always leaves a
8402 yyGLRState with consistent data and thus is easier to understand.
8403 Remove the yyvalp and yylocp parameters since they are always just
8404 taken from the yys parameter. When reporting a discarded merged value
8405 in debugging output, note that it is incompletely merged. Document the
8406 interface.
8407 (yyresolveAction): If resolving any of the RHS states fails, destroy
8408 them all rather than leaking them. Thus, as long as user actions are
8409 written to clean up the RHS correctly, yyresolveAction always cleans up
8410 the RHS of a semantic option. Document the interface.
8411
84122006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8413
8414 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8415 led to a segmentation fault in GNU Pascal. Problem reported
8416 by Waldek Hebisch.
8417
84182006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8419
8420 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8421 mid-rule action inside a nonterminal symbol in order to declare a
8422 destructor for its semantic value.
8423
84242006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8425
8426 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8427 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8428 __cplusplus && ! defined _STDLIB_H && !
8429 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8430 defined free))]: Include <stdlib.h> rather than rolling our own
8431 declarations of malloc and free, to avoid problems with
8432 incompatible declarations (using 'throw') C++'s stdlib.h. This
8433 should fix Debian bug 340012
8434 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8435 reported by Guillaume Melquiond.
8436
84372006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8438
8439 * NEWS: Clarify symbols versus types in unused-value warnings.
8440
8441 * configure.ac (AC_INIT): Bump version number.
8442
84432006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8444
8445 * NEWS: Version 2.1a.
8446 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8447 since C99 requires this.
8448
84492006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8450
8451 * m4/c-working.m4: New file.
8452 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8453
84542006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8455
8456 * Makefile.maint: Merge from coreutils.
8457
84582006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8459
8460 More portability fixes for problems summarized by Nelson H. F. Beebe.
8461
8462 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8463 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8464 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8465 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8466 messes up because C++ code is compiled in 32-bit mode but linked
8467 in 64-bit mode.
8468
84692006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8470
8471 More portability fixes for problems summarized by Nelson H. F. Beebe.
8472
8473 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8474 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8475
8476 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8477 nodist_PROGRAMS, since we don't need to actually compile the
8478 example if we're just doing a plain 'make'. This avoids bothering
8479 the installer unnecessarily about problems due to weird C++
8480 compilers.
8481
84822006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8483
8484 More portability fixes for problems summarized by Nelson H. F. Beebe.
8485
8486 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8487 than #include "...", and compile with -I'.'. The old method was
8488 not portable, according to Posix and the C standard, and it does
8489 not work with Sun C 5.7, where previous #line directives affect
8490 the working directory used in later #include "..." directives.
8491
84922006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8493
8494 Various DJGGP specific issues in /djgpp
8495
84962006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8497
8498 More portability fixes for problems summarized by Nelson H. F. Beebe.
8499
8500 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8501 '#include <map>' works and that you can apply ++ to iterators.
8502
85032006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8504
8505 Work around portability problems summarized by Nelson H. F. Beebe in
8506 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8507
8508 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8509 that '#include <string>' works.
8510
8511 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8512 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8513 "warning: sorry: semantics of inline function static data `const
8514 unsigned char translate_table[262]' are wrong (you'll wind up with
8515 multiple copies)".
8516
8517 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8518 or, xor to not_, and_, or_, and xor_, respectively. This works
8519 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8520 random system header somewhere that includes the equivalent of
8521 <iso646.h>.
8522
8523 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8524 -E" works; it apparently doesn't work with PathScale EKO Compiler
8525 Suite Version 2.0.
8526
85272006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8528
8529 During deterministic GLR operation, user actions should be able to
8530 influence the parse by changing yychar. To make this easier to fix and
8531 to make glr.c easier to evolve in general, don't maintain yytoken in
8532 parallel with yychar; just compute yytoken when needed.
8533 * tests/glr-regression.at (Incorrect lookahead during deterministic
8534 GLR): Check that setting yychar in a user action has the intended
8535 effect.
8536 * data/glr.c (yyGLRStack): Remove yytokenp member.
8537 (yyclearin): Don't set *yytokenp.
8538 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8539 yychar rather than *yytokenp to determine the current lookahead.
8540 Compute yytoken locally when needed.
8541 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8542 point to.
8543
8544 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8545 after `--report' documentation.
8546
85472006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8548
8549 * src/parse-gram.y (grammar_declaration): Location of printer
8550 symbol is @1, not list->location. Bug reported by twlevo.
8551 * tests/input.at (Incompatible Aliases): Adjust to above change.
8552
85532006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8554
8555 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8556 all the test at once. This makes the output easier to read in the
8557 normal case.
8558
8559 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8560 got from <http://bro-ids.org/download.html>. The bug is that
8561 when two actions appeared in succession, the second one was
8562 scanned before the first one was added to the grammar rule
8563 as a midrule action. Bison then output the incorrect warning
8564 "parse.y:905.17-906.36: warning: unused value: $3".
8565 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8566 associated with a value.
8567 (rhs): Don't invoke grammar_current_rule_action_append.
8568 (action): Invoke it here instead.
8569 * src/reader.c (grammar_midrule_action): Now extern.
8570 (grammar_current_rule_action_append): Don't invoke
8571 grammar_midrule_action; that is now the scanner's job.
8572 * src/reader.h (last_string, last_braced_code_loc):
8573 (grammar_midrule_action): New decls.
8574 * src/scan-gram.l (last_string): Now extern, sigh.
8575 (last_braced_code_loc): New extern variable.
8576 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8577 rule already has an action.
8578 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8579 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8580 Add some tests to check that the above changes fixed the bug.
8581
85822006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8583
8584 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8585 All used changed. Check whether the symbol has a destructor,
8586 not whether it is typed.
8587 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8588 that the values are still reported as unused. All line numbers
8589 adjusted.
8590
85912006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8592
8593 Work around a bug in bro 0.8, which underparenthesizes its
8594 definition of YYLLOC_DEFAULT.
8595 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8596 their arguments.
8597 * data/lalr1.cc: Likewise.
8598 * data/yacc.cc: Likewise.
8599
86002006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8601
8602 Work around a bug in Pike 7.0, and give the Pike folks a
8603 better way to override the usual int widths.
8604 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8605 user can override the types.
8606 (short): #undef, to work around a bug in Pike 7.0.
8607 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8608 (union yyalloc.yyss): Use yytype_int16 rather than short.
8609 All uses changed.
8610 (yysigned_char): Remove.
8611 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8612 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8613 * tests/regression.at (Web2c Actions): Adjust to above changes.
8614
8615 * src/reader.c (check_and_convert_grammar): New function.
8616 (reader): Close the input file even if something went wrong during
8617 parsing. Minor file descriptor leak reported by twlevo.
8618
8619 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8620 to pacify gcc -Wswitch-default.
8621 * src/scan-gram.l (adjust_location): Use a default: break; case
8622 to pacify gcc -Wswitch-default.
8623 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8624 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8625 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8626 Move these decls to scan-skel.l, since they don't need to be
8627 visible elsewhere.
8628 * src/scan-skel.l: Accept the above decls.
8629 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8630 is used.
8631
86322006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8633
8634 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8635 since we don't want to insist on a version number at the start
8636 of the changelog every time.
8637 * Makefile.maint: Sync from coreutils a bit better.
8638 (sc_trailing_blank): Renamed from sc_trailing_space.
8639 All uses changed.
8640 (sc_no_if_have_config_h, sc_require_config_h):
8641 (sc_prohibit_assert_without_use): New rules.
8642 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8643 (sc_dd_max_sym_length): Fix leading spaces in rule.
8644 (sc_system_h_headers): Prefix with @.
8645 (sc_useless_cpp_parens, m4-check): Output line numbers.
8646 (changelog-check): Allow version only in head.
8647 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8648 satisfy new Makefile.maint rule.
8649 * data/glr.c: Likewise.
8650 * data/glr.cc: Likewise.
8651 * data/lalr1.cc: Likewise.
8652 * data/yacc.c: Likewise.
8653 * lib/ebitsetv.c: Likewise.
8654 * lib/lbitset.c: Likewise.
8655 * lib/subpipe.c: Likewise.
8656 * lib/timevar.c: Likewise.
8657 * src/system.h: Likewise.
8658 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8659 * djgpp/Makefile.maint: Add copyright notice.
8660 * djgpp/README.in: Likewise.
8661 * djgpp/config.bat: Likewise.
8662 * djgpp/config.site: Likewise.
8663 * djgpp/config_h.sed: Likewise.
8664 * djgpp/djunpack.bat: Likewise.
8665 * djgpp/config.sed: Fix copyright notice to match standard format.
8666 * djgpp/subpipe.h: Likewise.
8667 * lib/bitsetv-print.c: Likewise.
8668 * lib/bitsetv.c: Likewise.
8669 * lib/subpipe.h: Likewise.
8670 * lib/timevar.c: Likewise.
8671 * lib/timevar.h: Likewise.
8672 * djgpp/subpipe.c: Use standard recipe for config.h.
8673 * lib/abitset.c: Likewise.
8674 * lib/bitset.c: Likewise.
8675 * lib/bitset_stats.c: Likewise.
8676 * lib/bitsetv-print.c: Likewise.
8677 * lib/bitsetv.c: Likewise.
8678 * lib/ebitsetv.c: Likewise.
8679 * lib/get-errno.c: Likewise.
8680 * lib/lbitset.c: Likewise.
8681 * lib/subpipe.c: Likewise.
8682 * lib/timevar.c: Likewise.
8683 * lib/vbitset.c: Likewise.
8684 * tests/local.at: Likewise.
8685 * src/scan-gram.l: Don't include verify.h, since system.h does
8686 that for us.
8687 * .x-sc_require_config_h: New file.
8688 * .x-sc_unmarked_diagnostics: New file.
8689
86902006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8691
8692 Be a bit more systematic about using 'abort'.
8693 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8694 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8695 Put 'default: abort ();' before some other case, to satisfy older
8696 pedantic compilers.
8697 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8698 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8699 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8700 * src/conflicts.c (resolve_sr_conflict): Likewise.
8701 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8702 (get_decision_str, get_orientation_str, get_node_alignment_str):
8703 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8704 (get_linestyle_str, get_arrowstyle_str): Likewise.
8705 * src/conflicts.c (resolve_sr_conflict):
8706 Use a default case rather than one for the one remaining enum
8707 value, to catch invalid enum values as well.
8708 * src/lalr.c (set_goto_map, map_goto):
8709 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8710 * src/nullable.c (nullable_compute, token_definitions_output):
8711 Likewise.
8712 * src/reader.c (packgram, reader): Likewise.
8713 * src/state.c (transitions_to, state_new, state_reduction_find):
8714 Likewise.
8715 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8716 (symbol_pack): Likewise.
8717 * src/tables.c (conflict_row, pack_vector): Likewise.
8718 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8719 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8720 * src/system.h: Don't include <assert.h>.
8721 (assert): New macro.
8722
8723 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8724 (Destructor Decl, Parser Function, Pure Calling):
8725 Describe rules for braces inside C code more carefully.
8726
87272006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8728
8729 Fix some porting glitches found by Nelson H. F. Beebe.
8730 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8731 compilers that don't understand that abort () does not return.
8732 * src/state.c (transitions_to): Likewise.
8733 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8734 that '#include <cstdlib>' works.
8735 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8736 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8737 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8738 for the benefit of some pre-C99 compilers.
8739
8740 * bootstrap: Undo changes to gnulib files that autoreconf made.
8741
8742 Minor fixups to get 'make maintainer-check' to work.
8743 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8744 with the new verify.h implementation.
8745 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8746 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8747 * data/yacc.c (YYUSE): Likewise.
8748 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8749 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8750 * src/parse-gram.y (declaration): Don't pass a string constant
8751 to a function that expects char *, since GCC might complain
8752 about the constant value.
8753 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8754 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8755 before #defining them.
8756 * tests/glr-regression.at
8757 (Incorrectly initialized location for empty right-hand side in GLR):
8758 In yyerror, use the msg arg.
8759 (Corrupted semantic options if user action cuts parse):
8760 (Incorrect lookahead during deterministic GLR):
8761 (Incorrect lookahead during nondeterministic GLR):
8762 Don't name a local var 'index'; it shadows string.h's 'index'.
8763
87642006-01-19 Akim Demaille <akim@epita.fr>
8765
8766 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8767 location, not just parts of it.
8768
87692006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8770
8771 * NEWS: Document the fact that multiple %unions are now allowed.
8772 * doc/bison.texinfo (Union Decl): Likewise.
8773 * TODO: This feature is now implemented, so remove it from
8774 the wishlist.
8775
8776 * Makefile.maint: Merge with coreutils Makefile.maint.
8777 (CVS_LIST): Use build-aux version if available.
8778 (VERSION_REGEXP): New macro.
8779 (syntax-check-rules): Add sc_no_if_have_config_h,
8780 sc_prohibit_assert_without_use, sc_require_config_h,
8781 sc_useless_cpp_parens.
8782 (sc_obsolete_symbols): Check for O_NDELAY.
8783 (sc_dd_max_sym_length): Track coreutils.
8784 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8785 (sc_useless_cpp_parens): New rule.
8786 (news-date-check): Look for version or today's date.
8787 (changelog-check): Don't require version number near head.
8788 (copyright-check): Use current year instead of hardwiring 2005.
8789 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8790 (announcement): Add --gpg-key-ID.
8791
8792 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8793 with "file system".
8794
8795 Avoid undefined behavior that addressed just before the start of an
8796 array. Problem reported by twlevo.
8797 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8798 * src/lalr.c (build_relations): Rely on new sentinel.
8799 * src/gram.c (gram_free): Adjust to new sentinel.
8800
88012006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8802
8803 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8804 yylookaheadNeeds. All uses updated.
8805 (yysplitStack): Rename local yynewLookaheadStatuses to
8806 yynewLookaheadNeeds.
8807 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8808 GLR): In comments, change `lookahead status' to `lookahead need'.
8809
88102006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8811
8812 * data/glr.c (yysplitStack): A little stylistic rewrite.
8813
88142006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8815
8816 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8817
88182006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8819
8820 * doc/bison.texinfo: Fix some typos.
8821 (GLR Semantic Actions): New subsection discussing special
8822 considerations because GLR semantic actions might be deferred.
8823 (Actions): Mention look-ahead usage of yylval.
8824 (Actions and Locations): Mention look-ahead usage of yylloc.
8825 (Special Features for Use in Actions): Add YYEOF entry and mention it
8826 in the yychar entry.
8827 In the yychar entry, remove mention of the local yychar case (pure
8828 parser) since this is irrelevant information when writing semantic
8829 actions and since it's already discussed in `Table of Symbols' where
8830 yychar is otherwise described as an external variable.
8831 In the yychar entry, don't call it the `current' look-ahead since it
8832 isn't when semantic actions are deferred.
8833 In the yychar and yyclearin entries, add note about deferred semantic
8834 actions.
8835 Add yylloc and yylval entries discussing look-ahead usage.
8836 (Look-Ahead Tokens): When discussing yychar, don't call it the
8837 `current' look-ahead, and do mention yylval and yylloc.
8838 (Error Recovery): Cross-reference `Action Features' when mentioning
8839 yyclearin.
8840 (Table of Symbols): In the yychar entry, don't call it the `current'
8841 look-ahead.
8842 In the yylloc and yylval entries, mention look-ahead usage.
8843
88442006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8845
8846 * tests/glr-regression.at: Update copyright year to 2006.
8847
88482006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8849
8850 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8851 use during nondeterministic operation to track which stacks have
8852 actually needed the current lookahead.
8853 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8854 Allocate, deallocate, resize, and otherwise shuffle space for
8855 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8856 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8857 appropriately during nondeterministic operation.
8858 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8859 members to store the current lookahead to be used by the deferred
8860 user action.
8861 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8862 from which the RHS is taken. Set the lookahead members of the new
8863 yySemanticOption according to the lookahead status for stack yyk.
8864 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8865 yyaddDeferredAction.
8866 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8867 members of yySemanticOption before invoking yyuserAction, and then set
8868 them back to their current values afterward.
8869 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8870 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8871 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8872 titles for consistency.
8873 (Leaked merged semantic value if user action cuts parse): In order to
8874 suppress lint warnings, use arguments in merge function, and assign
8875 char value < 128 in main.
8876 (Incorrect lookahead during deterministic GLR): New test case.
8877 (Incorrect lookahead during nondeterministic GLR): New test case.
8878
88792006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8880
8881 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8882 !yyvaluep as signal that no semantic value is available to print.
8883 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8884 to print a semantic value.
8885
88862006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8887
8888 * tests/glr-regression.at: For consistency with my newer test cases,
8889 don't thank myself.
8890
88912006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8892
8893 * data/glr.c (yyresolveValue): When merging semantic options, if at
8894 least one user action succeeds but a later one cuts the parse, then
8895 destroy the semantic value before returning rather than leaking it.
8896 (yyresolveStates): If a user action cuts the parse and thus
8897 yyresolveValue fails, ignore the (unset) semantic value rather than
8898 corrupting the yyGLRState, and empty the semantic options list since
8899 the user actions should have called all necessary destructors.
8900 Simplify code with YYCHK.
8901 * tests/glr-regression.at (Corrupted semantic options if user action
8902 cuts parse): New test case.
8903 (Undesirable destructors if user action cuts parse): New test case.
8904 Before applying any of this patch, this test case never actually failed
8905 for me... but only because the corrupted semantic options usually
8906 masked this bug.
8907 (Leaked merged semantic value if user action cuts parse): New test
8908 case.
8909
89102006-01-05 Akim Demaille <akim@epita.fr>
8911
8912 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8913
89142006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8915
8916 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8917 _MSC_VER. Problem reported by Cenzato Marco.
8918 (b4_c_function_def): Use it.
8919 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8920 b4_c_modern.
8921 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8922 than rolling our own.
8923
89242006-01-04 Akim Demaille <akim@epita.fr>
8925
8926 Also warn about non-used mid-rule values.
8927 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8928 member.
8929 (symbol_list_new): Adjust.
8930 * src/reader.c (symbol_typed_p): New.
8931 (grammar_rule_check): Use it.
8932 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8933 Check its rule.
8934 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8935 Use it.
8936 * tests/actions.at (Exotic Dollars): Adjust.
8937
89382006-01-04 Akim Demaille <akim@epita.fr>
8939
8940 * src/reader.c (grammar_midrule_action): If $$ is set in a
8941 mid-rule, move the `used' bit to its lhs.
8942 * tests/input.at (Unused values): New.
8943 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8944
89452006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8946
8947 * doc/bison.texinfo (Bison Options): Say more accurately what
8948 --yacc does.
8949 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8950 about declarations in the grammar when in Yacc mode, as POSIX does
8951 not require a diagnostic when the grammar uses extensions.
8952
8953 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8954
8955 Warn about dubious constructions like "%token T T".
8956 Reported by twlevo.
8957 * src/symtab.h (struct symbol.declared): New member.
8958 * src/symtab.c (symbol_new): Initialize it to false.
8959 (symbol_class_set): New arg DECLARING, specifying whether
8960 this is a declaration that we want to warn about, if there
8961 is more than one of them. All uses changed.
8962
8963 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8964 Allow multiple %union directives, whose contents concatenate.
8965 * src/parse-gram.y (grammar_declaration): Likewise.
8966 Use muscle_code_grow, so that we don't need stype_line any more.
8967 All uses changed.
8968
8969 * src/muscle_tab.c (muscle_grow): Fix comment.
8970
8971 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8972 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8973 Update copyright year to 2006.
8974
89752006-01-03 Akim Demaille <akim@epita.fr>
8976
8977 Have glr.cc pass (some of) the calc.at tests.
8978 * data/glr.cc (b4_parse_param_orig): New.
8979 (b4_parse_param): Improve its definition, and bound it more
8980 clearly in the skeleton.
8981 (b4_epilogue): Append, instead of prepending, in order to keep
8982 #line consistency.
8983 Simplify the generation of auxiliary functions: locations and
8984 purity are mandated.
8985 (b4_global_tokens_and_yystype): Honor it.
8986 * data/location.cc (c++.m4): Don't include it.
8987 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8988 and AT_SKEL_CC_IF.
8989 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8990 AT_LALR1_CC_IF.
8991 Be sure to initialize the first position's filename.
8992 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8993 mandated anyway.
8994 (AT_CHECK_CALC_GLR_CC): New.
8995 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8996
89972006-01-02 Akim Demaille <akim@epita.fr>
8998
8999 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9000 c.m4.
9001 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9002 * data/glr.cc: Do not include stack.hh.
9003
90042006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9005
9006 * data/glr.c: Reformat whitespace with tabs.
9007 (b4_lpure_formals): Remove this unused m4 macro.
9008 * tests/cxx-type.at: Reformat whitespace with tabs.
9009 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9010 since it's a member. Rename type to isNterm for clarity.
9011
90122005-12-29 Akim <akim@sulaco.local>
9013
9014 Let glr.cc catch up with symbol_value_print.
9015 * data/glr.cc (b4_yysymprint_generate): Replace by...
9016 (b4_yy_symbol_print_generate): this.
9017 (yy_symbol_print, yy_symbol_value_print): Declare them.
9018
90192005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9020
9021 * src/location.h (boundary): Note that a line or column equal
9022 to INT_MAX indicates an overflow.
9023 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9024 (rule_length_overflow, increment_rule_length, add_column_width):
9025 New functions.
9026 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9027 (<SC_BRACED_CODE>"}"):
9028 Use increment_rule_length rather than incrementing it by hand.
9029 (adjust_location, handle_syncline): Diagnose overflow.
9030 (handle_action_dollar, handle_action_at):
9031 Fix bug with monstrosities like $-2147483648.
9032 Remove now-unnecessary checks.
9033 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9034 (convert_ucn_to_byte): Verify assumptions.
9035 (handle_syncline): New arg LOC. All callers changed.
9036 Don't store through a value derived from char const * pointer.
9037
9038 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9039 GCC warnings.
9040
90412005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9042
9043 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9044 Remove unnecessary forward static decls.
9045
90462005-12-27 Akim Demaille <akim@epita.fr>
9047
9048 * src/reader.c (grammar_current_rule_check): Also check that $$
9049 is used.
9050 Take the rule to check as argument, hence rename as...
9051 (grammar_rule_check): this.
9052 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9053 Rename as...
9054 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9055 (grammar_midrule_action, grammar_symbol_append): Now static.
9056 * tests/torture.at (input): Don't rely on the default action
9057 being always performed.
9058 * tests/calc.at: "Set" $$ even when the action is "cut" with
9059 YYERROR or other.
9060 * tests/actions.at (Exotic Dollars): Instead of using unused
9061 values, check that the warning is issued.
9062
90632005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9064
9065 * NEWS: Improve wording for unused-value warnings.
9066
90672005-12-22 Akim Demaille <akim@epita.fr>
9068
9069 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9070 (b4_yysymprint_generate): Rename as...
9071 (b4_yy_symbol_print_generate): this.
9072 Generate yy_symbol_print instead of yysymprint.
9073 Generate also yy_symbol_value_print, and use it.
9074
90752005-12-22 Akim Demaille <akim@epita.fr>
9076
9077 * NEWS: Warn about unused values.
9078 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9079 a `used' member.
9080 (symbol_list_n_get, symbol_list_n_used_set): New.
9081 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9082 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9083 * src/reader.c (grammar_current_rule_check): Check that values are
9084 used.
9085 * src/symtab.c (symbol_print): Accept 0.
9086 * tests/existing.at: Remove the type information.
9087 Empty the actions.
9088 Remove useless actions (beware of mid-rule actions: perl -000
9089 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9090 * tests/actions.at (Exotic Dollars): Use unused values.
9091 * tests/calc.at: Likewise.
9092 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9093 Likewise.
9094
9095 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9096 rule_useful_p.
9097
90982005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9099
9100 Undo 2005-12-01 tentative license wording change. The wording is
9101 still being reviewed by the lawyers, and we don't want to wait for
9102 them before publishing a test release. For now, revert to the
9103 previous wording.
9104 * NEWS: Undo 2005-12-01 change.
9105 * data/glr.c: Revert to previous license wording.
9106 * data/glr.cc: Likewise.
9107 * data/lalr1.cc: Likewise.
9108 * data/location.cc: Likewise.
9109 * data/yacc.c: Likewise.
9110
9111 * NEWS: Reword %destructor vs YYABORT etc.
9112 * data/glr.c: Use American spacing, for consistency.
9113 * data/glr.cc: Likewise.
9114 * data/lalr1.cc: Likewise.
9115 * data/yacc.c: Likewise.
9116 * data/yacc.c: Reformat comments slightly.
9117 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9118 for consistency. Fix some spelling errors and reword recently-included
9119 text slightly.
9120 * tests/cxx-type.at: Cast results of malloc, for C++.
9121
91222005-12-21 Joel E. Denny <address@hidden>
9123
9124 * tests/cxx-type.at: Construct a tree, count the parents of shared
9125 nodes, and free each node once and only once. Previously, the memory
9126 for semantic values was leaked instead.
9127
91282005-12-21 Joel E. Denny <address@hidden>
9129
9130 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9131 (yylval, yylloc): If pure, #define to yystackp->yyval and
9132 yystackp->yyloc similar to yychar and yynerrs.
9133 (yyparse): If pure, remove local yylval and yylloc. Add local
9134 yystackp to accommodate pure definitions of yylval and yylloc.
9135 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9136 yylvalp and yyllocp to &yylval and &yylloc.
9137 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9138 namespace. Previously, nerrs and char were missing, but lval and lloc
9139 weren't necessary.
9140 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9141 yylvalp and yyllocp parameters since, if pure, these are now always
9142 accessible through yystackp. If not pure, they are still accessible
9143 globally.
9144 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9145 `if (YYID (N))' to pacify lint.
9146
91472005-12-21 Akim Demaille <akim@epita.fr>
9148
9149 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9150 destroy the RHS symbols of a rule.
9151 * data/yacc.c (yylen): Initialize to 0.
9152 Keep its value to the number of items to possibly shift.
9153 In particular, a regular successful parse that ends on YYFINAL by
9154 a (internal) YYACCEPT must not have yylen != 0.
9155 (yyerrorlab, yyreturn): Pop the RHS.
9156 Reorder a bit to emphasize the `shifting' bits of code.
9157 (YYPOPSTACK): Now accept a number of items to pop.
9158 * data/lalr1.cc: Likewise.
9159 * data/glr.c: Formatting changes.
9160 Use goto instead of fall through.
9161 * doc/bison.texinfo (Destructor Decl): Complete.
9162
91632005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9164
9165 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9166 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9167 * djgpp/config.bat: Replace every occurence of the file name
9168 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9169 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9170 * djgpp/config.sed: Replace every occurence of the file name
9171 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9172 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9173 * djgpp/djunpack.bat: DJGPP specific file.
9174 * djgpp/fnchange.lst: DJGPP specific file.
9175 * djgpp/README.in: Add new information about how to unpack the bison
9176 source on MSDOS and other systems which have 8.3 file name restrictions
9177 using djunpack.bat and fnchange.lst.
9178
91792005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9180
9181 * bootstrap (build_cvs_prefix): Remove; unused.
9182 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9183 when getting gnulib.
9184
91852005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9186
9187 * data/glr.c: Reorder typedef declarations for structs to match order
9188 of struct declarations.
9189 Rename yystack everywhere to yystackp except in yyparse where it's not
9190 a pointer.
9191 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9192 consistency.
9193 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9194 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9195 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9196 lint.
9197
91982005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9199
9200 * tests/sets.at (Accept): Fix typos in regular expression used to
9201 sed out the final state number.
9202
9203 Work around portability problem on Solaris 10: flex-generated
9204 files include <stdio.h> before <config.h>, which messes up
9205 because the latter defines __EXTENSIONS__. Address the problem
9206 by creating two new little files that include <config.h> first,
9207 then include the flex-generated files. Rewrite everyone else
9208 to include <config.h> first, as well.
9209 * lib/timevar.c: Always include "config.h".
9210 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9211 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9212 (EXTRA_bison_SOURCES): New macro.
9213 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9214 * src/system.h: Don't include config.h.
9215 * src/LR0.c: Include <config.h> first.
9216 * src/assoc.c: Likewise.
9217 * src/closure.c: Likewise.
9218 * src/complain.c: Likewise.
9219 * src/conflicts.c: Likewise.
9220 * src/derives.c: Likewise.
9221 * src/files.c: Likewise.
9222 * src/getargs.c: Likewise.
9223 * src/gram.c: Likewise.
9224 * src/lalr.c: Likewise.
9225 * src/location.c: Likewise.
9226 * src/main.c: Likewise.
9227 * src/muscle_tab.c: Likewise.
9228 * src/nullable.c: Likewise.
9229 * src/output.c: Likewise.
9230 * src/parse-gram.y: Likewise.
9231 * src/print.c: Likewise.
9232 * src/print_graph.c: Likewise.
9233 * src/reader.c: Likewise.
9234 * src/reduce.c: Likewise.
9235 * src/relation.c: Likewise.
9236 * src/state.c: Likewise.
9237 * src/symlist.c: Likewise.
9238 * src/symtab.c: Likewise.
9239 * src/tables.c: Likewise.
9240 * src/uniqstr.c: Likewise.
9241 * src/vcg.c: Likewise.
9242
9243 * src/parse-gram.y: Fix minor problems uncovered by lint.
9244 (current_lhs, current_lhs_location): Now static.
9245 (current_assoc): Remove unused variable.
9246
9247 Cleanups so that Bison-generated parsers have less lint.
9248 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9249 Prepend /*ARGSUSED*/, for lint's sake.
9250 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9251 definition if 'lint' is defined.
9252 (YYID): New macro (or function, if lint).
9253 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9254 * data/yacc.c: Likewise.
9255 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9256 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9257 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9258 is C++ only.
9259 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9260 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9261 Use YYID(0) rather than 0, for lint.
9262 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9263 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9264
92652005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9266
9267 * tests/glr-regression.at
9268 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9269 Close memory leak reported by twlevo.
9270
92712005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9272
9273 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9274 all stacks.
9275 (yyparse): Iterate another stack in order to call user destructors.
9276 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9277 New test case.
9278 (Duplicated user destructor for lookahead): This test now is expected
9279 to succeed.
9280
92812005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9282
9283 * NEWS: Document the following change.
9284 * data/yacc.c: Say "parser skeleton" rather than "file", since
9285 it's no longer just a file.
9286 * data/glr.c: Grant a special exception for C GLR parsers, that
9287 reads like the already-existing exception for C LALR(1) parsers.
9288 * data/glr.cc: Likewise.
9289 * data/lalr1.cc: Likewise.
9290 * data/location.cc: Likewise.
9291 * data/yacc.c: Reword the "written by" statement to clarify that
9292 it was the parser skeleton, not the entire output file.
9293 * data/glr.c: Written by Paul Hilfinger.
9294 * data/glr.cc: Written by Akim Demaille.
9295 * data/lalr1.cc: Likewise.
9296
92972005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9298
9299 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9300 Fix typos in previous change that broke 'make check'.
9301 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9302 supported in C.
9303 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9304 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9305 We can revert this once things settle down.
9306
9307 * src/conflicts.c (conflicts_print): Don't print file name twice
9308 when %expect fails because there were no conflicts.
9309 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9310 change.
9311 * tests/conflicts.at (%expect not enough, %expect too much):
9312 (%expect with reduce conflicts): Adjust to new behavior.
9313
93142005-11-18 Akim Demaille <akim@epita.fr>
9315
9316 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9317 errors.
9318 * NEWS: Document this.
9319 * doc/bison.texinfo (Expect Decl): Likewise.
9320
93212005-11-16 Akim Demaille <akim@epita.fr>
9322
9323 Generalize the display of semantic values and locations in traces.
9324 * data/glr.c (yy_reduce_print): Fix indices (again).
9325 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9326 literal integers.
9327 * data/lalr1.cc (yyreduce_print): Rename as...
9328 (yy_reduce_print): this.
9329 Display values and locations.
9330 * data/yacc.c (yy_reduce_print): Likewise.
9331 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9332 (yysymprint): Move higher to be visible from yy_reduce_print).
9333 (yyparse): Adjust.
9334 * tests/calc.at: Adjust the expected length of the traces.
9335
93362005-11-14 Akim Demaille <akim@epita.fr>
9337
9338 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9339 from 1 to N, while values and location start at 0.
9340 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9341
93422005-11-14 Akim Demaille <akim@epita.fr>
9343
9344 * data/glr.c (yy_reduce_print): Fix the $ number.
9345
93462005-11-14 Akim Demaille <akim@epita.fr>
9347
9348 "Use" parse parameters.
9349 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9350 * data/glr.c, data/glr.cc: Use them.
9351 * data/glr.c (YYUSE): Have a C++ definition that supports
9352 non-pointer types.
9353
93542005-11-14 Akim Demaille <akim@epita.fr>
9355
9356 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9357
93582005-11-14 Akim Demaille <akim@epita.fr>
9359
9360 * data/glr.cc: New.
9361 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9362
93632005-11-12 Akim Demaille <akim@epita.fr>
9364
9365 Let position and location be PODs.
9366 * data/location.cc (position::initialize, location::initialize): New.
9367 (position::position, location::location): Define only if
9368 b4_location_constructors is defined.
9369 * data/lalr1.cc (b4_location_constructors): Define it for backward
9370 compatibility.
9371 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9372
93732005-11-12 Akim Demaille <akim@epita.fr>
9374
9375 * data/lalr1.cc: Move the body of the ctor and dtor into the
9376 parser file (instead of the header).
9377 Wrap the implementations in a "namespace yy".
9378
93792005-11-12 Akim Demaille <akim@epita.fr>
9380
9381 Have glr.c include its header file when created.
9382 * data/glr.c (b4_shared_declarations): New.
9383 Output them verbatim in the parser if !%defines, otherwise
9384 output then in the header file, and include it instead.
9385
93862005-11-11 Akim Demaille <akim@epita.fr>
9387
9388 * data/glr.c: Comment changes.
9389
93902005-11-11 Akim Demaille <akim@epita.fr>
9391
9392 When yydebug, report semantic and location values for reductions.
9393 * data/glr.c (yy_reduce_print): Report the semantic values and the
9394 locations.
9395 (YY_REDUCE_PRINT): Adjust.
9396 (yyglrReduce): Use them.
9397 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9398 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9399 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9400 traces.
9401
94022005-11-10 Akim Demaille <akim@epita.fr>
9403
9404 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9405 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9406 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9407
94082005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9409
9410 * m4/cxx.m4, examples/Makefile.am: Don't build
9411 examples/calc++ if no C++ compiler is available. (trivial change)
9412
94132005-11-09 Akim Demaille <akim@epita.fr>
9414
9415 * src/scan-skel.l: Use a couple of asserts.
9416
94172005-11-03 Akim Demaille <akim@epita.fr>
9418
9419 In some (weird) cases, the final state number is incorrect.
9420 Reported by Alexandre Duret-Lutz.
9421 * src/LR0.c (state_list_append): Remove the computation of
9422 final_state.
9423 (save_reductions): Do it here.
9424 (get_state): Alpha conversion.
9425 (generate_states): Use a for loop.
9426 * src/gram.h (item_number_is_rule_number)
9427 (item_number_is_symbol_number): New.
9428 * src/state.c: Use assert.
9429 * src/system.h: Include assert.h.
9430 * tests/sets.at (Accept): New.
9431
94322005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9433
9434 * data/glr.c (yyfill): Adjust comment.
9435 (yyresolveAction): Initialize default location properly
9436 for empty right-hand sides.
9437 (yydoAction): Ditto.
9438 Add comment explaining apparently dead code.
9439 * tests/glr-regression.at
9440 (Incorrectly initialized location for empty right-hand side in GLR):
9441 New test.
9442
94432005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9444
9445 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9446 gnulib when interrupted. This fixes some race conditions and
9447 works around some portability problems (one noted by Paul
9448 Hilfinger).
9449
94502005-10-22 Akim <akim@epita.fr>
9451
9452 * Makefile.cfg: Adjust to config -> build-aux.
9453 Reported by twledo.
9454
94552005-10-21 Akim Demaille <akim@epita.fr>
9456
9457 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9458 the %parse-params.
9459 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9460 * data/yacc.c (b4_Pure_if): Rename as...
9461 (b4_yacc_pure_if): this.
9462 (YY_SYMBOL_PRINT, yyparse): Adjust.
9463 * doc/bison.texinfo: Formatting changes.
9464
94652005-10-21 Akim Demaille <akim@epita.fr>
9466
9467 Finish the transition config -> build-aux.
9468 * configure.ac, Makefile.am: Use build-aux.
9469 * config/prev-version, config/announce-gen, config/Makefile.am:
9470 Move to...
9471 * build-aux/prev-version, build-aux/announce-gen,
9472 * build-aux/Makefile.am: here.
9473
94742005-10-14 Akim Demaille <akim@epita.fr>
9475
9476 * examples/calc++/test: Use set -x only when VERBOSE.
9477
94782005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9479
9480 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9481 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9482
94832005-10-13 Akim Demaille <akim@epita.fr>
9484
9485 * src/scan-skel.l: Output the base name parts of the parser and
9486 header file names.
9487 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9488 additional checks.
9489 Use this to exercise C++ outputs in subdirs.
9490 Reported by Oleg Smolsky.
9491
94922005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9493
9494 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9495 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9496 Problem reported by John P. Hartmann.
9497 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9498 already defined it.
9499
95002005-10-12 Akim Demaille <akim@epita.fr>
9501
9502 * src/parse-gram.y (version_check): Exit 63 to please missing
9503 (stands for "version mismatch).
9504 * tests/input.at, doc/bison.texinfo: Adjust.
9505
95062005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9507
9508 Work around portability problems with Visual Age C compiler
9509 (xlc and xlC_r) reported by John P. Hartmann.
9510 * data/location.cc (initial_column, initial_line): Remove.
9511 All uses replaced by 0 and 1.
9512 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9513 that xlc complains about.
9514 * src/scan-skel.l (skel_wrap): Likewise.
9515 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9516 as __STDC__.
9517 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9518 __STDC_VERSION__. Use it everywhere instead of looking at
9519 __STDC__ and __cplusplus.
9520
95212005-10-10 Akim Demaille <akim@epita.fr>
9522
9523 * examples/calc++/test: Be quiet unless VERBOSE.
9524
95252005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9526
9527 * data/c.m4 (yydestruct, yysymprint):
9528 Use YYUSE instead of casting to void.
9529 * data/glr.c (YYUSE): New macro.
9530 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9531 Use it instead of rolling our own.
9532 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9533 (YYCHK1):
9534 Use /*CONSTCOND*/ to suppress lint warnings.
9535 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9536 (YY_STACK_PRINT): Use 'false' not '0'.
9537 (YYUSE): New macro.
9538 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9539 * data/yacc.c (YYUSE): New macro.
9540 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9541 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9542 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9543
9544
9545 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9546 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9547
95482005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9549
9550 Undo the parts of the unlocked-I/O change that substituted
9551 putc or puts for printf. This might hurt performance a bit,
9552 but some people prefer the printf style.
9553 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9554 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9555 All uses replaced by YYFPRINTF and YYDPRINTF.
9556 * data/yacc.c: Likewise.
9557 * lib/bitset.c (bitset_print): Likewise.
9558 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9559 putc and puts.
9560 * lib/lbitset.c (debug_lbitset): Likewise.
9561 * src/closure.c (print_firsts, print_fderives): Likewise.
9562 * src/gram.c (grammar_dump): Likewise.
9563 * src/lalr.c (look_ahead_tokens_print): Likewise.
9564 * src/output.c (escaped_output): Likewise.
9565 (user_actions_output): Break apart two printfs.
9566 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9567 * src/reduce.c (reduce_print): Likewise.
9568 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9569 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9570
9571 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9572 Use assignments rather than casts-to-void to suppress
9573 unused-variable warnings. This pacifies 'lint'.
9574 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9575 unused-variable warnings.
9576
95772005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9578
9579 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9580
95812005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9582
9583 Use unlocked I/O for a minor performance improvement on hosts like
9584 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9585 is to use the gnlib unlocked-io module, and to prefer putc and
9586 puts to printf when either will work (since the latter doesn't
9587 come in an unlocked flavor).
9588 * bootstrap (gnulib_modules): Add unlocked-io.
9589 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9590 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9591 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9592 and similarly for puts and putc and printf.
9593 * data/yacc.c: Likewise.
9594 * lib/bitset.c (bitset_print): Likewise.
9595 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9596 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9597 to printf.
9598 * lib/lbitset.c (debug_lbitset): Likewise.
9599 * src/closure.c (print_firsts, print_fderives): Likewise.
9600 * src/gram.c (grammar_dump): Likewise.
9601 * src/lalr.c (look_ahead_tokens_print): Likewise.
9602 * src/output.c (escaped_output): Likewise.
9603 (user_actions_output): Coalesce two printfs.
9604 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9605 * src/reduce.c (reduce_print): Likewise.
9606 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9607 * src/system.h: Include unlocked-io.h rather than stdio.h.
9608
9609 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9610 this confuses xgettext.
9611
96122005-10-02 Akim Demaille <akim@epita.fr>
9613
9614 * bootstrap (gnulib_modules): Add strverscmp.
9615 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9616 * m4/.cvsignore: Add strverscmp.m4.
9617 * src/parse-gram.y (%require): New token, new rule.
9618 (version_check): New.
9619 * src/scan-gram.l (%require): Adjust.
9620 * tests/input.at (AT_REQUIRE): New.
9621 Use it.
9622 * doc/bison.texinfo (Require Decl): New.
9623 (Calc++ Parser): Use %require.
9624
96252005-10-02 Akim Demaille <akim@epita.fr>
9626
9627 * data/location.cc: New.
9628
96292005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9630 Akim Demaille <akim@epita.fr>
9631
9632 Make sure -odir/foo.cc creates dir/location.hh etc.
9633 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9634 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9635 (spec_defines_file): Now const.
9636 (dir_prefix): New.
9637 (short_base_name): Remove.
9638 * src/files.c: Adjust.
9639 (dirname.h): Include.
9640 (base_name): Don't prototype it.
9641 (finput): Remove, duplicates gram_in.
9642 (full_base_name, short_base_name): Replace by...
9643 (all_but_ext, all_but_tab_ext): these.
9644 (compute_base_names): Rename as...
9645 (compute_file_name_parts): this.
9646 Update to compute the new variables, including dir_prefix.
9647 Adjust dependencies.
9648 * src/output.c (prepare): Output them.
9649 * src/reader.c: Adjust to use gram_in, not finput.
9650 * src/scan-skel.l (@dir_prefix@): New.
9651
96522005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9653
9654 * lib/subpipe.c: New function end_of_output_subpipe() added
9655 to allow support for non-posix systems. This is a no-op function
9656 for posix systems.
9657
9658 * lib/subpipe.h: New function end_of_output_subpipe() added
9659 to allow support for non-posix systems. This is a no-op function
9660 for posix systems.
9661
9662 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9663 handle the lack of pipe/fork functionality on non-posix systems.
9664
9665 * djgpp/Makefile.maint: DJGPP specific file.
9666
9667 * djgpp/README.in: DJGPP specific file.
9668
9669 * djgpp/config.bat: DJGPP specific configuration file.
9670
9671 * djgpp/config.sed: DJGPP specific configuration file.
9672
9673 * djgpp/config.site: DJGPP specific configuration file.
9674
9675 * djgpp/config_h.sed: DJGPP specific configuration file.
9676
9677 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9678
9679 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9680
96812005-10-02 Akim Demaille <akim@epita.fr>
9682
9683 * data/location.cc: New, extract from...
9684 * data/lalr1.cc: here.
9685 (location.hh): Include it after the user prologue, in case the
9686 filename type is defined by the user.
9687 Forward declation location and position before the pre-prologue.
9688 (yyresult_): Rename as...
9689 (yyresult): this, it's a local variable, not an attribute.
9690 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9691
96922005-10-01 Akim Demaille <akim@epita.fr>
9693
9694 * examples/extexi: Restore the #line generation.
9695
96962005-09-30 Akim Demaille <akim@epita.fr>,
9697 Alexandre Duret-Lutz <adl@gnu.org>
9698
9699 Move the token type and YYSTYPE in the parser class.
9700 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9701 (parser::token): New, from the moved free definition of tokens.
9702 (parser::semantic_value): Now a full definition instead of an
9703 indirection to YYSTYPE.
9704 (b4_post_prologue): No longer included in the header file, but
9705 in the implementation file.
9706 * doc/bison.texi (C+ Language Interface): Update.
9707 * src/parse-gram.y: Support unary %define.
9708 * tests/actions.at: Define global_tokens_and_yystype for backward
9709 compatibility until we update the tests.
9710 * tests/calc.at: Idem.
9711 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9712 to simplify the code.
9713
97142005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9715
9716 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9717 Ah, the good old days! Problem reported by Peter Klein.
9718 * bootstrap (gnulib_modules): Add strerror, strtoul.
9719 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9720 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9721
97222005-09-29 Akim Demaille <akim@epita.fr>
9723
9724 * data/c.m4 (b4_error_verbose_if): New.
9725 * data/lalr1.cc: Use it.
9726 (YYERROR_VERBOSE_IF): Remove.
9727 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9728 parser members, replaced by...
9729 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9730 local variables.
9731 (yysyntax_error_): Takes the state number as argument.
9732 (yyreduce_print_): Use the argument yyrule, not the former
9733 attribute yyn_.
9734
97352005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9736
9737 * bootstrap (gnulib_modules): Add verify.
9738 * lib/.cvsignore: Add verify.h.
9739 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9740 * src/system.h (verify): Remove.
9741 Include verify.h instead.
9742 * src/tables.c (tables_generate): Use new API for 'verify'.
9743
97442005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9745
9746 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9747 local variables whose names begin with 'yy'.
9748 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9749 Trivial changes from Joel E. Denny.
9750
9751 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9752 it itself.
9753 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9754 don't use alloca any more.
9755
9756 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9757 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9758 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9759 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9760 to match yacc.c, to test more hosts.
9761
97622005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9763
9764 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9765 doesn't affect behavior.
9766 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9767 Solaris, AIX, MSC.
9768 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9769 This works a bit better with glibc, if user code has already included
9770 stdlib.h.
9771 * doc/bison.texinfo (Bison Parser): Document that users can't
9772 arbitrarily use malloc and free for other purposes. Document
9773 that <alloca.h> and <malloc.h> might be included.
9774 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9775 user must declare alloca.
9776
9777 * HACKING (release): Forwarn the Translation Project about
9778 stable releses.
9779
97802005-09-20 Akim Demaille <akim@epita.fr>
9781
9782 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9783
97842005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9785
9786 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9787 (YYSTACK_ALLOC_MAXIMUM): Use it.
9788 (yysyntax_error): New function.
9789 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9790 multiple syntax errors are reported, and alloca is being used.
9791 Instead, reallocate buffers twice as big each time, so that
9792 we waste at most half the allocated memory. Start with a small
9793 (128-byte) buffer that will suffice in most cases anyway.
9794 Use yysyntax_error to do most of the work.
9795
9796 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9797 yynerrs is the number of errors reported, not the number of
9798 errors encountered.
9799
9800 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9801 Mark it as expected to fail.
9802 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9803 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9804 Don't start user-code symbols with "yy", to avoid name space problems.
9805
98062005-09-19 Akim Demaille <akim@epita.fr>
9807
9808 Remove the traits, failed experiment.
9809 It never proved useful, and anyway because of the current
9810 definition, it was not possible to have several specialization of
9811 this traits, making it useless.
9812 * data/lalr1.cc (yy:traits): Remove.
9813 Inline its definitions in the parser class.
9814
98152005-09-19 Akim Demaille <akim@epita.fr>
9816
9817 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9818 least Mac OSX with a /usr/local install of gettext.
9819
98202005-09-19 Akim Demaille <akim@epita.fr>
9821
9822 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9823 and yytoken for similarity with the other skeletons.
9824
98252005-09-19 Akim Demaille <akim@epita.fr>
9826
9827 * NEWS, configure.ac: update version number to 2.1a.
9828
98292005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9830
9831 * NEWS: Version 2.1.
9832
9833 * NEWS: Remove notice of yytname change, since it was never in an
9834 official release.
9835 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9836 diagnostic.
9837 * src/output.c (prepare): Likewise.
9838 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9839 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9840 is not defined. This is an awful hack, but it's enough for now.
9841 All callers changed.
9842 * tests/glr-regression-at (make_value): Args are const pointers now,
9843 to avoid GCC warning.
9844 (Duplicated user destructor for lookahead): New test. Currently
9845 skipped. It fails on my host but I'm not sure it'll always fail.
9846
98472005-09-16 Akim Demaille <akim@epita.fr>
9848
9849 * src/symtab.h (struct symbol): Declare the printer and destructor
9850 as const, to avoid accidental calls to free.
9851 (symbol_destructor_set, symbol_printer_set): Adjust.
9852 * src/symtab.c: Adjust.
9853
98542005-09-16 Akim Demaille <akim@epita.fr>
9855
9856 * data/c.m4 (b4_token_enums): New.
9857 (b4_token_defines): Rename as...
9858 (b4_token_enums_defines): this.
9859 (b4_token_defines): New, output only the #defines.
9860 * data/yacc.c, data/glr.c: Adjust.
9861 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9862 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9863 as default values.
9864
98652005-09-16 Akim Demaille <akim@epita.fr>
9866
9867 * data/lalr1.cc (yylex_): Remove, inline its code.
9868 (yyreport_syntax_error_): Remove, replaced by...
9869 (yysyntax_error_): this which returns a string and leaves to the
9870 caller the call to the users' error function.
9871 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9872 Move from members of the parser object...
9873 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9874 to local variables of the parse function.
9875
98762005-09-16 Akim Demaille <akim@epita.fr>
9877
9878 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9879 since it's in Bison's name space.
9880
98812005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9882
9883 * data/glr.c (yyresolveValue): Add default case to pacify
9884 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9885
9886 * NEWS: Document when yyparse started to return 2.
9887 * doc/bison.texinfo (Parser Function): Document when yyparse
9888 returns 2.
9889
9890 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9891 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9892 changed.
9893 (class position): file_name -> filename (reverting). All uses changed.
9894
98952005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9896
9897 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9898 do anything if $@ exists. This reverts part of the 2005-07-07
9899 patch.
9900
99012005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9902
9903 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9904 contains obsolete information and isn't worth distributing as a
9905 separate file anyway.
9906 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9907 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9908 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9909 (yyparse): Abort if user code uses longjmp to throw an unexpected
9910 value.
9911
99122005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9913
9914 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9915 Suggested by twlevo@xs4all.nl.
9916
9917 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9918 This avoids a diagnostic from gcc -Wswitch-enum.
9919 Problem reported by twlevo@xs4all.nl.
9920
9921 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9922 standards. Use "file name" or "file" or "name", depending on
9923 the context.
9924 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9925 not to hack/foo.tab.c.
9926 (Calc++ Top Level): 2nd arg of main is not const.
9927 * data/glr.c: b4_filename -> b4_file_name.
9928 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9929 All uses changed.
9930 (class position): filename -> file_name. All uses changed.
9931 * data/yacc.c: b4_filename -> b4_file_name.
9932 * lib/bitset.h: filename -> file_name in local vars.
9933 * lib/bitset_stats.c: Likewise.
9934 * src/files.c: Likewise.
9935 * src/scan-skel.l ("@output ".*\n): Likewise.
9936 * src/files.c (file_name_split): Renamed from filename_split.
9937 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9938
99392005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9940
9941 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9942 to accommodate latest gnulib.
9943
9944 * tests/glr-regression.at (Duplicate representation of merged trees):
9945 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9946
9947 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9948 needed.
9949
99502005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9951
9952 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9953 All uses changed. Invoke user destructor after an error during a
9954 split parse (trivial change from Joel E. Denny).
9955
9956 * tests/glr-regression.at
9957 (User destructor after an error during a split parse): New test case.
9958 Problem reported by Joel E. Denny in:
9959 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9960
99612005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9962
9963 * README-cvs: Give URLs for recommended tools.
9964 Mention Gzip version problem, and bootstrapping issues.
9965 Remove troubleshooting section, as it's somewhat obsolete.
9966
9967 * bootstrap (no_cache): New var, to accommodate different wget
9968 variants. Use it instead of '-C off'. Problem reported by
9969 twlevo@xs4all.nl.
9970
9971 * data/glr.c (yydestroyStackItem): New function.
9972 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9973 debugging information. Problem reported by Joel E. Denny.
9974
99752005-08-25 Akim Demaille <akim@epita.fr>
9976
9977 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9978
99792005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9980
9981 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9982 Don't invoke destructor on unresolved entries.
9983 * tests/glr-regression.at
9984 (User destructor for unresolved GLR semantic value): New test case.
9985 Problem reported by Joel E. Denny in:
9986 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9987
99882005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9989
9990 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9991 Add strnlen.c.
9992 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9993 lib-prefix.m4, po.m4.
9994
9995 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9996 in yydestruct diagnostic, since it might not be an error.
9997 Problem reported by Joel Denny near end of
9998 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9999 * data/lalr1.cc (yyerturn): Likewise.
10000 * data/yacc.c (yyreturn): Likewise.
10001 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10002
10003 * src/files.c: Remove obsolete FIXME comment.
10004
10005 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10006 with the other templates, and to fix bogus run-on messages such
10007 as the one reported at the end of
10008 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10009 All callers changed to avoid the newline.
10010 (yyprocessOneStack): Output two lines rather than one, to accommodate
10011 the above change. This changes the debug output format slightly.
10012
10013 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10014 reported by Joel E. Denny in
10015 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10016 (trivial change).
10017 * tests/glr-regression.at (Duplicate representation of merged trees):
10018 New test, from Joel E. Denny in:
10019 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10020 * THANKS: Add Joel E. Denny.
10021
10022 * configure.ac (AC_INIT): Bump to 2.0c.
10023
100242005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10025
10026 * NEWS: Version 2.0b.
10027
10028 * Makefile.am (SUBDIRS): Put examples before tests, so that
10029 "make check" doesn't finish with "All 1 tests passed".
10030
10031 * tests/regression.at (Token definitions): Don't rely on
10032 AT_PARSER_CHECK for data that contains backslashes. It currently
10033 uses 'echo', and 'echo' isn't portable if its argument contains
10034 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10035 that the byte '\0xff' is not printable in the C locale; it is,
10036 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10037 not printable, so use '\0x81' to test.
10038
10039 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10040 version of GCC, since the macro is used with non-GCC compilers.
10041
10042 Fix core dump reported by Pablo De Napoli in
10043 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10044 * tests/regression.at (Invalid inputs with {}): New test.
10045 * src/parse-gram.y (token_name): Translate type before using
10046 it as an index.
10047
10048 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10049 the user's name space. All uses changed to __attribute__
10050 ((__unused__)).
10051 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10052 Add __attribute__ ((__noreturn__)).
10053
10054 * etc/clcommit: Remove. We weren't using it, and it failed
10055 "make maintainer-distcheck".
10056 * Makefile.maint: Merge from coreutils.
10057 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10058 (syntax-check-rules): Change list of rules as described below.
10059 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10060 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10061 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10062 (sc_trailing_space): New rules.
10063 (sc_xalloc_h_in_src): Remove.
10064 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10065 (sc_space_tab, sc_error_exit_success, sc_changelog):
10066 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10067 (makefile-check, po-check, author_mark_check):
10068 (makefile_path_separator_check, copyright-check):
10069 Use grep -n, to make it easier to find violations.
10070 Use CVS_LIST and CVS_LIST_EXCEPT.
10071 (header_regexp, h_re): Remove.
10072 (dd_c): New macro.
10073 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10074 (my-distcheck): Use more-modern GCC flags.
10075 (signatures, %.asc): Remove.
10076 (rel-files, announcement): Remove signatures.
10077 Restore old updating code, even though we don't use it, so
10078 that we're the same as coreutils.
10079 (alpha, beta, major): Depend on news-date-check.
10080 Make the upload commands.
10081
10082 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10083 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10084 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10085 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10086 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10087 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10088 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10089 * tests/sets.at: Likewise.
10090
10091 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10092 we comment out the Autoconf version number.
10093 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10094 it's error-prone and "make maintainer-distcheck" rejects it.
10095
10096 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10097 Indent calls to "error" to pacify "make maintainer-distcheck",
10098 when the calls are not intended to be translated.
10099 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10100
10101 * src/Makefile.am (DEFS): Use +=, to pacify
10102 "make maintainer-distcheck".
10103 (bison_SOURCES): Add scan-skel.h.
10104 (sc_tight_scope): New rule, from coreutils.
10105
10106 * src/files.c (src_extension, header_extension):
10107 Now static, not extern.
10108 * src/getargs.c (short_options): Likewise.
10109 * src/muscle_tab.c (muscle_table): Likewise.
10110 * src/parse-gram.y (current_class, current_type, current_prec):
10111 Likewise.
10112 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10113 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10114 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10115 void, to avoid warning when NLS is disabled.
10116 * src/output.c: Include scan-skel.h.
10117 (scan_skel): Remove decl, since scan-skel.h does this.
10118 (output_skeleton):
10119 Indent calls to "error" to pacify "make maintainer-distcheck".
10120 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10121 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10122 "make maintainer-distcheck".
10123 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10124 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10125 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10126 (skel_lex_destroy, scan_skel): Move these decls to...
10127 * src/scan-skel.h: New file.
10128 * src/uniqstr.c (uniqstr_assert):
10129 Indent calls to "error" to pacify "make maintainer-distcheck".
10130
10131 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10132 not @VAR@.
10133
10134 * tests/torture.at: Revamp to avoid misuse of atoi that
10135 "make maintainer-distcheck" complained about.
10136
10137 * examples/extexi (message): Don't print a message more than once,
10138 and omit line-number decoration that makes Emacs compile think
10139 that informative messages are worth worrying about.
10140
101412005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10142
10143 * configure.ac: Update version number.
10144
10145 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10146 accidentally.
10147 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10148 autogenerated by the maintainer.
10149 * examples/calc++/.cvsignore: Add *.yy.
10150
10151 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10152 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10153 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10154
10155 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10156
10157 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10158 from maintainer-distcheck about casting the argument of 'free'.
10159
10160 * NEWS: Mention recent yytname changes.
10161 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10162
10163 * bootstrap: For translations that have not yet been upgraded to
10164 the new runtime-po domain, prime the pump by extracting the
10165 relevant strings from the obsolete translations. This code can be
10166 removed once the bison-runtime domain has been translated by each
10167 team.
10168
10169 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10170 now that token names are already quoted.
10171
10172 Fix problem reported by Anthony Heading.
10173 * data/glr.c (YYTOKEN_TABLE): New macro.
10174 (yytname): Define if YYTOKEN_TABLE.
10175 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10176 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10177 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10178 * src/output.c (prepare_symbols): Output token_table_flag.
10179
101802005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10181
10182 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10183 again if the first call fails.
10184
10185 * data/glr.c (yytnamerr): New function.
10186 (yyreportSyntaxError): Use it to dequote most string literals.
10187 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10188 with other skeletons. All uses changed.
10189 (yytnameerr_): New function.
10190 (yyreport_syntax_error): Use it to dequote most string literals.
10191 * data/yacc.c (yytnamerr): New function.
10192 (yyerrlab): Use it to decode most string literals.
10193 * doc/bison.texinfo (Decl Summary, Calling Convention):
10194 Clarify quoting convention of yytname.
10195 * src/output.c (prepare_symbols): Quote all names. This undoes
10196 the 2005-04-17 change, which is now accomplished (mostly) via
10197 changes in the parsers as described above.
10198 * tests/regression.at (Token definitions, Web2c Actions):
10199 Undo most 2005-04-17 change here, too.
10200
102012005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10202
10203 Fix more problems reported by twlevo@xs4all.nl.
10204 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10205 remove trailing spaces. This loses the exit status of ./types,
10206 and isn't needed since ./types shouldn't be emitting trailing
10207 spaces.
10208 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10209 as the stack isn't valid in that case.
10210
10211 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10212 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10213 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10214 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10215 is used.
10216 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10217 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10218 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10219 Likewise.
10220
10221 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10222 overly-picky compilers that reject 'char *foo = "bar";'.
10223
10224 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10225 to FILE * parameter, not to stderr. This fixes a typo introduced
10226 in the 2005-07-12 change.
10227
10228 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10229 warnings from GCC 4.
10230
10231 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10232 (yyglrShiftDefer, yysplitStack):
10233 Remove unused parameters b4_pure_formals. All uses changed.
10234 (yyglrShift): Remove unused parameters b4_user_formals.
10235 All uses changed.
10236 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10237
102382005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10239
10240 Destructor cleanups and regularization among the three skeletons.
10241 * NEWS: Document the behavior changes.
10242 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10243 stack before failing, as the cleanup code will do it for us now.
10244 * data/lalr1.cc (yyerrlab): Likewise.
10245 * data/glr.c (yyparse): Pop everything off the stack before
10246 freeing it, so that destructors get called properly.
10247 * data/lalr1.cc (yyreturn): Likewise.
10248 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10249 This is more consistent.
10250 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10251 why destructors might be called. 1.875 -> 2.1.
10252 (Destructor Decl, Decl Summary, Table of Symbols):
10253 Some English-language cleanups for %destructor.
10254 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10255 Add output line for destructor of start symbol.
10256 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10257 because of that same extra output line.
10258
10259 * NEWS: Document minor wording changes in diagnostics of
10260 Bison-generated parsers.
10261 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10262 Remove unused formals. All uses changed.
10263 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10264 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10265 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10266 Rename yyoverflowab to yyexhaustedlab.
10267 When memory exhaustion occurs during syntax-error reporting,
10268 report it separately rather than in a single diagnostic; this
10269 eases translation.
10270 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10271 (Memory Exhausted): Renamed from Parser Stack Overflow.
10272 Revamp wording slightly to prefer "memory exhaustion".
10273 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10274
10275 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10276
10277 Add i18n support to the GLR skeleton. Partially fix the C++
10278 skeleton; a C++ expert needs to finish this. Remove debugging
10279 msgids; there's little point to having them translated, since they
10280 can be understood only by someone who can read the
10281 (English-language) source code.
10282
10283 Generate runtime-po/bison-runtime.pot automatically, so that we
10284 don't have to worry about garbage getting in that file. We'll
10285 make sure after the next official release that old msgids don't
10286 get lost. See
10287 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10288
10289 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10290 Now auto-generated.
10291 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10292 Fix typos in explanations of the runtime file.
10293 * bootstrap: Change gettext keyword from YYI18N to YY_.
10294 Use standard Makefile.in.in in runtime-po, since we'll arrange
10295 for backward-compatible bison-runtime.po files in a different way.
10296 * data/glr.c (YY_): New macro, from yacc.c.
10297 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10298 Translate messages intended for users.
10299 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10300 the wording in the other skeletons. We don't know that the memory
10301 is virtual.
10302 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10303 Use same method that yacc.c uses.
10304 Don't translate debugging messages.
10305 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10306 it doesn't work (yet), and requires C++ expertise to fix.
10307 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10308 Move defn to a more logical place, to be consistent with other
10309 skeletons.
10310 Don't translate debugging messages.
10311 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10312 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10313 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10314 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10315
10316 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10317 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10318 void, not int.
10319 * tests/glr-regression.at (Badly Collapsed GLR States):
10320 Likewise.
10321 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10322 yylex should return 0 at EOF rather than aborting.
10323
10324 Improve tests for stack overflow in GLR parser.
10325 Problem reported by twlevo@xs4all.nl.
10326 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10327 All uses removed.
10328 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10329 can handle the problem.
10330 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10331 (yyparse): New local variable yyresult to record the result.
10332 Use result of setjmp to set it, rather than storing itinto
10333 struct.
10334 (yyDone): Remove label.
10335 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10336 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10337 if YYABORT is used).
10338 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10339 yyparse status; put status > 1 into diagnostic.
10340 Check that status==2 works.
10341 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10342 Use exit status 3 for failure to open (which shouldn't happen).
10343
103442005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10345
10346 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10347 1 on syntax error; just let yyparse do its thing.
10348 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10349 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10350 (Exploding the Stack Size with Alloca):
10351 (Exploding the Stack Size with Malloc):
10352 Expect exit status 2, not 1, since the parser is supposed to blow
10353 its stack. Problem reported by twlevo@xs4all.nl.
10354
10355 * data/glr.c (yyparse): Don't assume that the initial calls
10356 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10357 Print a stack-overflow message and fail instead.
10358 Initialize the line-number information before creating the stack,
10359 so that the stack-overflow message can report line zero safely.
10360
103612005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10362
10363 Fix problems reported by twlevo@xs4all.nl.
10364 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10365 (yyuserMerge): Provide a default case if b4_mergers is empty.
10366 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10367 * tests/glr-regression.at
10368 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10369 Add casts to pacify C++ compilers.
10370 * tests/glr-regression.at (Improper merging of GLR delayed action
10371 sets): Declare yylex before using it.
10372 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10373 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10374 test for valgrind; valgrind is independent of g++.
10375 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10376 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10377 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10378 Use a destructor, so that we can expand the stack. Change
10379 YYSTYPE to char * so that we can free it. Cast result of malloc.
10380
103812005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10382
10383 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10384 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10385
103862005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10387
10388 * PACKAGING: New file, suggested by Bruno Haible and taken from
10389 similar wording in gettext's PACKAGING file.
10390 * NEWS: Mention PACKAGING.
10391 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10392
103932005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10394
10395 * NEWS: Document recent i18n improvements.
10396 * bootstrap: Get runtime translations into runtime-po.
10397 Create runtime-po files automatically, if possible.
10398 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10399 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10400 does not infringe on the user's name space.
10401 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10402 * doc/bison.texinfo (Internationalization): Revamp the English
10403 and Texinfo syntax a bit, to try to make it clearer.
10404 (Bison Options, Option Cross Key): Mention --print-localedir.
10405 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10406 YYENABLE_NLS. Quote a bit more.
10407 * runtime-po/.cvsignore: New file.
10408 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10409 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10410 * runtime-po/quot.sed: Likewise.
10411 * runtime-po/boldquot.sed: Likewise.
10412 * runtime-po/en@quot.header: Likewise.
10413 * runtime-po/en@boldquot.header: Likewise.
10414 * runtime-po/insert-header.sin: Likewise.
10415 * runtime-po/remove-potcdate.sin: Likewise.
10416 * runtime-po/Makevars: Likewise.
10417 * runtime-po/LINGUAS: Likewise.
10418 * runtime-po/de.po: Likewise; we will rely on the translation project
10419 to maintain this, so "bootstrap" should get it.
10420 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10421 its value.
10422 * src/main.c (main): Bind the bison-runtime domain, too.
10423
104242005-07-12 Bruno Haible <bruno@clisp.org>
10425
10426 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10427 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10428 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10429 * runtime-po: New directory.
10430 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10431 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10432 * runtime-po/Rules-quot: New file, copied from po/.
10433 * runtime-po/quot.sed: Likewise.
10434 * runtime-po/boldquot.sed: Likewise.
10435 * runtime-po/en@quot.header: Likewise.
10436 * runtime-po/en@boldquot.header: Likewise.
10437 * runtime-po/insert-header.sin: Likewise.
10438 * runtime-po/remove-potcdate.sin: Likewise.
10439 * runtime-po/Makevars: New file.
10440 * runtime-po/POTFILES.in: New file.
10441 * runtime-po/LINGUAS: New file.
10442 * runtime-po/bison-runtime.pot: New file.
10443 * runtime-po/de.po: New file.
10444 * m4/bison.m4: New file.
10445 * Makefile.am (SUBDIRS): Add runtime-po.
10446 (aclocaldir, aclocal_DATA): New variables.
10447 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10448 Define aclocaldir.
10449 * src/getargs.c (usage): Document --print-localedir option.
10450 (PRINT_LOCALEDIR_OPTION): New enum item.
10451 (long_options): Add --print-localedir option.
10452 (getargs): Handle --print-localedir option.
10453 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10454 (Internationalization): New section.
10455
104562005-07-12 Akim Demaille <akim@epita.fr>
10457
10458 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10459 for consistency with the rest of the code.
10460 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10461 Add separators.
10462
104632005-07-12 Akim Demaille <akim@epita.fr>
10464
10465 * src/parse-gram.y: Use %printer instead of YYPRINT.
10466
104672005-07-12 Akim Demaille <akim@epita.fr>
10468
10469 * src/symtab.h, src/symtab.c (symbol_print): New.
10470 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10471 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10472
104732005-07-12 Akim Demaille <akim@epita.fr>
10474
10475 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10476 b4_at_dollar and b4_dollar_dollar.
10477
104782005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10479
10480 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10481 and Pennello's paper.
10482
104832005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10484
10485 * data/yacc.c (yyparse): Undo previous patch. Instead,
10486 set yylsp[0] and yyvsp[0] only if the initial action
10487 sets yylloc and yylval, respectively.
10488
10489 * data/yacc.c (yyparse): In the initial action, set
10490 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10491 This avoids the use of undefined variables if the initial
10492 action does not set yylloc and/or yylval.
10493
104942005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10495
10496 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10497 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10498 Remove from CVS. These files are automatically generated.
10499 * examples/extexi: Clarify that this file is now part of Bison,
10500 not GNU M4, and that it works with any POSIX-compatible Awk.
10501 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10502 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10503 so that we also get calc++-parser.yy. Geneate it.
10504 Use $(AWK), not gawk, since any conforming Awk will do.
10505 Put comment before action, since older 'make' can't handle comment
10506 in action.
10507 $(BUILT_SOURCES): List all built sources, not just some of them.
10508 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10509 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10510 $($(calc_sources_generated)): Remove unnecessary test for existence
10511 of target. (This had a shell syntax error anyway; a stray "x".)
10512 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10513 calc++-parser.yy.
10514 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10515
10516 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10517 implied by the other modules.
10518
105192005-07-06 Akim Demaille <akim@epita.fr>
10520
10521 Bind examples/calc++ to the package.
10522 * examples/calc++/Makefile: Remove, replaced by...
10523 * examples/calc++/Makefile.am: ... this new file.
10524 * examples/calc++/test: Remove input.
10525 * examples/calc++/compile: Remove.
10526 * examples/Makefile.am: New.
10527 * configure.ac, Makefile.am: Adjust.
10528 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10529
105302005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10531
10532 * data/glr.c (yyFail): Drastically simplify; since the format argument
10533 never had any % directives, we can simply pass it to yyerror.
10534 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10535 be modified later, as that is the usual style in glr.c.
10536 Problems reported by Paul Hilfinger.
10537
10538 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10539 and size overflow errors.
10540 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10541 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10542 (YYSIZEMAX): New macro.
10543 (yystpcpy): New function, taken from yacc.c.
10544 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10545 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10546 so that we don't have to maintain their signatures.
10547 (yyFail): Check for buffer overflow, by using vsnprintf rather
10548 than vsprintf. Allocate a bigger buffer if possible.
10549 Report an error if buffer allocation fails.
10550 (yyStackOverflow): New function.
10551 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10552 the initialization was successful. It might fail if storage was
10553 exhausted.
10554 (yyexpandGLRStack): Add more checks for storage allocation failure.
10555 Use yyStackOverflow to report failures.
10556 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10557 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10558 Don't assume stack number fits in int.
10559 (yysplitStack): Check for storage allocation failure.
10560 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10561 can print diagnostics on storage allocation failure. All callers
10562 changed.
10563 (yyresolveValue): Use yybool for boolean.
10564 (yyreportSyntaxError): Check for size-calculation overflow.
10565 This code is taken from yacc.c.
10566 (yyparse): Check for storage allocation errors when allocating
10567 the initial stack.
10568
105692005-07-05 Akim Demaille <akim@epita.fr>
10570
10571 Extract calc++ from the documentation.
10572 * doc/bison.texinfo (Calc++): Add the extraction marks.
10573 * examples/extexi: New, from the aborted GNU Programming 2E.
10574 Separate the different paragraph of a file with empty lines.
10575 * examples/Makefile: Use it to extract the whole calc++ example.
10576
105772005-06-24 Akim Demaille <akim@epita.fr>
10578
10579 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10580 class typedefs.
10581
105822005-06-22 Akim Demaille <akim@epita.fr>
10583
10584 * doc/bison.texinfo (C++ Language Interface): First stab.
10585 (C++ Parsers): Remove.
10586
105872005-06-22 Akim Demaille <akim@epita.fr>
10588
10589 * data/lalr1.cc (yylex_): Honor %lex-param.
10590
105912005-06-22 Akim Demaille <akim@epita.fr>
10592
10593 Start a set of simple examples.
10594 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10595 * examples/calc++/calc++-driver.hh,
10596 * examples/calc++/calc++-parser.yy,
10597 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10598 * examples/calc++/compile, examples/calc++/test: New.
10599
106002005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10601
10602 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10603 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10604 which stems from the 2005-05-27 patch.
10605
106062005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10607
10608 * data/glr.c: Modify treatment of unused parameters to permit use
10609 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10610
106112005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10612
10613 Fix infringement on user name space reported by Janos Zoltan Szabo.
10614 * data/yacc.c (yyparse): strlen -> yystrlen.
10615
106162005-05-30 Akim Demaille <akim@epita.fr>
10617
10618 * data/lalr1.cc (_): New.
10619 Translate the various messages.
10620
106212005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10622
10623 Fix infringement on user name space reported by Bruno Haible.
10624 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10625 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10626 the user's name space.
10627 (alloca): Include <stdlib.h> to get it, if it's not built in.
10628 (YYMALLOC, YYFREE): Define only if needed.
10629 (malloc, free): Declare, but only if needed, as this infringes on
10630 the user name space.
10631
106322005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10633
10634 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10635 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10636 with %d format.
10637 * lib/ebitset.c (min, max): Undef before defining.
10638 * lib/vbitset.c (min, max): Likewise.
10639 * lib/subpipe.c (create_subpipe): Save local variables in case
10640 vfork clobbers them.
10641
106422005-05-24 Bruno Haible <bruno@clisp.org>
10643
10644 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10645 error message syntax used by gcc-4.0.
10646
106472005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10648
10649 * README: Mention m4 1.4.3. Remove obsolete advice about
10650 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10651
10652 * bootstrap: Remove workaround for problem I encountered with
10653 gettext 0.14.1; it seems to be fixed now.
10654
106552005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10656
10657 * NEWS: Version 2.0a.
10658
10659 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10660 the previous change.
10661
10662 Various maintainer cleanups.
10663 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10664 conftest*, for benefit of CVS commands run at the same time as
10665 "configure". Add build-aux, since "bootstrap" now creates it and
10666 its subfiles.
10667 * Makefile.cfg (move_if_change): Remove.
10668 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10669 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10670 (po_repo, do-po-update, po-update, wget_files, get-targets):
10671 (config.guess-url_prefix, config.sub-url_prefix):
10672 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10673 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10674 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10675 Remove.
10676 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10677 this is now the recommended name.
10678 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10679 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10680 ylwrap. These files now go into build-aux.
10681 * config/move-if-change: Remove.
10682 * config/prev-version.txt: Bump from 1.75 to 2.0.
10683
10684 * bootstrap: Add stdio-safer, unistd-safer modules.
10685 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10686 we don't need it).
10687 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10688 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10689 * lib/subpipe.c: Include "unistd-safer.h".
10690 (create_subpipe): Make sure all the newly-created
10691 file descriptors are > 2, so that diagnostics don't
10692 get sent down them (which might cause Bison to hang, in theory).
10693 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10694 * src/files.c (xfopen): Use fopen_safer, not fopen.
10695
10696 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10697 yesterday's yacc.c fix.
10698
106992005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10700
10701 * data/glr.c, data/lalr1.cc: Update copyright date.
10702
10703 Fix a destructor bug reported by Wolfgang Spraul in
10704 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10705 * data/yacc.c (yyabortlab): Don't call destructor, and
10706 don't set yychar to EMPTY.
10707 (yyoverflowlab): Don't call destructor.
10708 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10709 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10710 since we no longer output the message "discarding lookahead token
10711 end of input ()".
10712
107132005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10714
10715 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10716 fix a small glitch in debugging output.
10717 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10718 after YY_SYMBOL_PRINT where needed.
10719
10720 (struct yyGLRState): Add some comments.
10721 (struct yySemanticOption): Add some comments.
10722 (union yyGLRStackItem): Add comment.
10723
10724 (yymergeOptionSets): Correct this to properly perform the union,
10725 avoiding infinite reported by Michael Rosien.
10726 Update comment.
10727
10728 * tests/glr-regression.at: Add test for GLR merging error reported
10729 by M. Rosien.
10730
107312005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10732
10733 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10734 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10735 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10736 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10737 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10738 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10739 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10740 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10741 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10742 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10743 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10744 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10745 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10746 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10747 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10748 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10749 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10750 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10751 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10752 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10753 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10754 src/output.h, src/parse-gram.c, src/parse-gram.h,
10755 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10756 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10757 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10758 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10759 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10760 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10761 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10762 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10763 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10764 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10765 tests/reduce.at, tests/regression.at, tests/sets.at,
10766 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10767 Update FSF postal mail address.
10768
107692005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10770
10771 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10772 Problem reported by Ralf Menzel.
10773
107742005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10775
10776 * tests/actions.at: Test that stack overflow invokes destructors.
10777 From Marcus Holland-Moritz.
10778 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10779 from here....
10780 (yyreturn): to here. That way, destructors are called properly
10781 even if the stack overflows, or the user calls YYACCEPT or
10782 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10783 (yyoverflowlab): Destroy the lookahead.
10784
107852005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10786
10787 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10788
107892005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10790
10791 * NEWS: Bison-generated C parsers no longer quote literal strings
10792 associated with tokens.
10793 * src/output.c (prepare_symbols): Don't escape strings,
10794 since users don't want to see C escapes.
10795 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10796 in diagnostics.
10797 * tests/input.at (Torturing the Scanner): Likewise.
10798 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10799
108002005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10801
10802 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10803 the data size is known to be too small and we can't increase it.
10804 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10805
108062005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10807
10808 * src/parse-gram.y: Include quotearg.h.
10809 (string_as_id): Quote $1 before using it as a key, since the
10810 lexer no longer quotes it for us.
10811 (string_content): Don't strip quotes, since lexer no longer
10812 quotes it for us.
10813 * src/scan-gram.l: Include quotearg.h.
10814 ("\""): Omit quote.
10815 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10816 a key, since the rest of the lexer doesn't quote it.
10817 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10818 * tests/regression.at (Token definitions): Check for backslashes
10819 in token strings.
10820
10821 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10822 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10823 (yyparse): Revamp code to generate long syntax error message, to
10824 make it easier to translate, and to avoid problems with arithmetic
10825 overflow. Change "virtual memory" to "memory" in diagnostic, since
10826 we don't know whether the memory is virtual.
10827
108282005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10829
10830 * NEWS: Bison-generated C parsers now use the _ macro to
10831 translate strings.
10832 * data/yacc.c (_) [!defined _]: New macro.
10833 All English strings wrapped inside this macro.
10834 * doc/bison.texinfo (Bison Parser): Document _.
10835 * po/POTFILES.in: Include src/parse-gram.c, since it now
10836 includes translateable strings that parse-gram.y doesn't.
10837
108382005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10839
10840 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10841 reverting the 2004-10-11 change to this function.
10842 (symbol_check_alias_consistency): Don't call symbol_type_set
10843 if the type name is already correct.
10844 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10845
108462005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10847
10848 * tests/regression.at (Token definitions): Don't use a token named
10849 c, as that generates a "#define c ..." that runs afoul of buggy
10850 stdlib.h that uses the identifier c as a member of struct
10851 drand48_data. Problem reported by Horst Wente.
10852
108532005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10854
10855 * bootstrap: Change translation URL from
10856 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10857 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10858 redirection glitches. Problem reported by twlevo@xs4all.nl.
10859
108602005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10861
10862 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10863 after operands; POSIX says this isn't portable for the c99 command.
10864
108652005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10866
10867 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10868 immediately if a data overrun has occurred; this may help us track
10869 down what may be a spurious failure on MacOS.
10870
108712005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10872
10873 Respond to problems reported by twlevo@xs4all.nl.
10874
10875 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10876
10877 * src/vcg.h: Comment fix.
10878 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10879 (G_CMAX): Change to -1 instead of INT_MAX.
10880
10881 * data/yacc.c (yyparse): Omit spaces before #line.
10882
108832005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10884
10885 * src/tables.c (state_number_to_vector_number): Put it inside an
10886 "#if 0", since it's not currently used. Problem reported by
10887 Roland McGrath.
10888
108892005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10890
10891 * src/output.c (escaped_output): Renamed from
10892 escaped_file_name_output, since we now use it for symbol tags as
10893 well. All uses changed.
10894 (symbol_destructors_output, symbol_printers_output):
10895 Escape symbol tags too.
10896 Problem reported by Matyas Forstner in
10897 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10898
10899 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10900 not needed.
10901 * src/output.c (user_actions_output, token_definitions_output,
10902 symbol_destructors_output, symbol_printers_output): Likewise.
10903 * src/reader.c (prologue_augment): Likewise.
10904 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10905
10906 * src/vcg.c (output_edge): Don't quote linestyle arg.
10907 Problem reported by twlevo@xs4all.nl.
10908
109092005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10910
10911 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10912 example, reported by Derek M Jones. Also, make the example even
10913 more outrageous, to better illustrate how bad the problem is.
10914
109152005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10916
10917 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10918 putsym. Typo reported by Sebastian Piping.
10919
109202005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10921
10922 * doc/bison.texinfo (Language and Grammar): some -> same
10923 (Epilogue): int he -> in the
10924 Typos reported by Sebastian Piping via Justin Pence.
10925
109262005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10927
10928 * tests/glr-regression.at (Improper handling of embedded actions
10929 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10930 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10931 with dollar signs in test names.
10932 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10933 for a similar reason.
10934
109352005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10936
10937 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10938 wants to redefine G_VIEW.
10939
109402005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10941
10942 * src/vcg.c (get_view_str): Remove case for normal_view.
10943 Problem reported by twlevo@xs4all.nl.
10944
109452005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10946
10947 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10948 Problem reported by twlevo@xs4all.nl.
10949
10950 * doc/bison.texinfo: Change @dircategory from "GNU programming
10951 tools" to "Software development". Requested by Richard Stallman
10952 via Karl Berry.
10953
109542005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10955
10956 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10957 Problem reported by twlevo@xs4all.nl.
10958
109592005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10960
10961 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10962 keyword; it's not needed with modern compilers, and it doesn't
10963 affect correctness with older compilers. Suggested by
10964 twlevo@xs4all.nl.
10965
109662005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10967
10968 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10969 gcc -Wswitch-default.
10970 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10971 * data/yacc.c (yyparse): Likewise.
10972
109732005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10974
10975 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10976 already. Let config.h define any nonstandard values.
10977
109782005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10979
10980 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10981 for the benefit of slower hosts. Problem reported by
10982 Nelson H. F. Beebe.
10983
109842005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10985
10986 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10987 being defined and not used.
10988 * data/lalr1.cc (yyparse): Likewise.
10989 Use "if (false)" rather than "if (0)".
10990
109912005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10992
10993 * TODO: Mention that we should allow NUL bytes in tokens.
10994
109952005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10996
10997 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10998 Problem reported by Hans Aberg.
10999
110002005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11001
11002 * src/getargs.c (version): Happy new year; update overall
11003 program copyright date from 2004 to 2005.
11004
11005 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11006 Problem reported by Hans Aberg.
11007 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11008 (Output file names.): Add a test for the case when standard output
11009 is closed.
11010
110112004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11012
11013 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11014 to fix an oversight in the Bison 2.0 manual.
11015
110162004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11017
11018 * NEWS: Version 2.0. Reformat the existing news items since
11019 1.875, so that related items are grouped together.
11020 * configure.ac (AC_INIT): Bump version to 2.0.
11021 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11022
11023 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11024 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11025 otherwise, we're not testing alloca. Unfortunately there's no
11026 simple way to consult HAVE_ALLOCA here.
11027
11028 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11029 for yymsg, too.
11030
11031 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11032 hand. This avoids a warning about comparing int to size_t when
11033 GCC warnings are enabled.
11034
110352004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11036
11037 * NEWS: Bison-generated parsers no longer default to using the
11038 alloca function (when available) to extend the parser stack, due
11039 to widespread problems in unchecked stack-overflow detection.
11040 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11041 responsibility to set it to a positive value. This lets the user
11042 specify a value that is not a preprocessor constant.
11043 * data/yacc.c (YYMAXDEPTH): Likewise.
11044 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11045 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11046 to be a compile-time constant. However, explain the constraints on it.
11047 Also, explain the constraints on YYINITDEPTH.
11048 (Table of Symbols): Explain that alloca is no longer the default.
11049 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11050 to 1.
11051
11052 * doc/bison.texinfo (Location Default Action): Mention that n must
11053 be zero when k is zero. Suggested by Frank Heckenbach.
11054
110552004-12-22 Akim Demaille <akim@epita.fr>
11056
11057 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11058 (parser::state_type, parser::semantic_type, parser::location_type):
11059 Private, not public.
11060 (parser::parse): Return ints, not bool.
11061 Returning a bool introduces a problem: 0 corresponds to false, and
11062 it seems weird to return false on success. Returning true changes
11063 the conventions for yyparse.
11064 Alternatively we could return void and send an exception.
11065 There is no clear consensus (yet?).
11066 (state_stack, semantic_stack, location_stack): Rename as...
11067 (state_stack_type, semantic_stack_type, location_stack_type): these.
11068 Private, not public.
11069 * tests/c++.at: New.
11070 * tests/testsuite.at, tests/Makefile.am: Adjust.
11071
110722004-12-21 Akim Demaille <akim@epita.fr>
11073
11074 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11075
110762004-12-21 Akim Demaille <akim@epita.fr>
11077
11078 Don't impose std::string for filenames.
11079
11080 * data/lalr1.cc (b4_filename_type): New.
11081 (position::filename): Use it.
11082 (parser.hh): Move the inclusion of stack.hh and location.hh below
11083 the user code, so that needed headers for the filename type can be
11084 included first.
11085 Forward declare them before the user code.
11086 * tests/Makefile.am (check-local, installcheck-local): Pass
11087 TESTSUITEFLAGS to the TESTSUITE.
11088
110892004-12-20 Akim Demaille <akim@epita.fr>
11090
11091 Use more STL like names: my_class instead of MyClass.
11092
11093 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11094 (SemanticStack, SemanticType, StateStack, StateType)
11095 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11096 (Parser::value): Rename as...
11097 (location_stack, location_type, rhs_number_type, semantic_stack)
11098 (semantic_type, state_stack, state_type, token_number_type, stack)
11099 (slice, traits, parser::yylloc, parser::yylval): these.
11100
11101 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11102
111032004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11104
11105 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11106 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11107
111082004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11109
11110 Remove uses of 'short int' and 'unsigned short int'. This raises
11111 some arbitrary limits. It uses more memory but nowadays that's
11112 not much of an issue.
11113
11114 This change does not affect the generated parsers; that's a different
11115 task, as some users will want to conserve memory there.
11116
11117 Ideally we should use size_t to represent all object counts, and
11118 something like ptrdiff_t to represent signed differences of object
11119 counts; but that will require more code-cleanup than I have the
11120 time to do right now.
11121
11122 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11123 Use size_t, not int or short int, to count objects.
11124 * src/closure.c (nritemset, closure): Likewise.
11125 * src/closure.h (nritemset, closure): Likewise.
11126 * src/nullable.c (nullable_compute): Likewise.
11127 * src/print.c (print_core): Likewise.
11128 * src/print_graph.c (print_core): Likewise.
11129 * src/state.c (state_compare, state_hash): Likewise.
11130 * src/state.h (struct state): Likewise.
11131 * src/tables.c (default_goto, goto_actions): Likewise.
11132
11133 * src/gram.h (rule_number, rule): Use int, not short int.
11134 * src/output.c (prepare_rules): Likewise.
11135 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11136 errs, reductions): Likewise.
11137 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11138 Likewise.
11139 * src/tables.c (vector_number, tally, action_number,
11140 ACTION_NUMBER_MINIMUM): Likewise.
11141 * src/output.c (muscle_insert_short_int_table): Remove.
11142
111432004-12-17 Akim Demaille <akim@epita.fr>
11144
11145 * data/lalr1.cc: Extensive Doxygenation.
11146 (error_): Rename as...
11147 (error): this, since it is visible to the user.
11148 Adjust callers.
11149 (Parser::message): Now an automatic variable from...
11150 (Parser::yyreport_syntax_error_): here.
11151 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11152 Parser::error.
11153 * tests/input.at: Escape $.
11154
111552004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11156
11157 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11158 Parenthesize rhs to avoid obscure problems with mistakes like
11159 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11160 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11161 b4_rhs_location): Likewise.
11162 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11163 b4_rhs_location): Likewise.
11164
111652004-12-16 Akim Demaille <akim@epita.fr>
11166
11167 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11168 yacc.c: be sure to stay within yycheck_.
11169 * tests/actions.at: Re-enable C++ tests.
11170
111712004-12-16 Akim Demaille <akim@epita.fr>
11172
11173 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11174 real.
11175
111762004-12-16 Akim Demaille <akim@epita.fr>
11177
11178 Use #define to handle the %name-prefix.
11179
11180 * data/glr.c, data/yacc.c: Comment changes.
11181 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11182 so that one can refer to yylex in the parser file, and have it
11183 renamed, as is the case with other skeletons.
11184
111852004-12-16 Akim Demaille <akim@epita.fr>
11186
11187 Move lalr1.cc internals into yy*.
11188
11189 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11190 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11191 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11192 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11193 (empty_, final_, terror_, errcode_, ntokens_)
11194 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11195 (looka_, ilooka_, error_range_, nerrs_):
11196 Rename as...
11197 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11198 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11199 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11200 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11201 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11202 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11203 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11204 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11205 these.
11206
112072004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11208
11209 Fix some problems reported by twlevo at xs4all.
11210 * src/symtab.c (symbol_new): Report an error if the input grammar
11211 contains too many symbols. This is better than calling abort() later.
11212 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11213 (struct node, struct graph):
11214 Rename member expand to stretch. All uses changed.
11215 (struct graph): Remove member layoutalgorithm. All uses removed.
11216 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11217 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11218 All uses changed.
11219 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11220
112212004-12-15 Akim Demaille <akim@epita.fr>
11222
11223 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11224 Add more Doxygen comments.
11225 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11226 (report_syntax_error_, translate_): Rename as...
11227 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11228 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11229
112302004-12-15 Akim Demaille <akim@epita.fr>
11231
11232 * data/lalr1.cc (lex_): Rename as...
11233 (yylex_): this.
11234 Move the trace here.
11235 Take the %name-prefix into account.
11236 Reported by Alexandre Duret-Lutz.
11237
112382004-12-15 Akim Demaille <akim@epita.fr>
11239
11240 Simplify the C++ parser constructor.
11241
11242 * data/lalr1.cc (debug_): Rename as...
11243 (yydebug_): so that the parser's internals are always in the yy*
11244 pseudo namespace.
11245 Adjust uses.
11246 (b4_parse_param_decl): Remove the leading comma as it is now only
11247 called as unique argument list.
11248 (Parser::Parser): Remove the constructor accepting a location and
11249 an initial debugging level.
11250 Remove from the other ctor the argument for the debugging level.
11251 (debug_level_type, debug_level, set_debug_level): New.
11252
11253 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11254 constructor calls.
11255
112562004-12-15 Akim Demaille <akim@epita.fr>
11257
11258 Remove b4_root related material: failure experiment
11259 (which goal was to allow to derive from a class).
11260
11261 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11262 definitions and uses.
11263
112642004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11265
11266 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11267 not 2, since it's not portable to subtract 1 from the start of an
11268 array. The new item 0 is never set or used. All uses changed.
11269
11270 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11271 the default definition of YYLLOC_DEFAULT. Problem reported
11272 by Frank Heckenbach.
11273
112742004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11275
11276 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11277 the normal case and one for the error case. Just use the
11278 first one uniformly. Problem reported by Frank Heckenbach.
11279 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11280 use exactly the same macro in both places.
11281 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11282 so that the normal-case YYRHSLOC works for the error case too.
11283 All uses changed.
11284 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11285 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11286 * doc/bison.texinfo (Location Default Action): Don't claim that
11287 we have an array of locations. Use the same macro for both glr
11288 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11289 the index is 0.
11290
112912004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11292
11293 * HACKING: Update email addresses to send announcements to.
11294
11295 * configure.ac (AC_INIT): Bump version to 1.875f.
11296
112972004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11298
11299 * NEWS: Version 1.875e.
11300 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11301
11302 * src/scan-skel.l: Include "complain.h", for "fatal".
11303
11304 * src/relation.h (relation_print, relation_digraph):
11305 Relation sizes are of type relation_node, not size_t (this is
11306 merely a doc fix, since the two types are equivalent).
11307 (relation_transpose): Relation sizes are of type relation_node,
11308 not int.
11309 * src/relation.c: Likewise.
11310 (top, infinity): Now of type relation_node, not int.
11311 (traverse, relation_transpose): Use relation_node, not int.
11312
11313 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11314 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11315 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11316
11317 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11318 specifying whether the test should be skipped. Use it tp
11319 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11320 fail on some hosts, and should be skipped.
11321
113222004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11323
11324 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11325 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11326 unless otherwise specified below.
11327
11328 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11329 to allocate kernel_base, kernel_items, kernel_size, since
11330 they needn't be initialized to 0.
11331 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11332 * src/closure.c (new_closure): Likewise, for itemset.
11333 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11334 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11335 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11336 (build_relations): Likewise for edge, states1, includes.
11337 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11338 * src/reader.c (packgram): Likewise, for ritem, rules.
11339 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11340 * src/relation.c (relation_digraph): Likewise for VERTICES.
11341 (relation_transpose): Likewise for new_R, end_R.
11342 * src/symtab.c (symbols_token_translations_init): Likewise for
11343 token_translations.
11344 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11345 (token_actions): Likewise for yydefact, actrow, conflrow,
11346 conflict_list.
11347 (save_column): Likewise for froms[symno], tos[symno].
11348 (goto_actions): Likewise for state_count.
11349 (pack_table): Likewise for base, pos, check.
11350 (tables_generate): Likewise for width.
11351
11352 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11353 for initial core. Just have a separate core, so we needn't worry
11354 about whether kernel_size and kernel_base are initialized.
11355
11356 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11357 kernel_size, kernel_items): Remove unnecessary initialization.
11358 * src/conflicts.c (conflicts): Likewise.
11359 * src/derives.c (derives): Likewise.
11360 * src/muscle_tablc (muscle_insert): Likewise.
11361 * src/relation.c (relation_digraph): Likewise.
11362 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11363 conflrow, conflict_table, conflict_list, table, check):
11364 Likewise.
11365
11366 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11367 This is because all callers pass unsigned int.
11368 * src/closure.h (new_closure): Likewise.
11369
11370 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11371 (build_relations): Initialize includes[i] in all cases.
11372 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11373 and rules[ruleno].precsym. Initialize members in order.
11374 * src/relation.c (relation_transpose): Always initialize new_R[i]
11375 and end_R[i].
11376 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11377
11378 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11379 conflict_list[0] was always 0, but now it isn't initialized.
11380
11381 * src/table.c (table_grow): When conflict_table grew, the grown
11382 area wasn't cleared. Fix this.
11383
11384 * lib/.cvsignore: Add strdup.c, strdup.h.
11385 * m4/.cvsignore: Add strdup.m4.
11386
113872004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11388
11389 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11390 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11391 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11392 ngotos + 1 without checking for overflow.
11393 (build_relations): Use END_NODE, not -1, to denote end of edges.
11394 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11395 build_relations): Use goto_number, not int, for goto numbers.
11396 * src/tables.c (save_column, default_goto): Likewise.
11397
113982004-11-23 Akim Demaille <akim@epita.fr>
11399
11400 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11401 of #defining from yystype.
11402 Don't typedef yystype, C++ does not need it.
11403 This lets it possible to forward declare it as union.
11404
114052004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11406
11407 * bootstrap (gnulib_modules): Add extensions.
11408 Problem reported by Jim Meyering.
11409
114102004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11411
11412 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11413 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11414 src/system.h, src/tables.c: XFREE -> free, to accommodate
11415 recent change to gnulib xalloc.h.
11416 Problem reported by Jim Meyering.
11417
114182004-11-17 Akim Demaille <akim@epita.fr>
11419
11420 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11421
114222004-11-17 Akim Demaille <akim@epita.fr>,
11423 Alexandre Duret-Lutz <adl@gnu.org>
11424
11425 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11426 changes.
11427 (YYCDEBUG): Adjust.
11428 Use it instead of cdebug_.
11429 (Parser::debug_stream, Parser::set_debug_stream): New.
11430 (Parser::symprint_): Define cdebug_ for temporary backward
11431 compatibility.
11432 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11433 debug_stream ().
11434
114352004-11-17 Akim Demaille <akim@epita.fr>
11436
11437 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11438 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11439 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11440 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11441
114422004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11443
11444 * data/glr.c (yyloc_default): Remove; not used.
11445 Problem reported by Frank Heckenbach.
11446
114472004-10-25 Akim Demaille <akim@epita.fr>
11448
11449 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11450 Introduce another definition to address simple location arrays.
11451 (yyGLRStack): New member: yyerror_range.
11452 (yyrecoverSyntaxError, yyparse): Update it.
11453 (yyrecoverSyntaxError): Use it when shifting the error token to
11454 have an accurate range, equivalent to the one computed by both
11455 yacc.c and lalr1.cc.
11456 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11457 that column numbers start at column 0, as per GNU Coding
11458 Standards, the others tests, and the doc.
11459 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11460 Adjust to the above change (first column is 0).
11461 And adjust the location of the "<error>", now covering the whole
11462 line.
11463
114642004-10-22 Akim Demaille <akim@epita.fr>
11465 and Paul Eggert <eggert@cs.ucla.edu>
11466
11467 Remove some arbitrary limits on goto numbers and relations.
11468 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11469 initial values, since they're never used.
11470 (set_goto_map): ngotos is now unsigned, so test for overflow
11471 by seeing whether it wraps around to zero.
11472 * src/lalr.h (goto_number): Now size_t, not short int.
11473 (GOTO_NUMBER_MAXIMUM): Remove.
11474 * src/relation.c (relation_print, traverse, relation_transpose):
11475 Check for END_NODE rather than looking at sign.
11476 * src/relation.h (END_NODE): New macro.
11477 (relation_node): Now size_t, not short int.
11478
114792004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11480
11481 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11482 keyword, not an identifier. Problem reported by Baron Schwartz in
11483 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11484
114852004-10-11 Akim Demaille <akim@epita.fr>
11486
11487 * src/symtab.c (symbol_check_alias_consistency): Also check
11488 type names, destructors, and printers.
11489 Reported by Alexandre Duret-Lutz.
11490 Recode the handling of associativity and precedence in terms
11491 of symbol_precedence_set.
11492 Accept no redeclaration at all, not even equal to the previous
11493 value.
11494 (redeclaration): New.
11495 Use it to factor redeclaration complaints.
11496 (symbol_make_alias): Don't set the type of the alias, let
11497 symbol_check_alias_consistency do it as for other features.
11498 * src/symtab.h (symbol): Add new member prec_location, and
11499 type_location.
11500 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11501 * tests/input.at (Incompatible Aliases): New.
11502
115032004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11504
11505 .cvsignore fixes to accommodate gnulib changes,
11506 and the practice of naming build directories "_build".
11507 * .cvsignore: Add "_*". Sort.
11508 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11509 * m4/.cvsignore: Add "*_gl.m4".
11510
115112004-10-06 Akim Demaille <akim@epita.fr>
11512
11513 * src/parse-gram.y (add_param): Fix the truncation of trailing
11514 spaces.
11515
115162004-10-05 Akim Demaille <akim@epita.fr>
11517
11518 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11519 whether the reducion was empty or not. This leaves room to
11520 improve the use of YYLLOC_DEFAULT in such a case.
11521 lalr1.cc is still experimental, so changing this is acceptable.
11522 And finally, there are probably not many users who changed the
11523 handling of locations in GLR, so changing is admissible too.
11524
11525 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11526 empty reduction, set @$ to an empty location ending the previously
11527 stacked symbol.
11528 Adjust uses to make sure the code is triggered on empty
11529 reductions.
11530 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11531 expected output: empty reductions have empty locations.
11532
115332004-09-29 Akim Demaille <akim@epita.fr>
11534
11535 * data/lalr1.cc: Move towards a more standard C++ coding style
11536 for templates: Class < T > -> Class<T>.
11537
115382004-09-29 Akim Demaille <akim@epita.fr>
11539
11540 * data/lalr1.cc: Reinstall the former ctor, for sake of
11541 compatibility, but warn it will be removed.
11542 Move towards a more standard C++ coding style (i.e., type *var ->
11543 type* var).
11544
115452004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11546
11547 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11548 since it's less likely to work if NULs are involved in the future.
11549
115502004-09-27 Akim Demaille <akim@epita.fr>
11551
11552 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11553
115542004-09-27 Akim Demaille <akim@epita.fr>
11555
11556 * data/lalr1.cc (b4_parse_param_decl_1): New.
11557 (b4_parse_param_decl): Use it to have different names between attribute
11558 and argument names.
11559 (b4_cc_constructor_call): Likewise.
11560
115612004-09-24 Akim Demaille <akim@epita.fr>
11562
11563 * src/parse-gram.y (add_param): Strip the leading and trailing
11564 blanks from a formal argument declaration.
11565 (YY_LOCATION_PRINT): New.
11566
115672004-09-24 Akim Demaille <akim@epita.fr>
11568
11569 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11570 after the location.
11571
115722004-09-24 Akim Demaille <akim@epita.fr>
11573
11574 * doc/bison.texinfo (Table of Symbols): Sort.
11575
115762004-09-21 Akim Demaille <akim@epita.fr>
11577
11578 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11579 the useless parentheses.
11580 Suggested by Paul Eggert.
11581
115822004-09-20 Akim Demaille <akim@epita.fr>
11583
11584 Let the initial-action act on the look-ahead, and use it for the
11585 "initial push" (corresponding to an hypothetical beginning-of-file).
11586 And let lalr1.cc honor %initial-action.
11587
11588 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11589 example.
11590 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11591 (Parser::Parser): Remove the ctor that used to initialize it.
11592 (Parser::parse): Like in the other skeletons, issue the "starting
11593 parse" message before any action.
11594 Honor %initial-action.
11595 Initialize the stacks with the lookahead.
11596 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11597 look-ahead.
11598 Push them in the stacks.
11599 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11600
116012004-09-20 Akim Demaille <akim@epita.fr>
11602
11603 * doc/bison.texinfo (Initial Action Decl): New.
11604
116052004-09-20 Akim Demaille <akim@epita.fr>
11606
11607 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11608 clearer criterion to define it.
11609 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11610 When reducing on an empty RHS, use the latest stacked location as
11611 location.
11612 yylloc is not always available.
11613 * data/glr.c: Likewise.
11614 Also, honor initial-actions.
11615
116162004-09-20 Akim Demaille <akim@epita.fr>
11617
11618 * data/yacc.c (YY_LOCATION_PRINT): New.
11619 Define when we know YYLTYPE's structure, i.e., when the default
11620 YYLLOC_DEFAULT is used.
11621 * data/c.m4 (b4_yysymprint_generate): Use it.
11622 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11623 value of the result.
11624 (error_start_): Replace with...
11625 (error_range_): this location array.
11626 This allows to replace code relying on the implementation of
11627 locations by portable code.
11628 * data/yacc.c (yylerrsp): Replace with...
11629 (yyerror_range): this.
11630 Every time a token is popped, update yyerror_range[0], to have an
11631 accurate location for the error token.
11632 * data/glr.c (YY_LOCATION_PRINT): New.
11633 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11634 deference a pointer.
11635 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11636 report the location in %printers.
11637
11638 * src/scan-skel.l: Instead of abort, report error messages to ease
11639 understanding skeleton scanning failures.
11640
116412004-09-16 Akim Demaille <akim@epita.fr>
11642
11643 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11644 (iterator, const_iterator): these, to be more in the C++ spirit.
11645 Also, return reverse iterators so that when displaying the stack
11646 we display its bottom first.
11647 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11648 from yacc.c.
11649 We should probably use vector here though.
11650
116512004-09-16 Akim Demaille <akim@epita.fr>
11652
11653 Have more complete shift traces.
11654
11655 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11656 to report Shifts instead of ad hoc YYDPRINTF invocations,
11657 including for the error token.
11658 * data/lalr1.cc (symprint_): Output the location.
11659 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11660 output the location within the %printer.
11661 Activate GLR tests, at least to make sure they compile properly.
11662 They still don't pass though.
11663 * tests/calc.at: Adjust expect verbose output, since now "Entering
11664 state..." is on a different line than the "Shifting" message.
11665
116662004-09-08 Akim Demaille <akim@epita.fr>
11667
11668 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11669 Bison directive from the Bison file to the invocation of this
11670 macro, so that these directives are passed to
11671 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11672 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11673 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11674 the extra Bison directives instead of the whole series.
11675 Change the grammar so that there are recoverable errors, and
11676 unrecoverable errors. Now we can have the parser give up before
11677 consuming the whole input. As a result we now can observe that
11678 the lookahead is freed when needed.
11679 Change the parser source to parse argv[1] instead of a hard coded
11680 string.
11681 Simplify yylex, and give a value and location to EOF.
11682 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11683 passed directives already coded in the file.
11684 Add some tests to check the location of "error".
11685 For some tests, the C++ parser is correct, and not yacc.c.
11686 For other tests, they provide different, but unsatisfying, values,
11687 so keep the C++ value so that at least one parser is "correct"
11688 according to the test suite.
11689 (Actions after errors): Remove, this is subsumed by the
11690 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11691
116922004-09-06 Akim Demaille <akim@epita.fr>
11693
11694 * data/lalr1.cc: Adjust the indentation of the labels.
11695 (Parser::pop): New.
11696 Use it.
11697
116982004-09-06 Akim Demaille <akim@epita.fr>
11699
11700 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11701 argument, an informative message.
11702 Call YY_SYMBOL_PRINT.
11703 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11704 * data/lalr1.cc (destruct_): Likewise.
11705 In addition, no longer depend on b4_yysymprint_generate and
11706 b4_yydestruct_generate to generate these functions, do it "by
11707 hand".
11708
117092004-09-03 Akim Demaille <akim@epita.fr>
11710
11711 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11712 invoked, yydestruct the lookahead.
11713 * tests/calc.at (Calculator $1): Update the expected lengths of
11714 traces: there is an added line for the discarded lookahead.
11715 * doc/bison.texinfo (Destructor Decl): Some rewording.
11716 Define "discarded" symbols.
11717
117182004-09-02 Akim Demaille <akim@epita.fr>
11719
11720 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11721
117222004-09-02 Akim Demaille <akim@epita.fr>
11723
11724 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11725 (YYDSYMPRINTF): Rename as...
11726 (YY_SYMBOL_PRINT): this.
11727 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11728 two.
11729 Use it instead of direct symprint_ calls.
11730 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11731 one.
11732
117332004-09-02 Akim Demaille <akim@epita.fr>
11734
11735 * data/lalr1.cc (b4_yysymprint_generate): New.
11736 (symprint_): New member function, defined when YYDEBUG.
11737 Use it consistently instead of token/nterm debugging output by
11738 hand.
11739 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11740 %printer calls to use cdebug_ when using lalr1.cc.
11741
117422004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11743
11744 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11745 with #ifdef YYDEBUG.
11746
117472004-08-26 Akim Demaille <akim@epita.fr>
11748
11749 * doc/bison.texinfo (Implementing Loops): Rename as...
11750 (Implementing Gotos/Loops): this.
11751
117522004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11753
11754 Adjust to latest gnulib.
11755 * bootstrap (gnulib_modules): Add xalloc-die.
11756 Set LC_ALL=C so that file names sort consistently.
11757 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11758 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11759 uintmax_t.m4, ulonglong.m4.
11760 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11761 po.m4 since we are now using _gl.m4 instead.
11762
117632004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11764
11765 * src/scan-action.l: Remove. Scanning of semantic actions is
11766 handled in scan-gram.l.
11767
117682004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11769
11770 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11771
11772 * src/location.h (struct): The file member is a uniqstr.
11773 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11774
117752004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11776
11777 Fix bug with non-%union parsers that have printers or destructors,
11778 which led to a Bison core dump. Reported by Peter Fales in
11779 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11780
11781 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11782 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11783 not to our own type.
11784 * src/output.c (symbol_destructors_output, symbol_printers_output):
11785 Don't assume %union.
11786 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11787 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11788 UNION-FLAG. All callers changed.
11789 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11790 Use type char, not unsigned int, when declaring an array of char;
11791 this lets us remove a cast.
11792 (Printers and Destructors): Add non-%union test cases.
11793
117942004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11795
11796 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11797 GLR writeups. E.g., avoid frenchspacing and the future tense,
11798 change "lookahead" to "look-ahead", and change "wrt" to "with
11799 respect to".
11800
118012004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11802
11803 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11804 New sections, split off from the GLR Parsers section. Put the new
11805 Simple GLR Parser near the start of the GLR section, for clarity.
11806 Rewrite connective text.
11807
118082004-06-21 Frank Heckenbach <frank@g-n-u.de>
11809
11810 * doc/bison.texinfo (Simple GLR Parsers): New section.
11811
118122004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11813
11814 * NEWS, TODO, doc/bison.texinfo:
11815 Use "look-ahead" instead of "lookahead", to be consistent.
11816 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11817 while we're fixing "look-ahead".
11818 * src/conflicts.c (shift_set): Renamed from shiftset.
11819 (look_ahead_set): Renamed from lookaheadset.
11820 * src/print.c: Likewise.
11821 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11822 name for "lookahead".
11823 (report_types, usage): Likewise.
11824 * src/getargs.h (report_look_ahead_tokens): Renamed from
11825 report_lookaheads.
11826 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11827 compute_lookaheads.
11828 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11829 (look_ahead_tokens_print): Renamed from lookaheads_print.
11830 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11831 state_rule_lookaheads_print.
11832 * src/state.h: Likewise.
11833 (reductions.look_ahead_tokens): Renamed from lookaheads.
11834 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11835 AT_DATA_LOOKAHEADS_GRAMMAR.
11836
118372004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11838
11839 * README: Update location of patched M4 distribution.
11840
118412004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11842
11843 Don't assume the C++ compiler takes the same arguments as the C compiler
11844 (trivial change).
11845 * configure.ac (O0CXXFLAGS): New var.
11846 * tests/atlocal.in (CXXFLAGS): Use it.
11847
118482004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11849
11850 Fix some "make check" problems with C++ reported by
11851 Albert Chin-A-Young for Tru64 C++ in this thread:
11852 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11853
11854 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11855 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11856 Output to a .cc file for C++, not to a .c file.
11857 * tests/calc.at (AT_CHECK_CALC): Likewise.
11858 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11859 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11860
118612004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11862
11863 * tests/calc.at, tests/actions.at: Workaround for SGI
11864 C++ compiler. (trivial change)
11865
118662004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11867
11868 Spent a few hours checking out which prerequisite versions the
11869 current sources actually require. I went all the way back to
11870 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11871 a seemingly endless set of combinations of versions more recent
11872 than that. The bottom line is that the current sources require
11873 fairly recent versions of the build tools, and it'll be some work
11874 to change this.
11875 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11876 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11877 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11878 Add comments explaining why those particular versions are
11879 currently needed.
11880
11881 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11882 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11883 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11884
11885 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11886 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11887
118882004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11889
11890 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11891 0.11.5. Suggested by Bruno Haible.
11892 * bootstrap: Remove gettext version checking.
11893
11894 * doc/bison.texinfo (Decl Summary): Also mention that %union
11895 can depend on prerequisite types. Problem reported by Tim
11896 Van Holder.
11897
118982004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11899
11900 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11901 * README-alpha: Don't tell people not to package this.
11902
11903 * bootstrap: Don't assume $(...) works; use `...` instead.
11904 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11905 gettext better.
11906
11907 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11908 put into the -d output file, and mention what to do if YYSTYPE is
11909 defined as a macro.
11910
119112004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11912
11913 Undo change made earlier today: it caused autopoint to not bring
11914 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11915 autopoint's.
11916
11917 * bootstrap: Check that gettext version matches what's in
11918 configure.ac. Warn users to ignore robots.txt ERROR 404.
11919 * bootstrap: Undo today's earlier change (logged below).
11920 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11921
11922 The gettext version checking is causing more trouble than it's
11923 curing; remove it. Problem reported by Paul Hilfinger.
11924
11925 * bootstrap: Issue a warning that one can expect a message
11926 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11927 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11928
119292004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11930
11931 Ensure that the C++ compiler used for testing actually works on a
11932 simple test program; if not, skip the C++-related tests. Problem
11933 reported by Vin Shelton in:
11934 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11935
11936 * m4/cxx.m4: New file.
11937 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11938 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11939 * tests/local.at (AT_COMPILE_CXX): Use it.
11940
119412004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11942
11943 * data/glr.c (yylloc): Output this macro even if locations are not
11944 being generated, as the GLR parser needs it even in that case.
11945 Problem reported by Troy A. Johnson
11946 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11947
11948 * configure.ac (AC_INIT): Update to 1.875e.
11949
119502004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11951
11952 * NEWS: Version 1.875d.
11953 * configure.ac (AC_INIT): Likewise.
11954 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11955
11956 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11957 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11958 lalr1.cc runs afoul of the first, and the last two are no longer
11959 supported by GCC 3.4.0.
11960 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11961 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11962
119632004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11964
11965 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11966 unsigned int, for compatibility with latest gnulib hash module.
11967 * src/state.c (state_hash, state_hasher): Likewise.
11968 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11969 * src/uniqstr.c (hash_uniqstr): Likewise.
11970
119712004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11972
11973 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11974
11975 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11976 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11977 character and string literals.
11978 (unexpected_end): New function.
11979 (unexpected_eof): Use it.
11980 (unexpected_newline): New function.
11981 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11982 actions.
11983
11984 * NEWS: Document %expect-rr.
11985
11986 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11987 Fix typo by replacing $1 with $option.
11988 Remove more 'intl'-related files.
11989 Don't DEFUN AM_INTL_SUBDIR twice.
11990
11991 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11992 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11993 strtoul.c.
11994 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11995 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11996 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11997 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11998 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11999 * src/.cvsignore: Add *.output.
12000
12001 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12002 gets copied to the output file.
12003
120042004-04-28 Paul Eggert <eggert@twinsun.com>
12005
12006 Get files from the gnulib and po repositories, instead of relying
12007 on them being in our CVS. Upgrade to latest versions of gnulib
12008 and Automake.
12009
12010 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12011 * bootstrap: Bootstrap from gnulib and po repositories.
12012 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12013 * README-cvs: Document these changes. Remove version numbers from
12014 mentions of build tools, since they change so often. Mention Flex.
12015
12016 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12017 (gl_USE_SYSTEM_EXTENSIONS): Add.
12018 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12019 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12020 does this for us.
12021 (AC_ISC_POSIX): Remove; we no longer support this
12022 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12023 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12024 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12025 Do not check for C89 headers, except for locale.h which is used
12026 by the Yacc library and must port to K&R hosts.
12027 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12028 Do not check for C89 functions, except for setlocale which is
12029 used by the Yacc library.
12030 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12031 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12032 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12033 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12034 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12035 AM_GNU_GETTEXT): Remove; now done by:
12036 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12037 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12038 for us.
12039
12040 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12041 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12042 Define to empty, as gnulib.mk will do the rest for us.
12043 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12044 for us.
12045 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12046 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12047
12048 * src/files.c: Include gnulib's xstrndup.h.
12049
12050 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12051 (REALLOC): Use xnrealloc, for likewise.
12052 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12053 (strnlen, memrchr): Remove decls; functions no longer used.
12054 Include <stpcpy.h>.
12055
12056 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12057 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12058 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12059 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12060 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12061 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12062 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12063 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12064 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12065 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12066 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12067 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12068 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12069 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12070 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12071 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12072 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12073 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12074 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12075 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12076 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12077 Remove, as these files are now generated automatically
12078 by bootstrap or automake.
12079
12080 * po/ChangeLog: Remove: all but one entry was a duplicate
12081 of this file, and I moved that 2000-11-02 entry here.
12082
12083 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12084 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12085 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12086 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12087 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12088 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12089 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12090 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12091 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12092 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12093 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12094 xstrndup.h.
12095 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12096 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12097 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12098 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12099 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12100 * src/.cvsignore: Remove *_.c.
12101
12102
12103 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12104 support it. (The latest stable gzip doesn't.)
12105
121062004-04-27 Paul Eggert <eggert@twinsun.com>
12107
12108 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12109 case, as stos_ is now used by destructors due to the 2004-02-09
12110 change.
12111
12112 Remove more K&R C support.
12113 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12114 * lib/subpipe.c (errno): Remove decl.
12115 Include <stdlib.h> unconditionally.
12116 (EXIT_FAILURE): Remove macro.
12117 * src/complain.c (vfprintf, strerror): Remove.
12118 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12119 unconditionally.
12120 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12121 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12122 (strchr, strspn, memchr): Remove decls.
12123 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12124 unconditionally. Do not declare perror.
12125 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12126 unconditionally.
12127
12128 * src/complain.c (_): Remove useless defn, as system.h defines this.
12129
12130 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12131 with latest obstack.h.
12132 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12133 to procedure types, as obstack.h now does that for us.
12134 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12135
12136 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12137 so that this include file can stand alone.
12138 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12139 does this now. Include subpipe.h first after config.h, to
12140 test whether it can stand alone.
12141
12142 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12143 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12144 unused declaration.
12145
12146 * tests/synclines.at (%union synch line): Put a dummy member in
12147 the union, because empty unions aren't allowed in C. Caught
12148 by GCC 3.4.0.
12149
121502004-04-13 Jim Meyering <jim@meyering.net>
12151
12152 * src/conflicts.c (conflicts_print): Correct format string typo:
12153 use `%%' to produce literal `%'. (trivial change)
12154
121552004-03-30 Paul Eggert <eggert@twinsun.com>
12156
12157 * src/getargs.c (version): Update copyright year to 2004.
12158
12159 * data/c.m4 (b4_int_type): Use 'short int' rather than
12160 'short', and similarly for 'long', 'unsigned', etc.
12161 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12162 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12163 yy_yypstack, yydumpstack): Likewise.
12164 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12165 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12166 Likewise.
12167 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12168 yy_stack_print, yyparse): Likewise.
12169 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12170 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12171 * lib/bitset.c (bitset_print): Likewise.
12172 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12173 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12174 * lib/bitsetv.c (bitsetv_dump): Likewise.
12175 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12176 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12177 Likewise.
12178 * src/LR0.c (allocate_itemsets): Likewise.
12179 * src/gram.h (rule_number, rule): Likewise.
12180 * src/lalr.h (goto_number): Likewise.
12181 * src/nullable.c (nullable_compute): Likewise.
12182 * src/output.c (prepare_rules): Likewise.
12183 * src/relation.c (relation_print, relation_digraph): Likewise.
12184 * src/relation.h (relation_node): Likewise.
12185 * src/state.h (state_number, transitions, errs, reductions,
12186 struct state): Likewise.
12187 * src/symtab.h (symbol_number, struct symbol): Likewise.
12188 * src/tables.c (vector_number, tally, action_number,
12189 default_goto, goto_actions): Likewise.
12190 * tests/existing.at (GNU Cim Grammar): Likewise.
12191 * tests/regression.at (Web2c Actions): Likewise.
12192
12193 * src/output.c (muscle_insert_short_int_table): Renamed from
12194 muscle_insert_short_table. All uses changed.
12195
121962004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12197
12198 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12199 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12200 Add %expect-rr rule.
12201
12202 * src/scan-gram.l: Recognize %expect-rr.
12203
12204 * src/conflicts.h (expected_sr_conflicts): Rename from
12205 expected_conflicts.
12206 (expected_rr_conflicts): Declare.
12207
12208 * src/conflicts.c (expected_sr_conflicts): Rename from
12209 expected_conflicts.
12210 (expected_rr_conflicts): Define.
12211 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12212 for GLR parsers.
12213 Use expected_sr_conflicts in place of expected_conflicts.
12214 Warn if expected_rr_conflicts used in non-GLR parser.
12215
12216 * doc/bison.texinfo: Add documentation for %expect-rr.
12217
122182004-03-08 Paul Eggert <eggert@gnu.org>
12219
12220 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12221 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12222
12223 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12224 in lalr1.cc.
12225 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12226 * src/scan-gram.l (scan_integer): New function.
12227 ({int}): Use it.
12228 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12229 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12230 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12231 Say "long int", not "long", for uniformity with GNU style.
12232
122332004-02-25 Paul Eggert <eggert@twinsun.com>
12234
12235 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12236 compilers. This fixes a problem with Intel's C++ compiler being
12237 chatty, reported by Guido Trentalancia in
12238 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12239
122402004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12241
12242 Support %destructor and merge error locations in lalr1.cc.
12243
12244 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12245 (Parser::stos_): Define unconditionally.
12246 (Parser::destruct_): New method. Generate its body with
12247 b4_yydestruct_generate.
12248 (Parser::error_start_): New attribute.
12249 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12250 token which are discarded.
12251 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12252 error_start_ when erroneous token are discarded.
12253 (Parser::parse) <yyerrlab1>: Compute the location of the error
12254 token so that it covers all the discarded tokens.
12255 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12256 it can be called with `%skeleton "lalr1.cc"', and do that.
12257
122582004-02-02 Paul Eggert <eggert@twinsun.com>
12259
12260 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12261 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12262 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12263 There's no need to mention top_builddir since Automake does that
12264 for us.
12265 (INCLUDES): Remove, as Automake says it's obsolescent.
12266 Contents migrated into AM_CPPFLAGS as described above.
12267 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12268
122692004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12270
12271 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12272 (yyreportSyntaxError): Handle case where lookahead token is
12273 YYEMPTY.
12274
122752004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12276
12277 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12278 resulting parsers are compilable with C++.
12279
122802003-12-23 Paul Eggert <eggert@twinsun.com>
12281
12282 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12283 * src/output.c (output_skeleton): Rename local var.
12284 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12285 Bison tokens, as this runs afoul of the 2003-10-07 change that
12286 disallowed NUL bytes in character constants or string literals.
12287
12288 * tests/local.at: Require Autoconf 2.59's Autotest.
12289 * tests/testsuite.at: Don't include local.at, since we now assume
12290 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12291 including it.
12292 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12293 multiple inclusion warnings.
12294
122952003-12-02 Akim Demaille <akim@epita.fr>
12296
12297 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12298 conditions.
12299 From Bruno Haible.
12300
123012003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12302
12303 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12304
123052003-10-07 Paul Eggert <eggert@twinsun.com>
12306
12307 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12308 if testsuite doesn't exist.
12309
12310 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12311 literals, unfortunately.
12312 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12313 Complain about NUL bytes in character constants or string literals.
12314
123152003-10-05 Paul Eggert <eggert@twinsun.com>
12316
12317 * NEWS: Don't document %no-default-prec, as it's still
12318 too experimental.
12319 * doc/bison.texinfo: Document %no-default-prec only if
12320 the defaultprec flag is set. Normally it's not.
12321
123222003-10-04 Paul Eggert <eggert@twinsun.com>
12323
12324 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12325 non-modifiable lvalue, instead of a modifiable one.
12326 * doc/bison.texinfo (Actions): Document that $$ can
12327 be assigned to. Do not claim that $$ and $N are
12328 array element references: user code should not rely on this.
12329
123302003-10-01 Paul Eggert <eggert@twinsun.com>
12331
12332 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12333 (grammar_declaration): Use it.
12334 * src/scan-gram.l: New token %no-default-prec.
12335 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12336 * NEWS, doc/bison.texinfo: Document the above.
12337
123382003-10-01 Akim Demaille <akim@epita.fr>
12339
12340 VCG no longer supports long_straight_phase.
12341
12342 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12343 * src/print_graph.c (print_graph): Adjust.
12344
123452003-09-30 Frank Heckenbach <frank@g-n-u.de>
12346 and Paul Eggert <eggert@twinsun.com>
12347
12348 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12349 Table of Symbols): Document %default-prec.
12350 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12351 (grammar_declaration): Set default_prec on %default-prec.
12352 * src/scan-gram.l (%default-prec): New token.
12353 * src/reader.h (default_prec): New flag.
12354 * src/reader.c: Likewise.
12355 (packgram): Handle it.
12356 * tests/conflicts.at (%default-prec without %prec,
12357 %default-prec with %prec, %default-prec 1): New tests.
12358
123592003-09-30 Paul Eggert <eggert@twinsun.com>
12360
12361 * tests/testsuite.at: Include local.at, not input.at, fixing
12362 a typo in the 2003-08-25 patch.
12363
123642003-08-27 Akim Demaille <akim@epita.fr>
12365
12366 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12367 GCC warnings.
12368
123692003-08-26 Akim Demaille <akim@epita.fr>
12370
12371 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12372 "<\#" to avoid magic from Gnus when posting parts of this script.
12373
123742003-08-26 Akim Demaille <akim@epita.fr>
12375
12376 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12377 (Parser::parse): here.
12378 Adjust: nerrs and errstatus is now replaced by...
12379 (Parser::nerrs_, Parser::errstatus_): New.
12380
123812003-08-25 Akim Demaille <akim@epita.fr>
12382
12383 * config/announce-gen, Makefile.cfg: New.
12384 * Makefile.am: Adjust.
12385 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12386 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12387
123882003-08-25 Akim Demaille <akim@epita.fr>
12389
12390 When reducing initial empty rules, Bison parser read an initial
12391 location that is not defined. This results in garbage, and that
12392 affects Bison's own parser. Therefore we need (i) to extend Bison
12393 to support a means to initialize this location, and (ii) to use
12394 this CVS Bison to fix CVS Bison's parser.
12395
12396 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12397 with...
12398 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12399 * src/parse-gram.y: Adjust.
12400 (%initial-action): New.
12401 (%error-verbose): Since we require CVS Bison, there is no reason
12402 not to use it.
12403 * src/scan-gram.l: Adjust.
12404 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12405 * data/yacc.c (yyparse): Use b4_initial_action.
12406
124072003-08-25 Akim Demaille <akim@epita.fr>
12408
12409 * doc/bison.texinfo: Don't promote stdout for error messages.
12410
124112003-08-25 Akim Demaille <akim@epita.fr>
12412
12413 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12414 From Alexandre Duret-Lutz.
12415
124162003-08-25 Akim Demaille <akim@epita.fr>
12417
12418 Version 1.875c.
12419
124202003-08-25 Akim Demaille <akim@epita.fr>
12421
12422 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12423 Use them.
12424
124252003-08-25 Akim Demaille <akim@epita.fr>
12426
12427 * data/lalr1.cc (Parser::reduce_print_): New.
12428 Use it.
12429
124302003-08-25 Akim Demaille <akim@epita.fr>
12431
12432 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12433 error recovery loops. This patch is based on
12434 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12435 Also, augment the similarity between lalr1.cc and yacc.c.
12436 Note: the locations of error recovery rules are not correct yet.
12437
12438 * data/lalr1.cc: Comment changes to augment the similarity between
12439 lalr1.cc and yacc.c.
12440 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12441 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12442 yyerrlab), when hitting EOF, pop the whole stack here instead of
12443 merely falling thru the default error handling mechanism.
12444 (yyerrorlab): New label, with the old contents of YYERROR,
12445 plus the following change: pop the stack of rhs corresponding
12446 to the production that invoked YYERROR. That is how Yacc
12447 behaves (required by POSIX).
12448 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12449 fail.
12450
124512003-08-25 Akim Demaille <akim@epita.fr>
12452
12453 Tune local.at so that people can "autom4te -l autotest calc.at -o
12454 calc" for instance, to extract a sub test suite.
12455
12456 * tests/testsuite.at: Move the initialization, Autotest version
12457 requirement, and AT_TESTED invocation into...
12458 * tests/local.at: here.
12459 * tests/testsuite.at: Include it for compatibility with Autoconf
12460 2.57.
12461 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12462 be ignore.
12463
124642003-08-04 Paul Eggert <eggert@twinsun.com>
12465
12466 Rework code slightly to avoid gcc -Wtraditional warnings.
12467 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12468 The returned value is now stored in *YY0. All callers changed.
12469 * src/output.c (merge_output): Adjust to the above change.
12470
124712003-07-26 Paul Eggert <eggert@twinsun.com>
12472
12473 * data/glr.c (YYASSERT): New macro.
12474 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12475 yyresolveStates, yyprocessOneStack):
12476 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12477 Derived from a suggestion by Frank Heckenbach.
12478
124792003-07-25 Paul Eggert <eggert@twinsun.com>
12480
12481 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12482 for portability to K&R C (after ansi2knr, presumably). See
12483 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12484 by Frank Heckenbach, though I have omitted the structure-initialization
12485 part of his glr-knr.diff patch since I recall that the Portable
12486 C Compiler didn't require that change.
12487
12488 Let the user specify how to allocate and free memory.
12489 Derived from a suggestion by Frank Heckenbach in
12490 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12491 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12492 All uses of free, malloc, realloc changed to use these macros,
12493 and unnecessary casts removed.
12494 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12495
124962003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12497
12498 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12499 use s.empty() rather than s == "" to test for empty string; see
12500 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12501 (trivial change)
12502
125032003-06-25 Akim Demaille <akim@epita.fr>
12504
12505 * config/depcomp, config/install-sh: Update from masters.
12506
125072003-06-20 Paul Eggert <eggert@twinsun.com>
12508
12509 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12510 and return properly parenthesized result.
12511 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12512 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12513 Remove unnecessary parentheses from uses.
12514 * doc/bison.texinfo (Location Default Action): Describe the
12515 conventions for parentheses.
12516
125172003-06-19 Paul Eggert <eggert@twinsun.com>
12518
12519 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12520 yyreportTree): Do not assume that size_t is the same width as int,
12521 when printing sizes. Print sizes using an unsigned format.
12522 Problem reported by Frank Heckenbach in
12523 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12524
12525 Port to Forte Developer 7 C compiler.
12526 * data/glr.c (struct YYLTYPE): If locations are not being used,
12527 declare a single dummy member, as empty structs do not conform
12528 to the C standard.
12529 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12530 the Forte Developer 7 C compiler complains that end-of-loop
12531 code is not reached.
12532
125332003-06-17 Paul Eggert <eggert@twinsun.com>
12534
12535 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12536 avoid warnings from picky compilers about redefinition of PARAMS.
12537
125382003-06-17 Paul Eggert <eggert@twinsun.com>
12539
12540 Version 1.875b.
12541
12542 * NEWS: Document 1.875b.
12543
12544 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12545 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12546 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12547 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12548 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12549 per recent gettext manual's suggestion.
12550 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12551 Use prototypes, not old-style definitions.
12552 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12553 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12554 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12555 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12556 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12557 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12558 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12559 vbitset_or_and_cmp, vbitset_copy): Likewise.
12560
12561 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12562 Do not include <stdlib.h>.
12563 (PARAMS): Define unconditionally for C89.
12564 (ATTRIBUTE_NORETURN): Remove.
12565 (ATTRIBUTE_UNUSED): Define unconditionally.
12566
12567 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12568 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12569 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12570 * lib/vbitset.c, lib/vbitset.h: New files.
12571 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12572 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12573 from libbitset.
12574
12575 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12576 `How Can I Reset @code{yyparse}', since texinfo does not allow
12577 arbitrary @ in node names.
12578
12579 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12580 shouldn't be needed according to the gettext 0.12.1 documentation
12581 but which seem to be needed anyway: codeset.m4 glibc21.m4
12582 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12583 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12584 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12585
12586 * lib/.cvsignore: Add stdbool.h.
12587 * m4/.cvsignore: Add nls.m4, po.m4.
12588
12589 Upgrade to CVS gnulib.
12590 * stdbool_.h: File renamed from stdbool.h.in.
12591 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12592 AC_HEADER_STDBOOL.
12593 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12594 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12595 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12596 (MOSTLYCLEANFILES): New var.
12597 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12598 (stdbool.h): New rule.
12599 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12600 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12601 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12602 m4/quote.m4: Upgrade to today's gnulib.
12603
12604 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12605 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12606 the tests right now.
12607 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12608 yyerror are declared before use; C99 requires this.
12609
126102003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12611
12612 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12613 first.
12614 (yyrecoverSyntaxError): Correct the logic for setting and testing
12615 yyerrState.
12616 Correct comment on handling EOF.
12617 Allow states with only a default reduction, rather than failing
12618 (I can't quite reconstruct why these were not allowed before).
12619
12620 Fixes to avoid problem that $-N rules in GLR parsers can cause
12621 buffer overruns, corrupting state.
12622
12623 * src/output.c (prepare_rules): Output max_left_semantic_context
12624 definition.
12625 * src/reader.h (max_left_semantic_context): New variable declaration.
12626 * src/scan-gram.l (max_left_semantic_context): Define.
12627 (handle_action_dollar): Update max_left_semantic_context.
12628 * data/glr.c (YYMAXLEFT): New definition.
12629 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12630 (yyresolveAction): Ditto.
12631
12632 Fixes to problems with location handling in GLR parsers reported by
12633 Frank Heckenbach (2003/06/05).
12634
12635 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12636 (YYRHSLOC): Add parentheses, and define only if locations used.
12637 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12638 locations not used.
12639 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12640 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12641
12642 * tests/cxx-type.at: Exercise location information; update tests
12643 to differentiate output with and without locations.
12644 Remove forward declarations of yylex and yyerror---caused errors
12645 because default YYLTYPE not yet defined.
12646 Change semantic actions to compute strings, rather than printing
12647 them directly (to test proper passing of semantics values). Change
12648 output to prefix notation and update test data and expected results.
12649 (yylex): Track locations.
12650 (stmtMerge): Return value rather than printing, and include arguments
12651 in value.
12652
126532003-06-03 Paul Eggert <eggert@twinsun.com>
12654
12655 Avoid warnings generated by GCC 2.95.4 when Bison is
12656 configured with --enable-gcc-warnings.
12657 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12658 yy::]b4_parser_class_name[::translate_,
12659 yy::Stack::operator[] (unsigned),
12660 yy::Stack::operator[] (unsigned) const,
12661 yy::Slice::operator[] (unsigned),
12662 yy::Slice::operator[] (unsigned) const):
12663 Rename local vars to avoid warnings.
12664 * tests/glr-regression.at (Improper handling of embedded actions
12665 and $-N in GLR parsers): Remove unused local variable from yylex.
12666 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12667 (void) as arg when not pure, since we now assume C89 when building
12668 Bison. Pacify GCC by using parameter.
12669
126702003-06-02 Paul Eggert <eggert@twinsun.com>
12671
12672 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12673 yy::Location::lines, yy::Location::columns): Rename arguments
12674 to avoid shadowing; this removes a warning generated by GCC 3.3.
12675
126762003-06-01 Paul Eggert <eggert@twinsun.com>
12677
12678 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12679 to g++, as GCC 3.3 complains if you do it.
12680 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12681 everything that WARNING_CFLAGS has, except omit warnings
12682 not suitable for C++.
12683 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12684 * tests/atlocal.in (CXXFLAGS): New var.
12685 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12686
12687 Fix a GLR parser bug I reported in February; see
12688 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12689 The problem was that GLR parsers did not conform to the C standard,
12690 because actions like { $1 = $2 + $3; } expanded to expressions
12691 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12692 to a local variable. The C standard says that expressions
12693 like (var = f ()) + (var = f ()) have undefined behavior.
12694 Another problem was that GCC sometimes issues warnings that
12695 yyfill and its parameters are unused.
12696
12697 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12698 as possibly unused.
12699 (yyfill): New function.
12700 (YYFILL): Use it.
12701 (yyuserAction): Change type of yynormal to bool, so that it matches
12702 the new yyfill signature. Mark it as possibly unused.
12703
12704
12705 Follow up on a bug I reported in February, where a Bison-generated
12706 parser can loop. Provide a test case and a fix for yacc.c. I
12707 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12708 The original bug report is in:
12709 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12710
12711 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12712 macro's size was becoming unwieldy.
12713 (yyerrlab): Do not discard an empty lookahead symbol, as this
12714 might destroy garbage.
12715 (yyerrorlab): New label, with the old contents of YYERROR,
12716 plus the following change: pop the stack of rhs corresponding
12717 to the production that invoked YYERROR. That is how Yacc
12718 behaves, and POSIX requires this behavior.
12719 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12720 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12721 Define 'alarm' to do nothing if unistd.h is not available.
12722 Add a new rule "exp: '-' error;" to test the above change to
12723 data/yacc.c. Use 'alarm' to abort any test taking longer than
12724 10 seconds, as it's probably looping.
12725 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12726 Also, the new yacc.c generates two fewer diagnostics for an
12727 existing test.
12728
127292003-05-24 Paul Eggert <eggert@twinsun.com>
12730
12731 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12732 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12733 This fixes a problem reported by John Bowman when the Compaq/HP
12734 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12735 -ansi -Wall -gall).
12736 * data/yacc.c (union yyalloc): Likewise.
12737 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12738
12739 Switch from 'int' to 'bool' where that makes sense.
12740
12741 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12742 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12743 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12744 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12745 Return or accept bool, not int. All callers changed.
12746 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12747 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12748 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12749 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12750 bitset_or_and_cmp_): Likewise.
12751 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12752 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12753 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12754 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12755 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12756 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12757 bitset_stats_or_and_cmp): Likewise.
12758 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12759 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12760 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12761 ebitset_xor_cmp): Likewise.
12762 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12763 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12764 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12765 lbitset_xor_cmp): Likewise.
12766 * lib/bbitset.h: Include <stdbool.h>.
12767 (struct bitset_vtable): The following members now return bool, not
12768 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12769 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12770 or_and_cmp).
12771 * src/conflicts.c (count_rr_conflicts): Likewise.
12772 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12773 All uses changed.
12774 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12775 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12776 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12777 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12778 graph_flag): Likewise.
12779 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12780 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12781 graph_flag): Likewise.
12782 * src/output.c (error_verbose): Likewise.
12783 * src/output.h (error_verbose): Likewise.
12784 * src/reader.c (start_flag, typed): Likewise.
12785 * src/reader.h (typed): Likewise.
12786 * src/getargs.c (LOCATIONS_OPTION): New constant.
12787 (long_options, getargs): Use it.
12788 * src/lalr.c (build_relations): Use bool, not int.
12789 * src/nullable.c (nullable_compute): Likewise.
12790 * src/print.c (print_reductions): Likewise.
12791 * src/tables.c (action_row, pack_vector): Likewise.
12792 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12793 * src/output.c (prepare): Use it.
12794 * src/output.c (token_definitions_output,
12795 symbol_destructors_output, symbol_destructors_output): Use string,
12796 not boolean integer, to keep track of whether to output separator.
12797 * src/print_graph.c (print_core): Likewise.
12798 * src/state.c (state_rule_lookaheads_print): Likewise.
12799
12800 * config/install-sh: Sync from automake 1.7.5.
12801
128022003-05-14 Paul Eggert <eggert@twinsun.com>
12803
12804 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12805 semicolon after a grammar declaration, in the interest of possible
12806 future changes to the Bison input language.
12807 Do not allow a stray semicolon at the start of the grammar.
12808 (rhses.1): Allow one or more semicolons after any rule, including
12809 just before "|" as required by POSIX.
12810 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12811 grammar.
12812
128132003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12814
12815 %parse-param support for lalr1.cc.
12816
12817 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12818 b4_cc_constructor_calls, b4_cc_constructor_call,
12819 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12820 definitions.
12821 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12822 parse-param arguments.
12823 (yy::b4_parser_class_name): Declare instance variables to
12824 hold parse-param arguments.
12825 * tests/calc.at: s/value/semantic_value/ because value clashes
12826 with a member of yy::b4_parser_class_name. Adjust C++ code
12827 to handle %parse-param. Enable %parse-param test in C++.
12828
128292003-05-12 Paul Eggert <eggert@twinsun.com>
12830
12831 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12832 English a bit. Fix fclose typo. Change "const char" to "char
12833 const", and use ANSI C rather than K&R for "main". Suggest
12834 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12835 and suggest yy_switch_to_buffer.
12836
128372003-05-05 Paul Eggert <eggert@twinsun.com>
12838
12839 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12840 C89. This avoids a diagnostic on compilers that define __STDC__
12841 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12842 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12843
128442003-05-03 Paul Eggert <eggert@twinsun.com>
12845
12846 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12847 Do not overrun array bounds.
12848 This should fix a bug reported today by Olatunji Oluwabukunmi in
12849 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12850
128512003-04-29 Akim Demaille <akim@epita.fr>
12852
12853 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12854 * src/getargs.c, src/getargs.h: here, as bool, not int.
12855 (nondeterministic_parser): New.
12856 * src/parse-gram.y, src/scan-gram.l: Support
12857 %nondeterministic-parser.
12858 * src/output.c (prepare): Use nondeterministic_parser instead
12859 of glr_parser where appropriate.
12860 * src/tables.c (conflict_row, action_row, save_row)
12861 (token_actions, token_actions, pack_vector): Ditto.
12862
128632003-04-29 Akim Demaille <akim@epita.fr>
12864
12865 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12866
128672003-04-29 Akim Demaille <akim@epita.fr>
12868
12869 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12870 with %pure-parser and %locations to exercise the patch from Yakov
12871 Markovitch below.
12872
128732003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12874
12875 * data/yacc.c: (b4_lex_param): Corrected for the case where
12876 %lex-param is provided and %pure-parser isn't.
12877
128782003-04-27 Paul Eggert <eggert@twinsun.com>
12879
12880 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12881 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12882 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12883 if it is not defined.
12884 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12885
128862003-04-26 Paul Eggert <eggert@twinsun.com>
12887
12888 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12889 Declare to be of type suitable for the ninf value itself, not of
12890 type suitable for the corresponding table, since the latter might
12891 be unsigned but the ninf value might be negative. This fixes a
12892 bug reported by Alexandre Duret-Lutz in
12893 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12894
12895 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12896 invokes it. We shouldn't invoke it twice because it will attempt
12897 to put error.o in the archive twice. This fixes a glitch reported
12898 by Martin Mokrejs in
12899 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12900
129012003-04-21 Paul Eggert <eggert@twinsun.com>
12902
12903 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12904 to gnulib.
12905
129062003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12907
12908 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12909 Fix obvious typo that results in uncompilable GLR parsers
12910 when both %pure-parser and %locations are used. (trivial change)
12911
129122003-04-17 Paul Eggert <eggert@twinsun.com>
12913
12914 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12915 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12916 Do not insert the expected token via unput, as this runs afoul
12917 of a POSIX-compatibility bug in flex 2.5.31.
12918 All uses changed to BEGIN the parent state,
12919 since we no longer insert the expected token via unput.
12920 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12921 that is no longer emitted after the above change.
12922
12923 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12924 the first one. This change is from Paul Hilfinger, and it fixes
12925 regression reported by Werner Lemberg in
12926 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12927
12928 (resolve_sr_conflict): Don't invoke state_errs_set
12929 unless one or more tokens have been explicitly made errors.
12930 Otherwise, the above change causes Bison to abort.
12931
12932 * tests/existing.at (GNU pic Grammar): New test case, taken from
12933 Lemberg's email.
12934
129352003-03-31 Akim Demaille <akim@epita.fr>
12936
12937 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12938
129392003-03-31 Akim Demaille <akim@epita.fr>
12940
12941 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12942 output.
12943
129442003-03-31 Akim Demaille <akim@epita.fr>
12945
12946 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12947 From Paul Hilfinger.
12948
129492003-03-29 Akim Demaille <akim@epita.fr>
12950
12951 * m4/error.m4: Do not put under dynamic conditions some code which
12952 expansion is under static control.
12953
129542003-03-29 Akim Demaille <akim@epita.fr>
12955
12956 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12957
129582003-03-29 Akim Demaille <akim@epita.fr>
12959
12960 * doc/bison.texinfo (Strings are Destroyed): New.
12961
129622003-03-13 Paul Eggert <eggert@twinsun.com>
12963
12964 * .cvsignore: Add configure.lineno.
12965 * src/.cvsignore: Add yacc.
12966 * tests/.cvsignore: Add testsuite.log.
12967 * doc/fdl.texi: Sync with latest FSF version.
12968
129692003-03-12 Paul Eggert <eggert@twinsun.com>
12970
12971 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12972 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12973 cursor, instead of leaving it undefined. This fixes a bug
12974 reported by Tim Van Holder in
12975 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12976 * tests/input.at (Torturing the Scanner): Test the scanner on
12977 an empty input file, which was Tim Van Holder's test case.
12978
12979 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12980 <sys/resource.h> can be included, include sys/time.h and
12981 sys/times.h first, if available. This works around the SunOS
12982 4.1.4 porting bug reported by Bruce Becker in
12983 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12984
12985 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12986 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12987 AC_HEADER_SYS_WAIT.
12988
12989 Merge changes from gnulib. This was prompted because the CVS
12990 snapshot didn't build on Solaris 7 due to strnlen problems.
12991
12992 These changes need to be merged back into gnulib:
12993 * lib/hash.c: Include <stdbool.h> unconditionally.
12994 * m4/onceonly.m4 (m4_quote): New macro.
12995 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12996 Quote AC_FOREACH variable-expansions properly.
12997 The 2003-01-03 obstack.h change also needs merging.
12998 {end of changes requiring merging}
12999
13000 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13001 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13002 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13003 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13004 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13005 New files, imported from gnulib.
13006 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13007 above.
13008
13009 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13010 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13011 gnulib sources.
13012
13013 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13014 Add.
13015 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13016 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13017 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13018 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13019 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13020 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13021 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13022 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13023 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13024 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13025 (jm_PREREQ_ARGMATCH): Remove.
13026 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13027 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13028
13029 * src/system.h: Include <stdbool.h> unconditionally.
13030
13031 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13032 assuming at least C89 in the bitset code for some time now.
13033
130342003-03-03 Akim Demaille <akim@epita.fr>
13035
13036 * ro.po: New.
13037
130382003-03-02 Akim Demaille <akim@epita.fr>
13039
13040 * doc/bison.texinfo (Table of Symbols): Reactivate the
13041 documentation for %lex-param, and %parse-param.
13042
130432003-03-02 Akim Demaille <akim@epita.fr>
13044
13045 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13046 generate verbose error messages.
13047 Use the number of tokens as an upper bound in yytname, as it
13048 cannot be a non terminal.
13049
130502003-03-02 Akim Demaille <akim@epita.fr>
13051
13052 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13053 message.
13054
130552003-03-02 Akim Demaille <akim@epita.fr>
13056
13057 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13058 Use them to exercise yycheck overrun.
13059 Based on Andrew Suffield's grammar.
13060
130612003-03-02 Akim Demaille <akim@epita.fr>
13062
13063 Create tests/local.at for Bison generic testing macros.
13064
13065 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13066 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13067 This new file.
13068 * tests/calc.at (AT_CHECK_CALC): Adjust.
13069 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13070 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13071 * tests/local.at: here.
13072 (AT_COMPILE_CXX): Tags the tests using it as c++.
13073 Ignore the test if CXX is not functional.
13074
130752003-03-01 Paul Eggert <eggert@twinsun.com>
13076
13077 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13078 not loc->end, since loc->end might contain garbage and this leads
13079 to undefined behavior on some platforms.
13080 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13081 depend on *loc, so that the reader doesn't give the the false
13082 impression that *loc is initialized.
13083 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13084 does not survive the return.
13085
130862003-03-01 Akim Demaille <akim@epita.fr>
13087
13088 * src/scan-gram.l (code_start): Always initialize it when entering
13089 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13090 yylex invocation. An alternative would be making it static, but
13091 then it starts with the second %%'s beginning, instead of its end.
13092
130932003-02-28 Paul Eggert <eggert@twinsun.com>
13094
13095 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13096 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13097 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13098
130992003-02-26 Paul Eggert <eggert@twinsun.com>
13100
13101 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13102 Remove Sequent/Pyramid discussion (nobody uses them any more).
13103 Merge VMS and MS-DOS discussion; these ports may well be dead
13104 but let's keep mentioning them for now. Put <> around email
13105 addresses. Add copyright notice.
13106
131072003-02-24 Paul Eggert <eggert@twinsun.com>
13108
13109 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13110 to avoid collision with flex use of yylineno.
13111 Problem reported by Bruce Lilly in
13112 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13113 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13114 * data/yacc.c (yy_reduce_print): Likewise.
13115
13116 * config/depcomp: Sync with Automake 1.7.3.
13117
131182003-02-21 Akim Demaille <akim@epita.fr>
13119
13120 * data/lalr1.cc: Use temporary variables instead of casts to
13121 change integer types.
13122 Suggested by Paul Eggert.
13123
131242003-02-21 Akim Demaille <akim@epita.fr>
13125
13126 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13127 to avoid confusions with lalr1.cc's notion of Position.
13128 Suggested by Paul Eggert.
13129
131302003-02-20 Akim Demaille <akim@epita.fr>
13131
13132 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13133 before initial_columns.
13134 (location.hh): Use consistent variable names when defining the
13135 operator<<.
13136 Use "last" so that we subtract from Positions, not from unsigned.
13137
131382003-02-20 Akim Demaille <akim@epita.fr>
13139
13140 * data/lalr1.cc (position.hh): New subfile, including the extended
13141 and Doxygen'ed documentation of class Position.
13142 (location.hh): Use it.
13143 Document a` la Doxygen.
13144 With the help of Benoit Perrot.
13145
131462003-02-20 Akim Demaille <akim@epita.fr>
13147
13148 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13149 AT_YACC_IF.
13150 Redefine AT_YYERROR_SEES_LOC_IF using it.
13151 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13152 not defined.
13153 Don't use the location in yy::Parser::error_ and
13154 yy::Parser::print_ when not %locations.
13155 Activate more lalr1.cc tests.
13156
131572003-02-19 Akim Demaille <akim@epita.fr>
13158
13159 * data/lalr1.cc: When displaying a line number, be sure to make it
13160 an int.
13161
131622003-02-19 Akim Demaille <akim@epita.fr>
13163
13164 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13165 Remove, useless.
13166 (YYABORT, YYACCEPT, YYERROR): New.
13167 * tests/calc.at: Renable the lalr1.cc test.
13168
131692003-02-19 Akim Demaille <akim@epita.fr>
13170
13171 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13172 error recovery, mixing with/without pops and discarding of the
13173 lookahead.
13174 Exercise YYERROR.
13175 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13176
131772003-02-17 Paul Eggert <eggert@twinsun.com>
13178
13179 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13180 * tests/testsuite.at (AT_COMPILE): Use them.
13181 This fixes the testsuite problem reported by Robert Lentz in
13182 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13183
131842003-02-12 Paul Eggert <eggert@twinsun.com>
13185
13186 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13187 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13188 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13189 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13190 Check for malloc failure, for consistency with yacc.c.
13191 (yytname_size): Remove, for consistency with yacc.c.
13192
13193 The bug still remains in data/lalr1.cc, as I didn't have time
13194 to fix it there.
13195
131962003-02-06 Akim Demaille <akim@epita.fr>
13197
13198 * configure.ac (GXX): Rename as...
13199 (CXX): this, to keep the original Autoconf semantics.
13200 Require 2.57.
13201 * data/lalr1.cc: Fix b4_copyright invocations.
13202 If YYDEBUG is not defined, don't depend upon name_ being defined.
13203 (location.hh): Include string and iostream.
13204 (Position::filename): New member.
13205 (Position::Position ()): New.
13206 (operator<< (Position)): New.
13207 (operator- (Position, int)): New.
13208 (Location::first, Location::last): Rename as...
13209 (Location::begin, Location::end): these, to mock the conventional
13210 iterator names.
13211 (operator<< (Location)): New.
13212 * tests/atlocal.in (CXX): New.
13213 * tests/testsuite.at (AT_COMPILE_CXX): New.
13214 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13215 locations in a more synthetic way.
13216 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13217 lalr1.cc is used.
13218 Adjust the C locations to match those from Emacs: first column is
13219 column 0.
13220 Change all the expected results.
13221 Conform to the GCS: simplify the locations when applicable.
13222 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13223 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13224 these CPP macros with the m4 macros new defined by...
13225 (AT_CHECK_PUSHDEFS): this, i.e.:
13226 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13227 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13228 New macros.
13229 (AT_CHECK_POPDEFS): Undefine them.
13230 (AT_CHECK_CALC_LALR1_CC): New.
13231 Use it for the first lalr1.cc test.
13232
132332003-02-04 Akim Demaille <akim@epita.fr>
13234
13235 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13236 Location as is defined.
13237
132382003-02-04 Akim Demaille <akim@epita.fr>
13239
13240 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13241 name_ being defined.
13242
132432003-02-03 Paul Eggert <eggert@twinsun.com>
13244
13245 * src/gram.h (start_symbol): Remove unused decl.
13246
13247 Use more-consistent naming conventions for local vars.
13248
13249 * src/derives.c (derives_compute): Change type of local var from
13250 int to rule_number.
13251 * src/gram.c (grammar_rules_partial_print): Likewise.
13252 * src/print.c (print_core): Likewise.
13253 * src/reduce.c (reduce_grammar_tables): Likewise.
13254
13255 * src/gram.c (grammar_dump): Change name of item_number *
13256 local var from r to rp.
13257 * src/nullable.c (nullable_compute): Likewise.
13258
13259 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13260
13261 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13262 for symbol or symbol_number var.
13263 * src/reader.c (grammar_start_symbol_set): Likewise.
13264 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13265 Likewise.
13266 * src/state.c (transitions_to): Likewise.
13267 * src/state.h: Likewise.
13268 * src/tables.c (symbol_number_to_vector_number): Likewise.
13269
13270 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13271 char * var.
13272
13273 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13274 var.
13275
13276 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13277 var.
13278
13279 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13280 Use str, not s, for char * var. Use ch, not c, for character var.
13281 Use size for size var.
13282
13283 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13284 char * var.
13285 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13286 uniqstr var.
13287 * src/uniqstr.h: Likewise.
13288
13289 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13290 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13291 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13292 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13293 param to have same name as that of enum, so that we don't use
13294 "s" to stand for a non-state.
13295
132962003-02-02 Akim Demaille <akim@epita.fr>
13297
13298 * src/scan-skel.l: Scan more than one inert character per yylex
13299 invocation.
13300
133012003-02-01 Paul Eggert <eggert@twinsun.com>
13302
13303 Version 1.875a.
13304
13305 * po/LINGUAS: Add ms.
13306
133072003-01-30 Akim Demaille <akim@epita.fr>
13308
13309 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13310
133112003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13312
13313 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13314 of $1.
13315
13316 Changes in response to error report by S. Eken: GLR mode does not
13317 handle negative $ indices or $ indices in embedded rules correctly.
13318 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13319
13320 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13321 (b4_rhs_location): Ditto.
13322 (yyfill): New function to copy from stack tree into array
13323 incrementally.
13324 (yyuserAction): Modify to allow incremental move of semantic values
13325 to rhs array when in GLR mode.
13326 Define YYFILL to use in user-defined actions to fill semantic array
13327 as needed.
13328 Remove dummy use of yystack, as there is now a guaranteed use.
13329 (yydoAction): Modify to allow incremental move of semantic values
13330 to rhs array when in GLR mode.
13331 (yyresolveAction): Ditto.
13332 (yyglrShiftDefer): Update comment.
13333 (yyresolveStates): Use X == NULL for pointers, not !X.
13334 (yyglrReduce): Ditto.
13335 (yydoAction): Ditto
13336
13337 * tests/glr-regr1.at: Rename to ...
13338 * tests/glr-regression.at: Add new regression test for the problems
13339 described above (adapted from S. Eken).
13340 Update copyright notice.
13341 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13342 * tests/Makefile.am: Ditto.
13343
133442003-01-28 Paul Eggert <eggert@twinsun.com>
13345
13346 * data/lalr1.cc: Do not use @output_header_name@ unless
13347 b4_defines_flag is set. This fixes two bugs reported by
13348 Tim Van Holder in
13349 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13350 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13351
133522003-01-21 Paul Eggert <eggert@twinsun.com>
13353
13354 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13355 we don't need to worry about yyerrlab1 being reported as an
13356 "unused label" by non-GCC C compilers. The downside is that if
13357 locations are used then a couple of statements are duplicated each
13358 time YYERROR is invoked, but the upside is that the warnings
13359 should vanish.
13360 (yyerrlab1): Move code to YERROR.
13361 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13362 This reverts some of the 2002-12-27 change.
13363
133642003-01-17 Paul Eggert <eggert@twinsun.com>
13365
13366 * src/output.c (symbol_printers_output): Fix typo that led
13367 to core dump. Problem reported by Antonio Rus in
13368 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13369
133702003-01-13 Akim Demaille <akim@epita.fr>,
13371 Quoc Peyrot <chojin@lrde.epita.fr>,
13372 Robert Anisko <anisko_r@lrde.epita.fr>
13373
13374 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13375 when the stacks contain one element, as the loop would otherwise
13376 free the last state, and then use the top state (the one we just
13377 popped). This means that the initial elements will not be freed
13378 explicitly, as is the case in yacc.c; it is not a problem, as
13379 these elements have fake values.
13380
133812003-01-11 Paul Eggert <eggert@twinsun.com>
13382
13383 * NEWS: %expect-violations are now just warnings, reverting
13384 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13385 bootstrapping problem reported by Matthias Klose; see
13386 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13387 * src/conflicts.c (conflicts_print): Likewise.
13388 * tests/conflicts.at (%expect not enough, %expect too much,
13389 %expect with reduce conflicts): Likewise.
13390 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13391 that the warning is enabled if the number of conflicts changes
13392 (not necessarily increases).
13393
13394 * src/getargs.c (version): Update copyright year.
13395
133962003-01-09 Akim Demaille <akim@epita.fr>
13397
13398 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13399
134002003-01-08 Paul Eggert <eggert@twinsun.com>
13401
13402 * Makefile.maint (WGETFLAGS):
13403 New macro, containing "-C off" to disable proxy caches.
13404 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13405 (rel-check): Use $(WGET) instead of wget.
13406
134072003-01-06 Paul Eggert <eggert@twinsun.com>
13408
13409 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13410 the GLR paper of Scott, Johnstone and Hussain.
13411
134122003-01-04 Paul Eggert <eggert@twinsun.com>
13413
13414 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13415 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13416 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13417 (EXTRA_LIBRARIES): New var, for liby.a.
13418 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13419 (EXTRA_SCRIPTS): New var, for yacc.
13420
13421 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13422 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13423 Problem reported by Nelson H. F. Beebe.
13424
134252003-01-03 Paul Eggert <eggert@twinsun.com>
13426
13427 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13428 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13429 when compiling Bison 1.875's `bitset bset = obstack_alloc
13430 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13431
13432 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13433 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13434 grow to a huge size with typical invocation.
13435
13436 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13437 Use the pattern recommended by Autoconf 2.57, except also protect
13438 against double-definition.
13439 * src/system.h: Likewise.
13440 Portability issues reported by Nelson H. F. Beebe.
13441
13442 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13443 All uses changed. Provide a definition in both C and C++.
13444 (yytrue, yyfalse): Define even if defined (__cplusplus).
13445
13446 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13447 Reported by Nelson H. F. Beebe.
13448
13449 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13450
134512003-01-02 Paul Eggert <eggert@twinsun.com>
13452
13453 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13454 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13455 Bug reported by Nelson H. F. Beebe.
13456
134572003-01-01 Paul Eggert <eggert@twinsun.com>
13458
13459 * Version 1.875.
13460
134612002-12-30 Paul Eggert <eggert@twinsun.com>
13462
13463 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13464 Moved here from...
13465 (<INITIAL>","): Here. This causes stray "," to be treated
13466 more uniformly.
13467
13468 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13469 last brace in braced code when not in Yacc mode, for compatibility
13470 with Bison 1.35. This resurrects the 2001-12-15 patch to
13471 src/reader.c.
13472
13473 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13474 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13475
134762002-12-28 Paul Eggert <eggert@twinsun.com>
13477
13478 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13479 that of SYM's type. This fixes Debian bug 168069, reported by
13480 Thomas Olsson.
13481
134822002-12-28 Paul Eggert <eggert@twinsun.com>
13483
13484 Version 1.75f.
13485
13486 Switch back to the Yacc style of conflict reports, undoing some
13487 of the 2002-07-30 change.
13488 * doc/bison.texinfo (Understanding): Use Yacc style for
13489 conflict reports. Also, use new way of locating rules.
13490 * src/conflicts.c (conflict_report):
13491 Renamed from conflict_report_yacc, removing the old
13492 'conflict_report'. Translate the entire conflict report at once,
13493 so that we don't assume that "," has the same interpretation in
13494 all languages.
13495 (conflicts_output): Use Yacc-style conflict report for each state,
13496 instead of our more-complicated style.
13497 (conflicts_print): Use Yacc-style conflict report, except print
13498 the input file name when not emulating Yacc.
13499 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13500 Conflicted Reduction, %expect not enough, %expect too much,
13501 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13502 * tests/existing.at (GNU Cim Grammar): Likewise.
13503 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13504
13505 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13506 fatal): Don't invoke fflush; it's not needed and it might even be
13507 harmful for stdout, as stdout might not be open.
13508 * src/reduce.c (reduce_print): Likewise.
13509
135102002-12-27 Paul Eggert <eggert@twinsun.com>
13511
13512 Fix a bug where error locations were not being recorded correctly.
13513 This problem was originally reported by Paul Hilfinger in
13514 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13515
13516 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13517 top of the location stack's error locations.
13518 (yyerrlab): Set it. When discarding a token, push its location
13519 onto yylerrsp so that we don't lose track of the error's end.
13520 (yyerrlab1): Now is only the target of YYERROR, so that we can
13521 properly record the location of the action that failed. For GCC
13522 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13523 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13524 (yyerrlab2): New label, which yyerrlab now falls through to.
13525 Compute the error's location by applying YYLLOC_DEFAULT to
13526 the locations of all the symbols that went into the error.
13527 * doc/bison.texinfo (Location Default Action): Mention that
13528 YYLLOC_DEFAULT is also invoked for syntax errors.
13529 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13530 Error locations include the locations of all the tokens that were
13531 discarded, not just the last token.
13532
135332002-12-26 Paul Eggert <eggert@twinsun.com>
13534
13535 * src/files.c: Include quote.h.
13536 (compute_output_file_names): Warn if we detect conflicting
13537 outputs to the same file. This should catch the misunderstanding
13538 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13539
13540 * src/conflicts.c (conflicts_print): If the user specifies
13541 "%expect N", report an error if there are any reduce/reduce
13542 conflicts. This is what the manual says should happen.
13543 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13544 * tests/conflicts.at (%expect with reduce conflicts): New test.
13545
13546 Don't use m4_include on relative file names, as it doesn't work as
13547 desired if there happens to be a file with that name under ".".
13548
13549 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13550 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13551 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13552 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13553 * src/output.c (output_skeleton): Use full path names when
13554 specifying a file to include; don't rely on include path, as
13555 it's unreliable when the working file contains a file with
13556 that name.
13557
135582002-12-25 Paul Eggert <eggert@twinsun.com>
13559
13560 Remove obsolete references to bison.simple and bison.hairy.
13561 Problem mentioned by Aubin Mahe in
13562 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13563 * data/glr.c: Comment fix.
13564 * doc/bison.1: Remove references. Also, mention "yacc".
13565
13566 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13567 with -g option.
13568
13569 * src/parse-gram.y (declaration): Use enum "report_states" rather
13570 than its numeric value 1.
13571
13572 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13573 opening a new one. This fixes Debian bug 165349, reported by
13574 Bruce Stephens.
13575
135762002-12-24 Paul Eggert <eggert@twinsun.com>
13577
13578 Version 1.75e.
13579
13580 * Makefile.maint (cvs-update): Don't assume that the shell
13581 supports $(...), as Solaris sh doesn't.
13582
13583 * src/parse-gram.y (lloc_default): Remove test for empty
13584 nonterminals at the end, since it didn't change the result.
13585
135862002-12-24 Paul Eggert <eggert@twinsun.com>
13587
13588 If the user does not define YYSTYPE as a macro, Bison now declares it
13589 using typedef instead of defining it as a macro. POSIX requires this.
13590 For consistency, YYLTYPE is also declared instead of defined.
13591
13592 %union directives can now have a tag before the `{', e.g., the
13593 directive `%union foo {...}' now generates the C code
13594 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13595 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13596 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13597 instead of `yyltype'.
13598
13599 `yystype' and `yyltype' are now obsolescent macros instead of being
13600 typedefs or tags; they are no longer documented and will be
13601 withdrawn in a future release.
13602
13603 * data/glr.c (b4_location_type): Remove.
13604 (YYSTYPE): Renamed from yystype.
13605 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13606 (struct YYLTYPE): Renamed from struct yyltype.
13607 (YYLTYPE): Renamed from yyltype.
13608 (yyltype, yystype): New (and obsolescent) macros,
13609 for backward compatibility.
13610 * data/yacc.c: Likewise.
13611
13612 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13613 does not specify a union tag. This is for compatibility with
13614 Solaris 9 yacc.
13615
13616 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13617 const *, since it is now modified by stripping surrounding { }.
13618 (current_braced_code): Remove.
13619 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13620 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13621 trailing " {...}". Now of type <chars>.
13622 (grammar_declaration): Adjust to bundled tokens.
13623 (code_content): Remove; stripping is now done by add_param.
13624 (print_token_value): Print contents of bundled tokens.
13625 (token_name): New function.
13626
13627 * src/reader.h (braced_code, current_braced_code): Remove.
13628 (token_name): New decl.
13629
13630 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13631 token_type, not braced_code code_kind. All uses changed.
13632 (SC_PRE_CODE): New state, for scanning after a keyword that
13633 has (or usually has) an immediately-following braced code.
13634 (token_type): New local var, to keep track of which token type
13635 to return when scanning braced code.
13636 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13637 <INITIAL>"%parse-param", <INITIAL>"%printer",
13638 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13639 instead of returning a token type immediately.
13640 (<INITIAL>"{"): Set token type.
13641 (<SC_BRACED_CODE>"}"): Use it.
13642 (handle_action_dollar, handle_action_at): Now returns bool
13643 indicating success. Fail if ! current_rule; this prevents a core dump.
13644 (handle_symbol_code_dollar, handle_symbol_code_at):
13645 Remove; merge body into caller.
13646 (handle_dollar, handle_at): Complain in invalid contexts.
13647
13648 * NEWS, doc/bison.texinfo: Document the above.
13649 * NEWS: Fix years and program names in copyright notice.
13650
136512002-12-17 Paul Eggert <eggert@twinsun.com>
13652
13653 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13654 Reporting, Table of Symbols): Omit mentions of %lex-param and
13655 %parse-param from the documentation for now.
13656
136572002-12-15 Paul Eggert <eggert@twinsun.com>
13658
13659 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13660 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13661 lookahead symbol, and which sets yychar in parser actions) and it
13662 disagreed with the Bison documentation. Bug
13663 reported by Andrew Walrond.
13664
13665 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13666 as the caller now does that.
13667 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13668 (YYEMPTY): Parenthesize right hand side, since others use it.
13669 (yyparse): Don't assume that our generated code is the only code
13670 that sets yychar.
13671
136722002-12-13 Paul Eggert <eggert@twinsun.com>
13673
13674 Version 1.75d.
13675
13676 POSIX requires a "yacc" command.
13677 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13678 (MOSTLYCLEANFILES): Add yacc.
13679 (yacc): New rule.
13680 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13681 as an alias for bison y.
13682
13683 * po/LINGUAS: Add da.
13684
13685 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13686 problem with latest <getopt.h>.
13687 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13688
13689 * doc/fdl.texi: Upgrade to 1.2.
13690 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13691 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13692 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13693 gnulib.
13694 * config/install-sh: Sync with autotools.
13695
13696 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13697 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13698 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13699 locations are requested.
13700 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13701 locations are requested.
13702
137032002-12-12 Paul Eggert <eggert@twinsun.com>
13704
13705 Remove unportable casts and storage allocation tricks.
13706 While we're at it, remove almost all casts, since they
13707 usually aren't needed and are a sign of trouble.
13708
13709 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13710
13711 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13712 the pointer DSET returned by malloc; this isn't portable.
13713 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13714 Similarly for DERIVES.
13715 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13716 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13717 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13718
13719 * src/derives.c (derives_compute): Do not bother invoking
13720 int_of_rule_number, since rule numbers are integers.
13721
13722 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13723 rather than XMALLOC (char, N).
13724
13725 * src/files.c (filename_split): Rewrite to avoid cast.
13726
13727 * src/gram.h (symbol_number_as_item_number,
13728 item_number_as_symbol_number, rule_number_as_item_number,
13729 item_number_as_rule_number):
13730 Now inline functions rather than macros, to avoid casts.
13731 * src/state.h (state_number_as_int): Likewise.
13732 * src/tables.c (state_number_to_vector_number,
13733 symbol_number_to_vector_number): Likewise.
13734
13735 * src/gram.h (int_of_rule_number): Remove; no longer used.
13736
13737 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13738 since the resulting storage is always stored into.
13739
13740 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13741 where it's needed.
13742
13743 * src/muscle_tab.c (muscle_m4_output):
13744 Now inline. Return bool, not int.
13745 * src/state.c (state_compare): Likewise.
13746 * src/symtab.c (symbol_check_defined,
13747 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13748 hash_compare_symbol, hash_symbol):
13749 Likewise.
13750 * src/uniqstr.c (uniqstr_print): Likewise.
13751 * src/muscle_tab.c (muscle_m4_output_processor):
13752 New function, to avoid casts.
13753 * src/state.c (state_comparator, stage_hasher): Likewise.
13754 * src/symtab.c (symbol_check_defined_processor,
13755 symbol_check_alias_consistency_processor, symbol_pack_processor,
13756 symbol_translation_processor, hash_symbol_comparator,
13757 hash_symbol_hasher): Likewise.
13758 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13759 * src/muscle_tab.c (muscles_m4_output):
13760 Use new functions instead of casting old functions unportably.
13761 * src/state.c (state_hash_new): Likewise.
13762 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13763 symbols_token_translations_init):
13764 Likewise.
13765 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13766
13767 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13768 var instead of casting to long, to avoid casts.
13769 (prepare_states): Use MALLOC rather than alloca, so that we don't
13770 have to worry about alloca.
13771 * src/state.c (state_hash_lookup): Likewise.
13772
13773 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13774 local var instead of casting to unsigned char, to avoid casts.
13775
13776 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13777 STATE_ALLOC): Remove.
13778 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13779 rather than calloc, and use offsetof to avoid allocating slightly
13780 too much storage.
13781 (state_new): Initialize all members.
13782
13783 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13784
13785 * src/symtab.c (symbol_free): Remove; unused.
13786 (symbol_get): Remove cast in lhs of assignment.
13787 (symbols_do): Now static. Accept generic arguments, not
13788 hashing-related ones.
13789
13790 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13791 (symbol_processor): Remove.
13792 (symbols_do): Remove decl; now static.
13793
13794 * src/system.h (alloca): Remove; decl no longer needed.
13795 (<stddef.h>): Include, for offsetof.
13796 (<inttypes.>, <stdint.h>): Include if available.
13797 (uintptr_t): New type, if system lacks it.
13798 (CALLOC, MALLOC, REALLOC): New macros.
13799 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13800 new macros.
13801
13802 * src/tables.c (table_size): Now int, to pacify GCC.
13803 (table_grow, table_ninf_remap): Use signed table size.
13804 (save_row): Don't bother initializing locals when not needed.
13805 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13806 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13807
13808 * src/vcg.h: Correct misspellings.
13809
13810 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13811
13812
13813 * src/getargs.c (getargs): Don't assume EOF == -1.
13814
138152002-12-09 Paul Eggert <eggert@twinsun.com>
13816
13817 Change identifier spellings to avoid collisions with names
13818 that are reserved by POSIX.
13819
13820 Don't use names ending in _t, since POSIX reserves them.
13821 For consistency, remove _e and _s endings -- they're weren't
13822 needed to remove ambiguity. All uses changed.
13823 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13824 turn was just renamed from struniq_t.
13825 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13826 which in turn was just renamed from struniq_processor_t.
13827 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13828 in turn was renamed from hash_compare_struniq_t.
13829 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13830 (state_list): Renamed from state_list_t.
13831 * src/assoc.h (assoc): Renamed from assoc_t.
13832 * src/conflicts.c (enum conflict_resolution): Renamed from
13833 enum conflict_resolution_e.
13834 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13835 (rule_list): Renamed from rule_list_t.
13836 * src/getargs.h (enum trace): Renamed from enum trace_e.
13837 (enum report): Renamed from enum report_e.
13838 * src/gram.h (item_number): Renamed from item_number_t.
13839 (rule_number): Renamed from rule_number_t.
13840 (struct rule_s): Remove the "rule_s" part; not used.
13841 (rule): Renamed from rule_t.
13842 (rule_filter): Renamed from rule_filter_t.
13843 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13844 (goto_list): Renamed from goto_list_t.
13845 * src/lalr.h (goto_number): Renamed from goto_number_t.
13846 * src/location.h (location): Renamed from location_t.
13847 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13848 and moved here from:
13849 * src/muscle_tab.h (muscle_entry_t): here.
13850 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13851 (rule_list): Renamed from rule_list_t.
13852 * src/print_graph.c (static_graph): Renamed from graph.
13853 * src/reader.h (braced_code): Renamed from braced_code_t.
13854 Remove brace_code_e tag.
13855 * src/relation.h (relation_node): Renamed from relation_node_t.
13856 (relation_nodes): Renamed from relation_nodes_t.
13857 (relation): Renamed from relation_t.
13858 * src/state.h (state_number): Renamed from state_number_t.
13859 (struct state): Renamed from struct state_s.
13860 (state): Renamed from state_t.
13861 (transitions): Renamed from transitions_t. Unused (and
13862 misspelled) transtion_s tag removed.
13863 (errs): Renamed from errs_t. Unused errs_s tag removed.
13864 (reductions): Renamed from reductions_t. Unused tag
13865 reductions_s removed.
13866 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13867 (struct symbol_list): Renamed from struct symbol_list_s.
13868 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13869 (struct symbol): Renamed from struct symbol_s.
13870 (symbol): Renamed from symbol_t.
13871 * src/tables.c (vector_number): Renamed from vector_number_t.
13872 (action_number): Renamed from action_t.
13873 * src/tables.h (base_number): Renamed from base_t.
13874 * src/vcg.h (enum color): Renamed from enum color_e.
13875 (enum textmode): Renamed from enum textmode_e.
13876 (enum shape): Renamed from enum shape_e.
13877 (struct colorentry): Renamed from struct colorentry_s.
13878 (struct classname): Renamed from struct classname_s.
13879 (struct infoname): Renamed from struct infoname_s.
13880 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13881 (enum decision): Renamed from enum decision_e.
13882 (enum orientation): Renamed from enum orientation_e.
13883 (enum alignment): Renamed from enum alignment_e.
13884 (enum arrow_mode): Renamed from enum arrow_mode_e.
13885 (enum crossing_type): Renamed from enum crossing_type_e.
13886 (enum view): Renamed from enum view_e.
13887 (struct node): Renamed from struct node_s.
13888 (node): Renamed from node_t.
13889 (enum linestyle): Renamed from enum linestyle_e.
13890 (enum arrowstyle): Renamed from enum arrowstyle_e.
13891 (struct edge): Renamed from struct edge.
13892 (edge): Renamed from edge_t.
13893 (struct graph): Renamed from struct graph_s.
13894 (graph): Renamed from graph_t.
13895 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13896 Rename value_t -> value.
13897 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13898 value_t_as_yystype -> value_as_yystype.
13899
13900 Don't include <errno.h> in the mainstream code, since it
13901 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13902 * lib/get-errno.c, lib/get-errno.h: New files.
13903 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13904 get-errno.c.
13905 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13906 * src/output.c (output_skeleton): Likewise.
13907 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13908 instead of errno.
13909 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13910 Likewise.
13911 (handle_action_dollar, handle_action_at): Likewise.
13912 * src/system.h: Do not include <errno.h>.
13913 (TAB_EXT): Renamed from EXT_TAB.
13914 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13915
13916 Avoid str[a-z]*, since <string.h> reserves that name space.
13917 Change all instances of "struniq" in names to "uniqstr", and
13918 likewise for "STRUNIQ" and "UNIQSTR".
13919 * src/uniqstr.c: Renamed from src/struniq.c.
13920 * src/uniqstr.h: Renamed from src/struniq.h.
13921 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13922 * src/files.c (strsuffix): Remove; unused.
13923 (concat2): Renamed from stringappend. Now static.
13924 * src/files.h (strsuffix, stringappend): Remove; unused.
13925 * src/parse-gram.y (<chars>): Renamed from <string>.
13926 (<uniqstr>): Renamed from <struniq>.
13927 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13928 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13929 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13930 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13931 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13932 (N_EXPAND): Renamed from N_STRETCH.
13933
13934 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13935 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13936 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13937 Remove; unused.
13938 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13939 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13940 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13941 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13942 (BASE_MAXIMUM): Renamed from BASE_MAX.
13943 (BASE_MINIMUM): Renamed from BASE_MIN.
13944 (ACTION_MAX): Remove; unused.
13945 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13946 Unnecessary casts removed from above defines.
13947
13948
13949 Fix misspelling in names.
13950 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13951 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13952 G_NODE_ALIGNEMENT.
13953
13954
13955 * lib/timevar.c (timevar_report): Renamed from time_report,
13956 for consistency with other names.
13957 * lib/timevar.h (timevar_report): New decl.
13958 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13959
13960
13961 Sort include-file uses.
13962
13963 Reorder all include files under src to be in the order "system.h".
13964 then the ../lib include files in angle brackets (alphabetized),
13965 then the . include files in double-quotes (alphabetized). Fix
13966 dependency breakages encountered in this process, as follows:
13967 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13968 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13969 * src/state.h: Include "symtab.h".
13970
139712002-12-08 Paul Eggert <eggert@twinsun.com>
13972
13973 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13974 since this causes problems when __file__ contains character
13975 sequences like "@" that are treated specially by src/scan-skel.l.
13976 Instead, just use the file's basename. This fixes the bug
13977 reported by Martin Mokrejs in
13978 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13979
139802002-12-06 Paul Eggert <eggert@twinsun.com>
13981
13982 Add support for rules that do not have trailing semicolons, as
13983 POSIX requires. Improve the quality of locations in Bison
13984 diagnostics.
13985
13986 * src/location.c: Include <quotearg.h>.
13987 (empty_location): Now const.
13988 (location_print): New function. Follow the recommendation of the
13989 GNU Coding Standards for locations that span file boundaries.
13990 * src/location.h: Do not include <quotearg.h>; no longer needed.
13991 (boundary): New type.
13992 (location_t): Use it. This allows locations to span file boundaries.
13993 All member uses changed: file -> start.file or end.file (as needed),
13994 first_line -> start.line, first_column -> start.column,
13995 last_line -> end.line, last_column -> end.column.
13996 (equal_boundaries): New function.
13997 (LOCATION_RESET, LOCATION_STEP): Remove.
13998 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13999 (empty_location): Now const.
14000 (location_print): New decl.
14001 * src/parse-gram.y (lloc_default): New function, which handles
14002 empty locations more accurately.
14003 (YYLLOC_DEFAULT): Use it.
14004 (%token COLON): Remove.
14005 (%token ID_COLON): New token.
14006 (rules): Use it.
14007 (declarations, rules): Remove trailing semicolon.
14008 (declaration, rules_or_grammar_declaration):
14009 Allow empty (";") declaration.
14010 (symbol_def): Remove empty actions; no longer needed.
14011 (rules_or_grammar_declaration): Remove trailing semicolon.
14012 (semi_colon.opt): Remove.
14013 * src/reader.h: Include location.h.
14014 (scanner_cursor): New decl.
14015 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14016 rolling our own.
14017 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14018 of *loc.
14019 (STEP): Remove. No longer needed, now that adjust_location does
14020 the work. All uses removed.
14021 (scanner_cursor): New var.
14022 (adjust_location): Renamed from extend_location. It now sets
14023 *loc and adjusts the scanner cursor. All uses changed.
14024 Don't bother testing for CR.
14025 (handle_syncline): Remove location arg; now updates scanner cursor.
14026 All callers changed.
14027 (unexpected_end_of_file): Now accepts start boundary of token or
14028 comment, not location. All callers changed. Update scanner cursor,
14029 not the location.
14030 (SC_AFTER_IDENTIFIER): New state.
14031 (context_state): Renamed from c_context. All uses changed.
14032 (id_loc, code_start, token_start): New local vars.
14033 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14034 processing of Yacc white space and equivalents here.
14035 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14036 instead of returning ID immediately, since we need to search for
14037 a subsequent colon.
14038 (<INITIAL>"'", "\""): Save token_start.
14039 (<INITIAL>"%{", "{", "%%"): Save code_start.
14040 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14041 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14042 BEGIN context_state at end, not INITIAL.
14043 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14044 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14045 Return correct token start.
14046 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14047 the start of a character, string or multiline comment is found.
14048 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14049 Reduction): Adjust reported locations to match the more-precise
14050 results now expected.
14051 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14052 * tests/reduce.at (Useless Rules, Reduced Automaton,
14053 Underivable Rules): Likewise.
14054 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14055 or "|"' now that so many other tokens are allowed by the new grammar.
14056
14057 * src/complain.h (current_file): Remove duplicate decl;
14058 current_file is now owned by files.h.
14059 * src/complain.c, src/scan-gram.l: Include files.h.
14060
140612002-12-06 Paul Eggert <eggert@twinsun.com>
14062
14063 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14064 promotes to int; it might be unsigned int.
14065 * data/yacc.c (yy_reduce_print): Likewise.
14066
14067 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14068 be #defined in the prologue, not in the Bison declarations.
14069 This fixes Debian Bug 102878, reported by Shaul Karl.
14070
140712002-12-02 Paul Eggert <eggert@twinsun.com>
14072
14073 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14074 * lib/strtoul.c: New file, from gnulib.
14075 This fixes a porting bug reported by Peter Klein in
14076 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14077
140782002-11-30 Paul Eggert <eggert@twinsun.com>
14079
14080 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14081 and put only a forward declaration in the prologue. This is for
14082 consistency with the other scanner helper functions.
14083
14084 Type clashes now generate warnings, not errors, since it
14085 appears that POSIX may allow some grammars with type clashes.
14086 * src/reader.c (grammar_current_rule_check): Warn about
14087 type clashes instead of complaining.
14088 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14089
14090 Add Yacc library, since POSIX requires it.
14091 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14092 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14093 * lib/main.c, lib/yyerror.c: New files.
14094
14095 gram_error can be static; it need not be extern.
14096 * src/reader.h (gram_error): Remove decl.
14097 * src/parse-gram.y (gram_error): Now static. Add static decl.
14098 (print_token_value): Omit parameter names from forward decl,
14099 for consistency.
14100
141012002-11-29 Paul Eggert <eggert@twinsun.com>
14102
14103 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14104 be declared before being used. E.g., one should typically
14105 declare them in the prologue. Use GNU coding style in examples.
14106 Put "const" consistently after the type it modifies. Mention
14107 that C99 supports "inline". Mention that yyerror traditionally
14108 returns "int".
14109
14110 %parse-param and %lex-param now take just one argument, the
14111 declaration; the argument name is deduced from the declaration.
14112
14113 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14114 Reporting, Table of Symbols): Document this.
14115 * src/parse-gram.y (add_param): New function.
14116 (COMMA): Remove.
14117 (declaration): Implement new rule for %parse-param and %lex-param.
14118 * src/scan-gram.l: "," now elicits a warning, rather than being
14119 a token; this is more compatible with byacc.
14120 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14121
141222002-11-27 Paul Eggert <eggert@twinsun.com>
14123
14124 Rename identifiers to avoid real and potential collisions.
14125
14126 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14127 to avoid collision with lex macro described by Bruce Lilly in
14128 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14129 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14130 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14131 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14132 All uses changed.
14133 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14134 The name "yycontrol" violates the name space rules, and this stuff
14135 wasn't being used anyway.
14136 (input): Remove action; this stuff wasn't being used.
14137 (gram_error): Rename local variable yylloc -> loc.
14138 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14139 (YY_DECL): Don't use "yy" at start of local variables.
14140 All uses changed, e.g., yylloc -> loc.
14141 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14142 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14143 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14144 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14145
14146 * src/parse-gram.y (gram_error): loc is now const *.
14147 * src/reader.h (gram_error): Likewise.
14148
141492002-11-24 Paul Eggert <eggert@twinsun.com>
14150
14151 Version 1.75c.
14152
14153 * tests/actions.at (Actions after errors): Use an output format
14154 more similar to that of the Printers and Destructors test.
14155 Test the position of the ';' token too.
14156 (Printers and Destructors): Likewise.
14157 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14158 unnecessarily alarming people when the test fails.
14159
14160 * data/yacc.c (yyerrlab1): Move this label down, so that the
14161 parser does not discard the lookahead token if the user code
14162 invokes YYERROR. This change is required for POSIX conformance.
14163
14164 * lib/error.c: Sync with gnulib.
14165
141662002-11-22 Paul Eggert <eggert@twinsun.com>
14167
14168 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14169 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14170 * lib/xmalloc.c: Likewise.
14171
141722002-11-20 Paul Eggert <eggert@twinsun.com>
14173
14174 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14175
141762002-11-20 Paul Eggert <eggert@twinsun.com>
14177
14178 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14179 should use `if (! x) abort ();' rather than `assert (x);', and
14180 anyway it's one less thing to worry about configuring.
14181
14182 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14183 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14184 and replace all instances of assert with abort.
14185 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14186 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14187
14188 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14189 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14190 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14191 hash_find_entry, hash_rehash, hash_insert): Likewise.
14192 * src/conflicts.c (resolve_sr_conflict): Likewise.
14193 * src/lalr.c (set_goto_map, map_goto): Likewise.
14194 * src/nullable.c (nullable_compute): Likewise.
14195 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14196 * src/reader.c (packgram, reader): Likewise.
14197 * src/state.c (state_new, state_free, state_transitions_set,
14198 state_reduction_find): Likewise.
14199 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14200 symbol_pack): Likewise.
14201 * src/tables.c (conflict_row, pack_vector): Likewise.
14202 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14203 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14204 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14205 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14206
14207 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14208 (ARGMATCH_CONSTRAINT): New macro.
14209 (ARGMATCH_ASSERT): Use it.
14210
14211 * src/system.h (verify): New macro.
14212 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14213 rather than assert.
14214 * src/tables.c (tables_generate): Likewise.
14215
14216 * src/struniq.c (struniq_assert): Now returns void, and aborts
14217 if the assertion is false.
14218 (struniq_assert_p): Remove.
14219 * src/struniq.h: Likewise.
14220
142212002-11-18 Paul Eggert <eggert@twinsun.com>
14222
14223 * data/glr.c (yygetLRActions): Replace `yyindex' with
14224 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14225 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14226 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14227
142282002-11-18 Akim Demaille <akim@epita.fr>
14229
14230 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14231 space.
14232 From Tim Van Holder.
14233
142342002-11-17 Paul Eggert <eggert@twinsun.com>
14235
14236 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14237 to "SyntaxError" for consistency with my 2002-11-15 change.
14238
14239 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14240 not define to {}, since this breaks the common use of `YYDPRINTF
14241 ((...));' if a single statement is desired (e.g. before `else').
14242 Work around GCC warnings by surrounding corresponding calls with
14243 {} if needed.
14244 (yyhasResolvedValue): Remove unused function.
14245 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14246 loop body.
14247 (yyreportSyntaxError): Renamed from yyreportParseError.
14248 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14249 All uses changed.
14250 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14251 extern when possible. Remove unused initializations.
14252
142532002-11-16 Akim Demaille <akim@epita.fr>
14254
14255 Augment the similarity between GLR and LALR traces.
14256
14257 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14258 (YY_REDUCE_PRINT): New.
14259 (yyparse): Use them.
14260 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14261 YYDPRINT here.
14262 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14263 state reached after the reduction/recovery, since...
14264 (yyparse, yyprocessOneStack): Report the state we are entering in.
14265
142662002-11-16 Akim Demaille <akim@epita.fr>
14267
14268 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14269 Add support for --trace=skeleton.
14270 * src/scan-skel.l: %option debug.
14271 Scan strings of non-@ or \n instead of character by character.
14272 (scan_skel): Handle trace_skeleton.
14273 (QPUTS): New.
14274 (@output_parser_name@, @output_header_name@): ``Restore'' their
14275 support (used to be M4 macros).
14276 * data/yacc.c: Quote larger chunks, a la glr.c.
14277 * data/lalr1.cc: Likewise.
14278 The header guards are no longer available, so use some other
14279 string than `YYLSP_NEEDED'.
14280
142812002-11-16 Akim Demaille <akim@epita.fr>
14282
14283 Make the ``Printers and Destructors'' test more verbose, taking
14284 `yacc.c''s behavior as (possibly wrong) reference.
14285
14286 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14287 instead of fprint on stdout.
14288 Set and report the last_line of the symbols.
14289 Consistently display values and locations.
14290
142912002-11-16 Paul Eggert <eggert@twinsun.com>
14292
14293 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14294
142952002-11-15 Paul Eggert <eggert@twinsun.com>
14296
14297 * tests/actions.at (Actions after errors): New test case.
14298
14299 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14300 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14301 tests/action.at, tests/calc.at, tests/conflicts.at,
14302 tests/cxx-type.at, tests/regression.at:
14303 "parse error" -> "syntax error" for POSIX compatibility.
14304 "parsing stack overflow..." -> "parser stack overflow" so
14305 that code matches Bison documentation.
14306
143072002-11-15 Akim Demaille <akim@epita.fr>
14308
14309 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14310 take two BRACED_CODE, not two string_content.
14311 Free the scanner's obstack when we are done.
14312 (code_content): New.
14313 * tests/calc.at: Adjust.
14314 * doc/bison.texinfo: Adjust.
14315 Also, make sure to include the `,' for these declarations.
14316
143172002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14318
14319 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14320 definition; avoids potential autoreconf problems.
14321
143222002-11-15 Akim Demaille <akim@epita.fr>
14323
14324 Always check the value returned by yyparse.
14325
14326 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14327 returned by yyparse.
14328 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14329 Adjust calls.
14330 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14331 returned by yyparse.
14332
143332002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14334
14335 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14336 on input.at test.
14337
143382002-11-14 Paul Eggert <eggert@twinsun.com>
14339
14340 * src/output.c (output_skeleton): Call xfopen instead of
14341 duplicating xfopen's body.
14342
14343 Fix bugs reported by Nelson H. F. Beebe in
14344 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14345
14346 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14347 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14348 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14349 file twice in the grammar, as an extra check.
14350
14351 * tests/input.at (Torturing the Scanner): Surround the
14352 backslash-newline tests with "#if 0", to make it less likely that
14353 we'll run into compiler bugs. Bring back solitary \ inside
14354 comment, but add a closing comment to work around HP C bug. Don't
14355 test backslash-newline in C character constant.
14356
143572002-11-14 Akim Demaille <akim@epita.fr>
14358
14359 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14360 status of the compiler.
14361 Calling `exit 1' is no longer needed.
14362 Reported by Nelson H. F. Beebe.
14363
143642002-11-14 Akim Demaille <akim@epita.fr>
14365
14366 * tests/atlocal.in (CPPFLAGS): We have config.h.
14367 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14368 New.
14369 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14370 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14371 * tests/regression.at, tests/torture.at: Use them for all the
14372 grammars that are to be compiled.
14373 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14374 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14375 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14376
143772002-11-14 Akim Demaille <akim@epita.fr>
14378
14379 * doc/bison.texinfo: Various formatting changes (alignments in
14380 samples, additional @group/@end group, GCS in samples.
14381 Use @deffn instead of simple @table to define the directives,
14382 macros, variables etc.
14383
143842002-11-13 Paul Eggert <eggert@twinsun.com>
14385
14386 Fix some bugs reported by Albert Chin-A-Young in
14387 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14388
14389 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14390 -o c"; the HP C compiler chatters during compilation.
14391 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14392 * tests/headers.at (export YYLTYPE): Likewise.
14393
14394 * tests/input.at (Torturing the Scanner): Remove lines containing
14395 solitary backslashes, as they tickle a bug in the HP C compiler.
14396
14397 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14398 comments, since they're not portable. Use GNU coding style.
14399
144002002-11-13 Akim Demaille <akim@epita.fr>
14401
14402 * data/yacc.c: Leave bigger chunks of quoted text.
14403 (YYDSYMPRINTF): New.
14404 Use it to report symbol activities.
14405 * data/glr.c (YYDSYMPRINTF): New.
14406 Use it.
14407
144082002-11-12 Paul Eggert <eggert@twinsun.com>
14409
14410 Version 1.75b.
14411
14412 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14413 (yyglrReduce): Return yyok, not 0.
14414 This should avoid the enumerated-type warnings reported
14415 by Nelson H. F. Beebe in
14416 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14417
14418 * lib/bbitset.h (BITSET_INLINE): Remove.
14419 * lib/bitset.h [! BITSET_INLINE]: Remove.
14420 (bitset_set, bitset_reset, bitset_test): Rename local vars
14421 to avoid shadowing warnings by GCC.
14422
14423 * data/glr.c (inline): Remove #define. It's the user's
14424 responsibility to #define it away, just like 'const'.
14425 This fixes one of the bugs reported by Nelson H. F. Beebe in
14426 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14427
14428 * Makefile.maint (po-check): Scan .l and .y files instead of the
14429 .c and the .h files that they generate. This fixes the bug
14430 reported by Tim Van Holder in:
14431 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14432 Look for N_ as well as for _. Try to avoid matching #define for
14433 N_ and _.
14434 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14435 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14436 * src/scan-gram.l: Revamp regular expressions so that " and '
14437 do not confuse xgettext.
14438
14439 * src/struniq.h (struniq_new): Do not declare the return type
14440 to be 'const'; this violates the C standard.
14441 * src/struniq.c (struniq_new): Likewise.
14442
144432002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14444
14445 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14446 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14447 linker.
14448
144492002-11-12 Akim Demaille <akim@epita.fr>
14450
14451 * Makefile.maint: Sync with Autoconf:
14452 (local_updates): New.
14453
144542002-11-12 Akim Demaille <akim@epita.fr>
14455
14456 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14457
144582002-11-12 Akim Demaille <akim@epita.fr>
14459
14460 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14461 locations.
14462
144632002-11-12 Akim Demaille <akim@epita.fr>
14464
14465 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14466 not yyvalue.
14467
144682002-11-12 Akim Demaille <akim@epita.fr>
14469
14470 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14471 Use it to test the GLR parser.
14472
144732002-11-12 Akim Demaille <akim@epita.fr>
14474
14475 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14476 defines it.
14477 * data/glr.c (yystos): New.
14478 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14479 (YYDSYMPRINT): New.
14480 (yyval): Don't define it, it is handled via M4.
14481 (yyrecoverParseError): Free verbosely the discarded symbols.
14482 * data/yacc.c (yysymprint): Remove, rather...
14483 (b4_yysymprint_generate): invoke.
14484 * data/c.m4 (b4_yysymprint_generate): New.
14485 Accept pointers as arguments, as opposed to the version from
14486 yacc.c.
14487 (b4_yydestruct_generate): Likewise.
14488 * tests/cations.at (Printers and Destructors): Use Bison directives
14489 instead of CPP macros.
14490 Don't rely on internal details.
14491
144922002-11-12 Akim Demaille <akim@epita.fr>
14493
14494 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14495 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14496 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14497 it against YYEMPTY and so forth), work on yytoken (i.e., set
14498 it to YYEMPTY etc.).
14499 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14500 (b4_symbol_actions): Remove.
14501 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14502 for 0, end-of-input.
14503
145042002-11-12 Akim Demaille <akim@epita.fr>
14505
14506 * doc/bison.texinfo (Destructor Decl): New.
14507
145082002-11-12 Akim Demaille <akim@epita.fr>
14509
14510 * src/tables.c (tables_generate): Use free for pointers that
14511 cannot be NULL, not XFREE.
14512 (pack_vector): Use assert, not fatal, for bound violations.
14513 * src/state.c (state_new): Likewise.
14514 * src/reader.c (reader): Likewise.
14515 * src/lalr.c (set_goto_map): Likewise.
14516 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14517 the file name.
14518
145192002-11-12 Akim Demaille <akim@epita.fr>
14520
14521 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14522 Restore.
14523 * src/scan-gram.l (last_string): Is global to the file, not to
14524 yylex.
14525 * src/parse-gram.y (input): Don't append the epilogue here,
14526 (epilogue.opt): do it here, and free the scanner's obstack.
14527 * src/reader.c (epilogue_set): Rename as...
14528 (epilogue_augment): this.
14529 * data/c.m4 (b4_epilogue): Defaults to empty.
14530
145312002-11-12 Akim Demaille <akim@epita.fr>
14532
14533 * src/getargs.c (long_options): Remove duplicates.
14534 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14535 Remove.
14536 * doc/bison.rnh: Remove.
14537 * doc/bison.texinfo (VMS Invocation): Remove.
14538
145392002-11-12 Akim Demaille <akim@epita.fr>
14540
14541 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14542 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14543
14544 Use struniq for symbols.
14545
14546 * src/symtab.h (symbol_t): The tag member is a struniq.
14547 (symbol_type_set): Adjust.
14548 * src/symtab.c (symbol_new): Takes a struniq.
14549 (symbol_free): Don't free the tag member.
14550 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14551 (hash_compare_symbol, hash_symbol): these.
14552 Use the fact that tags as struniqs.
14553 (symbol_get): Use struniq_new.
14554 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14555 Returns a strniq.
14556 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14557 and type members are struniqs.
14558 * src/reader.c (get_merge_function)
14559 (grammar_current_rule_merge_set): Adjust.
14560 (TYPE, current_type): Are struniq.
14561
14562 Use struniq for file names.
14563
14564 * src/files.h, src/files.c (infile): Split into...
14565 (grammar_file, current_file): these.
14566 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14567 * src/reduce.c (reduce_print): Likewise.
14568 * src/getargs.c (getargs): Likewise.
14569 * src/complain.h, src/complain.c: Likewise.
14570 * src/main.c (main): Call struniqs_new early enough to use it for
14571 file names.
14572 Don't free the input file name.
14573
145742002-11-12 Akim Demaille <akim@epita.fr>
14575
14576 * src/symtab.c (symbol_free): Remove dead deactivated code:
14577 type_name are properly removed.
14578 Don't use XFREE to free items that cannot be NULL.
14579 * src/struniq.h, src/struniq.c: New.
14580 * src/main.c (main): Initialize/free struniqs.
14581 * src/parse-gram.y (%union): Add astruniq member.
14582 (yyprint): Adjust.
14583 * src/scan-gram.l (<{tag}>): Return a struniq.
14584 Free the obstack bit that used to store it.
14585 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14586
145872002-11-11 Paul Eggert <eggert@twinsun.com>
14588
14589 Revamp to fix many (but not all) of the C- and M4-related quoting
14590 problems. Among other things, this fixes the Bison bug reported
14591 by Jan Hubicka when processing the Bash grammar; see:
14592 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14593
14594 Use new @ escapes consistently. Represent brackets with @{ and @}
14595 rather than @<:@ and @:>@, since this works a bit better with dumb
14596 editors like vi. Represent @ with @@, since @ is now consistently
14597 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14598 __ofile__, to avoid unexpected expansions. Similarly, use @output
14599 rather than #output.
14600
14601 * data/c.m4 (b4_copyright): Omit file name from comment, since
14602 the file name could contain "*/".
14603 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14604 be quoted. All uses changed.
14605
14606 * data/glr.c: Use new @ escapes consistently.
14607 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14608 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14609 Remove, since they couldn't handle arbitrary characters in file
14610 names.
14611 * data/lalr1.cc: Likewise.
14612 * data/yacc.c: Likewise.
14613
14614 * src/files.c (output_infix): Remove; all uses removed.
14615 * src/files.h: Likewise.
14616
14617 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14618 mishandled funny characters in file names, and anyway it isn't
14619 needed any more.
14620 * data/yacc.c: Likewise.
14621 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14622
14623 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14624 * data/yacc.c: Likewise.
14625
14626 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14627 strings now.
14628 (muscle_init): Quote filename as a C string.
14629 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14630 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14631 * src/output.c (escaped_file_name_output): New function.
14632 (prepare_symbols): Quote tokens for M4.
14633 (prepare): Don't insert output_infix, output_prefix,
14634 output_parser_name, output_header_name; this is now down by scan-skel.
14635 Insert skeleton as a C string.
14636
14637 * src/output.c (user_actions_output, symbol_destructors_output,
14638 symbol_printers_output): Quote filenames for C and M4.
14639 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14640
14641 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14642 escapes other than \\ and \'; this simplifies the code.
14643 (<SC_STRING>): Likewise, for \\ and \".
14644 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14645 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14646 Use new escapes @{ and @} for [ and ].
14647
14648 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14649 them with auto vars.
14650 Switch to new escape scheme, where @ is the escape character uniformly.
14651 Abort if a stray escape character is found. Avoid unbounded input
14652 buffer when parsing non-escaped text.
14653
14654 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14655 __oline__, #output, $@, and @{ do not have unintended meanings.
14656
146572002-11-09 Paul Eggert <eggert@twinsun.com>
14658
14659 Fix the test failure due to GCC warnings described in
14660 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14661 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14662 evaluate to 0 if it's impossible for NINF to be in the respective
14663 table.
14664 (yygetLRActions, yyrecoverParseError): Use them.
14665
14666 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14667 counted in the token inserted at end of file. Now takes
14668 location_t *, not location_t, so that the location can be
14669 adjusted. All uses changed.
14670
14671 * tests/regression.at (Invalid inputs): Adjust wording in
14672 diagnostic to match the new behavior.
14673
14674 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14675 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14676 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14677 abort ();'. This reduces the runtime of the "Many lookaheads"
14678 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14679 GCC 3.2.
14680
146812002-11-07 Paul Eggert <eggert@twinsun.com>
14682
14683 * src/parse-gram.y (CHARACTER): Remove unused token.
14684 All uses removed.
14685
14686 * src/scan-gram.l: Remove stack option. We no longer use the
14687 stack, since the stack was never deeper than 1; instead, use the
14688 new auto var c_context to record the stacked value.
14689
14690 Remove nounput option. At an unexpected end of file, we now unput
14691 the minimal input necessary to end cleanly; this simplifies the
14692 code.
14693
14694 Avoid unbounded token sizes where this is easy.
14695
14696 (unexpected_end_of_file): New function.
14697 Use it to systematize the error message on unexpected EOF.
14698 (last-string): Now auto, not static.
14699 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14700 (scanner_last_string_free): Remove; not used.
14701 (percent_percent_count): Move decl to just before use.
14702 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14703 not the (never otherwised-used) CHARACTER.
14704
147052002-11-07 Akim Demaille <akim@epita.fr>
14706
14707 Let yyerror always receive the msg as last argument, so that
14708 yyerror can be variadic.
14709
14710 * data/yacc.c (b4_yyerror_args): New.
14711 Use it when calling yyerror.
14712 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14713 Use it when calling yyerror.
14714 * doc/bison.texinfo (Error Reporting): Adjust.
14715 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14716 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14717
147182002-11-06 Akim Demaille <akim@epita.fr>
14719
14720 #line should have quoted strings.
14721 Ideally, this should be done by m4_quotearg.
14722
14723 * src/scan-skel.l: Include quotearg.h.
14724 Quote __ofile__.
14725 * src/output.c (symbol_printers_output)
14726 (symbol_destructors_output): Quote the file name.
14727
147282002-11-06 Akim Demaille <akim@epita.fr>
14729
14730 * tests/regression.at (Invalid inputs): Adjust to the recent
14731 messages.
14732
147332002-11-06 Akim Demaille <akim@epita.fr>
14734
14735 Restore --no-lines.
14736 Reported by Jim Kent.
14737
14738 * data/c.m4 (b4_syncline): New.
14739 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14740 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14741 * src/output.c (user_actions_output): Likewise.
14742 (prepare): Define 'b4_synclines_flag'.
14743 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14744
147452002-11-06 Akim Demaille <akim@epita.fr>
14746
14747 * src/main.c (main): Free `infile'.
14748 * src/scan-gram.l (handle_syncline): New.
14749 Recognize `#line'.
14750 * src/output.c (user_actions_output, symbol_destructors_output)
14751 (symbol_printers_output): Use the location's file name, not
14752 infile.
14753 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14754
147552002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14756
14757 * src/tables.c (matching_state): Don't allow states to match if
14758 either has GLR conflict entries.
14759
147602002-11-05 Paul Eggert <eggert@twinsun.com>
14761
14762 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14763 "integer out of range" rather than "invalid value".
14764 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14765 accordingly.
14766
14767 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14768 Also, remove one static variable in the scanner.
14769
14770 * src/scan-gram.l (braces_level): Now auto, not static.
14771 Initialize to zero if the compiler is being picky.
14772 (INITIAL): Clear braces_level instead of incrementing it.
14773 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14774 as POSIX 1003.1-2001 requires.
14775 * src/system.h (IF_LINT): New macro, taken from coreutils.
14776 * configure.ac: Define "lint" if --enable-gcc-warnings.
14777
147782002-11-05 Akim Demaille <akim@epita.fr>
14779
14780 * src/scan-gram.l: When it starts with `%', complain about the
14781 whole directive, not just that `invalid character: %'.
14782
147832002-11-04 Akim Demaille <akim@epita.fr>
14784
14785 * Makefile.maint: Update from Autoconf.
14786 (update, cvs-update, po-update, do-po-update): New.
14787
147882002-11-04 Akim Demaille <akim@epita.fr>
14789
14790 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14791 and yyerror.
14792 Have yyerror `use' its arguments.
14793 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14794 returns true when location & yacc & pure & parse-param.
14795 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14796
147972002-11-04 Akim Demaille <akim@epita.fr>
14798
14799 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14800 clashes.
14801 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14802 font-lock-mode.
14803 Use complain_at.
14804 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14805 slot 0.
14806
148072002-11-03 Paul Eggert <eggert@twinsun.com>
14808
14809 * src/reader.c (get_merge_function, grammar_current_rule_check):
14810 Use consistent diagnostics for reporting type name clashes.
14811 Quote the types with <>, for consistency with Yacc.
14812 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14813
148142002-11-03 Akim Demaille <akim@epita.fr>
14815
14816 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14817 New.
14818 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14819 (b4_parse_param): Remove.
14820 Use b4_identification.
14821 Propagate b4_pure_args where needed to pass them to yyerror.
14822 * data/glr.m4 (b4_parse_param): Remove.
14823 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14824 (b4_lpure_formals): New.
14825 Use b4_identification.
14826 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14827 b4_user_formals and b4_user_args.
14828 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14829 (yyreportAmbiguity): When using a pure parser, also need
14830 the location, and the parse-params.
14831 Adjust callers.
14832 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14833 When using a pure parser, also need the parse-params.
14834 Adjust callers.
14835 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14836 (%pure-parser + %parse-param) LALR and GLR parsers.
14837 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14838 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14839 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14840 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14841 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14842 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14843 * doc/bison.texinfo: Untabify the whole file.
14844 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14845 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14846 (Error Reporting): Adjust to these new directives.
14847 Document %error-verbose, deprecate YYERROR_VERBOSE.
14848
148492002-11-03 Akim Demaille <akim@epita.fr>
14850
14851 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14852 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14853 command line options.
14854 * tests/cxx-type.at: Formatting changes.
14855
148562002-11-03 Paul Eggert <eggert@twinsun.com>
14857
14858 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14859 to count columns correctly, and to check for invalid inputs.
14860
14861 Use mbsnwidth to count columns correctly. Account for tabs, too.
14862 Include mbswidth.h.
14863 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14864 (extend_location): New function.
14865 (YY_LINES): Remove.
14866
14867 Handle CRLF in C code rather than in Lex code.
14868 (YY_INPUT): New macro.
14869 (no_cr_read): New function.
14870
14871 Scan UCNs, even though we don't fully handle them yet.
14872 (convert_ucn_to_byte): New function.
14873
14874 Handle backslash-newline correctly in C code.
14875 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14876 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14877 all uses changed.
14878 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14879 Use {splice} wherever C allows backslash-newline.
14880 YY_STEP after space, newline, vertical-tab.
14881 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14882
14883 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14884
14885 ({int}, handle_action_dollar, handle_action_at): Check for integer
14886 overflow.
14887
14888 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14889
14890 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14891 as well as \000. Check for UCHAR_MAX, not 255.
14892 Allow \x with an arbitrary positive number of digits, as in C.
14893 Check for overflow here.
14894 Allow \? and UCNs, for compatibility with C.
14895
14896 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14897 with quote slot used by complain_at.
14898
14899 * tests/input.at: Add tests for backslash-newline, m4 quotes
14900 in symbols, long literals, and funny escapes in strings.
14901
14902 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14903 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14904 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14905 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14906 * m4/mbswidth.m4: New file, from GNU coreutils.
14907
14908 * doc/bison.texinfo (Grammar Outline): Document // comments.
14909 (Symbols): Document that trigraphs have no special meaning in Bison,
14910 nor is backslash-newline allowed.
14911 (Actions): Document that trigraphs have no special meaning.
14912
14913 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14914 no longer used.
14915
149162002-11-02 Paul Eggert <eggert@twinsun.com>
14917
14918 * src/reader.c: Don't include quote.h; not needed.
14919 (get_merge_function): Reword warning to be consistent with
14920 type clash diagnostic in grammar_current_rule_check.
14921
14922 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14923 bug in trigraph handling.
14924
14925 * src/output.c (prepare_symbols): When printing token names,
14926 escape "[" as "@<:@" and likewise for "]".
14927
14928 * src/system.h (errno): Remove declaration, as we are now
14929 assuming C89 or better, and C89 guarantees errno.
14930
149312002-10-30 Paul Eggert <eggert@twinsun.com>
14932
14933 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14934 Check for close failures.
14935 * src/files.h (xfclose): Return void, not int, since it always
14936 returned zero.
14937 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14938 indicates one.
14939 * src/output.c (output_skeleton): Use xfclose rather than fclose
14940 and ferror. xfclose now checks ferror.
14941
14942 * data/glr.c (YYLEFTMOST_STATE): Remove.
14943 (yyreportTree): Use a stack-based leftmost state. This avoids
14944 our continuing battles with bogus warnings about initializers.
14945
149462002-10-30 Akim Demaille <akim@epita.fr>
14947
14948 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14949 #if.
14950
149512002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14952
14953 * tests/glr-regr1.at: New test for reported regressions.
14954 * tests/testsuite.at: Add glr-regr1.at test.
14955 * tests/Makefile.am: Add glr-regr1.at test.
14956
149572002-10-24 Paul Eggert <eggert@twinsun.com>
14958
14959 Version 1.75a.
14960
14961 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14962 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14963 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14964 Don't assume strdup exists; POSIX says its an XSI extension.
14965 Check for buffer overflow on input.
14966
149672002-10-24 Akim Demaille <akim@epita.fr>
14968
14969 * src/output.c (output_skeleton): Don't disable M4sugar comments
14970 too soon: it results in comments being expanded.
14971 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14972 first output.
14973
149742002-10-24 Akim Demaille <akim@epita.fr>
14975
14976 * data/yacc.c (m4_int_type): New.
14977 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14978 char' as only yacc.c wants K&R portability.
14979 * data/glr.c (yysigned_char): Remove.
14980 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14981 Reported by Quoc Peyrot.
14982
149832002-10-23 Paul Eggert <eggert@twinsun.com>
14984
14985 * src/main.c (main): With --trace=time, report times even if a
14986 non-fatal error occurs. Formerly, the times were reported in some
14987 such cases but not in others.
14988 * src/reader.c (reader): Just return if a complaint has been issued,
14989 instead of exiting, so that 'main' can report times.
14990
149912002-10-22 Akim Demaille <akim@epita.fr>
14992
14993 * src/system.h: Include sys/types.
14994 Reported by Bert Deknuydt.
14995
149962002-10-23 Paul Eggert <eggert@twinsun.com>
14997
14998 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14999 Suggested by Art Haas.
15000
150012002-10-22 Paul Eggert <eggert@twinsun.com>
15002
15003 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15004 decl; not needed any more.
15005 * src/main.c (main): Use return to exit, undoing yesterday's change.
15006 The last OS that we could find where this wouldn't work is
15007 SunOS 3.5, and that's too old to worry about now.
15008
15009 * data/glr.c (struct yyltype): Define members even when not
15010 doing locations. This is more consistent with yacc.c, and it
15011 works around the following bug reports:
15012 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15013 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15014
15015 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15016 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15017 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15018
150192002-10-22 Akim Demaille <akim@epita.fr>
15020
15021 * data/README: New.
15022
150232002-10-21 Paul Eggert <eggert@twinsun.com>
15024
15025 Be consistent about 'bool'; the old code used an enum in one
15026 module and an int in another, and this violates the C standard.
15027 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15028 * configure.ac (AC_HEADER_STDBOOL): Add.
15029 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15030 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15031 * src/symtab.c (hash_compare_symbol_t): Likewise.
15032 * src/system.h (bool, false, true): Use a definition consistent
15033 with ../lib/hash.c. All uses changed.
15034
15035 * src/complain.c (warning_issued): Renamed from warn_message_count,
15036 so that we needn't worry about integer overflow (!).
15037 Now of type bool. All uses changed.
15038 (complaint_issued): Renamed from complain_message_count; likewise.
15039
15040 * src/main.c (main): Use exit to exit with failure.
15041
15042 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15043 rather than 1 and 0.
15044 * src/main.c (main): Likewise.
15045 * src/getargs.c (getargs): Likewise.
15046 * src/reader.c (reader): Likewise.
15047
15048 * src/getarg.c (getargs): Remove duplicate code for
15049 "Try `bison --help'".
15050
15051 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15052 What was that "2" for?
15053
15054 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15055 * src/getargs.c (usage): Likewise.
15056
15057 * src/getargs.c (getargs): When there are too few operands, report
15058 the last one. When there are too many, report the first extra
15059 one. This is how diffutils does it.
15060
150612002-10-20 Paul Eggert <eggert@twinsun.com>
15062
15063 Remove K&R vestiges.
15064 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15065 * src/complain.c (VA_START): Remove. Assume prototypes.
15066 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15067 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15068 fatal): Assume prototypes.
15069 * src/complain.h: Assume prototypes.
15070 * src/system.h (PARAMS): Remove.
15071 Include <limits.h> unconditionally, since it's guaranteeed even
15072 for a freestanding C89 compiler.
15073 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15074 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15075
150762002-10-20 Akim Demaille <akim@epita.fr>
15077
15078 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15079 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15080 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15081 (yyresolveStates, yyresolveAction, yyresolveStack)
15082 (yyprocessOneStack): Use them.
15083 (yy_reduce_print): New.
15084 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15085
150862002-10-20 Akim Demaille <akim@epita.fr>
15087
15088 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15089 arguments and output `void'.
15090 (b4_c_function): Rename as...
15091 (b4_c_function_def): this.
15092 (b4_c_function_decl, b4_c_ansi_function_def)
15093 (b4_c_ansi_function_decl): New.
15094 Change the interpretation of the arguments: before `int, foo', now
15095 `int foo, foo'.
15096 * data/yacc.c (yyparse): Prototype and define thanks to these.
15097 Adjust b4_c_function_def uses.
15098 * data/glr.c (yyparse): Likewise, but ANSI only.
15099
151002002-10-20 Akim Demaille <akim@epita.fr>
15101
15102 * src/output.c (prepare): Move the definition of `tokens_number',
15103 `nterms_number', `undef_token_number', `user_token_number_max'
15104 to...
15105 (prepare_tokens): Here.
15106 (prepare_tokens): Rename as...
15107 (prepare_symbols): this.
15108 (prepare): Move the definition of `rules_number' to...
15109 (prepare_rules): here.
15110 (prepare): Move the definition of `last', `final_state_number',
15111 `states_number' to...
15112 (prepare_states): here.
15113 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15114
151152002-10-20 Akim Demaille <akim@epita.fr>
15116
15117 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15118
151192002-10-20 Akim Demaille <akim@epita.fr>
15120
15121 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15122 * data/c.m4: here.
15123
151242002-10-20 Akim Demaille <akim@epita.fr>
15125
15126 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15127 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15128 `pair'.
15129 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15130 `name' to...
15131 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15132 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15133 These.
15134
151352002-10-19 Paul Eggert <eggert@twinsun.com>
15136
15137 Do not create a temporary file, as that involves security and
15138 cleanup headaches. Instead, use a pair of pipes.
15139 Derived from a suggestion by Florian Krohm.
15140 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15141 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15142 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15143 (BISON_PREREQ_SUBPIPE): Add.
15144 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15145 Add subpipe.h, subpipe.c.
15146 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15147 * po/POTFILES.in: Add lib/subpipe.c.
15148 * src/output.c: Include "subpipe.h".
15149 (m4_invoke): Remove decl.
15150 (scan_skel): New decl.
15151 (output_skeleton): Use pipe rather than temporary file for m4 input.
15152 Check that m4sugar.m4 is readable, to avoid deadlock.
15153 Check for pipe I/O error.
15154 * src/scan-skel.l (readpipe): Remove decl.
15155 (scan_skel): New function, to be used in place of m4_invoke.
15156 Read from stream rather than file.
15157
15158 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15159 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15160 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15161 this generates a more-accurate value anyway.
15162
15163 * lib/timevar.c (timervar_accumulate): Rename locals to
15164 avoid confusion with similarly-named more-global.
15165 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15166
15167 * src/output.c (prepare): Use xstrdup to convert char const *
15168 to char *, to avoid GCC warning.
15169
151702002-10-19 Akim Demaille <akim@epita.fr>
15171
15172 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15173 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15174 Use them to have `calc.y' ready for %pure-parser.
15175 * data/yacc.c (YYLEX): Pass a yylex return type to
15176 b4_c_function_call.
15177
151782002-10-19 Akim Demaille <akim@epita.fr>
15179
15180 Prototype support of %lex-param and %parse-param.
15181
15182 * src/parse-gram.y: Add the definition of the %lex-param and
15183 %parse-param tokens, plus their rules.
15184 Drop the `_' version of %glr-parser.
15185 Add the "," token.
15186 * src/scan-gram.l (INITIAL): Scan them.
15187 * src/muscle_tab.c: Comment changes.
15188 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15189 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15190 (muscle_entry_s): The `value' member is no longer const.
15191 Adjust all dependencies.
15192 * src/muscle_tab.c (muscle_init): Adjust: use
15193 MUSCLE_INSERT_STRING.
15194 Initialize the obstack earlier.
15195 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15196 (muscle_pair_list_grow): New.
15197 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15198 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15199 * tests/calc.at: Use %locations, not --locations.
15200 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15201
152022002-10-19 Akim Demaille <akim@epita.fr>
15203
15204 * src/getargs.c (usage): Take status as argument and exit
15205 accordingly.
15206 Report the traditional `Try ... --help' message when status != 0.
15207 (usage, version): Don't take a FILE * as arg, it is pointless.
15208 (getargs): When there is an incorrect number of arguments, make it
15209 an error, and report it GNUlically thanks to `usage ()'.
15210
152112002-10-18 Paul Eggert <eggert@twinsun.com>
15212
15213 * data/glr.c (yyreportParseError): Don't assume that sprintf
15214 yields the length of the printed string, as this is not true
15215 on SunOS 4.1.4. Reported by Peter Klein.
15216
15217 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15218 * tests/conflicts.at (%nonassoc and eof): Likewise.
15219 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15220
152212002-10-17 Akim Demaille <akim@epita.fr>
15222
15223 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15224 * src/getargs.c (trace_types, trace_args): Adjust.
15225 * src/reader.c (grammar_current_rule_prec_set)
15226 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15227 Standardize error messages.
15228 And s/@prec/%prec/!
15229 (reader): Use trace_flag to enable scanner/parser debugging,
15230 instead of an adhoc scheme.
15231 * src/scan-gram.l: Remove trailing debugging code.
15232
152332002-10-16 Paul Eggert <eggert@twinsun.com>
15234
15235 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15236 MUSCLE_TAB_H.
15237
15238 * NEWS: Officially drop support for building Bison with K&R C,
15239 since it didn't work anyway and it's not worth worrying about.
15240 * Makefile.maint (wget_files): Remove ansi2knr.c.
15241 (ansi2knr.c-url_prefix): Remove.
15242 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15243 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15244 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15245
152462002-10-15 Paul Eggert <eggert@twinsun.com>
15247
15248 Stop using the "enum_" trick for K&R-style function definitions;
15249 it confused me, and I was the author! Instead, assume that people
15250 who want to use K&R C compilers (when using these modules in GCC,
15251 perhaps?) will run ansi2knr.
15252
15253 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15254 All uses of "enum_" changed to "enum ".
15255 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15256 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15257
15258 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15259 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15260 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15261 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15262 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15263 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15264 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15265 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15266 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15267 Use function prototypes; this removes the need for declaring
15268 static functions simply to provide their prototypes.
15269 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15270 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15271 bitset_count_, bitset_create, bitset_dump, bitset_first,
15272 bitset_free, bitset_init, bitset_last, bitset_next,
15273 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15274 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15275 bitset_print, bitset_release_memory, bitset_toggle_,
15276 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15277 debug_bitset): Likewise.
15278 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15279 * lib/bitset_stats.c (bitset_log_histogram_print,
15280 bitset_percent_histogram_print, bitset_stats_and,
15281 bitset_stats_and_cmp, bitset_stats_and_or,
15282 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15283 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15284 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15285 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15286 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15287 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15288 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15289 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15290 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15291 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15292 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15293 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15294 bitset_stats_zero): Likewise.
15295 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15296 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15297 bitsetv_dump, debug_bitsetv): Likewise.
15298 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15299 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15300 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15301 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15302 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15303 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15304 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15305 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15306 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15307 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15308 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15309 Likewise.
15310 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15311 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15312 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15313 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15314 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15315 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15316 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15317 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15318 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15319 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15320 lbitset_xor_cmp, lbitset_zero): Likewise.
15321
153222002-10-14 Akim Demaille <akim@epita.fr>
15323
15324 Version 1.75.
15325
153262002-10-14 Akim Demaille <akim@epita.fr>
15327
15328 * tests/Makefile.am (maintainer-check-posix): New.
15329
153302002-10-14 Akim Demaille <akim@epita.fr>
15331
15332 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15333 member.
15334
153352002-10-14 Akim Demaille <akim@epita.fr>
15336
15337 * src/tables.c (table_ninf_remap): base -> tab.
15338 Reported by Matt Rosing.
15339
153402002-10-14 Paul Eggert <eggert@twinsun.com>
15341
15342 * tests/action.at, tests/calc.at, tests/conflicts.at,
15343 tests/cxx-type.at, tests/headers.at, tests/input.at,
15344 tests/regression.at, tests/synclines.at, tests/torture.at:
15345 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15346 so that the tests still work even if POSIXLY_CORRECT is set.
15347 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15348
15349 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15350 for portability to K&R hosts. Fix typo: signed char is guaranteed
15351 only to 127, not to 128.
15352 * data/glr.c (yysigned_char): New type.
15353 * data/yacc.c (yysigned_char): Likewise.
15354 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15355
153562002-10-13 Paul Eggert <eggert@twinsun.com>
15357
15358 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15359 true due to limited range of data type" warning from GCC.
15360
15361 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15362 by wrapping enum yytokentype's definition inside #ifndef
15363 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15364
153652002-10-13 Akim Demaille <akim@epita.fr>
15366
15367 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15368 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15369
153702002-10-13 Akim Demaille <akim@epita.fr>
15371
15372 * Makefile.maint: Update from Autoconf 2.54.
15373 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15374
153752002-10-13 Akim Demaille <akim@epita.fr>
15376
15377 * src/print.c (print_state): Separate the list of solved conflicts
15378 from the other items.
15379 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15380
153812002-10-13 Akim Demaille <akim@epita.fr>
15382
15383 Let nondeterministic skeletons be usable with deterministic
15384 tables.
15385
15386 With the patch, GAWK compiled by GCC without -O2 passes its test
15387 suite using a GLR parser driven by LALR tables. It fails with -O2
15388 because `struct stat' gives two different answers on my machine:
15389 88 (definition of an auto var) and later 96 (memset on this var).
15390 Hence the stack is badly corrumpted. The headers inclusion is to
15391 blame: if I move the awk.h inclusion before GLR's system header
15392 inclusion, the two struct stat have the same size.
15393
15394 * src/tables.c (pack_table): Always create conflict_table.
15395 (token_actions): Always create conflict_list.
15396 * data/glr.c (YYFLAG): Remove, unused.
15397
153982002-10-13 Akim Demaille <akim@epita.fr>
15399
15400 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15401 (O0FLAGS): New.
15402 (VALGRIND, GXX): New.
15403 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15404 * tests/bison.in: Run $PREBISON a pre-command.
15405 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15406 (maintainer-check-g++): New.
15407 * Makefile.am (maintainer-check): New.
15408
154092002-10-13 Akim Demaille <akim@epita.fr>
15410
15411 * data/glr.c: Formatting changes.
15412 Tweak some trace messages to match yacc.c's.
15413
154142002-10-13 Akim Demaille <akim@epita.fr>
15415
15416 GLR parsers sometimes raise parse errors instead of performing the
15417 default reduction.
15418 Reported by Charles-Henry de Boysson.
15419
15420 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15421 check the length of the traces when %glr.
15422 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15423 GLR's traces.
15424 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15425 Test GLR parsers.
15426 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15427 (yyltype): Remove the yy prefix from the member names.
15428 (yytable): Complete its comment.
15429 (yygetLRActions): Map error action number from YYTABLE from
15430 YYTABLE_NINF to 0.
15431 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15432 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15433 not satisfying as we could compare an YYACTION computed from
15434 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15435 only value for error actions.
15436 (yyreportParseError): In verbose parse error messages, don't issue
15437 `error' in the list of expected tokens.
15438 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15439 next action to perform to match glr.c's decoding.
15440 (yytable): Complete its comment.
15441
154422002-10-13 Paul Eggert <eggert@twinsun.com>
15443
15444 Fix problem reported by Henrik Grubbstroem in
15445 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15446 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15447 because the Bison parser reads the second action before reducing
15448 the first one.
15449 * src/scan-gram.l (rule_length): New static var.
15450 Use it to keep track of the rule length in the scanner, since
15451 we can't expect the parser to be in lock-step sync with the scanner.
15452 (handle_action_dollar, handle_action_at): Use this var.
15453 * tests/actions.at (Exotic Dollars): Test for the problem.
15454
154552002-10-12 Paul Eggert <eggert@twinsun.com>
15456
15457 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15458 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15459 Include <sys/time.h> when checking for clock_t and struct tms.
15460 Use same include order as source.
15461 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15462 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15463
15464 * lib/timevar.c: Update copyright date and clarify comments.
15465 (get_time) [IN_GCC]: Keep the GCC version for reference.
15466
15467 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15468 GCC version as of today, then merge Bison's changes.
15469 Change "GCC" to "Bison" in copyright notice. timevar.def's
15470 author is Akim, so change that too.
15471
15472 * src/reader.c (grammar_current_rule_check):
15473 Don't worry about the default action if $$ is untyped.
15474 Prevents bogus warnings reported by Jim Gifford in
15475 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15476
15477 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15478 * data/glr.c, data/lalr1.cc, data/yacc.c:
15479 Output token definitions before the first part of user declarations.
15480 Fixes compatibility problem reported by Jim Gifford for kbd in
15481 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15482
154832002-10-11 Paul Eggert <eggert@twinsun.com>
15484
15485 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15486 (yyparse): here. This undoes some of the 2002-07-25 change.
15487 Compatibility problem reported by Ralf S. Engelschall with
15488 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15489
154902002-10-11 Akim Demaille <akim@epita.fr>
15491
15492 * tests/regression.at Characters Escapes): New.
15493 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15494 characters.
15495 Reported by Jan Nieuwenhuizen.
15496
154972002-10-11 Akim Demaille <akim@epita.fr>
15498
15499 * po/id.po: New.
15500
155012002-10-10 Paul Eggert <eggert@twinsun.com>
15502
15503 Portability fixes for bitsets; this also avoids several GCC
15504 warnings.
15505
15506 * lib/abitset.c: Include <stddef.h>, for offsetof.
15507 * lib/lbitset.c: Likewise.
15508
15509 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15510 properly for vectors of objects. Do not assume that adding a
15511 header size to a multiple of a word size yields a value that is
15512 properly aligned for the whole union.
15513 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15514
15515 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15516 unique names for structures.
15517 * lib/ebitset.c (ebitset_bytes): Likewise.
15518 * lib/lbitset.c (lbitset_bytes): Likewise.
15519
15520 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15521 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15522 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15523 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15524 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15525 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15526 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15527 to improve the type-checking that GCC can do.
15528 * lib/bitset.c (bitset_op4_cmp): Likewise.
15529 * lib/bitset_stats.c (bitset_stats_count,
15530 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15531 bitset_stats_copy, bitset_stats_disjoint_p,
15532 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15533 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15534 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15535 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15536 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15537 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15538 bitset_stats_or_and_cmp): Likewise.
15539 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15540 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15541 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15542 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15543
15544 * lib/abitset.h: Include bitset.h, not bbitset.h.
15545 * lib/ebitset.h: Likewise.
15546 * lib/lbitset.h: Likewise.
15547
15548 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15549 All instances of parameters of type enum bitset_opts are now of
15550 type enum_bitset_opts, to conform to the C Standard, and similarly
15551 for enum_bitset_type.
15552 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15553 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15554
15555 Do not use "struct bitset_struct" to mean different things in
15556 different modules. Not only is this confusing, it violates
15557 the C Standard, which requires that structure types in different
15558 modules must be compatible if one is to be passed to the other.
15559 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15560 All instances of "struct bitset_struct *" replaced with "bitset".
15561 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15562 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15563 struct lbitset_struct, struct bitset_stats_struct): New types.
15564 All uses of struct bitset_struct changed to union bitset_union,
15565 etc.
15566 * lib/abitset.c (struct abitset_struct, abitset,
15567 struct bitset_struct): Remove.
15568 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15569 struct bitset_struct): Remove.
15570 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15571 bitset_struct): Remove.
15572 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15573 Likewise.
15574
15575 Do not call a function of type T using a call that assumes the
15576 function is of a different type U. Standard C requires that a
15577 function must be called with a type that is compatible with its
15578 definition.
15579 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15580 New decls.
15581 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15582 New functions.
15583 * lib/ebitset.c (PFV): Remove.
15584 * lib/lbitset.c (PFV): Likewise.
15585 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15586 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15587 decls.
15588 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15589 (ebitset_vtable): Use them.
15590 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15591 lbitset_xor): New functions.
15592 (lbitset_vtable): Use them.
15593
15594 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15595 Declare.
15596
15597 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15598 GCC warning.
15599 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15600 Use offsetof, for simplicity.
15601
156022002-10-06 Paul Eggert <eggert@twinsun.com>
15603
15604 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15605 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15606 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15607 which was inadvertently undone by the 2002-09-30 patch.
15608 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15609 the same width as int.
15610
156112002-10-04 Paul Eggert <eggert@twinsun.com>
15612
15613 Version 1.50.
15614
15615 * configure.ac (AC_INIT), NEWS: Increment version number.
15616
15617 * doc/bison.texinfo: Minor spelling, grammar, and white space
15618 fixes.
15619 (Symbols): Mention that any negative value returned from yylex
15620 signifies end-of-input. Warn about negative chars. Mention
15621 the portable Standard C character set.
15622
15623 The GNU coding standard says CFLAGS and YFLAGS are reserved
15624 for the installer to set.
15625 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15626 * src/Makefile.am (AM_CFLAGS): Likewise.
15627 (AM_YFLAGS): Renamed from YFLAGS.
15628
15629 Fix some MAX and MIN problems.
15630 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15631 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15632 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15633 * src/reader.c (reader): Use it.
15634
15635 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15636 POSIX 1003.1-2001 has removed fgrep.
15637
156382002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15639
15640 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15641 interpreted as signed.
15642 * lib/ebitset.c (ebitset_list): Fix bug.
15643
156442002-10-01 Paul Eggert <eggert@twinsun.com>
15645
15646 More fixes for 64-bit hosts and large bitsets.
15647
15648 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15649 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15650 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15651 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15652 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15653 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15654 bitset_count_): Likewise.
15655 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15656 bitset_first, bitset_last): Likewise.
15657 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15658 bitset_stats_list_reverse, bitset_stats_size,
15659 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15660 Likewise.
15661 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15662 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15663 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15664 bitsetv_reflexive_transitive_closure): Likewise.
15665 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15666 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15667 Likewise.
15668 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15669 Likewise.
15670
15671 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15672 Use size_t, not unsigned int, to count bytes.
15673 * lib/abitset.h (abitset_bytes): Likewise.
15674 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15675 Likewise.
15676 * lib/bitset.h (bitset_bytes): Likewise.
15677 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15678 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15679 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15680 * lib/ebitset.c (ebitset_bytes): Likewise.
15681 * lib/ebitset.h (ebitset_bytes): Likewise.
15682 * lib/lbitset.c (lbitset_bytes): Likewise.
15683 * lib/lbitset.h (lbitset_bytes): Likewise.
15684
15685 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15686 abitset_subset_p, abitset_disjoint_p, abitset_and,
15687 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15688 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15689 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15690 abitset_or_and, abitset_or_and_cmp):
15691 Use bitset_windex instead of unsigned int.
15692 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15693 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15694 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15695 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15696 Likewise.
15697 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15698
15699 * lib/bitset.c (bitset_print):
15700 Use proper printf formats for widths of integer types.
15701 * lib/bitset_stats.c (bitset_percent_histogram_print,
15702 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15703 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15704 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15705 * lib/lbitset.c (lbitset_bytes): Likewise.
15706
15707 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15708 BITSET_SIZE_MAX): New macros.
15709 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15710 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15711 to BITSET_WINDEX_MAX.
15712
15713 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15714 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15715 since we now return the bitset_bindex type (not int).
15716
15717 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15718 when computing sizes.
15719 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15720
15721 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15722 and avoid cast to unsigned.
15723
157242002-09-30 Akim Demaille <akim@epita.fr>
15725
15726 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15727 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15728 Updates from Michael Hayes.
15729
157302002-09-30 Art Haas <ahaas@neosoft.com>
15731
15732 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15733 invocations.
15734 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15735 defined.
15736
157372002-09-27 Akim Demaille <akim@epita.fr>
15738
15739 Version 1.49c.
15740
157412002-09-27 Akim Demaille <akim@epita.fr>
15742
15743 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15744 (Because of AC_LIBSOURCE).
15745
157462002-09-27 Akim Demaille <akim@epita.fr>
15747
15748 Playing with Autoscan.
15749
15750 * configure.ac: Remove the old LIBOBJ tweaks.
15751 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15752 * lib/strrchr.c: New.
15753 * lib/strtol.c: New, from the Coreutils 4.5.1.
15754
157552002-09-27 Akim Demaille <akim@epita.fr>
15756
15757 Playing with Autoscan.
15758
15759 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15760 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15761 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15762 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15763 Coreutils 4.5.1.
15764
157652002-09-24 Akim Demaille <akim@epita.fr>
15766
15767 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15768 (Frequently Asked Questions, Parser Stack Overflow): New.
15769
157702002-09-13 Akim Demaille <akim@epita.fr>
15771
15772 Playing with autoscan.
15773
15774 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15775 * src/files.c (skeleton_find): Remove, unused.
15776 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15777 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15778
157792002-09-13 Akim Demaille <akim@epita.fr>
15780
15781 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15782 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15783
157842002-09-13 Akim Demaille <akim@epita.fr>
15785
15786 * configure.ac: Require 2.54.
15787 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15788 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15789 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15790 Remove, provided by Autoconf macros.
15791
157922002-09-12 Akim Demaille <akim@epita.fr>
15793
15794 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15795
157962002-09-12 Akim Demaille <akim@epita.fr>
15797
15798 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15799 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15800 Reported by Martin Mokrejs.
15801
158022002-09-10 Akim Demaille <akim@epita.fr>
15803
15804 * src/parse-gram.y: Associate a human readable string to each
15805 token type.
15806 * tests/regression.at (Invalid inputs): Adjust.
15807
158082002-09-10 Gary V. Vaughan <gary@gnu.org>
15809
15810 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15811 with an Autoconf-2.5x style configure.ac.
15812
158132002-09-06 Paul Eggert <eggert@twinsun.com>
15814
15815 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15816 exception applies only to yacc.c. This is a modification of a
15817 patch originally suggested by Akim Demaille.
15818
158192002-09-06 Akim Demaille <akim@epita.fr>
15820
15821 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15822 here to...
15823 * data/yacc.c: here.
15824
15825 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15826 LocationType.
15827 (b4_ltype): Default to yy::Location from location.hh.
15828
158292002-09-04 Jim Meyering <jim@meyering.net>
15830
15831 * data/yacc.c: Guard the declaration of yytoknum also with
15832 `#ifdef YYPRINT', so it is declared only when used.
15833
158342002-09-04 Akim Demaille <akim@epita.fr>
15835
15836 * configure.in: Rename as...
15837 * configure.ac: this.
15838 Bump to 1.49c.
15839
158402002-09-04 Akim Demaille <akim@epita.fr>
15841
15842 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15843 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15844 translate maintainer only messages.
15845
158462002-08-12 Paul Eggert <eggert@twinsun.com>
15847
15848 Version 1.49b.
15849
15850 * Makefile.am (SUBDIRS): Remove intl.
15851 (DISTCLEANFILES): Remove.
15852 * NEWS: Mention that GNU M4 is now required. Clarify what is
15853 meant by "larger grammars". Mention the pt_BR translation.
15854 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15855 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15856 Bump version from 0.11.2 to 0.11.5.
15857 (BISON_PREREQ_STAGE): Remove.
15858 (AM_GNU_GETTEXT): Use external gettext.
15859 (AC_OUTPUT): Remove intl/Makefile.
15860
15861 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15862
15863 * data/glr.c: Include string.h, for strlen.
15864 (yyreportParseError): Use size_t for yysize.
15865 (yy_yypstack): No longer nested inside yypstates, as nested
15866 functions are not portable. Do not assume size_t is the
15867 same width as int.
15868 (yypstates): Do not assume that ptrdiff_t is the same width
15869 as int, and similarly for yyposn and YYINDEX.
15870
15871 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15872
15873 * lib/Makefile.am (INCLUDES): Do not include from the intl
15874 directory, which has been removed.
15875 * src/Makefile.am (INCLUDES): Likewise.
15876
15877 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15878 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15879 New vars.
15880
15881 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15882 * tests/Makefile.am (EXTRA_DIST): Likewise.
15883
15884 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15885 Do not assume that bitset_windex is the same width as unsigned.
15886
15887 * lib/abitset.c (abitset_unused_clear): Do not assume that
15888 bitset_word is the same width as int.
15889 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15890 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15891 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15892 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15893 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15894
15895 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15896 portability to one's complement hosts!).
15897 * lib/ebitset.c (ebitset_op1): Likewise.
15898 * lib/lbitset.c (lbitset_op1): Likewise.
15899
15900 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15901 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15902 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15903 Sync with fileutils.
15904 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15905 lib/gettext.h: Sync with diffutils.
15906
15907 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15908 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15909
15910 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15911 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15912 check for void *.
15913
15914 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15915 size_t; the old version tried to do this but casted improperly.
15916 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15917 (bitset_test): Now returns int, not unsigned long.
15918
15919 * lib/bitset_stats.c: Include "gettext.h".
15920 (_): New macro.
15921 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15922 name locals "index", as it generates unnecessary warnings on some
15923 hosts that have an "index" function.
15924
15925 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15926 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15927 they need translation.
15928 * src/LR0.c (state_list_append, new_itemsets, get_state,
15929 append_states, generate_states): Likewise.
15930 * src/assoc.c (assoc_to_string): Likewise.
15931 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15932 * src/gram.c (grammar_dump): Likewise.
15933 * src/injections.c (injections_compute): Likewise.
15934 * src/lalr.c (lookaheads_print): Likewise.
15935 * src/relation.c (relation_transpose): Likewise.
15936 * src/scan-gram.l: Likewise.
15937 * src/tables.c (table_grow, pack_vector): Likewise.
15938
15939 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15940 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15941 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15942 * m4/mbstate_t.m4: Sync with fileutils.
15943 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15944
15945 * po/LINGUAS: Add pt_BR.
15946 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15947 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15948 lib/timevar.c.
15949 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15950 manual recommends.
15951 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15952
15953 * src/complain.c (strerror_r): Remove decl; not needed.
15954 (strerror): Use same pattern as ../lib/error.c.
15955
15956 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15957
15958 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15959
15960 * src/main.c (main): Cast result of bindtextdomain and textdomain
15961 to void, to avoid a GCC warning when --disable-nls is in effect.
15962
15963 * src/scan-gram.l: Use strings rather than escapes when possible,
15964 to minimize the number of warnings from xgettext.
15965 (handle_action_dollar, handle_action_at): Don't use isdigit,
15966 as it mishandles negative chars and it may not work as expected
15967 outside the C locale.
15968
15969 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15970 this is a GCC extension and is not portable to other compilers.
15971
15972 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15973 Do not include <ctype.h>; no longer needed.
15974 Do not include <malloc.h>; no longer needed (and generates
15975 warnings on OpenBSD 3.0).
15976
15977 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15978 it's not portable.
15979
15980 * tests/regression.at: Do not use 'cc -c input.c -o input';
15981 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15982
15983 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15984 exit status as failure, not just exit status 1. Sun C exits
15985 with status 2 sometimes.
15986
15987 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15988 Use it for the two large tests.
15989
159902002-08-02 Akim Demaille <akim@epita.fr>
15991
15992 * src/conflicts.c (conflicts_output): Don't output rules never
15993 reduced here, since anyway that computation doesn't work.
15994 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15995 (rule_useless_p, rule_never_reduced_p): New.
15996 (grammar_rules_partial_print): Use a filter instead of a range.
15997 Display the title only if needed.
15998 (grammar_rules_print): Adjust.
15999 (grammar_rules_never_reduced_report): New.
16000 * src/tables.c (action_row): Move the computation of rules never
16001 reduced to...
16002 (token_actions): here.
16003 * src/main.c (main): Make the parser before making the report, so
16004 that rules never reduced are computed.
16005 Call grammar_rules_never_reduced_report.
16006 * src/print.c (print_results): Report rules never reduced.
16007 * tests/conflicts.at, tests/reduce.at: Adjust.
16008
160092002-08-01 Akim Demaille <akim@epita.fr>
16010
16011 Instead of attaching lookaheads and duplicating the rules being
16012 reduced by a state, attach the lookaheads to the reductions.
16013
16014 * src/state.h (state_t): Remove the `lookaheads',
16015 `lookaheads_rule' member.
16016 (reductions_t): Add a `lookaheads' member.
16017 Use a regular array for the `rules'.
16018 * src/state.c (reductions_new): Initialize the lookaheads member
16019 to 0.
16020 (state_rule_lookaheads_print): Adjust.
16021 * src/state.h, src/state.c (state_reductions_find): New.
16022 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16023 (count_rr_conflicts): Adjust.
16024 * src/lalr.c (LArule): Remove.
16025 (add_lookback_edge): Adjust.
16026 (state_lookaheads_count): New.
16027 (states_lookaheads_initialize): Merge into...
16028 (initialize_LA): this.
16029 (lalr_free): Adjust.
16030 * src/main.c (main): Don't free nullable and derives too early: it
16031 is used by --verbose.
16032 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16033
160342002-08-01 Akim Demaille <akim@epita.fr>
16035
16036 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16037 `rule_number_t**'.
16038 (set_derives, free_derives): Rename as...
16039 (derives_compute, derives_free): this.
16040 Adjust all dependencies.
16041 * src/nullable.c (set_nullable, free_nullable): Rename as...
16042 (nullable_compute, nullable_free): these.
16043 (rule_list_t): Store rule_t *, not rule_number_t.
16044 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16045 pointers, instead of their numbers.
16046 * src/main.c (main): Call nullable_free, and derives_free earlier,
16047 as they were lo longer used.
16048
160492002-08-01 Akim Demaille <akim@epita.fr>
16050
16051 * lib/timevar.c (get_time): Include children time.
16052 * src/lalr.h (LA, LArule): Don't export them: used with the
16053 state_t.
16054 * src/lalr.c (LA, LArule): Static.
16055 * src/lalr.h, src/lalr.c (lalr_free): New.
16056 * src/main.c (main): Call it.
16057 * src/tables.c (pack_vector): Check whether loc is >= to the
16058 table_size, not >.
16059 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16060 (tables_generate): do it, since that's also it which allocates
16061 them.
16062 Don't free LA and LArule, main does.
16063
160642002-07-31 Akim Demaille <akim@epita.fr>
16065
16066 Separate parser tables computation and output.
16067
16068 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16069 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16070 (yydefgoto, yydefact, high): Move to...
16071 * src/tables.h, src/tables.c: here.
16072 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16073 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16074 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16075 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16076 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16077 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16078 (action_row, save_row, token_actions, save_column, default_goto)
16079 (goto_actions, sort_actions, matching_state, pack_vector)
16080 (table_ninf_remap, pack_table, prepare_actions): Move to...
16081 * src/tables.c: here.
16082 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16083 * src/output.c (token_actions, output_base, output_conflicts)
16084 (output_check): Merge into...
16085 (prepare_actions): this.
16086 (actions_output): Rename as...
16087 (user_actions_output): this.
16088 * src/main.c (main): Call tables_generate and tables_free.
16089
160902002-07-31 Akim Demaille <akim@epita.fr>
16091
16092 Steal GCC's --time-report support.
16093
16094 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16095 stolen/adjusted from GCC.
16096 * m4/stage.m4: Remove time related checks.
16097 * m4/timevar.m4: New.
16098 * configure.in: Adjust.
16099 * src/system.h: Adjust to using timevar.h.
16100 * src/getargs.h, src/getargs.c: Support trace_time for
16101 --trace=time.
16102 * src/main.c (stage): Remove.
16103 (main): Replace `stage' invocations with timevar calls.
16104 * src/output.c: Insert pertinent timevar calls.
16105
161062002-07-31 Akim Demaille <akim@epita.fr>
16107
16108 Let --trace have arguments.
16109
16110 * src/getargs.h (enum trace_e): New.
16111 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16112 (long_options, short_options): --trace/-T takes an optional
16113 argument.
16114 Change all the uses of trace_flag to reflect the new flags.
16115 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16116
16117 Strengthen `stage' portability.
16118
16119 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16120 * configure.in: Use it.
16121 Don't check for malloc.h and sys/times.h.
16122 * src/system.h: Include them when appropriate.
16123 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16124 times and struct tms are available.
16125
161262002-07-30 Akim Demaille <akim@epita.fr>
16127
16128 In verbose parse error message, don't report `error' as an
16129 expected token.
16130 * tests/actions.at (Printers and Destructors): Adjust.
16131 * tests/calc.at (Calculator $1): Adjust.
16132 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16133 error message, do not report the parser accepts the error token in
16134 that state.
16135
161362002-07-30 Akim Demaille <akim@epita.fr>
16137
16138 Normalize conflict related messages.
16139
16140 * src/complain.h, src/complain.c (warn, complain): New.
16141 * src/conflicts.c (conflicts_print): Use them.
16142 (conflict_report_yacc): New, extracted from...
16143 (conflicts_print): here.
16144 * tests/conflicts.at, tests/existing.at: Adjust.
16145
161462002-07-30 Akim Demaille <akim@epita.fr>
16147
16148 Report rules which are never reduced by the parser: those hidden
16149 by conflicts.
16150
16151 * src/LR0.c (save_reductions): Don't make the final state too
16152 different: save its reduction (accept) instead of having a state
16153 without any action (no shift or goto, no reduce).
16154 Note: the final state is now a ``regular'' state, i.e., the
16155 parsers now contain `reduce 0' as default reduction.
16156 Nevertheless, since they decide to `accept' when yystate =
16157 final_state, they still will not reduce rule 0.
16158 * src/print.c (print_actions, print_reduction): Adjust.
16159 * src/output.c (action_row): Track reduced rules.
16160 (token_actions): Report rules never reduced.
16161 * tests/conflicts.at, tests/regression.at: Adjust.
16162
161632002-07-30 Akim Demaille <akim@epita.fr>
16164
16165 `stage' was accidently included in a previous patch.
16166 Initiate its autoconfiscation.
16167
16168 * configure.in: Look for malloc.h and sys/times.h.
16169 * src/main.c (stage): Adjust.
16170 Report only when trace_flag.
16171
161722002-07-29 Akim Demaille <akim@epita.fr>
16173
16174 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16175 state_number_t.
16176 (errs_t): symbol_t*, not symbol_number_t.
16177 (reductions_t): rule_t*, not rule_number_t.
16178 (FOR_EACH_SHIFT): New.
16179 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16180 * src/print.c, src/print_graph.c: Adjust.
16181
161822002-07-29 Akim Demaille <akim@epita.fr>
16183
16184 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16185
16186 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16187 (endtoken, accept): these.
16188 * src/reader.c (reader): Set endtoken's default tag to "$end".
16189 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16190 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16191 Adjust.
16192
161932002-07-29 Akim Demaille <akim@epita.fr>
16194
16195 * src/reduce.c (reduce_grammar): When the language is empty,
16196 complain about the start symbol, not the axiom.
16197 Use its location.
16198 * tests/reduce.at (Empty Language): New.
16199
162002002-07-26 Akim Demaille <akim@epita.fr>
16201
16202 * src/reader.h, src/reader.c (gram_error): ... can't get
16203 yycontrol without making too strong assumptions on the parser
16204 itself.
16205 * src/output.c (prepare_tokens): Use the real 0th value of
16206 token_translations instead of `0'.
16207 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16208 visible here.
16209 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16210 for the time being: %locations ought to provide it to yyerror.
16211
162122002-07-25 Akim Demaille <akim@epita.fr>
16213
16214 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16215 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16216 * tests/regression.at (Web2c Actions): Adjust.
16217
162182002-07-25 Akim Demaille <akim@epita.fr>
16219
16220 Stop storing rules from 1 to nrules + 1.
16221
16222 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16223 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16224 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16225 Iterate from 0 to nrules.
16226 Use rule_number_as_item_number and item_number_as_rule_number.
16227 Adjust to `derive' now containing possibly 0.
16228 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16229 Handle the `- 1' part in rule numbers from/to item numbers.
16230 * src/conflicts.c (log_resolution): Fix the message which reversed
16231 shift and reduce.
16232 * src/output.c (action_row): Initialize default_rule to -1.
16233 (token_actions): Adjust.
16234 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16235 expected output.
16236 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16237
162382002-07-25 Akim Demaille <akim@epita.fr>
16239
16240 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16241 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16242 (b4_c_knr_arg_decl): New.
16243 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16244 yyreport_parse_error.
16245
162462002-07-25 Akim Demaille <akim@epita.fr>
16247
16248 * data/yacc.c (yyreport_parse_error): New, extracted from...
16249 (yyparse): here.
16250 (yydestruct, yysymprint): Move above yyparse.
16251 Be K&R compliant.
16252
162532002-07-25 Akim Demaille <akim@epita.fr>
16254
16255 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16256 replace...
16257 (b4_sint_type, b4_uint_type): these.
16258 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16259 * tests/regression.at (Web2c Actions): Adjust.
16260
162612002-07-25 Akim Demaille <akim@epita.fr>
16262
16263 * src/gram.h (TIEM_NUMBER_MAX): New.
16264 (item_number_of_rule_number, rule_number_of_item_number): Rename
16265 as...
16266 (rule_number_as_item_number, item_number_as_rule_number): these.
16267 Adjust dependencies.
16268 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16269 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16270 (symbol_number_to_vector_number): New.
16271 (order): Of vector_number_t* type.
16272 (base_t, BASE_MAX, BASE_MIN): New.
16273 (froms, tos, width, pos, check): Of base_t type.
16274 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16275 (actrow): Of action_number_t type.
16276 (conflrow): Of unsigned int type.
16277 (table_ninf, base_ninf): New.
16278 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16279 (muscle_insert_int_table, muscle_insert_base_table)
16280 (muscle_insert_rule_number_table): New.
16281 (prepare_tokens): Output `toknum' as int_table.
16282 (action_row): Returns a rule_number_t.
16283 Use ACTION_MIN, not SHRT_MIN.
16284 (token_actions): yydefact is rule_number_t*.
16285 (table_ninf_remap): New.
16286 (pack_table): Use it for `base' and `table'.
16287 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16288 replaced with...
16289 (YYPACT_NINF, YYTABLE_NINF): these.
16290 (yypact, yytable): Compute their types instead of hard-coded
16291 `short'.
16292 * tests/regression.at (Web2c Actions): Adjust.
16293
162942002-07-19 Akim Demaille <akim@epita.fr>
16295
16296 * src/scan-gram.l (id): Can start with an underscore.
16297
162982002-07-16 Akim Demaille <akim@epita.fr>
16299
16300 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16301 Adjust all former `associativity' dependencies.
16302 * src/symtab.c (symbol_new): Default associativity is `undef', not
16303 `right'.
16304 (symbol_check_alias_consistence): Adjust.
16305
163062002-07-09 Akim Demaille <akim@epita.fr>
16307
16308 * doc/bison.texinfo: Properly set the ``header'' part.
16309 Use @dircategory ``GNU programming tools'' as per Texinfo's
16310 documentation.
16311 Use @copying.
16312
163132002-07-09 Akim Demaille <akim@epita.fr>
16314
16315 * lib/quotearg.h: Protect against multiple inclusions.
16316 * src/location.h (location_t): Add a `file' member.
16317 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16318 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16319 `error_one_per_line' support.
16320
163212002-07-09 Akim Demaille <akim@epita.fr>
16322
16323 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16324 * src/reader.c (lineno): Remove.
16325 Adjust all dependencies.
16326 (get_merge_function): Take a location and use complain_at.
16327 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16328 * tests/regression.at (Invalid inputs, Mixing %token styles):
16329 Adjust.
16330
163312002-07-09 Akim Demaille <akim@epita.fr>
16332
16333 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16334 recovery rule, and forbid extensions when --yacc.
16335 (gram_error): Use complain_at.
16336 * src/reader.c (reader): Exit if there were parse errors.
16337
163382002-07-09 Akim Demaille <akim@epita.fr>
16339
16340 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16341 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16342 Reported by R Blake <blakers@mac.com>.
16343
163442002-07-09 Akim Demaille <akim@epita.fr>
16345
16346 * data/yacc.c: Output the copyright notive in the header.
16347
163482002-07-03 Akim Demaille <akim@epita.fr>
16349
16350 * src/output.c (froms, tos): Are state_number_t.
16351 (save_column): sp, sp1, and sp2 are state_number_t.
16352 (prepare): Rename `final' as `final_state_number', `nnts' as
16353 `nterms_number', `nrules' as `rules_number', `nstates' as
16354 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16355 unused.
16356 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16357 * data/lalr1.cc (nsym_): Remove, unused.
16358
163592002-07-03 Akim Demaille <akim@epita.fr>
16360
16361 * src/lalr.h, src/lalr.c (goto_number_t): New.
16362 * src/lalr.c (goto_list_t): New.
16363 Propagate them.
16364 * src/nullable.c (rule_list_t): New.
16365 Propagate.
16366 * src/types.h: Remove.
16367
163682002-07-03 Akim Demaille <akim@epita.fr>
16369
16370 * src/closure.c (print_fderives): Use rule_rhs_print.
16371 * src/derives.c (print_derives): Use rule_rhs_print.
16372 (rule_list_t): New, replaces `shorts'.
16373 (set_derives): Add comments.
16374 * tests/sets.at (Nullable, Firsts): Adjust.
16375
163762002-07-03 Akim Demaille <akim@epita.fr>
16377
16378 * src/output.c (prepare_actions): Free `tally' and `width'.
16379 (prepare_actions): Allocate and free `order'.
16380 * src/symtab.c (symbols_free): Free `symbols'.
16381 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16382 * src/output.c (m4_invoke): Move to...
16383 * src/scan-skel.l: here.
16384 (<<EOF>>): Close yyout, and free its name.
16385
163862002-07-03 Akim Demaille <akim@epita.fr>
16387
16388 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16389
16390 * src/LR0.c (new_state): Merge into...
16391 (state_list_append): this.
16392 (new_states): Merge into...
16393 (generate_states): here.
16394 (set_states): Don't ensure a proper `errs' state member here, do it...
16395 * src/conflicts.c (conflicts_solve): here.
16396 * src/state.h, src/state.c: Comment changes.
16397 (state_t): Rename member `shifts' as `transitions'.
16398 Adjust all dependencies.
16399 (errs_new): For consistency, also take the values as argument.
16400 (errs_dup): Remove.
16401 (state_errs_set): New.
16402 (state_reductions_set, state_transitions_set): Assert that no
16403 previous value was assigned.
16404 (state_free): New.
16405 (states_free): Use it.
16406 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16407 temporary storage: use `errs' and `nerrs' as elsewhere.
16408 (set_conflicts): Allocate and free this `errs'.
16409
164102002-07-02 Akim Demaille <akim@epita.fr>
16411
16412 * lib/libiberty.h: New.
16413 * lib: Update the bitset implementation from upstream.
16414 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16415 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16416 * src/main.c: Adjust bitset stats calls.
16417
164182002-07-01 Paul Eggert <eggert@twinsun.com>
16419
16420 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16421 char, so that negative chars don't collide with $.
16422
164232002-06-30 Akim Demaille <akim@epita.fr>
16424
16425 Have the GLR tests be `warning' checked, and fix the warnings.
16426
16427 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16428 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16429 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16430 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16431 (yyaddDeferredAction): static.
16432 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16433 (yyreportParseError): yyprefix is const.
16434 yytokenp is used only when verbose.
16435 (yy__GNUC__): Replace with __GNUC__.
16436 (yypdumpstack): yyi is size_t.
16437 (yypreference): Un-yy local variables and arguments, to avoid
16438 clashes with `yyr1'. Anyway, we are not in the user name space.
16439 (yytname_size): be an int, as is compared with ints.
16440 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16441 Use them.
16442 * tests/cxx-gram.at: Use quotation to protect $1.
16443 Use AT_COMPILE to enable warnings hunts.
16444 Prototype yylex and yyerror.
16445 `Use' argc.
16446 Include `string.h', not `strings.h'.
16447 Produce and prototype stmtMerge only when used.
16448 yylex takes a location.
16449
164502002-06-30 Akim Demaille <akim@epita.fr>
16451
16452 We spend a lot of time in quotearg, in particular when --verbose.
16453
16454 * src/symtab.c (symbol_get): Store a quoted version of the key.
16455 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16456 Adjust all callers.
16457
164582002-06-30 Akim Demaille <akim@epita.fr>
16459
16460 * src/state.h (reductions_t): Rename member `nreds' as num.
16461 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16462 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16463
164642002-06-30 Akim Demaille <akim@epita.fr>
16465
16466 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16467 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16468 (shifts_to): Rename as...
16469 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16470 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16471 (TRANSITION_IS_DISABLED, transitions_to): these.
16472
164732002-06-30 Akim Demaille <akim@epita.fr>
16474
16475 * src/print.c (print_shifts, print_gotos): Merge into...
16476 (print_transitions): this.
16477 (print_transitions, print_errs, print_reductions): Align the
16478 lookaheads columns.
16479 (print_core, print_transitions, print_errs, print_state,
16480 print_grammar): Output empty lines separator before, not after.
16481 (state_default_rule_compute): Rename as...
16482 (state_default_rule): this.
16483 * tests/conflicts.at (Defaulted Conflicted Reduction),
16484 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16485 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16486
164872002-06-30 Akim Demaille <akim@epita.fr>
16488
16489 Display items as we display rules.
16490
16491 * src/gram.h, src/gram.c (rule_lhs_print): New.
16492 * src/gram.c (grammar_rules_partial_print): Use it.
16493 * src/print.c (print_core): Likewise.
16494 * tests/conflicts.at (Defaulted Conflicted Reduction),
16495 (Unresolved SR Conflicts): Adjust.
16496 (Unresolved SR Conflicts): Adjust and rename as...
16497 (Resolved SR Conflicts): this, as was meant.
16498 * tests/regression.at (Web2c Report): Adjust.
16499
165002002-06-30 Akim Demaille <akim@epita.fr>
16501
16502 * src/print.c (state_default_rule_compute): New, extracted from...
16503 (print_reductions): here.
16504 Pessimize, but clarify the code.
16505 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16506
165072002-06-30 Akim Demaille <akim@epita.fr>
16508
16509 * src/output.c (action_row): Let default_rule be always a rule
16510 number.
16511
165122002-06-30 Akim Demaille <akim@epita.fr>
16513
16514 * src/closure.c (print_firsts, print_fderives, closure):
16515 Use BITSET_EXECUTE.
16516 * src/lalr.c (lookaheads_print): Likewise.
16517 * src/state.c (state_rule_lookaheads_print): Likewise.
16518 * src/print_graph.c (print_core): Likewise.
16519 * src/print.c (print_reductions): Likewise.
16520 * src/output.c (action_row): Likewise.
16521 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16522
165232002-06-30 Akim Demaille <akim@epita.fr>
16524
16525 * src/print_graph.c: Use report_flag.
16526
165272002-06-30 Akim Demaille <akim@epita.fr>
16528
16529 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16530 to...
16531 * src/relation.h, src/relation.c (traverse, relation_digraph)
16532 (relation_print, relation_transpose): New.
16533
165342002-06-30 Akim Demaille <akim@epita.fr>
16535
16536 * src/state.h, src/state.c (shifts_to): New.
16537 * src/lalr.c (build_relations): Use it.
16538
165392002-06-30 Akim Demaille <akim@epita.fr>
16540
16541 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16542 (item_number_of_rule_number, rule_number_of_item_number): New.
16543 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16544 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16545 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16546 Propagate their use.
16547 Much remains to be done, in particular wrt `shorts' from types.h.
16548
165492002-06-30 Akim Demaille <akim@epita.fr>
16550
16551 * src/symtab.c (symbol_new): Initialize the `printer' member.
16552
165532002-06-30 Akim Demaille <akim@epita.fr>
16554
16555 * src/LR0.c (save_reductions): Remove, replaced by...
16556 * src/state.h, src/state.c (state_reductions_set): New.
16557 (reductions, errs): Rename as...
16558 (reductions_t, errs_t): these.
16559 Adjust all dependencies.
16560
165612002-06-30 Akim Demaille <akim@epita.fr>
16562
16563 * src/LR0.c (state_list_t, state_list_append): New.
16564 (first_state, last_state): Now symbol_list_t.
16565 (this_state): Remove.
16566 (new_itemsets, append_states, save_reductions): Take a state_t as
16567 argument.
16568 (set_states, generate_states): Adjust.
16569 (save_shifts): Remove, replaced by...
16570 * src/state.h, src/state.c (state_shifts_set): New.
16571 (shifts): Rename as...
16572 (shifts_t): this.
16573 Adjust all dependencies.
16574 * src/state.h (state_t): Remove the `next' member.
16575
165762002-06-30 Akim Demaille <akim@epita.fr>
16577
16578 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16579 escaped in slot 0.
16580
165812002-06-30 Akim Demaille <akim@epita.fr>
16582
16583 Use hash.h for the state hash table.
16584
16585 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16586 (allocate_storage): Use state_hash_new.
16587 (free_storage): Use state_hash_free.
16588 (new_state, get_state): Adjust.
16589 * src/lalr.h, src/lalr.c (states): Move to...
16590 * src/states.h (state_t): Remove the `link' member, no longer
16591 used.
16592 * src/states.h, src/states.c: here.
16593 (state_hash_new, state_hash_free, state_hash_lookup)
16594 (state_hash_insert, states_free): New.
16595 * src/states.c (state_table, state_compare, state_hash): New.
16596 * src/output.c (output_actions): Do not free states now, since we
16597 still need to know the final_state number in `prepare', called
16598 afterwards. Do it...
16599 * src/main.c (main): here: call states_free after `output'.
16600
166012002-06-30 Akim Demaille <akim@epita.fr>
16602
16603 * src/state.h, src/state.c (state_new): New, extracted from...
16604 * src/LR0.c (new_state): here.
16605 * src/state.h (STATE_ALLOC): Move to...
16606 * src/state.c: here.
16607 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16608 * src/state.h, src/state.c: here.
16609
166102002-06-30 Akim Demaille <akim@epita.fr>
16611
16612 * src/reader.c (gensym): Rename as...
16613 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16614 (getsym): Rename as...
16615 (symbol_get): this.
16616
166172002-06-30 Akim Demaille <akim@epita.fr>
16618
16619 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16620 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16621 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16622 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16623
166242002-06-30 Akim Demaille <akim@epita.fr>
16625
16626 Make the test suite pass with warnings checked.
16627
16628 * tests/actions.at (Printers and Destructors): Improve.
16629 Avoid unsigned vs. signed issues.
16630 * tests/calc.at: Don't exercise the scanner here, do it...
16631 * tests/input.at (Torturing the Scanner): here.
16632
166332002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16634
16635 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16636 reorganize first lines parallel to yacc.c.
16637
166382002-06-28 Akim Demaille <akim@epita.fr>
16639
16640 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16641 (b4_token_enum, b4_token_defines): New, factored from...
16642 * data/lalr1.cc, data/yacc.c, glr.c: here.
16643
166442002-06-28 Akim Demaille <akim@epita.fr>
16645
16646 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16647 unused variables.
16648 * src/output.c (merger_output): static.
16649
166502002-06-28 Akim Demaille <akim@epita.fr>
16651
16652 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16653 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16654 pacify GCC.
16655 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16656
166572002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16658
16659 Accumulated changelog for new GLR parsing features.
16660
16661 * src/conflicts.c (count_total_conflicts): Change name to
16662 conflicts_total_count.
16663 * src/conflicts.h: Ditto.
16664 * src/output.c (token_actions): Use the new name.
16665 (output_conflicts): Change conflp => conflict_list_heads, and
16666 confl => conflict_list for better readability.
16667 * data/glr.c: Use the new names.
16668 * NEWS: Add self to GLR announcement.
16669
16670 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16671
16672 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16673 Akim Demaille.
16674
16675 * data/bison.glr: Change name to glr.c
16676 * data/glr.c: Renamed from bison.glr.
16677 * data/Makefile.am: Add glr.c
16678
16679 * src/getargs.c:
16680
16681 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16682 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16683
16684 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16685
16686 * data/bison.glr: Be sure to restore the
16687 current #line when returning to the skeleton contents after having
16688 exposed the input file's #line.
16689
16690 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16691
16692 * data/bison.glr: Bring up to date with changes to bison.simple.
16693
16694 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16695
16696 * data/bison.glr: Correct definitions that use b4_prefix.
16697 Various reformatting.
16698 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16699 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16700 yytokenp argument; now part of stack.
16701 (yychar): Define to behave as documented.
16702 (yyclearin): Ditto.
16703
16704 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16705
16706 * src/reader.h: Add declaration for free_merger_functions.
16707
16708 * src/reader.c (merge_functions): New variable.
16709 (get_merge_function): New function.
16710 (free_merger_functions): New function.
16711 (readgram): Check for %prec that is not followed by a symbol.
16712 Handle %dprec and %merge declarations.
16713 (packgram): Initialize dprec and merger fields in rules array.
16714
16715 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16716 conflict_list_cnt, conflict_list_free): New variables.
16717 (table_grow): Also grow conflict_table.
16718 (prepare_rules): Output dprec and merger tables.
16719 (conflict_row): New function.
16720 (action_row): Output conflict lists for GLR parser. Don't use
16721 default reduction in conflicted states for GLR parser so that there
16722 are spaces for the conflict lists.
16723 (save_row): Also save conflict information.
16724 (token_actions): Allocate conflict list.
16725 (merger_output): New function.
16726 (pack_vector): Pack conflict table, too.
16727 (output_conflicts): New function to output yyconflp and yyconfl.
16728 (output_check): Allocate conflict_tos.
16729 (output_actions): Output conflict tables, also.
16730 (output_skeleton): Output b4_mergers definition.
16731 (prepare): Output b4_max_rhs_length definition.
16732 Use 'bison.glr' as default skeleton for GLR parsers.
16733
16734 * src/gram.c (glr_parser): New flag.
16735 (grammar_free): Call free_merger_functions.
16736
16737 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16738 all pairs of conflicting reductions, rather than just all tokens
16739 causing conflicts. Needed to size conflict tables.
16740 (conflicts_output): Modify call to count_rr_conflicts for new
16741 interface.
16742 (conflicts_print): Ditto.
16743 (count_total_conflicts): New function.
16744
16745 * src/reader.h (merger_list): New type.
16746 (merge_functions): New variable.
16747
16748 * src/lex.h (tok_dprec, tok_merge): New token types.
16749
16750 * src/gram.h (rule_s): Add dprec and merger fields.
16751 (glr_parser): New flag.
16752
16753 * src/conflicts.h (count_total_conflicts): New function.
16754
16755 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16756
16757 * doc/bison.texinfo (Generalized LR Parsing): New section.
16758 (GLR Parsers): New section.
16759 (Language and Grammar): Mention GLR parsing.
16760 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16761 Correct typo ("tge" -> "the").
16762
16763 * data/bison.glr: New skeleton for GLR parsing.
16764
16765 * tests/cxx-gram.at: New tests for GLR parsing.
16766
16767 * tests/testsuite.at: Include cxx-gram.at.
16768
16769 * tests/Makefile.am: Add cxx-gram.at.
16770
16771 * src/parse-gram.y:
16772
16773 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16774
16775 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16776
167772002-06-27 Akim Demaille <akim@epita.fr>
16778
16779 * src/options.h, src/options.c: Remove.
16780 * src/getargs.c (short_options, long_options): New.
16781
167822002-06-27 Akim Demaille <akim@epita.fr>
16783
16784 * data/bison.simple, data/bison.c++: Rename as...
16785 * data/yacc.c, data/lalr1.cc: these.
16786 * doc/bison.texinfo (Environment Variables): Remove.
16787
167882002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16789
16790 * src/getargs.c (report_argmatch): Initialize strtok().
16791
167922002-06-20 Akim Demaille <akim@epita.fr>
16793
16794 * data/bison.simple (b4_symbol_actions): New, replaces...
16795 (b4_symbol_destructor, b4_symbol_printer): these.
16796 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16797 user token numbers.
16798
167992002-06-20 Akim Demaille <akim@epita.fr>
16800
16801 * data/bison.simple (yydestructor): Rename as...
16802 (yydestruct): this.
16803
168042002-06-20 Akim Demaille <akim@epita.fr>
16805
16806 * src/symtab.h, src/symtab.c (symbol_type_set)
16807 (symbol_destructor_set, symbol_precedence_set): The location is
16808 the last argument.
16809 Adjust all callers.
16810
168112002-06-20 Akim Demaille <akim@epita.fr>
16812
16813 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16814 internals.
16815 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16816 Takes a location.
16817 * src/symtab.h, src/symtab.c (symbol_class_set)
16818 (symbol_user_token_number_set): Likewise.
16819 Adjust all callers.
16820 Promote complain_at.
16821 * tests/input.at (Type Clashes): Adjust.
16822
168232002-06-20 Akim Demaille <akim@epita.fr>
16824
16825 * data/bison.simple (YYLEX): Fix the declaration when
16826 %pure-parser.
16827
168282002-06-20 Akim Demaille <akim@epita.fr>
16829
16830 * data/bison.simple (yysymprint): Don't print the token number,
16831 just its name.
16832 * tests/actions.at (Destructors): Rename as...
16833 (Printers and Destructors): this.
16834 Also exercise %printer.
16835
168362002-06-20 Akim Demaille <akim@epita.fr>
16837
16838 * data/bison.simple (YYDSYMPRINT): New.
16839 Use it to remove many of the #if YYDEBUG/if (yydebug).
16840
168412002-06-20 Akim Demaille <akim@epita.fr>
16842
16843 * src/symtab.h, src/symtab.c (symbol_t): printer and
16844 printer_location are new members.
16845 (symbol_printer_set): New.
16846 * src/parse-gram.y (PERCENT_PRINTER): New token.
16847 Handle its associated rule.
16848 * src/scan-gram.l: Adjust.
16849 (handle_destructor_at, handle_destructor_dollar): Rename as...
16850 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16851 * src/output.c (symbol_printers_output): New.
16852 (output_skeleton): Call it.
16853 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16854 since there are already many grammar files with a user `yyprint'.
16855 Replace the calls to YYPRINT to calls to yysymprint.
16856 * tests/calc.at: Adjust.
16857 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16858 taking advantage of parser very internal details (stack size!).
16859
168602002-06-20 Akim Demaille <akim@epita.fr>
16861
16862 * src/scan-gram.l: Complete the scanner with the missing patterns
16863 to pacify Flex.
16864 Use `quote' and `symbol_tag_get' where appropriate.
16865
168662002-06-19 Akim Demaille <akim@epita.fr>
16867
16868 * tests/actions.at (Destructors): Augment to test locations.
16869 * data/bison.simple (yydestructor): Pass it the current location
16870 if locations are enabled.
16871 Prototype only when __STDC__ or C++.
16872 Change the argument names to move into the yy name space: there is
16873 user code here.
16874
168752002-06-19 Akim Demaille <akim@epita.fr>
16876
16877 * data/bison.simple (b4_pure_if): New.
16878 Use it instead of #ifdef YYPURE.
16879
168802002-06-19 Akim Demaille <akim@epita.fr>
16881
16882 * data/bison.simple (b4_location_if): New.
16883 Use it instead of #ifdef YYLSP_NEEDED.
16884
168852002-06-19 Akim Demaille <akim@epita.fr>
16886
16887 Prepare @$ in %destructor, but currently don't bind it in the
16888 skeleton, as %location use is not cleaned up yet.
16889
16890 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16891 (handle_action_at): New.
16892 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16893 a braced_code_t and a location as additional arguments.
16894 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16895 unquote one when outputting `b4_dollar_dollar'.
16896 Adjust callers.
16897 * data/bison.simple (b4_eval): Remove.
16898 (b4_symbol_destructor): Adjust.
16899 * tests/input.at (Invalid @n): Adjust.
16900
169012002-06-19 Zack Weinberg <zack@codesourcery.com>
16902
16903 * doc/bison.texinfo: Document ability to have multiple
16904 prologue sections.
16905
169062002-06-18 Akim Demaille <akim@epita.fr>
16907
16908 * src/files.c (compute_base_names): When computing the output file
16909 names from the input file name, strip the directory part.
16910
169112002-06-18 Akim Demaille <akim@epita.fr>
16912
16913 * data/bison.simple.new: Comment changes.
16914 Reported by Andreas Schwab.
16915
169162002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16917
16918 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16919 there are no `label `yyoverflowlab' defined but not used' warnings
16920 when yyoverflow is defined.
16921
169222002-06-18 Akim Demaille <akim@epita.fr>
16923
16924 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16925 new member.
16926 (symbol_destructor_set): Adjust.
16927 * src/output.c (symbol_destructors_output): Output the destructor
16928 locations.
16929 Output the symbol name.
16930 * data/bison.simple (b4_symbol_destructor): Adjust.
16931
169322002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16933 and Akim Demaille <akim@epita.fr>
16934
16935 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16936 what's left on the stack when the error recovery hits EOF.
16937 * tests/actions.at (Destructors): Complete to exercise this case.
16938
169392002-06-17 Akim Demaille <akim@epita.fr>
16940
16941 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16942 arguments is really empty, not only equal to `[]'.
16943 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16944 member.
16945 (symbol_destructor_set): New.
16946 * src/output.c (symbol_destructors_output): New.
16947 * src/reader.h (brace_code_t, current_braced_code): New.
16948 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16949 (handle_dollar): Rename as...
16950 (handle_action_dollar): this.
16951 (handle_destructor_dollar): New.
16952 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16953 (grammar_declaration): Use it.
16954 * data/bison.simple (yystos): Is always defined.
16955 (yydestructor): New.
16956 * tests/actions.at (Destructors): New.
16957 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16958
169592002-06-17 Akim Demaille <akim@epita.fr>
16960
16961 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16962 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16963 rule_length only when needed.
16964 * src/output.c (actions_output, token_definitions_output): Output
16965 the full M4 block.
16966 * src/symtab.c: Don't access directly to the symbol tag, use
16967 symbol_tag_get.
16968 * src/parse-gram.y: Use symbol_list_free.
16969
169702002-06-17 Akim Demaille <akim@epita.fr>
16971
16972 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16973 (symbol_list_prepend, get_type_name): Move to...
16974 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16975 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16976 Adjust all callers.
16977 (symbol_list_free): New.
16978 * src/scan-gram.l (handle_dollar): Takes a location.
16979 * tests/input.at (Invalid $n): Adjust.
16980
169812002-06-17 Akim Demaille <akim@epita.fr>
16982
16983 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16984 (symbol_list_prepend): New.
16985 * src/parse-gram.y (%union): `list' is a new member.
16986 (symbols.1): New, replaces...
16987 (terms_to_prec.1, nterms_to_type.1): these.
16988 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16989 Take a location as additional argument.
16990 Adjust all callers.
16991
169922002-06-15 Akim Demaille <akim@epita.fr>
16993
16994 * src/parse-gram.y: Move %token in the declaration section so that
16995 we don't depend upon CVS Bison.
16996
169972002-06-15 Akim Demaille <akim@epita.fr>
16998
16999 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17000 * src/print.c (print_core): Use it.
17001
170022002-06-15 Akim Demaille <akim@epita.fr>
17003
17004 * src/conflicts.c (log_resolution): Accept the rule involved in
17005 the sr conflicts instead of the lookahead number that points to
17006 that rule.
17007 (flush_reduce): Accept the current lookahead vector as argument,
17008 instead of the index in LA.
17009 (resolve_sr_conflict): Accept the current number of lookahead
17010 bitset to consider for the STATE, instead of the index in LA.
17011 (set_conflicts): Adjust.
17012 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17013
170142002-06-15 Akim Demaille <akim@epita.fr>
17015
17016 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17017 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17018 Adjust all dependencies.
17019 * src/lalr.c (initialize_lookaheads): Split into...
17020 (states_lookaheads_count, states_lookaheads_initialize): these.
17021 (lalr): Adjust.
17022
170232002-06-15 Akim Demaille <akim@epita.fr>
17024
17025 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17026 out of...
17027 (grammar_rules_print): here.
17028 * src/reduce.c (reduce_output): Use it.
17029 * tests/reduce.at (Useless Rules, Reduced Automaton)
17030 (Underivable Rules): Adjust.
17031
170322002-06-15 Akim Demaille <akim@epita.fr>
17033
17034 Copy BYacc's nice way to report the grammar.
17035
17036 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17037 New.
17038 Don't print the rules' location, it is confusing and useless.
17039 (rule_print): Use grammar_rhs_print.
17040 * src/print.c (print_grammar): Use grammar_rules_print.
17041
170422002-06-15 Akim Demaille <akim@epita.fr>
17043
17044 Complete and rationalize `useless thing' warnings.
17045
17046 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17047 (symbol_tag_print): New.
17048 Use them everywhere in place of accessing directly the tag member.
17049 * src/gram.h, src/gram.c (rule_print): New.
17050 Use it where a rule used to be printed `by hand'.
17051 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17052 (reduce_grammar_tables): Report the useless rules.
17053 (reduce_print): Useless things are a warning, not an error.
17054 Report it as such.
17055 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17056 (Reduced Automaton, Underivable Rules): Adjust.
17057 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17058 * tests/conflicts.at (Unresolved SR Conflicts)
17059 (Solved SR Conflicts): Adjust.
17060
170612002-06-15 Akim Demaille <akim@epita.fr>
17062
17063 Let symbols have a location.
17064
17065 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17066 (getsym): Adjust.
17067 Adjust all callers.
17068 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17069 Use location_t, not int.
17070 * src/symtab.c (symbol_check_defined): Take advantage of the
17071 location.
17072 * tests/regression.at (Invalid inputs): Adjust.
17073
170742002-06-15 Akim Demaille <akim@epita.fr>
17075
17076 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17077 (input): Don't try to initialize yylloc here, do it in the
17078 scanner.
17079 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17080 * src/gram.h (rule_t): Change line and action_line into location
17081 and action_location, of location_t type.
17082 Adjust all dependencies.
17083 * src/location.h, src/location.c (empty_location): New.
17084 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17085 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17086 (grammar_current_rule_symbol_append)
17087 (grammar_current_rule_action_append): Expect a location as argument.
17088 * src/reader.c (grammar_midrule_action): Adjust to attach an
17089 action's location as dummy symbol location.
17090 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17091 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17092 the line numbers.
17093
170942002-06-14 Akim Demaille <akim@epita.fr>
17095
17096 Grammar declarations may be found in the grammar section.
17097
17098 * src/parse-gram.y (rules_or_grammar_declaration): New.
17099 (declarations): Each declaration may end with a semicolon, not
17100 just...
17101 (grammar_declaration): `"%union"'.
17102 (grammar): Branch to rules_or_grammar_declaration.
17103
171042002-06-14 Akim Demaille <akim@epita.fr>
17105
17106 * src/main.c (main): Invoke scanner_free.
17107
171082002-06-14 Akim Demaille <akim@epita.fr>
17109
17110 * src/output.c (m4_invoke): Extracted from...
17111 (output_skeleton): here.
17112 Free tempfile.
17113
171142002-06-14 Akim Demaille <akim@epita.fr>
17115
17116 * src/parse-gram.y (directives, directive, gram)
17117 (grammar_directives, precedence_directives, precedence_directive):
17118 Rename as...
17119 (declarations, declaration, grammar, grammar_declaration)
17120 (precedence_declaration, precedence_declarator): these.
17121 (symbol_declaration): New.
17122
171232002-06-14 Akim Demaille <akim@epita.fr>
17124
17125 * src/files.c (action_obstack): Remove, unused.
17126 (output_obstack): Remove it, and all its dependencies, as it is no
17127 longer needed.
17128 * src/reader.c (epilogue_set): Build the epilogue in the
17129 muscle_obstack.
17130 * src/output.h, src/output.c (muscle_obstack): Move to...
17131 * src/muscle_tab.h, src/muscle_tab.h: here.
17132 (muscle_init): Initialize muscle_obstack.
17133 (muscle_free): New.
17134 * src/main.c (main): Call it.
17135
171362002-06-14 Akim Demaille <akim@epita.fr>
17137
17138 * src/location.h: New, extracted from...
17139 * src/reader.h: here.
17140 * src/Makefile.am (noinst_HEADERS): Merge into
17141 (bison_SOURCES): this.
17142 Add location.h.
17143 * src/parse-gram.y: Use location_t instead of Bison's.
17144 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17145 Use location_t instead of ints.
17146
171472002-06-14 Akim Demaille <akim@epita.fr>
17148
17149 * data/bison.simple, data/bison.c++: Be sure to restore the
17150 current #line when returning to the skeleton contents after having
17151 exposed the input file's #line.
17152
171532002-06-12 Akim Demaille <akim@epita.fr>
17154
17155 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17156 eager.
17157 * tests/actions.at (Exotic Dollars): New.
17158
171592002-06-12 Akim Demaille <akim@epita.fr>
17160
17161 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17162 ['"/] too eagerly.
17163 * tests/input.at (Torturing the Scanner): New.
17164
171652002-06-11 Akim Demaille <akim@epita.fr>
17166
17167 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17168 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17169 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17170 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17171 * src/reader.c (reader): Use it.
17172
171732002-06-11 Akim Demaille <akim@epita.fr>
17174
17175 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17176 Adjust all callers.
17177 (scanner_last_string_free): New.
17178
171792002-06-11 Akim Demaille <akim@epita.fr>
17180
17181 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17182 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17183 (last_string, YY_OBS_FREE): New.
17184 Use them when returning an ID.
17185
171862002-06-11 Akim Demaille <akim@epita.fr>
17187
17188 Have Bison grammars parsed by a Bison grammar.
17189
17190 * src/reader.c, src/reader.h (prologue_augment): New.
17191 * src/reader.c (copy_definition): Remove.
17192
17193 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17194 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17195 (grammar_current_rule_prec_set, grammar_current_rule_check)
17196 (grammar_current_rule_symbol_append)
17197 (grammar_current_rule_action_append): Export.
17198 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17199 (symbol_list_action_append): Remove.
17200 Hook the routines from reader.
17201 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17202 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17203
17204 * src/reader.c (read_declarations): Remove, unused.
17205
17206 * src/parse-gram.y: Handle the epilogue.
17207 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17208 (grammar_start_symbol_set): this.
17209 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17210 * src/reader.c (readgram): Remove, unused.
17211 (reader): Adjust to insert eoftoken and axiom where appropriate.
17212
17213 * src/reader.c (copy_dollar): Replace with...
17214 * src/scan-gram.h (handle_dollar): this.
17215 * src/parse-gram.y: Remove `%thong'.
17216
17217 * src/reader.c (copy_at): Replace with...
17218 * src/scan-gram.h (handle_at): this.
17219
17220 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17221 New.
17222
17223 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17224 time being.
17225
17226 * src/reader.h, src/reader.c (grammar_rule_end): New.
17227
17228 * src/parse.y (current_type, current_class): New.
17229 Implement `%nterm', `%token' support.
17230 Merge `%term' into `%token'.
17231 (string_as_id): New.
17232 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17233 type name.
17234
17235 * src/parse-gram.y: Be sure to handle properly the beginning of
17236 rules.
17237
17238 * src/parse-gram.y: Handle %type.
17239 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17240
17241 * src/parse-gram.y: More directives support.
17242 * src/options.c: No longer handle source directives.
17243
17244 * src/parse-gram.y: Fix %output.
17245
17246 * src/parse-gram.y: Handle %union.
17247 Use the prologue locations.
17248 * src/reader.c (parse_union_decl): Remove.
17249
17250 * src/reader.h, src/reader.c (epilogue_set): New.
17251 * src/parse-gram.y: Use it.
17252
17253 * data/bison.simple, data/bison.c++: b4_stype is now either not
17254 defined, then default to int, or to the contents of %union,
17255 without `union' itself.
17256 Adjust.
17257 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17258
17259 * src/output.c (actions_output): Don't output braces, as they are
17260 already handled by the scanner.
17261
17262 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17263 characters to themselves.
17264
17265 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17266 that the epilogue has a proper #line.
17267
17268 * src/parse-gram.y: Handle precedence/associativity.
17269
17270 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17271 a terminal.
17272 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17273 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17274 at all to define terminals that cannot be emitted.
17275
17276 * src/scan-gram.l: Escape M4 characters.
17277
17278 * src/scan-gram.l: Working properly with escapes in user
17279 strings/characters.
17280
17281 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17282 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17283 grammar.
17284 Use more modest sizes, as for the time being the parser does not
17285 release memory, and therefore the process swallows a huge amount
17286 of memory.
17287
17288 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17289 stricter %token grammar.
17290
17291 * src/symtab.h (associativity): Add `undef_assoc'.
17292 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17293 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17294
17295 * tests/regression.at (Invalid %directive): Remove, as it is now
17296 meaningless.
17297 (Invalid inputs): Adjust to the new error messages.
17298 (Token definitions): The new grammar doesn't allow too many
17299 eccentricities.
17300
17301 * src/lex.h, src/lex.c: Remove.
17302 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17303 (copy_character, copy_string2, copy_string, copy_identifier)
17304 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17305 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17306 (parse_action): Remove.
17307 * po/POTFILES.in: Adjust.
17308
173092002-06-11 Akim Demaille <akim@epita.fr>
17310
17311 * src/reader.c (parse_action): Don't store directly into the
17312 rule's action member: return the action as a string.
17313 Don't require `rule_length' as an argument: compute it.
17314 (grammar_current_rule_symbol_append)
17315 (grammar_current_rule_action_append): New, eved out from
17316 (readgram): here.
17317 Remove `action_flag', `rulelength', unused now.
17318
173192002-06-11 Akim Demaille <akim@epita.fr>
17320
17321 * src/reader.c (grammar_current_rule_prec_set).
17322 (grammar_current_rule_check): New, eved out from...
17323 (readgram): here.
17324 Remove `xaction', `first_rhs': useless.
17325 * tests/input.at (Type clashes): New.
17326 * tests/existing.at (GNU Cim Grammar): Adjust.
17327
173282002-06-11 Akim Demaille <akim@epita.fr>
17329
17330 * src/reader.c (grammar_midrule_action): New, Eved out from
17331 (readgram): here.
17332
173332002-06-11 Akim Demaille <akim@epita.fr>
17334
17335 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17336 New.
17337 (readgram): Use them as replacement of inlined code, crule and
17338 crule1.
17339
173402002-06-11 Akim Demaille <akim@epita.fr>
17341
17342 * src/reader.c (grammar_end, grammar_symbol_append): New.
17343 (readgram): Use them.
17344 Make the use of `p' as local as possible.
17345
173462002-06-10 Akim Demaille <akim@epita.fr>
17347
17348 GCJ's parser requires the tokens to be defined before the prologue.
17349
17350 * data/bison.simple: Output the token definition before the user's
17351 prologue.
17352 * tests/regression.at (Braces parsing, Duplicate string)
17353 (Mixing %token styles): Check the output from bison.
17354 (Early token definitions): New.
17355
173562002-06-10 Akim Demaille <akim@epita.fr>
17357
17358 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17359 assigning twice the same user number to a token, so that we can
17360 use it in...
17361 * src/lex.c (lex): here.
17362 Also use `symbol_class_set' instead of hand written code.
17363 * src/reader.c (parse_assoc_decl): Likewise.
17364
173652002-06-10 Akim Demaille <akim@epita.fr>
17366
17367 * src/symtab.c, src/symtab.c (symbol_class_set)
17368 (symbol_user_token_number_set): New.
17369 * src/reader.c (parse_token_decl): Use them.
17370 Use a switch instead of ifs.
17371 Use a single argument.
17372
173732002-06-10 Akim Demaille <akim@epita.fr>
17374
17375 Remove `%thong' support as it is undocumented, unused, duplicates
17376 `%token's job, and creates useless e-mail traffic with people who
17377 want to know what it is, why it is undocumented, unused, and
17378 duplicates `%token's job.
17379
17380 * src/reader.c (parse_thong_decl): Remove.
17381 * src/options.c (option_table): Remove "thong".
17382 * src/lex.h (tok_thong): Remove.
17383
173842002-06-10 Akim Demaille <akim@epita.fr>
17385
17386 * src/symtab.c, src/symtab.c (symbol_type_set)
17387 (symbol_precedence_set): New.
17388 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17389 (value_components_used): Remove, unused.
17390
173912002-06-09 Akim Demaille <akim@epita.fr>
17392
17393 Move symbols handling code out of the reader.
17394
17395 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17396 (axiom): Move to...
17397 * src/symtab.h, src/symtab.c: here.
17398
17399 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17400 * src/reader.c (startval): Rename as...
17401 * src/symtab.h, src/symtab.c (startsymbol): this.
17402 * src/reader.c: Adjust.
17403
17404 * src/reader.c (symbol_check_defined, symbol_make_alias)
17405 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17406 (token_translations_init)
17407 Move to...
17408 * src/symtab.c: here.
17409 * src/reader.c (packsymbols): Move to...
17410 * src/symtab.h, src/symtab.c (symbols_pack): here.
17411 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17412 argument.
17413
174142002-06-03 Akim Demaille <akim@epita.fr>
17415
17416 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17417 then statements.
17418
174192002-06-03 Akim Demaille <akim@epita.fr>
17420
17421 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17422 structs with non literals.
17423 * src/scan-skel.l: never-interactive.
17424 * src/conflicts.c (enum conflict_resolution_e): No trailing
17425 comma.
17426 * src/getargs.c (usage): Split long literal strings.
17427 Reported by Hans Aberg.
17428
174292002-05-28 Akim Demaille <akim@epita.fr>
17430
17431 * data/bison.c++: Use C++ ostreams.
17432 (cdebug_): New member.
17433
174342002-05-28 Akim Demaille <akim@epita.fr>
17435
17436 * src/output.c (output_skeleton): Be sure to allocate enough room
17437 for `/' _and_ for `\0' in full_skeleton.
17438
174392002-05-28 Akim Demaille <akim@epita.fr>
17440
17441 * data/bison.c++: Catch up with bison.simple:
17442 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17443 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17444 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17445 and popping traces.
17446
174472002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17448
17449 * src/output.c (output_skeleton): Put an explicit path in front of
17450 the skeleton file name, rather than relying on the -I directory,
17451 to partially alleviate effects of having a skeleton file lying around
17452 in the current directory.
17453
174542002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17455
17456 * src/conflicts.c (log_resolution): Correct typo:
17457 obstack_printf should be obstack_fgrow1.
17458
174592002-05-26 Akim Demaille <akim@epita.fr>
17460
17461 * src/state.h (state_t): `solved_conflicts' is a new member.
17462 * src/LR0.c (new_state): Set it to 0.
17463 * src/conflicts.h, src/conflicts.c (print_conflicts)
17464 (free_conflicts, solve_conflicts): Rename as...
17465 (conflicts_print, conflicts_free, conflicts_solve): these.
17466 Adjust callers.
17467 * src/conflicts.c (enum conflict_resolution_e)
17468 (solved_conflicts_obstack): New, used by...
17469 (log_resolution): this.
17470 Adjust to attach the conflict resolution to each state.
17471 Complete the description with the precedence/associativity
17472 information.
17473 (resolve_sr_conflict): Adjust.
17474 * src/print.c (print_state): Output its solved_conflicts.
17475 * tests/conflicts.at (Unresolved SR Conflicts)
17476 (Solved SR Conflicts): Exercise --report=all.
17477
174782002-05-26 Akim Demaille <akim@epita.fr>
17479
17480 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17481 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17482 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17483 (token_number_t, item_number_as_token_number)
17484 (token_number_as_item_number, muscle_insert_token_number_table):
17485 Rename as...
17486 (symbol_number_t, item_number_as_symbol_number)
17487 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17488 these, since it is more appropriate.
17489
174902002-05-26 Akim Demaille <akim@epita.fr>
17491
17492 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17493 `Error:' lines.
17494 * data/bison.simple (yystos) [YYDEBUG]: New.
17495 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17496 error recovery.
17497 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17498
174992002-05-25 Akim Demaille <akim@epita.fr>
17500
17501 * doc/bison.texinfo (Debugging): Split into...
17502 (Tracing): this new section, its former contents, and...
17503 (Understanding): this new section.
17504 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17505 by...
17506 (report_flag): this.
17507 Adjust all dependencies.
17508 (report_args, report_types, report_argmatch): New.
17509 (usage, getargs): Report/support -r, --report.
17510 * src/options.h
17511 (struct option_table_struct): Rename as..,
17512 (struct option_table_s): this.
17513 Rename the `set_flag' member to `flag' to match with getopt_long's
17514 struct.
17515 * src/options.c (option_table): Split verbose into an entry for
17516 %verbose, and another for --verbose.
17517 Support --report/-r, so remove -r from the obsolete --raw.
17518 * src/print.c: Attach full item sets and lookaheads reports to
17519 report_flag instead of trace_flag.
17520 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17521
175222002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17523 and Paul Eggert <eggert@twinsun.com>
17524
17525 * data/bison.simple (yyparse): Correct error handling to conform to
17526 POSIX and yacc. Specifically, after syntax error is discovered,
17527 do not reduce further before shifting the error token.
17528 Clean up the code a bit by removing the labels yyerrdefault,
17529 yyerrhandle, yyerrpop.
17530 * NEWS: Document the above.
17531
175322002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17533
17534 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17535 type; it isn't always big enough, since it doesn't necessarily
17536 include non-terminals.
17537 (yytranslate): Expand definition of yy_token_number_type, so that
17538 the latter can be removed.
17539 (yy_token_number_type): Remove, only one use.
17540 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17541 don't use TokenNumberType as element type.
17542
17543 * tests/regression.at: Modify expected output to agree with change
17544 to yyr1 and yytranslate.
17545
175462002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17547
17548 * src/reader.c (parse_action): Use copy_character instead of
17549 obstack_1grow.
17550
175512002-05-13 Akim Demaille <akim@epita.fr>
17552
17553 * tests/regression.at (Token definitions): Prototype yylex and
17554 yyerror.
17555
175562002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17557
17558 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17559 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17560 32-bit arithmetic.
17561 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17562
175632002-05-07 Akim Demaille <akim@epita.fr>
17564
17565 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17566 avoid GCC warnings.
17567
175682002-05-07 Akim Demaille <akim@epita.fr>
17569
17570 Kill GCC warnings.
17571
17572 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17573 over the RHS of each rule.
17574 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17575 * src/state.h (state_t): Member `nitems' is unsigned short.
17576 * src/LR0.c (get_state): Adjust.
17577 * src/reader.c (packgram): Likewise.
17578 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17579 `Type'.
17580 (muscle_insert_int_table): Remove, unused.
17581 (prepare_rules): Remove `max'.
17582
175832002-05-06 Akim Demaille <akim@epita.fr>
17584
17585 * src/closure.c (print_firsts): Display of the symbol tags.
17586 (bitmatrix_print): Move to...
17587 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17588 here.
17589 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17590
175912002-05-06 Akim Demaille <akim@epita.fr>
17592
17593 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17594 hash_do_for_each.
17595
175962002-05-06 Akim Demaille <akim@epita.fr>
17597
17598 * src/LR0.c (new_state, get_state): Instead of using the global
17599 `kernel_size' and `kernel_base', have two new arguments:
17600 `core_size' and `core'.
17601 Adjust callers.
17602
176032002-05-06 Akim Demaille <akim@epita.fr>
17604
17605 * src/reader.c (packgram): No longer end `ritem' with a 0
17606 sentinel: it is not used.
17607
176082002-05-05 Akim Demaille <akim@epita.fr>
17609
17610 New experimental feature: display the lookaheads in the report and
17611 graph.
17612
17613 * src/print (print_core): When --trace-flag, display the rules
17614 lookaheads.
17615 * src/print_graph.c (print_core): Likewise.
17616 Swap the arguments.
17617 Adjust caller.
17618
176192002-05-05 Akim Demaille <akim@epita.fr>
17620
17621 * tests/torture.at (Many lookaheads): New test.
17622
176232002-05-05 Akim Demaille <akim@epita.fr>
17624
17625 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17626 (GENERATE_MUSCLE_INSERT_TABLE): this.
17627 (output_int_table, output_unsigned_int_table, output_short_table)
17628 (output_token_number_table, output_item_number_table): Replace with...
17629 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17630 (muscle_insert_short_table, muscle_insert_token_number_table)
17631 (muscle_insert_item_number_table): these.
17632 Adjust all callers.
17633 (prepare_tokens): Don't free `translations', since...
17634 * src/reader.h, src/reader.c (grammar_free): do it.
17635 Move to...
17636 * src/gram.h, src/gram.c (grammar_free): here.
17637 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17638 b4_translate_max.
17639
176402002-05-05 Akim Demaille <akim@epita.fr>
17641
17642 * src/output.c (output_unsigned_int_table): New.
17643 (prepare_rules): `i' is unsigned.
17644 `prhs', `rline', `r2' are unsigned int.
17645 Rename muscle `rhs_number_max' as `rhs_max'.
17646 Output muscles `prhs_max', `rline_max', and `r2_max'.
17647 Free rline and r1.
17648 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17649 to compute types instead of constant types.
17650 * tests/regression.at (Web2c Actions): Adjust.
17651
176522002-05-04 Akim Demaille <akim@epita.fr>
17653
17654 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17655 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17656 Adjust dependencies.
17657 * src/output.c (token_definitions_output): Be sure not to output a
17658 `#define 'a'' when fed with `%token 'a' "a"'.
17659 * tests/regression.at (Token definitions): New.
17660
176612002-05-03 Paul Eggert <eggert@twinsun.com>
17662
17663 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17664 for K&R C.
17665
176662002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17667
17668 * Makefile.am (SUBDIRS): Remove intl.
17669 (EXTRA_DIST): Add config/config.rpath.
17670
176712002-05-03 Akim Demaille <akim@epita.fr>
17672
17673 * data/bison.simple (m4_if): Don't output empty enums.
17674 And actually, output valid enum definitions :(.
17675
176762002-05-03 Akim Demaille <akim@epita.fr>
17677
17678 * configure.bat: Remove, completely obsolete.
17679 * Makefile.am (EXTRA_DIST): Adjust.
17680 Don't distribute config.rpath...
17681 * config/Makefile.am (EXTRA_DIST): Do it.
17682
176832002-05-03 Akim Demaille <akim@epita.fr>
17684
17685 * configure.in (GETTEXT_VERSION): New.
17686 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17687
176882002-05-03 Akim Demaille <akim@epita.fr>
17689
17690 * data/bison.simple (b4_token_enum): New.
17691 (b4_token_defines): Use it to output tokens both as #define and
17692 enums.
17693 Suggested by Paul Eggert.
17694 * src/output.c (token_definitions_output): Don't output spurious
17695 white spaces.
17696
176972002-05-03 Akim Demaille <akim@epita.fr>
17698
17699 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17700
177012002-05-02 Robert Anisko <robert@lrde.epita.fr>
17702
17703 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17704 Update the stack class, give a try to deque as the default container.
17705
177062002-05-02 Akim Demaille <akim@epita.fr>
17707
17708 * data/bison.simple (yyparse): Do not implement @$ = @1.
17709 (YYLLOC_DEFAULT): Adjust to do it.
17710 * doc/bison.texinfo (Location Default Action): Fix.
17711
177122002-05-02 Akim Demaille <akim@epita.fr>
17713
17714 * src/reader.c (parse_braces): Merge into...
17715 (parse_action): this.
17716
177172002-05-02 Akim Demaille <akim@epita.fr>
17718
17719 * configure.in (ALL_LINGUAS): Remove.
17720 * po/LINGUAS, hr.po: New.
17721
177222002-05-02 Akim Demaille <akim@epita.fr>
17723
17724 Remove the so called hairy (semantic) parsers.
17725
17726 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17727 * src/gram.h, src/gram.c (semantic_parser): Remove.
17728 (rule_t): Remove the guard and guard_line members.
17729 * src/lex.h (token_t): remove tok_guard.
17730 * src/options.c (option_table): Remove %guard and %semantic_parser
17731 support.
17732 * src/output.c, src/output.h (guards_output): Remove.
17733 (prepare): Adjust.
17734 (token_definitions_output): Don't output the `T'
17735 tokens (???).
17736 (output_skeleton): Don't output the guards.
17737 * src/files.c, src/files.c (attrsfile): Remove.
17738 * src/reader.c (symbol_list): Remove the guard and guard_line
17739 members.
17740 Adjust dependencies.
17741 (parse_guard): Remove.
17742 * data/bison.hairy: Remove.
17743 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17744 BISON_HAIRY.
17745
177462002-05-02 Akim Demaille <akim@epita.fr>
17747
17748 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17749 (parse_guard): Rename the formal argument `stack_offset' as
17750 `rule_length', which is more readable.
17751 Adjust callers.
17752 (copy_at, copy_dollar): Instead of outputting the hard coded
17753 values of $$, $n and so forth, output invocation to b4_lhs_value,
17754 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17755 Note: this patch partially drops `semantic-parser' support: it
17756 always does `rule_length - n', where semantic parsers ought to
17757 always use `-n'.
17758 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17759 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17760
177612002-05-02 Akim Demaille <akim@epita.fr>
17762
17763 * configure.in (AC_INIT): Bump to 1.49b.
17764 (AM_INIT_AUTOMAKE): Short invocation.
17765
177662002-05-02 Akim Demaille <akim@epita.fr>
17767
17768 Version 1.49a.
17769
177702002-05-01 Akim Demaille <akim@epita.fr>
17771
17772 * src/skeleton.h: Remove.
17773
177742002-05-01 Akim Demaille <akim@epita.fr>
17775
17776 * src/skeleton.h: Fix the #endif.
17777 Reported by Magnus Fromreide.
17778
177792002-04-26 Paul Eggert <eggert@twinsun.com>
17780
17781 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17782 Define if we define YYSTYPE and YYLTYPE, respectively.
17783 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17784
177852002-04-25 Robert Anisko <robert@lrde.epita.fr>
17786
17787 * src/scan-skel.l: Postprocess quadrigraphs.
17788
17789 * src/reader.c (copy_character): New function, used to output
17790 single characters while replacing `[' and `]' with quadrigraphs, to
17791 avoid troubles with M4 quotes.
17792 (copy_comment): Output characters with copy_character.
17793 (read_additionnal_code): Likewise.
17794 (copy_string2): Likewise.
17795 (copy_definition): Likewise.
17796
17797 * tests/calc.at: Exercise M4 quoting.
17798
177992002-04-25 Akim Demaille <akim@epita.fr>
17800
17801 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17802 between `!' and the command.
17803 Reported by Paul Eggert.
17804
178052002-04-24 Robert Anisko <robert@lrde.epita.fr>
17806
17807 * tests/calc.at: Exercise prologue splitting.
17808
17809 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17810 `b4_post_prologue' instead of `b4_prologue'.
17811
17812 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17813 muscles.
17814 (output): Free pre_prologue_obstack and post_prologue_obstack.
17815 * src/files.h, src/files.c (attrs_obstack): Remove.
17816 (pre_prologue_obstack, post_prologue_obstack): New.
17817 * src/reader.c (copy_definition): Add a parameter to specify the
17818 obstack to fill, instead of using attrs_obstack unconditionally.
17819 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17820 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17821
178222002-04-23 Paul Eggert <eggert@twinsun.com>
17823
17824 * data/bison.simple: Remove unnecessary commentary and white
17825 space differences from 1_29-branch.
17826 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17827
17828 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17829 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17830 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17831 constructors or destructors.
17832
17833 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17834
178352002-04-23 Akim Demaille <akim@epita.fr>
17836
17837 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17838 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17839 location with columns.
17840 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17841 All reported by Paul Eggert.
17842
178432002-04-22 Akim Demaille <akim@epita.fr>
17844
17845 * src/reduce.c (dump_grammar): Move to...
17846 * src/gram.h, src/gram.c (grammar_dump): here.
17847 Be sure to separate long item numbers.
17848 Don't read the members of a rule's prec if its nil.
17849
178502002-04-22 Akim Demaille <akim@epita.fr>
17851
17852 * src/output.c (table_size, table_grow): New.
17853 (MAXTABLE): Remove, replace uses with table_size.
17854 (pack_vector): Instead of dying when the table is too big, grow it.
17855
178562002-04-22 Akim Demaille <akim@epita.fr>
17857
17858 * data/bison.simple (yyr1): Its type is that of a token number.
17859 * data/bison.c++ (r1_): Likewise.
17860 * tests/regression.at (Web2c Actions): Adjust.
17861
178622002-04-22 Akim Demaille <akim@epita.fr>
17863
17864 * src/reader.c (token_translations_init): 256 is now the default
17865 value for the error token, i.e., it will be assigned another
17866 number if the user assigned 256 to one of her tokens.
17867 (reader): Don't force 256 to error.
17868 * doc/bison.texinfo (Symbols): Adjust.
17869 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17870 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17871 etc. instead of 10, 20, 30 (which was used to `jump' over error
17872 (256) and undefined (2)).
17873
178742002-04-22 Akim Demaille <akim@epita.fr>
17875
17876 Propagate more token_number_t.
17877
17878 * src/gram.h (token_number_as_item_number)
17879 (item_number_as_token_number): New.
17880 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17881 Use it to create output_item_number_table and
17882 output_token_number_table.
17883 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17884 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17885 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17886 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17887
178882002-04-22 Akim Demaille <akim@epita.fr>
17889
17890 * src/output.h, src/output.c (get_lines_number): Remove.
17891
178922002-04-19 Akim Demaille <akim@epita.fr>
17893
17894 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17895 as Lex/Flex'.
17896 (Debugging): More details about enabling the debugging features.
17897 (Table of Symbols): Describe $$, $n, @$, and @n.
17898 Suggested by Tim Josling.
17899
179002002-04-19 Akim Demaille <akim@epita.fr>
17901
17902 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17903
179042002-04-10 Akim Demaille <akim@epita.fr>
17905
17906 * src/system.h: Rely on HAVE_LIMITS_H.
17907 Suggested by Paul Eggert.
17908
179092002-04-09 Akim Demaille <akim@epita.fr>
17910
17911 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17912 full stderr, and strip it according to the bison options, instead
17913 of composing the error message from different bits.
17914 This makes it easier to check for several error messages.
17915 Adjust all the invocations.
17916 Add an invocation exercising the error token.
17917 Add an invocation demonstrating a stupid error message.
17918 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17919 Adjust the tests.
17920 Error message are for stderr, not stdout.
17921
179222002-04-09 Akim Demaille <akim@epita.fr>
17923
17924 * src/gram.h, src/gram.c (error_token_number): Remove, use
17925 errtoken->number.
17926 * src/reader.c (reader): Don't specify the user token number (2)
17927 for $undefined, as it uselessly prevents using it.
17928 * src/gram.h (token_number_t): Move to...
17929 * src/symtab.h: here.
17930 (state_t.number): Is a token_number_t.
17931 * src/print.c, src/reader.c: Use undeftoken->number instead of
17932 hard coded 2.
17933 (Even though this 2 is not the same as above: the number of the
17934 undeftoken remains being 2, it is its user token number which
17935 might not be 2).
17936 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17937 `user_token_number_max'.
17938 Output `undef_token_number'.
17939 * data/bison.simple, data/bison.c++: Use them.
17940 Be sure to map invalid yylex return values to
17941 `undef_token_number'. This saves us from gratuitous SEGV.
17942
17943 * tests/conflicts.at (Solved SR Conflicts)
17944 (Unresolved SR Conflicts): Adjust.
17945 * tests/regression.at (Web2c Actions): Adjust.
17946
179472002-04-08 Akim Demaille <akim@epita.fr>
17948
17949 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17950 Adding #line.
17951 Remove the duplicate `typedefs'.
17952 (RhsNumberType): Fix the declaration and various other typos.
17953 Use __ofile__.
17954 * data/bison.simple: Use __ofile__.
17955 * src/scan-skel.l: Handle __ofile__.
17956
179572002-04-08 Akim Demaille <akim@epita.fr>
17958
17959 * src/gram.h (item_number_t): New, the type of item numbers in
17960 RITEM. Note that it must be able to code symbol numbers as
17961 positive number, and the negation of rule numbers as negative
17962 numbers.
17963 Adjust all dependencies (pretty many).
17964 * src/reduce.c (rule): Remove this `short *' pointer: use
17965 item_number_t.
17966 * src/system.h (MINSHORT, MAXSHORT): Remove.
17967 Include `limits.h'.
17968 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17969 (shortcpy): Remove.
17970 (MAXTABLE): Move to...
17971 * src/output.c (MAXTABLE): here.
17972 (prepare_rules): Use output_int_table to output rhs.
17973 * data/bison.simple, data/bison.c++: Adjust.
17974 * tests/torture.at (Big triangle): Move the limit from 254 to
17975 500.
17976 * tests/regression.at (Web2c Actions): Ajust.
17977
17978 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17979 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17980 passes, but produces negative #line number, once fixed, GCC is
17981 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17982 C), it passes.
17983 * src/state.h (state_h): Code input lines on ints, not shorts.
17984
179852002-04-08 Akim Demaille <akim@epita.fr>
17986
17987 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17988 and then the grammar.
17989
179902002-04-08 Akim Demaille <akim@epita.fr>
17991
17992 * src/system.h: No longer using strndup.
17993
179942002-04-07 Akim Demaille <akim@epita.fr>
17995
17996 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17997 * src/output.c (output_table_data): Return the longest number.
17998 (prepare_tokens): Output `token_number_max').
17999 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18000 New.
18001 Use them to define yy_token_number_type/TokenNumberType.
18002 Use this type for yytranslate.
18003 * tests/torture.at (Big triangle): Push the limit from 124 to
18004 253.
18005 * tests/regression.at (Web2c Actions): Adjust.
18006
180072002-04-07 Akim Demaille <akim@epita.fr>
18008
18009 * tests/torture.at (Big triangle): New.
18010 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18011 * tests/existing.at: here.
18012
180132002-04-07 Akim Demaille <akim@epita.fr>
18014
18015 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18016 nritems.
18017 Adjust dependencies.
18018
180192002-04-07 Akim Demaille <akim@epita.fr>
18020
18021 * src/reader.c: Normalize increments to prefix form.
18022
180232002-04-07 Akim Demaille <akim@epita.fr>
18024
18025 * src/reader.c, symtab.c: Remove debugging code.
18026
180272002-04-07 Akim Demaille <akim@epita.fr>
18028
18029 Rename all the `bucket's as `symbol_t'.
18030
18031 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18032 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18033 * src/symtab.c, src/symtab.h (bucket): Rename as...
18034 (symbol_t): this.
18035 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18036 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18037 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18038 (buckets_new, buckets_free, buckets_do): Rename as...
18039 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18040 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18041 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18042 (symbols_new, symbols_free, symbols_do): these.
18043
180442002-04-07 Akim Demaille <akim@epita.fr>
18045
18046 Use lib/hash for the symbol table.
18047
18048 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18049 EOF.
18050 * src/lex.c (lex): Set the `number' member of new terminals.
18051 * src/reader.c (bucket_check_defined, bucket_make_alias)
18052 (bucket_check_alias_consistence, bucket_translation): New.
18053 (reader, grammar_free, readgram, token_translations_init)
18054 (packsymbols): Adjust.
18055 (reader): Number the predefined tokens.
18056 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18057 for predefined tokens.
18058 * src/symtab.h (bucket): Remove all the hash table related
18059 members.
18060 * src/symtab.c (symtab): Replace by...
18061 (bucket_table): this.
18062 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18063 (buckets_new, buckets_do): New.
18064
180652002-04-07 Akim Demaille <akim@epita.fr>
18066
18067 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18068 (start_symbol, max_user_token_number, semantic_parser)
18069 (error_token_number): Initialize.
18070 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18071 Initialize.
18072 (reader): Don't.
18073 (errtoken, eoftoken, undeftoken, axiom): Extern.
18074
180752002-04-07 Akim Demaille <akim@epita.fr>
18076
18077 * src/gram.h (rule_s): prec and precsym are now pointers
18078 to the bucket giving the priority/associativity.
18079 Member `associativity' removed: useless.
18080 * src/reduce.c, src/conflicts.c: Adjust.
18081
180822002-04-07 Akim Demaille <akim@epita.fr>
18083
18084 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18085 Properly escape the symbols' TAG when outputting them.
18086
180872002-04-07 Akim Demaille <akim@epita.fr>
18088
18089 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18090
180912002-04-07 Akim Demaille <akim@epita.fr>
18092
18093 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18094 (LArule): this, which is an array to rule_t*.
18095 * src/print.c, src/conflicts.c: Adjust.
18096
180972002-04-07 Akim Demaille <akim@epita.fr>
18098
18099 * src/gram.h (rule_t): Rename `number' as `user_number'.
18100 `number' is a new member.
18101 Adjust dependencies.
18102 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18103
181042002-04-07 Akim Demaille <akim@epita.fr>
18105
18106 As a result of the previous patch, it is no longer needed
18107 to reorder ritem itself.
18108
18109 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18110
181112002-04-07 Akim Demaille <akim@epita.fr>
18112
18113 Be sure never to walk through RITEMS, but use only data related to
18114 the rules themselves. RITEMS should be banished.
18115
18116 * src/output.c (output_token_translations): Rename as...
18117 (prepare_tokens): this.
18118 In addition to `translate', prepare the muscles `tname' and
18119 `toknum', which were handled by...
18120 (output_rule_data): this.
18121 Remove, and move the remainder of its outputs into...
18122 (prepare_rules): this new routines, which also merges content from
18123 (output_gram): this.
18124 (prepare_rules): Be sure never to walk through RITEMS.
18125 (output_stos): Rename as...
18126 (prepare_stos): this.
18127 (output): Always invoke prepare_states, after all, just don't use it
18128 in the output if you don't need it.
18129
181302002-04-07 Akim Demaille <akim@epita.fr>
18131
18132 * src/LR0.c (new_state): Display `nstates' as the name of the
18133 newly created state.
18134 Adjust to initialize first_state and last_state if needed.
18135 Be sure to distinguish the initial from the final state.
18136 (new_states): Create the itemset of the initial state, and use
18137 new_state.
18138 * src/closure.c (closure): Now that the initial state has its
18139 items properly set, there is no need for a special case when
18140 creating `ruleset'.
18141
18142 As a result, now the rule 0, reducing to $axiom, is visible in the
18143 outputs. Adjust the test suite.
18144
18145 * tests/conflicts.at (Solved SR Conflicts)
18146 (Unresolved SR Conflicts): Adjust.
18147 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18148 * tests/conflicts.at (S/R in initial): New.
18149
181502002-04-07 Akim Demaille <akim@epita.fr>
18151
18152 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18153 the RHS of the rules.
18154 * src/output.c (output_gram): Likewise.
18155
181562002-04-07 Akim Demaille <akim@epita.fr>
18157
18158 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18159 bucket.
18160 Adjust all dependencies.
18161 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18162 `number' of the buckets too.
18163 * src/gram.h: Include `symtab.h'.
18164 (associativity): Move to...
18165 * src/symtab.h: here.
18166 No longer include `gram.h'.
18167
181682002-04-07 Akim Demaille <akim@epita.fr>
18169
18170 * src/gram.h, src/gram.c (rules_rhs_length): New.
18171 (ritem_longest_rhs): Use it.
18172 * src/gram.h (rule_t): `number' is a new member.
18173 * src/reader.c (packgram): Set it.
18174 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18175 the end of `rules', and count them out of `nrules'.
18176 (reduce_output, dump_grammar): Adjust.
18177 * src/print.c (print_grammar): It is no longer needed to check for
18178 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18179 * tests/reduce.at (Reduced Automaton): New test.
18180
181812002-04-07 Akim Demaille <akim@epita.fr>
18182
18183 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18184 lacking `+ 1' to nrules, Bison reported as useless a token if it
18185 was used solely to set the precedence of the last rule...
18186
181872002-04-07 Akim Demaille <akim@epita.fr>
18188
18189 * data/bison.c++, data/bison.simple: Don't output the current file
18190 name in #line, to avoid useless diffs between two identical
18191 outputs under different names.
18192
181932002-04-07 Akim Demaille <akim@epita.fr>
18194
18195 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18196 Normalize loops to using `< nrules + 1', not `<= nrules'.
18197
181982002-04-07 Akim Demaille <akim@epita.fr>
18199
18200 * TODO: Update.
18201
182022002-04-07 Akim Demaille <akim@epita.fr>
18203
18204 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18205 bucket.value as bucket.number.
18206
182072002-04-07 Akim Demaille <akim@epita.fr>
18208
18209 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18210 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18211 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18212 RHS, instead of being an index in RITEMS.
18213
182142002-04-04 Paul Eggert <eggert@twinsun.com>
18215
18216 * doc/bison.texinfo: Update copyright date.
18217 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18218 (Symbols): Warn about running Bison in one character set,
18219 but compiling and/or running in an incompatible one.
18220 Warn about character code 256, too.
18221
182222002-04-03 Paul Eggert <eggert@twinsun.com>
18223
18224 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18225 YYERROR_VERBOSE is nonzero, not whether it is defined.
18226
18227 Merge changes from bison-1_29-branch.
18228
182292002-03-20 Paul Eggert <eggert@twinsun.com>
18230
18231 Merge fixes from Debian bison_1.34-1.diff.
18232
18233 * configure.in (AC_PREREQ): 2.53.
18234
182352002-03-20 Akim Demaille <akim@epita.fr>
18236
18237 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18238
182392002-03-19 Paul Eggert <eggert@twinsun.com>
18240
18241 * src/bison.simple (YYCOPY): New macro.
18242 (YYSTACK_RELOCATE): Use it.
18243 Remove Type arg; no longer needed. All callers changed.
18244 (yymemcpy): Remove; no longer needed.
18245
18246 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18247 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18248
182492002-03-19 Akim Demaille <akim@epita.fr>
18250
18251 Test and fix the #line outputs.
18252
18253 * tests/atlocal.at (GCC): New.
18254 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18255 (Prologue synch line, %union synch line, Postprologue synch line)
18256 (Action synch line, Epilogue synch line): New tests.
18257 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18258 * data/bison.simple, data/bison.c++: Use it.
18259
182602002-03-19 Akim Demaille <akim@epita.fr>
18261
18262 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18263 (Solved SR Conflicts, %expect not enough, %expect right)
18264 (%expect too much): Move to...
18265 * tests/conflicts.at: this new file.
18266
182672002-03-19 Akim Demaille <akim@epita.fr>
18268
18269 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18270 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18271 that we can move to enums for instance.
18272 * src/output.c (token_definitions_output): Output a list of
18273 `token-name, token-number' instead of the #define.
18274 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18275
182762002-03-14 Akim Demaille <akim@epita.fr>
18277
18278 Use Gettext 0.11.1.
18279
182802002-03-09 Robert Anisko <robert@lrde.epita.fr>
18281
18282 * data/bison.c++: Make the user able to add members to the generated
18283 parser by subclassing.
18284
182852002-03-05 Robert Anisko <robert@lrde.epita.fr>
18286
18287 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18288 a character.
18289 Reported by Nicolas Tisserand and Nicolas Burrus.
18290
182912002-03-04 Robert Anisko <robert@lrde.epita.fr>
18292
18293 * src/reader.c: Warn about lacking semi-colons, do not complain.
18294
182952002-03-04 Robert Anisko <robert@lrde.epita.fr>
18296
18297 * data/bison.c++: Remove a debug line.
18298
182992002-03-04 Robert Anisko <robert@lrde.epita.fr>
18300
18301 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18302 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18303 provide a default implementation.
18304
183052002-03-04 Akim Demaille <akim@epita.fr>
18306
18307 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18308 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18309 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18310 * tests/semantic.at (Parsing Guards): Similarly.
18311 * src/reader.at (readgram): Complain if the last rule is not ended
18312 with a semi-colon.
18313
183142002-03-04 Akim Demaille <akim@epita.fr>
18315
18316 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18317 * src/closure.c: here.
18318 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18319 RTC.
18320 * src/warshall.h, src/warshall.c: Remove.
18321 * tests/sets.at (Broken Closure): Adjust.
18322
183232002-03-04 Akim Demaille <akim@epita.fr>
18324
18325 * src/output.c (output_skeleton): tempdir is const.
18326 bytes_read is unused.
18327
183282002-03-04 Akim Demaille <akim@epita.fr>
18329
18330 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18331 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18332 Update.
18333 From Michael Hayes.
18334
183352002-03-04 Akim Demaille <akim@epita.fr>
18336
18337 * src/closure.c (closure): `r' is unused.
18338
183392002-03-04 Akim Demaille <akim@epita.fr>
18340
18341 * tests/sets.at (Broken Closure): Add the ending `;'.
18342 * src/reader.at (readgram): Complain if a rule is not ended with a
18343 semi-colon.
18344
183452002-03-04 Akim Demaille <akim@epita.fr>
18346
18347 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18348 (count_sr_conflicts): Use bitset_count.
18349 * src/reduce.c (inaccessable_symbols): Ditto.
18350 (bits_size): Remove.
18351 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18352
183532002-03-04 Akim Demaille <akim@epita.fr>
18354
18355 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18356 * src/reduce.c: Remove the `bitset_zero's following the
18357 `bitset_create's, as now it is performed by the latter.
18358
183592002-03-04 Akim Demaille <akim@epita.fr>
18360
18361 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18362 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18363 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18364 latest sources from Michael.
18365
183662002-03-04 Akim Demaille <akim@epita.fr>
18367
18368 * src/output.c (output): Don't free the grammar.
18369 * src/reader.c (grammar_free): New.
18370 * src/main.c (main): Call it and don't free symtab here.
18371
183722002-03-04 Akim Demaille <akim@epita.fr>
18373
18374 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18375 before returning.
18376 Reported by Benoit Perrot.
18377
183782002-03-04 Akim Demaille <akim@epita.fr>
18379
18380 Use bitset operations when possible, not loops over bits.
18381
18382 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18383 bitset_or.
18384 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18385 * src/reduce.c (useless_nonterminals): Formatting changes.
18386 * src/warshall.c (TC): Use bitset_or.
18387
183882002-03-04 Akim Demaille <akim@epita.fr>
18389
18390 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18391 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18392 Ditto.
18393
183942002-03-04 Akim Demaille <akim@epita.fr>
18395
18396 * src/lalr.c (F): Now a bitset*.
18397 Adjust all dependencies.
18398
183992002-03-04 Akim Demaille <akim@epita.fr>
18400
18401 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18402 Adjust all dependencies.
18403
184042002-03-04 Akim Demaille <akim@epita.fr>
18405
18406 * src/L0.c, src/LR0.h (nstates): Be size_t.
18407 Adjust comparisons (signed vs unsigned).
18408 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18409 bitset*.
18410 Adjust all dependencies.
18411
184122002-03-04 Akim Demaille <akim@epita.fr>
18413
18414 * src/closure.c (firsts): Now, also a bitset.
18415 Adjust all dependencies.
18416 (varsetsize): Remove, now unused.
18417 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18418
184192002-03-04 Akim Demaille <akim@epita.fr>
18420
18421 * src/print.c: Convert to use bitset.h, not hand coded iterations
18422 over ints.
18423
184242002-03-04 Akim Demaille <akim@epita.fr>
18425
18426 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18427
184282002-03-04 Akim Demaille <akim@epita.fr>
18429
18430 * src/closure.c (ruleset): Be a bitset.
18431 (rulesetsize): Remove.
18432
184332002-03-04 Akim Demaille <akim@epita.fr>
18434
18435 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18436 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18437 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18438 * src/closure.c (fderives): Be an array of bitsets.
18439
184402002-02-28 Robert Anisko <robert@lrde.epita.fr>
18441
18442 * data/bison.c++: Merge the two generated headers. Insert a copyright
18443 notice in each output file.
18444
184452002-02-28 Akim Demaille <akim@epita.fr>
18446
18447 * data/bison.c++: Copy the prologue of bison.simple to fetch
18448 useful M4 definitions, such as b4_header_guard.
18449
184502002-02-25 Akim Demaille <akim@epita.fr>
18451
18452 * src/getargs.c (version): Give the name of the authors, and use a
18453 translator friendly scheme for the bgr
18454 copyright notice.
18455
184562002-02-25 Akim Demaille <akim@epita.fr>
18457
18458 * src/output.c (header_output): Remove, now handled completely via
18459 M4.
18460
184612002-02-25 Akim Demaille <akim@epita.fr>
18462
18463 * m4/m4.m4: New, from CVS Autoconf.
18464 * configure.in: Invoke it.
18465 * src/output.c (output_skeleton): Use its result instead of the
18466 hard coded name.
18467
184682002-02-25 Akim Demaille <akim@epita.fr>
18469
18470 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18471 Fileutils 4.1.5.
18472 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18473 * src/output.c (output_skeleton): Use mkstemp to create a real
18474 temporary file.
18475 Move the filling of `skeleton' and its muscle to...
18476 (prepare): here.
18477 (output): Move the definition of the prologue muscle to...
18478 (prepare): here.
18479 * src/system.h (DEFAULT_TMPDIR): New.
18480
184812002-02-14 Paul Eggert <eggert@twinsun.com>
18482
18483 Remove the support for C++ namespace cleanliness; it was
18484 causing more problems than it was curing, since it didn't work
18485 properly on some nonstandard C++ compilers. This can wait
18486 for a proper C++ parser.
18487
18488 * NEWS: Document this.
18489 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18490 of C++, as it's treated like C now.
18491 * src/bison.simple (YYSTD): Remove.
18492 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18493 Treat C++ just like Standard C instead of trying to support
18494 namespace cleanliness.
18495
184962002-02-14 Akim Demaille <akim@epita.fr>
18497
18498 * tests/regression.at (else): Adjust to Andreas' change.
18499
185002002-02-14 Akim Demaille <akim@epita.fr>
18501
18502 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18503
185042002-02-13 Andreas Schwab <schwab@suse.de>
18505
18506 * src/output.c (output_rule_data): Don't output NULL, it might
18507 not be defined yet.
18508
185092002-02-11 Robert Anisko <robert@lrde.epita.fr>
18510
18511 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18512 (Copyright notice): Update.
18513
185142002-02-11 Akim Demaille <akim@epita.fr>
18515
18516 * tests/regression.at (%nonassoc and eof): Don't include
18517 nonportable headers.
18518
185192002-02-08 Robert Anisko <robert@lrde.epita.fr>
18520
18521 * data/bison.c++: Correct error recovery. Make the user able to
18522 initialize the starting location.
18523
185242002-02-07 Akim Demaille <akim@epita.fr>
18525
18526 * tests/input.at: New.
18527
185282002-02-07 Robert Anisko <robert@lrde.epita.fr>
18529
18530 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18531 more consistent when naming methods and variables. Put preprocessor
18532 directives around tables only needed for debugging.
18533
185342002-02-07 Robert Anisko <robert@lrde.epita.fr>
18535
18536 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18537 C++ parsers.
18538 (yy::b4_name::parse): Use print_.
18539
185402002-02-07 Robert Anisko <robert@lrde.epita.fr>
18541
18542 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18543
185442002-02-07 Robert Anisko <robert@lrde.epita.fr>
18545
18546 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18547 C++ parsers.
18548 (yy::b4_name::parse): Build verbose error messages, and use error_.
18549
185502002-02-06 Robert Anisko <robert@lrde.epita.fr>
18551
18552 * data/bison.c++: Fix m4 quoting in comments.
18553
185542002-02-06 Robert Anisko <robert@lrde.epita.fr>
18555
18556 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18557 not expanded by m4.
18558
185592002-02-05 Akim Demaille <akim@epita.fr>
18560
18561 * data/bison.c++: Adjust to the M4 back end.
18562 More is certainly needed.
18563
185642002-02-05 Akim Demaille <akim@epita.fr>
18565
18566 Give a try to M4 as a back end.
18567
18568 * lib/readpipe.c: New, from wdiff.
18569 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18570 BISON_HAIRY.
18571 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18572 specific values. Now it is m4 that performs the lookup.
18573 * src/parse-skel.y: Remove.
18574 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18575 * src/output.c (actions_output, guards_output)
18576 (token_definitions_output): No longer keeps track of the output
18577 line number, hence remove the second argument.
18578 (guards_output): Check against the guard member of a rule, not the
18579 action member.
18580 Adjust callers.
18581 (output_skeleton): Don't look for the skeleton location, let m4 do
18582 that.
18583 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18584 file will be used.
18585 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18586 (prepare): Given that for the time being changesyntax is not
18587 usable in M4, rename the muscles using `-' to `_'.
18588 Define `defines_flag', `output_parser_name' and `output_header_name'.
18589 * src/output.h (actions_output, guards_output)
18590 (token_definitions_output): Adjust prototypes.
18591 * src/scan-skel.l: Instead of scanning the skeletons, it now
18592 processes the output of m4: `__oline__' and `#output'.
18593 * data/bison.simple: Adjust to be used by M4(sugar).
18594 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18595 to date.
18596 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18597 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18598 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18599 shamelessly stolen from CVS Autoconf.
18600
186012002-02-05 Akim Demaille <akim@epita.fr>
18602
18603 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18604 * configure.in: Check for the declarations of free and malloc.
18605 * src/muscle_tab.c: Adjust.
18606
186072002-02-05 Akim Demaille <akim@epita.fr>
18608
18609 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18610 which have no values.
18611
186122002-02-05 Akim Demaille <akim@epita.fr>
18613
18614 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18615 * data/: here.
18616
186172002-01-29 Paul Eggert <eggert@twinsun.com>
18618
18619 * src/bison.simple (YYSIZE_T): Do not define merely because
18620 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18621 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18622
186232002-01-27 Akim Demaille <akim@epita.fr>
18624
18625 Fix `%nonassoc and eof'.
18626
18627 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18628 which were not properly copied! Replace
18629 memcpy (res->errs, src->errs, src->nerrs);
18630 with
18631 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18632 !!!
18633 * tests/regression.at (%nonassoc and eof): Adjust to newest
18634 Autotest: `.' is not in the PATH.
18635
186362002-01-27 Akim Demaille <akim@epita.fr>
18637
18638 * tests/sets.at (AT_EXTRACT_SETS): New.
18639 (Nullable): Use it.
18640 (Firsts): New.
18641
186422002-01-26 Akim Demaille <akim@epita.fr>
18643
18644 * tests/actions.at, tests/calc.at, tests/headers.at,
18645 * tests/torture.at: Adjust to the newest Autotest which no longer
18646 forces `.' in the PATH.
18647
186482002-01-25 Akim Demaille <akim@epita.fr>
18649
18650 * tests/regression.at (%nonassoc and eof): New.
18651 Suggested by Robert Anisko.
18652
186532002-01-24 Akim Demaille <akim@epita.fr>
18654
18655 Bison dumps core when trying to complain about broken input files.
18656 Reported by Cris van Pelt.
18657
18658 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18659 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18660 into...
18661 (Invalid inputs): Strengthen: exercise parse_percent_token.
18662
186632002-01-24 Robert Anisko <robert.anisko@epita.fr>
18664
18665 * src/Makefile.am: Add bison.c++.
18666 * src/bison.c++: New skeleton.
18667
186682002-01-21 Paolo Bonzini <bonzini@gnu.org>
18669
18670 * po/it.po: New.
18671
186722002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18673
18674 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18675
186762002-01-20 Marc Autret <marc@gnu.org>
18677
18678 * src/files.c (compute_output_file_names): Fix
18679
186802002-01-20 Marc Autret <marc@gnu.org>
18681
18682 * tests/output.at: New test.
18683 * src/files.c (compute_base_names): Don't map extensions when
18684 the YACC flag is set, use defaults.
18685 Reported by Evgeny Stambulchik.
18686
186872002-01-20 Marc Autret <marc@gnu.org>
18688
18689 * src/system.h: Need to define __attribute__ away for non-GCC
18690 compilers as well (i.e., the vendor C compiler).
18691 Suggested by Albert Chin-A-Young.
18692
186932002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18694
18695 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18696 canonical definition.
18697 * src/system.h: Use the canonical definition for PARAMS (avoids
18698 a conflict with the macro from lib/hash.h).
18699
187002002-01-11 Akim Demaille <akim@epita.fr>
18701
18702 * configure.in: Use AC_FUNC_STRNLEN.
18703 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18704
187052002-01-09 Akim Demaille <akim@epita.fr>
18706
18707 * src/files.c, src/files.h (output_infix): New.
18708 (tab_extension): Remove.
18709 (compute_base_names): Compute the former, drop the latter.
18710 * src/output.c (prepare): Insert the muscles `output-infix', and
18711 `output-suffix'.
18712 * src/parse-skel.y (string, string.1): New.
18713 (section.header): Use it.
18714 (section.yacc): Remove.
18715 (prefix): Remove too.
18716 * src/scan-skel.l: Adjust.
18717 * src/bison.simple, src/bison.hairy: Adjust.
18718
187192002-01-09 Akim Demaille <akim@epita.fr>
18720
18721 * configure.in (WERROR_CFLAGS): Compute it.
18722 * src/Makefile.am (CFLAGS): Pass it.
18723 * tests/atlocal.in (CFLAGS): Idem.
18724 * src/files.c: Fix a few warnings.
18725 (get_extension_index): Remove, unused.
18726
187272002-01-08 Akim Demaille <akim@epita.fr>
18728
18729 * src/getargs.c (AS_FILE_NAME): New.
18730 (getargs): Use it to convert DOSish file names.
18731 * src/files.c (base_name): Rename as full_base_name to avoid
18732 clashes with `base_name ()'.
18733 (filename_split): New.
18734 (compute_base_names): N-th rewrite, using filename_split.
18735
187362002-01-08 Akim Demaille <akim@epita.fr>
18737
18738 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18739 New, stolen from the Fileutils 4.1.
18740 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18741 * configure.in: Check for the presence of memrchr, and of its
18742 prototype.
18743
187442002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18745
18746 * lib/hash.h (__P): Added definition for this macro.
18747 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18748 BUILT_SOURCES, to ensure they are generated first.
18749 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18750 %error-verbose to allow bootstrapping with bison 1.30x.
18751
187522002-01-06 Akim Demaille <akim@epita.fr>
18753
18754 * src/reader.c (parse_braces): Don't fetch the next char, the
18755 convention is to fetch on entry.
18756 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18757 'switch' without a following semicolon.
18758 * tests/regression.at (braces parsing): New.
18759
187602002-01-06 Akim Demaille <akim@epita.fr>
18761
18762 Bison is dead wrong in its RR conflict reports.
18763
18764 * tests/torture.at (GNU Cim Grammar): New.
18765 * src/conflicts.c (count_rr_conflicts): Fix.
18766
187672002-01-06 Akim Demaille <akim@epita.fr>
18768
18769 Creating package.m4 from configure.ac causes too many problems.
18770
18771 * tests/Makefile.am (package.m4): Create it by hand,
18772 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18773
187742002-01-06 Akim Demaille <akim@epita.fr>
18775
18776 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18777 skeleton.h.
18778
187792002-01-04 Paul Eggert <eggert@twinsun.com>
18780
18781 * doc/bison.texinfo (Debugging):
18782 Remove YYSTDERR; it's no longer defined or used.
18783 Also, s/cstdio.h/cstdio/.
18784
187852002-01-03 Akim Demaille <akim@epita.fr>
18786
18787 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18788
187892002-01-03 Akim Demaille <akim@epita.fr>
18790
18791 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18792 tracing code to --trace, wait for a better --trace option, with
18793 args.
18794
187952002-01-03 Akim Demaille <akim@epita.fr>
18796
18797 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18798 The ISO C++ standard is extremely clear about it: stderr is
18799 considered a macro, not a regular symbol (see table 94 `Header
18800 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18801 Therefore std:: does not apply to it. It still does with fprintf.
18802 Also, s/cstdio.h/cstdio/.
18803
188042002-01-03 Akim Demaille <akim@epita.fr>
18805
18806 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18807 for non system headers.
18808
188092002-01-02 Akim Demaille <akim@epita.fr>
18810
18811 Equip the skeleton chain with location tracking, runtime trace,
18812 pure parser and scanner.
18813
18814 * src/parse-skel.y: Request a pure parser, locations, and prefix
18815 renaming.
18816 (%union): Having several members with the same type does not help
18817 type mismatches, simplify.
18818 (YYPRINT, yyprint): New.
18819 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18820 (skel_error): this.
18821 Handle locations.
18822 * src/scan-skel.l: Adjust to these changes.
18823 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18824 (LOCATION_PRINT, skel_control_t): New.
18825
188262001-12-30 Akim Demaille <akim@epita.fr>
18827
18828 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18829 replace `gb' with BLANKS.
18830 * src/scan-skel.l: Adjust.
18831
188322001-12-30 Akim Demaille <akim@epita.fr>
18833
18834 * src/system.h: We don't need nor want bcopy.
18835 Throw away MS-DOS crap: we don't need getpid.
18836 * configure.in: We don't need strndup. It was even causing
18837 problems: because Flex includes the headers *before* us,
18838 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18839 not visible.
18840 * lib/xstrndup.c: New.
18841 * src/scan-skel.l: Use it.
18842 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18843 * src/parse-skel.y: Use %directives instead of #defines.
18844
188452001-12-30 Akim Demaille <akim@epita.fr>
18846
18847 * src/skeleton.h: New.
18848 * src/output.c (output_parser, output_master_parser): Remove, dead
18849 code.
18850 * src/output.h (get_lines_number, actions_output, guards_output)
18851 (token_definitions_output): Prototype them.
18852 * src/parse-skel.y: Add the license notice.
18853 Include output.h and skeleton.h.
18854 (process_skeleton): Returns void, and takes a single parameter.
18855 * src/scan-skel.l: Add the license notice.
18856 Include skeleton.h.
18857 Don't use %option yylineno: it seems that then Flex imagines
18858 REJECT has been used, and therefore it won't reallocate its
18859 buffers (which makes no other sense to me than a bug). It results
18860 in warnings for `unused: yy_flex_realloc'.
18861
188622001-12-30 Robert Anisko <robert.anisko@epita.fr>
18863
18864 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18865 (MUSCLE_INSERT_PREFIX): ...to there.
18866 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18867 (MUSCLE_INSERT_PREFIX): Move from here...
18868
18869 * src/bison.hairy: Add a section directive. Put braces around muscle
18870 names. This parser skeleton is still broken, but Bison should not
18871 choke on a bad muscle 'syntax'.
18872 * src/bison.simple: Add a section directive. Put braces around muscle
18873 names.
18874
18875 * src/files.h (strsuffix, stringappend): Add declarations.
18876 (tab_extension): Add declaration.
18877 (short_base_name): Add declaration.
18878
18879 * src/files.c (strsuffix, stringappend): No longer static. These
18880 functions are used in the skeleton parser.
18881 (tab_extension): New.
18882 (compute_base_names): Use the computations done in this function
18883 to guess if the generated parsers should have '.tab' in their
18884 names.
18885 (short_base_name): No longer static.
18886
18887 * src/output.c (output_skeleton): New.
18888 (output): Disable call to output_master_parser, and give a try to
18889 a new skeleton handling system.
18890 (guards_output, actions_output): No longer static.
18891 (token_definitions_output, get_lines_number): No longer static.
18892
18893 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18894
18895 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18896 parse-skel.y.
18897
18898 * src/parse-skel.y: New file.
18899 * src/scan-skel.l: New file.
18900
189012001-12-29 Akim Demaille <akim@epita.fr>
18902
18903 %name-prefix is broken.
18904
18905 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18906 Adjust all dependencies.
18907 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18908 %name-prefix.
18909
18910 Renaming yylval but not yylloc is not consistent. Now we do.
18911
18912 * src/bison.simple: Prefix yylloc if used.
18913 * doc/bison.texinfo (Decl Summary): Document that.
18914
189152001-12-29 Akim Demaille <akim@epita.fr>
18916
18917 * doc/bison.texinfo: Promote `%long-directive' over
18918 `%long_directive'.
18919 Remove all references to fixed-output-files, yacc is enough.
18920
189212001-12-29 Akim Demaille <akim@epita.fr>
18922
18923 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18924 user prologue. These are defaults.
18925 * tests/actions.at (Mid-rule actions): Make sure the user can
18926 define YYDEBUG and YYERROR_VERBOSE.
18927
189282001-12-29 Akim Demaille <akim@epita.fr>
18929
18930 * src/output.c (header_output): Don't forget to export YYLTYPE and
18931 yylloc.
18932 * tests/headers.at (export YYLTYPE): New, make sure it does.
18933 * tests/regression.at (%union and --defines, Invalid CPP headers):
18934 Move to...
18935 * tests/headers.at: here.
18936
189372001-12-29 Akim Demaille <akim@epita.fr>
18938
18939 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18940
189412001-12-29 Akim Demaille <akim@epita.fr>
18942
18943 * tests/actions.at (Mid-rule actions): Output on a single line
18944 instead of several.
18945
189462001-12-29 Akim Demaille <akim@epita.fr>
18947
18948 * doc/bison.texinfo: Formatting changes.
18949
189502001-12-29 Akim Demaille <akim@epita.fr>
18951
18952 Don't store the token defs in a muscle, just be ready to output it
18953 on command. Now possible via `symbols'. Fixes a memory leak.
18954
18955 * src/output.c (token_definitions_output): New.
18956 (output_parser, header_output): Use it.
18957 * src/reader.c (symbols_save): Remove.
18958
189592001-12-29 Akim Demaille <akim@epita.fr>
18960
18961 * src/bison.simple: Do not provide a default for YYSTYPE and
18962 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18963 default.
18964
189652001-12-29 Akim Demaille <akim@epita.fr>
18966
18967 Mid-rule actions are simply... ignored!
18968
18969 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18970 the empty-rule associated to the dummy symbol, not to the host
18971 rule.
18972 * tests/actions.at (Mid-rule actions): New.
18973
189742001-12-29 Akim Demaille <akim@epita.fr>
18975
18976 Memory leak.
18977
18978 * src/reader.c (reader): Free grammar.
18979
189802001-12-29 Akim Demaille <akim@epita.fr>
18981
18982 Memory leak.
18983
18984 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18985 since it allocates it for each state, although only one is needed.
18986 (allocate_storage): Do it here.
18987
189882001-12-29 Akim Demaille <akim@epita.fr>
18989
18990 * src/options.h, src/options.c (create_long_option_table): Rename
18991 as...
18992 (long_option_table_new): this, with a clearer prototype.
18993 (percent_table): Remove, unused,
18994 * src/getargs.c (getargs): Adjust.
18995
189962001-12-29 Akim Demaille <akim@epita.fr>
18997
18998 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18999 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19000 as states.
19001
190022001-12-29 Akim Demaille <akim@epita.fr>
19003
19004 * src/lalr.c (build_relations): Rename `states' as `states1'.
19005 Sorry, I don't understand exactly what it is, no better name...
19006
190072001-12-29 Akim Demaille <akim@epita.fr>
19008
19009 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19010 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19011 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19012 as rules.
19013
190142001-12-29 Akim Demaille <akim@epita.fr>
19015
19016 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19017 ago.
19018
190192001-12-29 Akim Demaille <akim@epita.fr>
19020
19021 * src/reader.c, src/reader.h (user_toknums): Remove.
19022 Adjust all users to use symbols[i]->user_token_number.
19023
190242001-12-29 Akim Demaille <akim@epita.fr>
19025
19026 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19027 Adjust all users to use symbols[i]->prec or ->assoc.
19028
190292001-12-29 Akim Demaille <akim@epita.fr>
19030
19031 * src/reader.c, src/reader.h (tags): Remove.
19032 Adjust all users to use symbols[i]->tag.
19033
190342001-12-29 Akim Demaille <akim@epita.fr>
19035
19036 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19037 and rule_table.
19038 * src/reader.c (packsymbols): Fill this table.
19039 Drop sprec.
19040 * src/conflicts.c (resolve_sr_conflict): Adjust.
19041 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19042 single table.
19043 Use symbols[i]->tag instead of tags[i].
19044
190452001-12-29 Akim Demaille <akim@epita.fr>
19046
19047 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19048 In addition, put a comment in there, to replace...
19049 * tests/regression.at (%union and C comments): Remove.
19050
190512001-12-29 Akim Demaille <akim@epita.fr>
19052
19053 * tests/regression.at (Web2c Actions): Blindly move the actual
19054 output as expected output. The contents *seem* right to me, but I
19055 can't pretend reading perfectly parser tables... Nonetheless, all
19056 the other tests pass correctly, the table look OK, even though the
19057 presence of `$axiom' is to be noted: AFAICS it is useless (but
19058 harmless).
19059
190602001-12-29 Akim Demaille <akim@epita.fr>
19061
19062 * src/reader.c (readgram): Don't add the rule 0 if there were no
19063 rules read. In other words, add it _after_ having performed
19064 grammar sanity checks.
19065 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19066
190672001-12-29 Akim Demaille <akim@epita.fr>
19068
19069 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19070 visible, and some states have now a different number.
19071
190722001-12-29 Akim Demaille <akim@epita.fr>
19073
19074 * src/reader.c (readgram): Bind the initial rule's lineno to that
19075 of the first rule.
19076 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19077 (Solved SR Conflicts): Adjust rule 0's line number.
19078
190792001-12-29 Akim Demaille <akim@epita.fr>
19080
19081 Fix the `GAWK Grammar' failure.
19082
19083 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19084 the reductions of the first state which was mistakenly confused
19085 with the final state because precisely final_state was initialized
19086 to 0.
19087 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19088 now noticed by Bison.
19089 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19090 have a reduction on $default.
19091
190922001-12-29 Akim Demaille <akim@epita.fr>
19093
19094 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19095 rule line numbers.
19096 * src/closure.c (print_closure): Likewise.
19097 * src/derives.c (print_derives): Likewise.
19098 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19099 now.
19100
191012001-12-29 Akim Demaille <akim@epita.fr>
19102
19103 * src/lalr.c (lookaheads_print): New.
19104 (lalr): Call it when --trace-flag.
19105 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19106 are dumped.
19107
191082001-12-29 Akim Demaille <akim@epita.fr>
19109
19110 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19111 when walking through ritem, even via rule->rhs.
19112 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19113 (useful_production, useless_nonterminals): Likewise.
19114 (reduce_grammar_tables): Likewise, plus update nritems.
19115 * src/nullable.c (set_nullable): Likewise.
19116 * src/lalr.c (build_relations): Likewise.
19117 * tests/sets.at (Nullable): Adjust.
19118 Fortunately, now, the $axiom is no longer nullable.
19119
191202001-12-29 Akim Demaille <akim@epita.fr>
19121
19122 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19123 the 0-sentinel.
19124 * src/gram.c (ritem_longest_rhs): Likewise.
19125 * src/reduce.c (nonterminals_reduce): Likewise.
19126 * src/print_graph.c (print_graph): Likewise.
19127 * src/output.c (output_rule_data): Likewise.
19128 * src/nullable.c (set_nullable): Likewise.
19129
191302001-12-29 Akim Demaille <akim@epita.fr>
19131
19132 * src/output.c: Comment changes.
19133
191342001-12-27 Paul Eggert <eggert@twinsun.com>
19135
19136 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19137 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19138 Sparc, as they were causing more porting problems than the
19139 (minor) performance improvement was worth.
19140
19141 Also, catch up with 1.31's YYSTD.
19142
191432001-12-27 Akim Demaille <akim@epita.fr>
19144
19145 * src/output.c (output_gram): Rely on nritems, not the
19146 0-sentinel. See below.
19147 Use -1 as separator, not 0.
19148 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19149 Rely on -1 as separator in yyrhs, instead of 0.
19150 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19151 twice `Now at end of input', therefore there are two lines less to
19152 expect.
19153
191542001-12-27 Akim Demaille <akim@epita.fr>
19155
19156 * tests/regression.at (Unresolved SR Conflicts):
19157 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19158 below.
19159
191602001-12-27 Akim Demaille <akim@epita.fr>
19161
19162 * src/LR0.c (new_state): Recognize the final state by the fact it
19163 is reached by eoftoken.
19164 (insert_start_shifting_state, insert_eof_shifting_state)
19165 (insert_accepting_state, augment_automaton): Remove, since now
19166 these states are automatically computed from the initial state.
19167 (generate_states): Adjust.
19168 * src/print.c: When reporting a rule number to the user, substract
19169 1, so that the axiom rule is rule 0, and the first user rule is 1.
19170 * src/reduce.c: Likewise.
19171 * src/print_graph.c (print_core): For the time being, just as for
19172 the report, depend upon --trace-flags to dump the full set of
19173 items.
19174 * src/reader.c (readgram): Once the grammar read, insert the rule
19175 0: `$axiom: START-SYMBOL $'.
19176 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19177 number of the states has changed (the final state is no longer
19178 necessarily the last), catch up.
19179
191802001-12-27 Akim Demaille <akim@epita.fr>
19181
19182 Try to make the use of the eoftoken valid. Given that its value
19183 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19184 is used instead of > 0 where appropriate, (ii), depend upon nritems
19185 instead of the 0-sentinel.
19186
19187 * src/gram.h, src/gram.c (nritems): New.
19188 Expected to be duplication of nitems, but for the time being...
19189 * src/reader.c (packgram): Assert nritems and nitems are equal.
19190 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19191 * src/closure.c (print_closure, print_fderives): Likewise.
19192 * src/gram.c (ritem_print): Likewise.
19193 * src/print.c (print_core, print_grammar): Likewise.
19194 * src/print_graph.c: Likewise.
19195
191962001-12-27 Akim Demaille <akim@epita.fr>
19197
19198 * src/main.c (main): If there are complains after grammar
19199 reductions, then output the report anyway if requested, then die.
19200 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19201 * src/reader.c (eoftoken): New.
19202 (parse_token_decl): If the token being defined has value `0', it
19203 is the eoftoken.
19204 (packsymbols): No longer hack `tags' to insert `$' by hand.
19205 Be sure to preserve the value of the eoftoken.
19206 (reader): Make sure eoftoken is defined.
19207 Initialize nsyms to 0: now eoftoken is created just like the others.
19208 * src/print.c (print_grammar): Don't special case the eof token.
19209 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19210 lie anyway, albeit pleasant.
19211 * tests/calc.at: Exercise error messages with eoftoken.
19212 Change the grammar so that empty input is invalid.
19213 Adjust expectations.
19214 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19215
192162001-12-27 Akim Demaille <akim@epita.fr>
19217
19218 * configure.in: Check the protos of strchr ans strspn.
19219 Replace strchr if needed.
19220 * src/system.h: Provide the protos of strchr, strspn and memchr if
19221 missing.
19222 * lib/strchr.c: New.
19223 * src/reader.c (symbols_save): Use strchr.
19224
192252001-12-27 Akim Demaille <akim@epita.fr>
19226
19227 * src/print.c, src/print_graph.c (escape): New.
19228 Use it to quote the TAGS outputs.
19229 * src/print_graph.c (print_state): Now errors are in red, and
19230 reductions in green.
19231 Prefer high to wide: output the state number on a line of its own.
19232
192332001-12-27 Akim Demaille <akim@epita.fr>
19234
19235 * src/state.h, src/state.c (reductions_new): New.
19236 * src/LR0.c (set_state_table): Let all the states have a
19237 `reductions', even if reduced to 0.
19238 (save_reductions): Adjust.
19239 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19240 * src/print.c (print_reductions, print_actions): Adjust.
19241 * src/output.c (action_row): Adjust.
19242
192432001-12-27 Akim Demaille <akim@epita.fr>
19244
19245 * src/state.h, src/state.c (errs_new, errs_dup): New.
19246 * src/LR0.c (set_state_table): Let all the states have an errs,
19247 even if reduced to 0.
19248 * src/print.c (print_errs, print_reductions): Adjust.
19249 * src/output.c (output_actions, action_row): Adjust.
19250 * src/conflicts.c (resolve_sr_conflict): Adjust.
19251
192522001-12-27 Akim Demaille <akim@epita.fr>
19253
19254 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19255
192562001-12-27 Akim Demaille <akim@epita.fr>
19257
19258 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19259 * src/print.c: here.
19260 (lookaheadset, shiftset): New, used as additional storage by
19261 print_reductions.
19262 (print_results): Adjust.
19263 (print_shifts, print_gotos, print_errs): New, extracted from...
19264 (print_actions): here.
19265 * src/print_graph.c (print_actions): Remove dead code.
19266
192672001-12-27 Akim Demaille <akim@epita.fr>
19268
19269 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19270 `$n' and `@n'.
19271
192722001-12-27 Akim Demaille <akim@epita.fr>
19273
19274 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19275 (build_relations): Adjust.
19276
192772001-12-27 Akim Demaille <akim@epita.fr>
19278
19279 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19280 duplication.
19281
192822001-12-27 Akim Demaille <akim@epita.fr>
19283
19284 * src/reader.c (packgram): Catch nitems overflows.
19285
192862001-12-27 Akim Demaille <akim@epita.fr>
19287
19288 * src/files.c, src/files.h (guard_obstack): Remove.
19289 * src/output.c (output): Adjust.
19290 * src/reader.c (parse_braces): New, factoring...
19291 (copy_action, copy_guard): these two which are renamed as...
19292 (parse_action, parse_guard): these.
19293 As a voluntary consequence, using braces around guards is now
19294 mandatory.
19295
192962001-12-27 Akim Demaille <akim@epita.fr>
19297
19298 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19299 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19300 members.
19301 (symbol_list_new): Adjust.
19302 (copy_action): action_line is the first line, not the last.
19303 (copy_guard): Just as for actions, store the `action' only, not
19304 the switch/case/break flesh.
19305 Don't parse the user action that might follow the guard, let...
19306 (readgram): do it, i.e., now, there can be an action after a
19307 guard.
19308 In other words the guard is just explicitly optional.
19309 (packgram): Adjust.
19310 * src/output.c (guards_output): New.
19311 (output_parser): Call it when needed.
19312 (output): Also free the guard and attrs obstacks.
19313 * src/files.c, src/files.h (obstack_save): Remove.
19314 (output_files): Remove.
19315 As a result, if one needs the former `.act' file, using an
19316 appropriate skeleton which requires actions and guards is now
19317 required.
19318 * src/main.c (main): Adjust.
19319 * tests/semantic.at: New.
19320 * tests/regression.at: Use `input.y' as input file name.
19321 Avoid 8+3 problems by requiring input.c when the test needs the
19322 parser.
19323
193242001-12-27 Akim Demaille <akim@epita.fr>
19325
19326 * src/reader.c (symbol_list_new): Be sure to initialize all the
19327 fields.
19328
193292001-12-27 Akim Demaille <akim@epita.fr>
19330
19331 All the hacks using a final pseudo state are now useless.
19332
19333 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19334 * src/lalr.c (nLA): New.
19335 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19336 instead of lookaheadsp from the pseudo state (nstate + 1).
19337
193382001-12-27 Akim Demaille <akim@epita.fr>
19339
19340 * src/output.c (action_row, token_actions): Use a state_t instead
19341 of a integer, and nlookaheads instead of the following state's
19342 lookaheadsp.
19343
193442001-12-27 Akim Demaille <akim@epita.fr>
19345
19346 * src/conflicts.c (log_resolution, flush_shift)
19347 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19348 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19349 (conflicts_print, print_reductions): Use a state_t instead of an
19350 integer when referring to a state.
19351 As much as possible, depend upon nlookaheads, instead of the
19352 `lookaheadsp' member of the following state (since lookaheads of
19353 successive states are successive, the difference between state n + 1
19354 and n served as the number of lookaheads for state n).
19355 * src/lalr.c (add_lookback_edge): Likewise.
19356 * src/print.c (print_core, print_actions, print_state)
19357 (print_results): Likewise.
19358 * src/print_graph.c (print_core, print_actions, print_state)
19359 (print_graph): Likewise.
19360 * src/conflicts.h: Adjust.
19361
193622001-12-27 Akim Demaille <akim@epita.fr>
19363
19364 * src/bison.hairy: Formatting/comment changes.
19365 ANSIfy.
19366 Remove `register' indications.
19367 Add plenty of `static'.
19368
193692001-12-27 Akim Demaille <akim@epita.fr>
19370
19371 * src/output.c (prepare): Drop the muscle `ntbase' which
19372 duplicates ntokens.
19373 * src/bison.simple: Formatting/comment changes.
19374 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19375 is an undocumented synonym.
19376
193772001-12-22 Akim Demaille <akim@epita.fr>
19378
19379 * src/output.c (output_table_data): Change the prototype to use
19380 `int' for array ranges: some invocations do pass an int, not a
19381 short.
19382 Reported by Wayne Green.
19383
193842001-12-22 Akim Demaille <akim@epita.fr>
19385
19386 Some actions of web2c.y are improperly triggered.
19387 Reported by Mike Castle.
19388
19389 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19390 * tests/regression.at (Web2c): Rename as...
19391 (Web2c Report): this.
19392 (Web2c Actions): New.
19393
193942001-12-22 Akim Demaille <akim@epita.fr>
19395
19396 Reductions in web2c.y are improperly reported.
19397 Reported by Mike Castle.
19398
19399 * src/conflicts.c (print_reductions): Fix.
19400 * tests/regression.at (Web2c): New.
19401
194022001-12-18 Akim Demaille <akim@epita.fr>
19403
19404 Some host fail on `assert (!"foo")', which expands to
19405 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19406 Reported by Nelson Beebee.
19407
19408 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19409 `#define it_succeeded 0' and `assert (it_succeeded)'.
19410
194112001-12-17 Marc Autret <autret_m@epita.fr>
19412
19413 * src/bison.simple: Don't hard code the skeleton line and filename.
19414 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19415 New line counter 'skeleton_line' (skeleton-line muscle).
19416
194172001-12-17 Paul Eggert <eggert@twinsun.com>
19418
19419 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19420 YYDEBUG must be defined to a nonzero value.
19421
19422 * src/bison.simple (yytname): Do not assume that the user defines
19423 YYDEBUG to a properly parenthesized expression.
19424
194252001-12-17 Akim Demaille <akim@epita.fr>
19426
19427 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19428 nlookaheads is a new member.
19429 Adjust all users.
19430 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19431 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19432 state.
19433
194342001-12-17 Akim Demaille <akim@epita.fr>
19435
19436 * src/files.h, src/files.c (open_files, close_files): Remove.
19437 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19438 let...
19439 * src/reader.c (reader): Do it.
19440
194412001-12-17 Akim Demaille <akim@epita.fr>
19442
19443 * src/conflicts.c (print_reductions): Formatting changes.
19444
194452001-12-17 Akim Demaille <akim@epita.fr>
19446
19447 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19448 (flush_reduce): New.
19449 (resolve_sr_conflict): Adjust.
19450
194512001-12-17 Akim Demaille <akim@epita.fr>
19452
19453 * src/output.c (output_obstack): Be static and rename as...
19454 (format_obstack): this, to avoid any confusion with files.c's
19455 output_obstack.
19456 * src/reader.h (muscle_obstack): Move to...
19457 * src/output.h: here, since it's defined in output.c.
19458
194592001-12-17 Akim Demaille <akim@epita.fr>
19460
19461 * src/output.c (action_row, save_column, default_goto)
19462 (sort_actions, matching_state, pack_vector): Better variable
19463 locality.
19464
194652001-12-17 Akim Demaille <akim@epita.fr>
19466
19467 * src/output.c: Various formatting changes.
19468
194692001-12-17 Akim Demaille <akim@epita.fr>
19470
19471 * src/files.c (output_files): Free the output_obstack.
19472 * src/main.c (main): Call print and print_graph conditionally.
19473 * src/print.c (print): Work unconditionally.
19474 * src/print_graph.c (print_graph): Work unconditionally.
19475 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19476
194772001-12-16 Marc Autret <autret_m@epita.fr>
19478
19479 * src/output.c (actions_output): Fix. When we use %no-lines,
19480 there is one less line per action.
19481
194822001-12-16 Marc Autret <autret_m@epita.fr>
19483
19484 * src/bison.simple: Remove a useless #line directive.
19485 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19486 * src/output.c (get_lines_number): New.
19487 (output_parser): Adjust, now takes care about the lines of a
19488 output muscles.
19489 Fix line numbering.
19490 (actions_output): Computes the number of lines taken by actions.
19491 (output_master_parser): Insert new skeleton which is the name of
19492 the output parser file name.
19493
194942001-12-15 Marc Autret <autret_m@epita.fr>
19495
19496 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19497
194982001-12-15 Marc Autret <autret_m@epita.fr>
19499
19500 * src/output.c (output_gram): Keep track of the hairy one.
19501
195022001-12-15 Akim Demaille <akim@epita.fr>
19503
19504 Make `make distcheck' work.
19505
19506 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19507 system.h which uses libgettext.h.
19508
195092001-12-15 Akim Demaille <akim@epita.fr>
19510
19511 * src/nullable.c (set_nullable): Useless rules must be skipped,
19512 otherwise, since we range over their symbols, we might look at a
19513 nonterminal which no longer ``exists'', i.e., it is not counted in
19514 `nvars', hence we overflow our arrays.
19515
195162001-12-15 Akim Demaille <akim@epita.fr>
19517
19518 The header can also be produced directly, without any obstack!
19519 Yahoo!
19520
19521 * src/files.c, src/files.h (defines_obstack): Remove.
19522 (compute_header_macro): Global.
19523 (defines_obstack_save): Remove.
19524 * src/reader.c (parse_union_decl): No longer output to
19525 defines_obstack: its content can be found in the `stype' muscle
19526 anyway.
19527 (output_token_translations): Merge into...
19528 (symbols_output): this.
19529 Rename as...
19530 (symbols_save): this.
19531 (reader): Adjust.
19532 * src/output.c (header_output): New.
19533 (output): Call it.
19534
195352001-12-15 Akim Demaille <akim@epita.fr>
19536
19537 * src/reader.c (parse_union_decl): Instead of handling two obstack
19538 simultaneously, use one to define the `stype' muscle, and use the
19539 value of the latter to fill defines_obstack.
19540 (copy_comment): Remove.
19541 (copy_comment2): Work for a single obstack.
19542 Rename as...
19543 (copy_comment): this.
19544
195452001-12-15 Akim Demaille <akim@epita.fr>
19546
19547 * src/lex.c, src/lex.h (xgetc): No longer static.
19548 * src/reader.c (parse_union_decl): Revamp.
19549
195502001-12-15 Akim Demaille <akim@epita.fr>
19551
19552 Still making progress in separating Bison into (i) input, (ii)
19553 process, (iii) output: now we can directly output the parser file
19554 without using table_obstack at all.
19555
19556 * src/files.c, src/files.h (table_obstack): Bye bye.
19557 (parser_file_name): New.
19558 * src/files.c (compute_output_file_names): Compute it.
19559 * src/output.c (actions_output, output_parser)
19560 (output_master_parser): To a file instead of an obstack.
19561
195622001-12-15 Akim Demaille <akim@epita.fr>
19563
19564 Attach actions to rules, instead of pre-outputting them to
19565 actions_obstack.
19566
19567 * src/gram.h (rule_t): action and action_line are new members.
19568 * src/reader.c (symbol_list): Likewise.
19569 (copy_action): Save the actions within the rule.
19570 (packgram): Save them in rule_table.
19571 * src/output.c (actions_output): New.
19572 (output_parser): Use it on `%%actions'.
19573 (output_rule_data): Don't free rule_table.
19574 (output): Do it.
19575 (prepare): Don't save the `action' muscle.
19576 * src/bison.simple: s/%%action/%%actions/.
19577
195782001-12-15 Akim Demaille <akim@epita.fr>
19579
19580 * src/reader.c (copy_action): When --yacc, don't append a `;'
19581 to the user action: let it fail if lacking.
19582 Suggested by Arnold Robbins and Tom Tromey.
19583
195842001-12-14 Akim Demaille <akim@epita.fr>
19585
19586 * src/lex.c (literalchar): Simply return the char you decoded, non
19587 longer mess around with obstacks and int pointers.
19588 Adjust all callers.
19589
195902001-12-14 Akim Demaille <akim@epita.fr>
19591
19592 * src/lex.c (literalchar): Don't escape the special characters,
19593 just decode them, and keep them as char (before, eol was output as
19594 the 2 char string `\n' etc.).
19595 * src/output.c (output_rule_data): Use quotearg to output the
19596 token strings.
19597
195982001-12-13 Paul Eggert <eggert@twinsun.com>
19599
19600 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19601 Do not infringe on the global user namespace when using C++.
19602 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19603 All uses of `fprintf' and `stderr' changed.
19604
19605 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19606
196072001-12-13 Akim Demaille <akim@epita.fr>
19608
19609 The computation of nullable is broken: it doesn't handle empty
19610 RHS's properly.
19611
19612 * tests/torture.at (GNU AWK Grammar): New.
19613 * tests/sets.at (Nullable): New.
19614 * src/nullable.c (set_nullable): Instead of blindly looping over
19615 `ritems', loop over the rules, and then over their rhs's.
19616
19617 Work around Autotest bugs.
19618
19619 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19620 frame, because Autotest understand lines starting with a `+' as
19621 traces from the shell. Then, they are not processed properly.
19622 Admittedly an Autotest bug, but we don't have time to wait for
19623 Autotest to catch up.
19624 * tests/regression.at (Broken Closure): Adjust to the new table
19625 frames.
19626 Move to...
19627 * tests/sets.at: here.
19628
196292001-12-13 Akim Demaille <akim@epita.fr>
19630
19631 * src/closure.c (closure): Use nrules instead of playing tricks
19632 with BITS_PER_WORD.
19633
196342001-12-13 Akim Demaille <akim@epita.fr>
19635
19636 * src/print.c (print_actions): Output the handling of `$' as the
19637 traces do: shifting the token EOF. Before EOF was treated as a
19638 nonterminal.
19639 * tests/regression.at: Adjust some tests.
19640 * src/print_graph.c (print_core): Complete the set of items via
19641 closure. The next-to-final and final states are still unsatisfying,
19642 but that's to be addressed elsewhere.
19643 No longer output the rule numbers, but do output the state number.
19644 A single loop for the shifts + gotos is enough, but picked a
19645 distinct color for each.
19646 (print_graph): Initialize and finalize closure.
19647
196482001-12-13 Akim Demaille <akim@epita.fr>
19649
19650 * src/reader.c (readgram): Remove dead code, an strip useless
19651 braces.
19652 (get_type): Remove, unused.
19653
196542001-12-12 Akim Demaille <akim@epita.fr>
19655
19656 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19657 on that of lib/error.c.
19658
196592001-12-12 Akim Demaille <akim@epita.fr>
19660
19661 Some hosts don't like `/' in includes.
19662
19663 * src/system.h: Include libgettext.h without qualifying the path.
19664 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19665 $(top_srcdir).
19666
196672001-12-11 Marc Autret <autret_m@epita.fr>
19668
19669 * src/output.c (output_parser): Remove useless muscle.
19670
196712001-12-11 Marc Autret <autret_m@epita.fr>
19672
19673 * src/bison.simple: Remove #line just before %%epilogue. It
19674 is now handled in ...
19675 * src/reader.c (read_additionnal_code): Add the output of a
19676 #line for the epilogue.
19677
196782001-12-10 Marc Autret <autret_m@epita.fr>
19679
19680 * src/reader.c (copy_definition): Re-use CPP-outed code which
19681 replace precedent remove.
19682 * src/bison.simple: Remove #line before %%prologue because
19683 %%input-line is wrong at this time.
19684
196852001-12-10 Marc Autret <autret_m@epita.fr>
19686
19687 * src/reader.c (symbols_output): Clean up.
19688 * src/output.c (output_gram, output): Clean up.
19689
196902001-12-10 Akim Demaille <akim@epita.fr>
19691
19692 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19693 * src/LR0.c (set_state_table): here.
19694 * src/lalr.c (lalr): Call it.
19695
196962001-12-10 Akim Demaille <akim@epita.fr>
19697
19698 * src/state.h (shifts): Remove the `number' member: shifts are
19699 attached to state, hence no longer need to be labelled with a
19700 state number.
19701
197022001-12-10 Akim Demaille <akim@epita.fr>
19703
19704 Now that states have a complete set of members, the linked list of
19705 shifts is useless: just fill directly the state's shifts member.
19706
19707 * src/state.h (shifts): Remove the `next' member.
19708 * src/LR0.c (first_state, last_state): Remove.
19709 Adjust the callers.
19710 (augment_automaton): Don't look for the shifts that must be added
19711 a shift on EOF: it is those of the state we looked for! But now,
19712 since shifts are attached, it is no longer needed to looking
19713 merely by its id: its number.
19714
197152001-12-10 Akim Demaille <akim@epita.fr>
19716
19717 * src/LR0.c (augment_automaton): Better variable locality.
19718 Remove an impossible branch: if there is a state corresponding to
19719 the start symbol being shifted, then there is shift for the start
19720 symbol from the initial state.
19721
197222001-12-10 Akim Demaille <akim@epita.fr>
19723
19724 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19725 only when appropriate: when insert_start_shifting_state' is not
19726 invoked.
19727 * tests/regression.at (Rule Line Numbers): Adjust.
19728
197292001-12-10 Akim Demaille <akim@epita.fr>
19730
19731 * src/LR0.c (augment_automaton): Now that all states have shifts,
19732 merge the two cases addition shifts to the initial state.
19733
197342001-12-10 Akim Demaille <akim@epita.fr>
19735
19736 * src/lalr.c (set_state_table): Move to...
19737 * src/LR0.c: here.
19738 * src/lalr.c (lalr): Don't call it...
19739 * src/LR0.c (generate_states): do it.
19740 * src/LR0.h (first_state): Remove, only the table is used.
19741
197422001-12-10 Akim Demaille <akim@epita.fr>
19743
19744 * src/LR0.h (first_shift, first_reduction): Remove.
19745 * src/lalr.c: Don't use first_shift: find shifts through the
19746 states.
19747
197482001-12-10 Akim Demaille <akim@epita.fr>
19749
19750 * src/LR0.c: Attach shifts to states as soon as they are
19751 computed.
19752 * src/lalr.c (set_state_table): Instead of assigning shifts to
19753 state, just assert that the mapping was properly done.
19754
197552001-12-10 Akim Demaille <akim@epita.fr>
19756
19757 * src/LR0.c (insert_start_shift): Rename as...
19758 (insert_start_shifting_state): this.
19759 (insert_eof_shifting_state, insert_accepting_state): New.
19760 (augment_automaton): Adjust.
19761 Better locality of the variables.
19762 When looking if the start_symbol is shifted from the initial
19763 state, using `while (... symbol != start_symbol ...)' sounds
19764 better than `while (... symbol < start_symbol ...)': If fail
19765 to see how the order between symbols could be relevant!
19766
197672001-12-10 Akim Demaille <akim@epita.fr>
19768
19769 * src/getargs.h: Don't declare `spec_name_prefix' and
19770 `spec_file_prefix', declared by src/files.h.
19771 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19772 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19773 * src/output.c (prepare): Adjust.
19774 * src/reader.c (symbols_output): Likewise.
19775 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19776
197772001-12-10 Akim Demaille <akim@epita.fr>
19778
19779 * src/muscle_tab.c (muscle_init): NULL is a better default than
19780 `"0"'.
19781
197822001-12-10 Akim Demaille <akim@epita.fr>
19783
19784 * src/reader.c (reader): Calling symbols_output once is enough.
19785
197862001-12-10 Akim Demaille <akim@epita.fr>
19787
19788 Now that states have a complete set of members, the linked list of
19789 reductions is useless: just fill directly the state's reductions
19790 member.
19791
19792 * src/state.h (struct reductions): Remove member `number' and
19793 `next'.
19794 * src/LR0.c (first_reduction, last_reduction): Remove.
19795 (save_reductions): Don't link the new reductions, store them in
19796 this_state.
19797 * src/lalr.c (set_state_table): No need to attach reductions to
19798 states, it's already done.
19799 * src/output.c (output_actions): No longer free the shifts, then
19800 the reductions, then the states: free all the states and their
19801 members.
19802
198032001-12-10 Akim Demaille <akim@epita.fr>
19804
19805 * src/options.c (OPTN, DRTV, BOTH): New.
19806 (option_table): Use them.
19807
19808 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19809 the job of system.h.
19810 * src/options.c: Don't include stdio.h and xalloc.h for the same
19811 reasons.
19812
198132001-12-10 Akim Demaille <akim@epita.fr>
19814
19815 * src/output.c (output, prepare): Make sure the values of the
19816 muscles `action' and `prologue' are 0-terminated.
19817
198182001-12-10 Akim Demaille <akim@epita.fr>
19819
19820 Clean up GCC warnings.
19821
19822 * src/reader.c (copy_action): `buf' is not used.
19823 (parse_skel_decl): Be static.
19824 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19825 * src/options.h (create_long_option_table): Have a real prototype.
19826 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19827 (hash_delete_at): Return const void *.
19828 Adjust casts to preserve the const.
19829
198302001-12-10 Akim Demaille <akim@epita.fr>
19831
19832 * configure.in: Require 2.52g.
19833 M4 is not needed, but AUTOM4TE is.
19834 * m4/m4.m4: Remove.
19835 * tests/Makefile.am: Adjust.
19836
198372001-12-10 Akim Demaille <akim@epita.fr>
19838
19839 One structure for states is enough, even though theoretically
19840 there are LR(0) states and LALR(1) states.
19841
19842 * src/lalr.h (state_t): Remove.
19843 (state_table): Be state_t **, not state_t *.
19844 * src/state.h (core, CORE_ALLOC): Rename as...
19845 (state_t, STATE_ALLOC): this.
19846 Add the LALR(1) members: shifts, reductions, errs.
19847 * src/LR0.c (state_table): Rename as...
19848 (state_hash): this, to avoid name clashes with the global
19849 `state_table'.
19850 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19851 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19852
198532001-12-10 Akim Demaille <akim@epita.fr>
19854
19855 Bison dumps core on bash.y.
19856 Reported by Pascal Bart.
19857
19858 * src/warshall.c (bitmatrix_print): New.
19859 (TC): Use it.
19860 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19861 j must be the outer loop.
19862 * tests/regression.at (Broken Closure): New.
19863
198642001-12-05 Akim Demaille <akim@epita.fr>
19865
19866 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19867 its argument.
19868 Reported by Peter Hamorsky.
19869
198702001-12-05 Akim Demaille <akim@epita.fr>
19871
19872 * src/conflicts.c (err_table): Remove.
19873 (resolve_sr_conflict): Adjust.
19874 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19875 Rename as...
19876 (state_t.reductions, state_t.shifts): this.
19877
198782001-12-05 Akim Demaille <akim@epita.fr>
19879
19880 * src/reduce.c (reduce_grammar_tables): No longer disable the
19881 removal of useless rules via CPP but via `if (0)', so that the
19882 compiler still check the code is valid.
19883 For instance, it should have noticed `rline' no longer exists: use
19884 the `line' member of rule_t.
19885 * src/gram.c (dummy, rline): Remove, unused.
19886
198872001-12-05 Akim Demaille <akim@epita.fr>
19888
19889 * src/output.c (pack_vector): Use assert, not berror.
19890 * src/main.c (berror): Remove, unused.
19891
198922001-12-05 Akim Demaille <akim@epita.fr>
19893
19894 New experimental feature: if --verbose --trace output all the
19895 items of a state, not only its kernel.
19896
19897 * src/print.c (print_core): If `trace_flag', then invoke closure
19898 before outputting the items of the state (print_core is no longer
19899 a correct name them).
19900 (print_results): Invoke new_closure/free_closure if needed.
19901
199022001-12-05 Akim Demaille <akim@epita.fr>
19903
19904 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19905 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19906 (nitemset): for consistency with the rest of the project.
19907
199082001-12-05 Akim Demaille <akim@epita.fr>
19909
19910 * src/closure.c (print_closure): Improve.
19911 (closure): Use it for printing input and output.
19912
199132001-12-05 Akim Demaille <akim@epita.fr>
19914
19915 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19916 indexed by nonterminals.
19917
199182001-12-05 Akim Demaille <akim@epita.fr>
19919
19920 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19921 what it was!).
19922 * src/warshall.h: Remove accidental duplication of the content.
19923
199242001-12-05 Akim Demaille <akim@epita.fr>
19925
19926 * src/closure.c (set_fderives): De-obfuscate.
19927
199282001-12-05 Akim Demaille <akim@epita.fr>
19929
19930 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19931
199322001-12-05 Akim Demaille <akim@epita.fr>
19933
19934 * src/closure.c (set_firsts): De-obfuscate.
19935
199362001-12-05 Akim Demaille <akim@epita.fr>
19937
19938 * src/output.c (action_row): De-obfuscate
19939 using the good o' techniques: arrays not pointers, variable
19940 locality, BITISSET, RESETBIT etc.
19941
199422001-12-05 Akim Demaille <akim@epita.fr>
19943
19944 Pessimize the code to simplify it: from now on, all the states
19945 have a valid SHIFTS, which NSHIFTS is possibly 0.
19946
19947 * src/LR0.c (shifts_new): Be global and move to..
19948 * src/state.c, src/state.h: here.
19949 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19950 * src/print_graph: Adjust.
19951
199522001-12-05 Akim Demaille <akim@epita.fr>
19953
19954 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19955 * src/conflicts.c: Use it.
19956 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19957 incorrectly ``simplified''.
19958
199592001-12-05 Akim Demaille <akim@epita.fr>
19960
19961 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19962 using the good o' techniques: arrays not pointers, variable
19963 locality, BITISSET, RESETBIT etc.
19964
199652001-12-05 Akim Demaille <akim@epita.fr>
19966
19967 * src/state.h (SHIFT_SYMBOL): New.
19968 * src/conflicts.c: Use it to deobfuscate.
19969
199702001-12-05 Akim Demaille <akim@epita.fr>
19971
19972 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19973 (print_reductions): De-obfuscate using the good o' techniques:
19974 arrays not pointers, variable locality, BITISSET.
19975
199762001-12-05 Akim Demaille <akim@epita.fr>
19977
19978 * src/conflicts.c (print_reductions): Arrays, not pointers.
19979 Use BITISSET.
19980
199812001-12-05 Akim Demaille <akim@epita.fr>
19982
19983 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19984
199852001-12-05 Akim Demaille <akim@epita.fr>
19986
19987 * src/conflicts.c (print_reductions): Improve variable locality.
19988
199892001-12-05 Akim Demaille <akim@epita.fr>
19990
19991 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19992
199932001-12-05 Akim Demaille <akim@epita.fr>
19994
19995 * src/conflicts.c (print_reductions): Improve variable locality.
19996
199972001-12-05 Akim Demaille <akim@epita.fr>
19998
19999 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20000 * src/lalr.c: Use them.
20001
200022001-12-05 Akim Demaille <akim@epita.fr>
20003
20004 * src/LR0.c (augment_automaton): Formatting changes.
20005 Better variable locality.
20006
200072001-12-05 Akim Demaille <akim@epita.fr>
20008
20009 * src/lalr.c (matrix_print): New.
20010 (transpose): Use it.
20011 Use arrays instead of pointers.
20012
200132001-12-05 Akim Demaille <akim@epita.fr>
20014
20015 * src/lalr.c (maxrhs): Move to...
20016 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20017 * src/lalr.c (build_relations): Adjust.
20018
200192001-12-05 Akim Demaille <akim@epita.fr>
20020
20021 * src/lalr.c (transpose): Free the memory allocated to the
20022 argument, as it is replaced by the results by the unique caller.
20023 (build_relations): Merely invoke transpose: it handles the memory
20024 deallocation.
20025 Improve variable locality.
20026 Avoid variables used as mere abbreviations.
20027 (compute_lookaheads): Use arrays instead of pointers.
20028
200292001-12-05 Akim Demaille <akim@epita.fr>
20030
20031 * src/lalr.c (initialize_F): Improve variable locality.
20032 Avoid variables used as mere abbreviations.
20033
200342001-12-05 Akim Demaille <akim@epita.fr>
20035
20036 * src/derives.c (print_derives): Display the ruleno.
20037 * src/lalr.c (initialize_F, transpose): Better variable locality
20038 to improve readability.
20039 Avoid variables used as mere abbreviations.
20040
200412001-12-05 Akim Demaille <akim@epita.fr>
20042
20043 * src/lalr.c (traverse): Use arrays instead of pointers.
20044
200452001-12-05 Akim Demaille <akim@epita.fr>
20046
20047 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20048 the handling of squeue.
20049 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20050
200512001-12-05 Akim Demaille <akim@epita.fr>
20052
20053 Because useless nonterminals are now kept alive (instead of being
20054 `destroyed'), we now sometimes examine them, and store information
20055 related to them. Hence we need to know their number, and adjust
20056 memory allocations.
20057
20058 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20059 static.
20060 * src/LR0.c (allocate_itemsets): The memory allocated to
20061 `symbol_count' was used for two different purpose: once to count
20062 the number of occurrences of each symbol, and later reassigned to
20063 `shift_symbol', containing the symbol that can be shifted from a
20064 given state.
20065 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20066 only, and...
20067 (new_itemsets): Allocate `shift_symbol' here.
20068 (allocate_itemsets): symbol_count includes useless nonterminals.
20069 Make room for them.
20070 (free_storage): Use `free', not `XFREE', for pointers that cannot
20071 be null.
20072
200732001-12-05 Akim Demaille <akim@epita.fr>
20074
20075 * src/nullable.c (set_nullable): Deobfuscate the handling of
20076 ritem.
20077 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20078
200792001-12-05 Akim Demaille <akim@epita.fr>
20080
20081 * src/gram.c, src/gram.h (ritem_print): New.
20082 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20083 (This useless function was defined only to work around VMS linkers
20084 that can't handle compilation units with variables only).
20085 * src/reduce.c (dump_grammar): Use it to trace the construction of
20086 ritem.
20087
200882001-12-04 Paul Eggert <eggert@twinsun.com>
20089
20090 * src/bison.simple (union yyalloc): Change member names
20091 to be the same as the stack names.
20092 (yyparse): yyptr is now union yyalloc *, not char *.
20093 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20094 and may generate better code on some machines.
20095 (yystpcpy): Use prototype if __STDC__ is defined, not just
20096 if __cplusplus is defined.
20097
200982001-11-30 Akim Demaille <akim@epita.fr>
20099
20100 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20101 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20102 Gettext doesn't compile cleanly, and dies with -Werror.
20103 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20104 Include WARNING_CFLAGS here.
20105 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20106 before being defined.
20107
201082001-11-27 Paul Eggert <eggert@twinsun.com>
20109
20110 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20111 First arg is int, not unsigned.
20112 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20113 (SIZE_MAX, UINT_MAX): New macros.
20114 (quotearg_n_options): Abort if N is negative.
20115 Avoid overflow check on hosts where size_t is 64 bits and int
20116 is 32 bits, as overflow is impossible there.
20117 Fix off-by-one typo that caused unnecessary reallocation.
20118
201192001-11-29 Paul Eggert <eggert@twinsun.com>
20120
20121 Name space cleanup in generated parser.
20122
20123 * doc/bison.texinfo (Bison Parser): Discuss system headers
20124 and their effect on the user name space.
20125
20126 * src/bison.simple:
20127 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20128 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20129 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20130
20131 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20132 on user names when possible.
20133
20134 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20135 Simplify test for whather <alloca.h> exists.
20136
20137 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20138
20139 (<stdio.h>): Include if YYDEBUG.
20140
20141 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20142 ! defined (yyoverflow) && ! defined (yymemcpy).
20143
20144 (yymemcpy, yyparse): Rename local variables as needed so that
20145 they all begin with 'yy'.
20146
20147 (yystrlen, yystpcpy): New functions.
20148
20149 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20150 All uses changed.
20151
20152 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20153 instead of relying on string.h functions. Use YYSTACK_ALLOC
20154 and YYSTACK_FREE instead of malloc and free.
20155
201562001-11-30 Akim Demaille <akim@epita.fr>
20157
20158 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20159 before their first uses.
20160 (YYBISON, YYPURE): Move to the top of the output.
20161
201622001-11-30 Akim Demaille <akim@epita.fr>
20163
20164 * tests/reduce.at (Useless Nonterminals): Fix.
20165
201662001-11-30 Akim Demaille <akim@epita.fr>
20167
20168 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20169 if body instead of `;' to pacify GCC's warnings.
20170
201712001-11-30 Akim Demaille <akim@epita.fr>
20172
20173 Instead of mapping the LHS of unused rules to -1, keep the LHS
20174 valid, but flag the rules as invalid.
20175
20176 * src/gram.h (rule_t): `useful' is a new member.
20177 * src/print.c (print_grammar): Adjust.
20178 * src/derives.c (set_derives): Likewise.
20179 * src/reader.c (packgram, reduce_output): Likewise.
20180 * src/reduce.c (reduce_grammar_tables): Likewise.
20181 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20182
201832001-11-30 Akim Demaille <akim@epita.fr>
20184
20185 * src/reduce.c (reduce_output): Formatting changes.
20186 * src/print.c (print_results, print_grammar): Likewise.
20187 * tests/regression.at (Rule Line Numbers)
20188 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20189
201902001-11-30 Akim Demaille <akim@epita.fr>
20191
20192 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20193 useless nonterminals, move them at the end of the symbol arrays.
20194 (reduce_output): Adjust.
20195 * tests/reduce.at (Useless Nonterminals): Adjust.
20196
201972001-11-30 Akim Demaille <akim@epita.fr>
20198
20199 * src/reduce.c: Various comment/formatting changes.
20200 (nonterminals_reduce): New, extracted from...
20201 (reduce_grammar_tables): here.
20202 (reduce_grammar): Call nonterminals_reduce.
20203
202042001-11-29 Paul Eggert <eggert@twinsun.com>
20205
20206 * src/bison.simple (YYSTACK_REALLOC): Remove.
20207 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20208 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20209 New macros.
20210 (union yyalloc): New type.
20211 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20212 an arbitrary restriction on hosts where size_t is wider than int.
20213
20214 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20215 a parser stack overflow. Allocate just one block of memory for all
20216 three stacks, instead of allocating three blocks; this typically is
20217 faster and reduces fragmentation.
20218
20219 Do not limit the number of items in the stack to a value that fits
20220 in 'int', as this is an arbitrary limit on hosts with 64-bit
20221 size_t and 32-bit int.
20222
202232001-11-29 Marc Autret <autret_m@epita.fr>
20224
20225 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20226 of defining YYERROR_VERBOSE.
20227 [AT_DATA]: $4 is now out of C declarations in the prologue.
20228
202292001-11-28 Marc Autret <autret_m@epita.fr>
20230
20231 * src/reader.c (parse_dquoted_param): New.
20232 (parse_skel_decl): Use it.
20233 * src/lex.h: Add its prototype.
20234 * src/lex.c (literalchar): Become not static.
20235
202362001-11-28 Marc Autret <autret_m@epita.fr>
20237
20238 * src/output.h: And put its extern declaration here.
20239 * src/output.c (error_verbose): Define here.
20240 (prepare): Echo name modification.
20241 * src/getargs.h: Clean its extern declaration.
20242 * src/getargs.c (error_verbose_flag): Remove.
20243 (getargs): Remove case 'e'.
20244 * src/options.c (option_table): 'error-verbose' is now seen as simple
20245 percent option.
20246 Include output.h.
20247
20248 * src/reader.c (read_declarations): Remove case tok_include.
20249 (parse_include_decl): Remove.
20250 * src/lex.h (token_t): Remove tok_include.
20251 * src/options.c (option_table): 'include' is now a simple command line
20252 option.
20253
202542001-11-28 Marc Autret <autret_m@epita.fr>
20255
20256 * src/bison.simple: Adjust muscle names.
20257 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20258 * src/output.c (prepare): s/_/-/ for the muscles names.
20259 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20260
202612001-11-28 Marc Autret <autret_m@epita.fr>
20262
20263 * src/bison.simple: Fix debug.
20264 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20265
202662001-11-28 Akim Demaille <akim@epita.fr>
20267
20268 * src/LR0.c (shifts_new): New.
20269 (save_shifts, insert_start_shift, augment_automaton): Use it.
20270
202712001-11-28 Akim Demaille <akim@epita.fr>
20272
20273 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20274 keep ruleno only.
20275
202762001-11-28 Akim Demaille <akim@epita.fr>
20277
20278 * src/closure.c (closure): Instead of looping over word in array
20279 then bits in words, loop over bits in array.
20280
202812001-11-28 Akim Demaille <akim@epita.fr>
20282
20283 * src/closure.c (closure): No longer optimize the special case
20284 where all the bits of `ruleset[r]' are set to 0, to make the code
20285 clearer.
20286
202872001-11-28 Akim Demaille <akim@epita.fr>
20288
20289 * src/closure.c (closure): `r' and `c' are new variables, used to
20290 de-obfuscate accesses to RULESET and CORE.
20291
202922001-11-28 Akim Demaille <akim@epita.fr>
20293
20294 * src/reduce.c (reduce_print): Use ngettext.
20295 (dump_grammar): Improve the trace accuracy.
20296
202972001-11-28 Akim Demaille <akim@epita.fr>
20298
20299 * src/reduce.c (dump_grammar): Don't translate trace messages.
20300
203012001-11-28 Akim Demaille <akim@epita.fr>
20302
20303 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20304 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20305 as all tags are free'ed afterwards.
20306 From Enrico Scholz.
20307
203082001-11-27 Paul Eggert <eggert@twinsun.com>
20309
20310 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20311 use alloca when we didn't want to, and vice versa.
20312
203132001-11-27 Marc Autret <autret_m@epita.fr>
20314
20315 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20316 initialization.
20317 * src/output.c (prepare): Remove its update.
20318
203192001-11-27 Marc Autret <autret_m@epita.fr>
20320
20321 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20322 Use %error-verbose.
20323
203242001-11-27 Marc Autret <autret_m@epita.fr>
20325
20326 * src/bison.simple: Remove YYERROR_VERBOSE using.
20327 Use %%error_verbose.
20328 (yyparse): Likewise.
20329 * src/output.c (prepare): Give its final value.
20330 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20331 * src/getargs.h: Add its extern declaration.
20332 * src/getargs.c (error_verbose_flag): New int.
20333 (getargs): Update to catch new case.
20334 * src/options.c (option_table): 'error-verbose' is a new option.
20335 (shortopts): Update.
20336
203372001-11-27 Akim Demaille <akim@epita.fr>
20338
20339 * src/system.h: Use intl/libgettext.h.
20340 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20341
203422001-11-27 Akim Demaille <akim@epita.fr>
20343
20344 * tests/torture.at (Exploding the Stack Size with Malloc):
20345 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20346
203472001-11-27 Akim Demaille <akim@epita.fr>
20348
20349 * src/files.c: Include error.h.
20350 Reported by Hans Aberg.
20351
203522001-11-26 Marc Autret <autret_m@epita.fr>
20353
20354 * src/reader.c (parse_include_decl): New, not yet implemented.
20355 (read_declarations): Add case tok_include.
20356 * src/getargs.h (include): Add its extern definition.
20357 * src/getargs.c (include): New const char *.
20358 (getargs): Add case '-I'.
20359 * src/options.c (option_table): Add include as command line and
20360 percent option.
20361 * src/lex.h (token_t): Add tok_include.
20362
203632001-11-26 Akim Demaille <akim@epita.fr>
20364
20365 * src/reader.c (readgram): Make sure rules for mid-rule actions
20366 have a lineno equal to that of their host rule.
20367 Reported by Hans Aberg.
20368 * tests/regression.at (Rule Line Numbers): New.
20369
203702001-11-26 Akim Demaille <akim@epita.fr>
20371
20372 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20373 size_ts.
20374
203752001-11-26 Akim Demaille <akim@epita.fr>
20376
20377 * src/complain.c, src/complain.h (error): Remove, provided by
20378 lib/error.[ch].
20379
203802001-11-26 Akim Demaille <akim@epita.fr>
20381
20382 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20383 issue an error message.
20384 * tests/regression.at (Invalid %directive): New.
20385 Reported by Hans Aberg.
20386
203872001-11-26 Akim Demaille <akim@epita.fr>
20388
20389 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20390 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20391
203922001-11-26 Akim Demaille <akim@epita.fr>
20393
20394 * src/conflicts.c (conflicts_print): Don't complain at all when
20395 there are no reduce/reduce conflicts, and as many shift/reduce
20396 conflicts as expected.
20397 * tests/regression.at (%expect right): Adjust.
20398
203992001-11-23 Akim Demaille <akim@epita.fr>
20400
20401 * lib/alloca.c: Update, from fileutils.
20402
204032001-11-23 Akim Demaille <akim@epita.fr>
20404
20405 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20406
204072001-11-23 Akim Demaille <akim@epita.fr>
20408
20409 * src/system.h: Include alloca.h.
20410 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20411
204122001-11-23 Akim Demaille <akim@epita.fr>
20413
20414 * src/print_graph.c (print_actions): Remove `rule', unused.
20415 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20416 pacify GCC's signed < unsigned warnings.
20417 * src/closure.c (itemsetsize): Likewise.
20418 * src/reader.c (symbol_list_new): Static.
20419
204202001-11-23 Akim Demaille <akim@epita.fr>
20421
20422 Attaching lineno to buckets is stupid, since only one copy of each
20423 symbol is kept, only the line of the first occurrence is kept too.
20424
20425 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20426 * src/reader.c (rline_allocated): Remove, unused.
20427 (symbol_list): Have a `line' member.
20428 (symbol_list_new): New.
20429 (readgram): Use it.
20430 * src/print.c (print_grammar): Output the rule line numbers.
20431 * tests/regression.at (Solved SR Conflicts)
20432 (Unresolved SR Conflicts): Adjust.
20433 Reported by Hans Aberg.
20434
204352001-11-22 Marc Autret <autret_m@epita.fr>
20436
20437 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20438
204392001-11-22 Marc Autret <autret_m@epita.fr>
20440
20441 * src/muscle_tab.c (muscle_init): Remove initialization of
20442 skeleton muscle.
20443 * src/output.c (output_master_parser): Do it here.
20444
204452001-11-20 Akim Demaille <akim@epita.fr>
20446
20447 * po/sv.po: New.
20448 * configure.in (ALL_LINGUAS): Adjust.
20449 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20450 longer contains strings to translate.
20451
204522001-11-19 Akim Demaille <akim@epita.fr>
20453
20454 * src/conflicts.c (conflicts_print): Add a missing \n.
20455
204562001-11-19 Akim Demaille <akim@epita.fr>
20457
20458 * src/nullable.c (nullable_print): New.
20459 (set_nullable): Call it when tracing.
20460 Better locality of variables.
20461
204622001-11-19 Akim Demaille <akim@epita.fr>
20463
20464 * src/print.c (print_actions): Better locality of variables.
20465
204662001-11-19 Akim Demaille <akim@epita.fr>
20467
20468 * src/derives.c (print_derives): Fix and enrich.
20469 * src/closure.c (print_fderives): Likewise.
20470
204712001-11-19 Akim Demaille <akim@epita.fr>
20472
20473 * src/closure.c (itemsetend): Remove, replaced with...
20474 (itemsetsize): new.
20475
204762001-11-19 Akim Demaille <akim@epita.fr>
20477
20478 * src/LR0.c (kernel_end): Remove, replaced with...
20479 (kernel_size): new.
20480
204812001-11-19 Akim Demaille <akim@epita.fr>
20482
20483 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20484 to clarify.
20485
204862001-11-19 Akim Demaille <akim@epita.fr>
20487
20488 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20489
204902001-11-19 Akim Demaille <akim@epita.fr>
20491
20492 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20493 trace messages.
20494 * src/LR0.c: Likewise.
20495 (allocate_itemsets): Use arrays instead of pointers to clarify.
20496
204972001-11-19 Akim Demaille <akim@epita.fr>
20498
20499 * src/getargs.c (statistics_flag): Replace with...
20500 (trace_flag): New.
20501 (longopts): Accept --trace instead of --statistics.
20502 * src/getargs.h, src/options.c: Adjust.
20503 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20504 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20505
205062001-11-19 Akim Demaille <akim@epita.fr>
20507
20508 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20509 pointers to clarify the code.
20510 (save_reductions, save_shifts): Factor common parts of alternatives.
20511
205122001-11-19 Akim Demaille <akim@epita.fr>
20513
20514 * src/LR0.c (new_state, get_state): Complete TRACE code.
20515 * src/closure.c: Include `reader.h' to get `tags', needed by the
20516 trace code.
20517 Rename the conditional DEBUG as TRACE.
20518 Output consistently TRACEs to stderr, not stdout.
20519 * src/derives.c: Likewise.
20520 * src/reduce.c: (inaccessable_symbols): Using if is better style
20521 than goto.
20522 Use `#if TRACE' instead of `#if 0' for tracing code.
20523
205242001-11-19 Akim Demaille <akim@epita.fr>
20525
20526 * src/system.h (LIST_FREE, shortcpy): New.
20527 * src/LR0.c: Use them.
20528 * src/output.c (free_itemsets, free_reductions, free_shifts):
20529 Remove, replaced by LIST_FREE.
20530
205312001-11-19 Akim Demaille <akim@epita.fr>
20532
20533 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20534 (REDUCTIONS_ALLOC): New.
20535 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20536 allocation.
20537
205382001-11-19 Akim Demaille <akim@epita.fr>
20539
20540 * src/LR0.c (new_state): Complete trace code.
20541 * src/nullable.c (set_nullable): Don't translate traces.
20542
205432001-11-19 Akim Demaille <akim@epita.fr>
20544
20545 * src/print_graph.c (print_core): Better locality of variables.
20546 * src/print.c (print_core): Likewise.
20547
205482001-11-19 Akim Demaille <akim@epita.fr>
20549
20550 * src/vcg.c: You do the output, so you are responsible of the
20551 handling of VCG syntax, in particular: use quotearg.
20552 * src/print_graph.c: Don't.
20553 (print_actions): Don't output the actions as part of the nodes,
20554 since that's the job of the edges.
20555 (print_state): Don't output by hand: fill the node description,
20556 and ask for its output.
20557
205582001-11-19 Akim Demaille <akim@epita.fr>
20559
20560 * src/bison.simple (yyparse): When verbosely reporting an error,
20561 no longer put additional quotes around token names.
20562 * tests/calc.at: Adjust.
20563
205642001-11-19 Akim Demaille <akim@epita.fr>
20565
20566 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20567 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20568 * src/output.c: Adjust.
20569
205702001-11-19 Akim Demaille <akim@epita.fr>
20571
20572 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20573 (rule_t): this.
20574 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20575
205762001-11-19 Akim Demaille <akim@epita.fr>
20577
20578 * src/gram.h (rule_t): New.
20579 (rule_table): New.
20580 (rrhs, rlhs): Remove, part of state_t.
20581 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20582 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20583 * src/reader.c, src/reduce.c: Adjust.
20584
205852001-11-19 Akim Demaille <akim@epita.fr>
20586
20587 * src/reader.c (symbols_output): New, extracted from...
20588 (packsymbols): Here.
20589 (reader): Call it.
20590
205912001-11-19 Akim Demaille <akim@epita.fr>
20592
20593 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20594 (maxrhs): this new function.
20595
205962001-11-19 Akim Demaille <akim@epita.fr>
20597
20598 * src/lalr.c (F): New macro to access the variable F.
20599 Adjust.
20600
206012001-11-19 Akim Demaille <akim@epita.fr>
20602
20603 * src/lalr.h (LA): New macro to access the variable LA.
20604 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20605 * src/lalr.c: Adjust.
20606
206072001-11-19 Akim Demaille <akim@epita.fr>
20608
20609 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20610 (set_state_table): handle the `lookaheads' members.
20611
206122001-11-19 Akim Demaille <akim@epita.fr>
20613
20614 * src/lalr.h (lookaheads): Removed array, whose contents is now
20615 a member of...
20616 (state_t): this structure.
20617 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20618 Adjust.
20619
206202001-11-19 Akim Demaille <akim@epita.fr>
20621
20622 * src/lalr.h (consistent): Removed array, whose contents is now
20623 a member of...
20624 (state_t): this structure.
20625 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20626 Adjust.
20627
206282001-11-19 Akim Demaille <akim@epita.fr>
20629
20630 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20631 contents are now members of...
20632 (state_t): this structure.
20633 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20634 Adjust.
20635
206362001-11-19 Akim Demaille <akim@epita.fr>
20637
20638 * src/lalr.h (state_t): New.
20639 (state_table): Be a state_t * instead of a core **.
20640 (accessing_symbol): Remove, part of state_t.
20641 * src/lalr.c: Adjust.
20642 (set_accessing_symbol): Merge into...
20643 (set_state_table): this.
20644 * src/print_graph.c, src/conflicts.c: Adjust.
20645
206462001-11-14 Akim Demaille <akim@epita.fr>
20647
20648 * tests/calc.at, tests/output.at, tests/regression.at,
20649 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20650 now the tests are run in private dirs, therefore AC_CLEANUP and
20651 family can be simplified to 0-ary.
20652 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20653 use abs. path to find config.h.
20654 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20655 stderr, there can be way too much random noise.
20656 Instead pass -Werror to GCC and rely on the exit status.
20657 Reported by Wolfram Wagner.
20658
206592001-11-14 Akim Demaille <akim@epita.fr>
20660
20661 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20662 defined only if yyoverflow is defined, to avoid `warning: unused
20663 variable `yyvs1''.
20664 Reported by The Test Suite.
20665
206662001-11-14 Akim Demaille <akim@epita.fr>
20667
20668 * src/print.c: Include reduce.h.
20669 Reported by Hans Aberg.
20670
206712001-11-14 Akim Demaille <akim@epita.fr>
20672
20673 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20674 Revert a previous patch: these are really const.
20675 * src/conflicts.c (conflict_report): Additional useless pair of
20676 braces to pacify GCC's warnings for `if () if () {} else {}'.
20677 * src/lex.c (parse_percent_token): Replace equal_offset with
20678 arg_offset.
20679 arg is const.
20680 Be sure to strdup `arg' when used, since there is no reason for
20681 token_buffer not to change.
20682
206832001-11-14 Akim Demaille <akim@epita.fr>
20684
20685 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20686 definition.
20687 * src/main.c (main): Use them.
20688 Suggested by Hans Aberg.
20689
206902001-11-12 Akim Demaille <akim@epita.fr>
20691
20692 * src/system.h (ngettext): Now that we use ngettext, be sure to
20693 provide a default definition when NLS are not used.
20694
206952001-11-12 Akim Demaille <akim@epita.fr>
20696
20697 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20698 Use @kbd to denote user input.
20699 (Language and Grammar): ANSIfy the example.
20700 Adjust its layout for info/notinfo.
20701 (Location Tracking Calc): Output error messages to stderr.
20702 Output locations in a more GNUtically correct way.
20703 Fix a couple of Englishos.
20704 Adjust @group/@end group pairs.
20705
207062001-11-12 Akim Demaille <akim@epita.fr>
20707
20708 %expect was not functioning at all.
20709
20710 * src/conflicts.c (expected_conflicts): Set to -1.
20711 (conflict_report): Use ngettext.
20712 (conflicts_print): Check %expect and make its violation an error.
20713 * doc/bison.texinfo (Expect Decl): Adjust.
20714 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20715 * tests/regression.at (%expect not enough, %expect right)
20716 (%expect too much): New.
20717
207182001-11-12 Akim Demaille <akim@epita.fr>
20719
20720 * tests/regression.at (Conflicts): Rename as...
20721 (Unresolved SR Conflicts): this.
20722 (Solved SR Conflicts): New.
20723
207242001-11-12 Akim Demaille <akim@epita.fr>
20725
20726 * src/reduce.c (print_results): Rename as...
20727 (reduce_output): This.
20728 Output to OUT, passed as argument, instead of output_obstack.
20729 (dump_grammar): Likewise.
20730 (reduce_free): New.
20731 Also free V1.
20732 (reduce_grammar): No longer call reduce_output, since...
20733 * src/print.c (print_results): do it.
20734 * src/main.c (main): Call reduce_free;
20735
207362001-11-12 Akim Demaille <akim@epita.fr>
20737
20738 * src/conflicts.c (print_reductions): Accept OUT as argument.
20739 Output to it, not to output_obstack.
20740 * src/print.c (print_actions): Adjust.
20741
207422001-11-12 Akim Demaille <akim@epita.fr>
20743
20744 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20745 the result instead of using...
20746 (src_total, rrc_total, src_count, rrc_count): Remove.
20747 (any_conflicts): Remove.
20748 (print_conflicts): Split into...
20749 (conflicts_print, conflicts_output): New.
20750 * src/conflicts.h: Adjust.
20751 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20752 * src/print.c (print_grammar): Issue `\n' between two rules.
20753 * tests/regression.at (Conflicts): New.
20754 Reported by Tom Lane.
20755
207562001-11-12 Akim Demaille <akim@epita.fr>
20757
20758 * tests/regression.at (Invalid input): Remove, duplicate with
20759 ``Invalid input: 1''.
20760
207612001-11-12 Akim Demaille <akim@epita.fr>
20762
20763 * tests/torture.at (AT_DATA_STACK_TORTURE)
20764 (Exploding the Stack Size with Alloca)
20765 (Exploding the Stack Size with Malloc): New.
20766
207672001-11-12 Akim Demaille <akim@epita.fr>
20768
20769 * src/bison.simple (YYSTACK_REALLOC): New.
20770 (yyparse) [!yyoverflow]: Use it and free the old stack.
20771 Reported by Per Allansson.
20772
207732001-11-12 Pascal Bart <pascal.bart@epita.fr>
20774
20775 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20776 define CPP macro, which substitute YYSTYPE by yystype.
20777 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20778 with yyltype/YYLTYPE. This allows inclusion of the generated
20779 header within the parser if the compiler, such as GGC, accepts
20780 multiple equivalent #defines.
20781 From Akim.
20782
207832001-11-05 Akim Demaille <akim@epita.fr>
20784
20785 * src/reader.c (symbols_output): New, extracted from...
20786 (packsymbols): here.
20787 (reader): Adjust.
20788
207892001-11-05 Akim Demaille <akim@epita.fr>
20790
20791 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20792
207932001-11-05 Akim Demaille <akim@epita.fr>
20794
20795 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20796 pattern.
20797
207982001-11-05 Akim Demaille <akim@epita.fr>
20799
20800 * src/options.h (struct option_table_struct): set_flags is void*.
20801 * src/options.c (longopts): Support `--output' and `%output'.
20802 (usage): Adjust.
20803 * src/lex.h (tok_setopt): Remove, replaced with...
20804 (tok_intopt, tok_stropt): these new guys.
20805 * src/lex.c (getopt.h): Not needed.
20806 (token_buffer, unlexed_token_buffer): Not const.
20807 (percent_table): Promote `-' over `_' in directive names.
20808 Active `%name-prefix', `file-prefix', and `output'.
20809 (parse_percent_token): Accept possible arguments to directives.
20810 Promote `-' over `_' in directive names.
20811
208122001-11-04 Akim Demaille <akim@epita.fr>
20813
20814 * doc/bison.texinfo (Decl Summary): Split the list into
20815 `directives for grammars' and `directives for bison'.
20816 Sort'em.
20817 Add description of `%name-prefix', `file-prefix', and `output'.
20818 Promote `-' over `_' in directive names.
20819 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20820 Simplify the description of `--name-prefix'.
20821 Promote `-' over `_' in directive names.
20822 Promote `--output' over `--output-file'.
20823 Fix the description of `--defines'.
20824 * tests/output.at: Exercise %file-prefix and %output.
20825
208262001-11-02 Akim Demaille <akim@epita.fr>
20827
20828 * doc/refcard.tex: Update.
20829
208302001-11-02 Akim Demaille <akim@epita.fr>
20831
20832 * src/symtab.h (SUNDEF): New.
20833 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20834 stand for `uninitialized', instead of 0.
20835 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20836 * src/lex.c (lex): Adjust.
20837
20838 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20839 Number it 0.
20840 Let yylex return it instead of a plain 0.
20841 Reported by Dick Streefland.
20842
208432001-11-02 Akim Demaille <akim@epita.fr>
20844
20845 * tests/regression.at (Mixing %token styles): New test.
20846
208472001-11-02 Akim Demaille <akim@epita.fr>
20848
20849 * src/reader.c (parse_thong_decl): Formatting changes.
20850 (token_translations_init): New, extracted from...
20851 (packsymbols): Here.
20852 Adjust.
20853
208542001-11-01 Akim Demaille <akim@epita.fr>
20855
20856 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20857 Check that `9foo.y' produces correct cpp guards.
20858 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20859 guards.
20860 Reported by Wwp.
20861
208622001-11-01 Akim Demaille <akim@epita.fr>
20863
20864 * tests/regression.at (Invalid input: 2): New.
20865 * src/lex.c (unlexed_token_buffer): New.
20866 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20867 too.
20868 Reported by Wwp.
20869
208702001-11-01 Akim Demaille <akim@epita.fr>
20871
20872 * tests/calc.at: Catch up with 1.30.
20873 * configure.in: Bump to 1.49a.
20874 Adjust to newer Autotest.
20875
208762001-10-19 Pascal Bart <pascal.bart@epita.fr>
20877
20878 * src/conflicts.c: Move global variables rrc_total and src_total ...
20879 (print_conflicts): here.
20880 * src/output.c (output): Free global variable user_toknums.
20881 * src/lex.c (token_obstack): Become static.
20882
208832001-10-18 Akim Demaille <akim@epita.fr>
20884
20885 * tests/atlocal.in (GCC): Add.
20886 * tests/calc.at: s/m4_match/m4_bmatch/.
20887 s/m4_patsubst/m4_bpatsubst/.
20888 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20889 * configure.in: AC_SUBST(GCC).
20890
208912001-10-14 Marc Autret <autret_m@epita.fr>
20892
20893 * src/options.c (create_long_option_table): Fix.
20894
208952001-10-10 Akim Demaille <akim@epita.fr>
20896
20897 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20898
208992001-10-04 Akim Demaille <akim@epita.fr>
20900
20901 * src/reader.c (parse_union_decl): Push the caracters in
20902 union_obstack, not attrs_obstack.
20903
209042001-10-04 Akim Demaille <akim@epita.fr>
20905
20906 Merge in the branch 1.29.
20907
20908 * src/reader.c (packsymbols): Use a temporary obstack for
20909 `%%tokendef', since output_stack is already used elsewhere.
20910
20911 2001-10-02 Akim Demaille <akim@epita.fr>
20912
20913 Bump 1.29d.
20914
20915 2001-10-02 Akim Demaille <akim@epita.fr>
20916
20917 Version 1.29c.
20918
20919 2001-10-02 Akim Demaille <akim@epita.fr>
20920
20921 * tests/regression.at (Invalid CPP headers): New.
20922 From Alexander Belopolsky.
20923 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20924
20925 2001-10-02 Akim Demaille <akim@epita.fr>
20926
20927 * tests/regression.at (Invalid input): New.
20928 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20929 Reported by Shura.
20930
20931 2001-10-02 Akim Demaille <akim@epita.fr>
20932
20933 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20934
20935 2001-10-02 Akim Demaille <akim@epita.fr>
20936
20937 * src/output.c (output_parser): Assert `skeleton'.
20938 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20939 systems.
20940 From Shura.
20941
20942 2001-10-01 Marc Autret <autret_m@epita.fr>
20943
20944 * src/lex.h: Echo modifications.
20945 * src/lex.c (unlex): Parameter is now token_t.
20946 From Hans Aberg.
20947
20948 2001-10-01 Marc Autret <autret_m@epita.fr>
20949
20950 * src/main.c: Include lex.h.
20951 From Hans Aberg.
20952
20953 2001-09-29 Akim Demaille <akim@epita.fr>
20954
20955 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20956
20957 2001-09-28 Akim Demaille <akim@epita.fr>
20958
20959 * tests/testsuite.at: Update to newer Autotest.
20960 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20961
20962 2001-09-27 Akim Demaille <akim@epita.fr>
20963
20964 Position independent wrapper.
20965
20966 * tests/bison: Remove.
20967 * tests/bison.in: New.
20968 * configure.in: Adjust.
20969
20970 2001-09-27 Paul Eggert <eggert@twinsun.com>
20971
20972 Port quotearg fixes from tar 1.13.24.
20973
20974 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20975 tm to be declared.
20976 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20977 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20978
20979 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20980 * m4/mbrtowc.m4: New file.
20981 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20982 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20983
20984 2001-09-27 Akim Demaille <akim@epita.fr>
20985
20986 Bump to 1.29c.
20987
20988 2001-09-27 Akim Demaille <akim@epita.fr>
20989
20990 Version 1.29b.
20991
20992 2001-09-25 Akim Demaille <akim@epita.fr>
20993
20994 * src/system.h: Include `xalloc.h'.
20995 Remove it from the C files.
20996 * src/files.c (output_files): Free the obstacks.
20997 * src/lex.c (init_lex): Rename as...
20998 (lex_init): this.
20999 (lex_free): New.
21000 * src/main.c (main): Use it.
21001
21002 2001-09-24 Marc Autret <autret_m@epita.fr>
21003
21004 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21005 to output informations in fout (FILE*).
21006 (open_graph, close_graph): Likewise.
21007 (output_graph, output_edge, output_node): Likewise.
21008 * src/vcg.h: Update function prototypes.
21009 * src/print_graph.c (print_graph): Open output graph file.
21010 (print_actions): Adjust.
21011 * src/files.h: Remove extern declaration.
21012 * src/files.c: Remove graph_obstack declaration.
21013 (open_files): Remove graph_obstack initialization.
21014 (output_files): Remove graph_obstack saving.
21015
21016 2001-09-24 Marc Autret <autret_m@epita.fr>
21017
21018 * src/files.c (compute_output_file_names): Fix.
21019
21020 2001-09-24 Marc Autret <autret_m@epita.fr>,
21021 Akim Demaille <akim@epita.fr>
21022
21023 * src/reader.c (reader): Remove call to free_symtab ().
21024 * src/main.c (main): Call it here.
21025 Include symtab.h.
21026 * src/conflicts.c (initialize_conflicts): Rename as...
21027 (solve_conflicts): this.
21028 * src/print.c (print_core, print_actions, print_state)
21029 (print_grammar): Dump to a file instead a `output_obstack'.
21030 (print_results): Dump `output_obstack', and then proceed with the
21031 FILE *.
21032 * src/files.c (compute_output_file_names, close_files): New.
21033 (output_files): Adjust.
21034 * src/main.c (main): Adjust.
21035
21036 2001-09-23 Marc Autret <autret_m@epita.fr>
21037
21038 * src/files.c (compute_header_macro): Computes header macro name
21039 from spec_defines_file when given.
21040
21041 2001-09-23 Marc Autret <autret_m@epita.fr>
21042
21043 * src/files.c (output_files): Add default extensions.
21044
21045 2001-09-22 Akim Demaille <akim@epita.fr>
21046
21047 * src/conflicts.c (finalize_conflicts): Rename as...
21048 (free_conflicts): this.
21049
21050 2001-09-22 Akim Demaille <akim@epita.fr>
21051
21052 * src/gram.c (gram_free): Rename back as...
21053 (dummy): this.
21054 (output_token_translations): Free `token_translations'.
21055 * src/symtab.c (free_symtab): Free the tag field.
21056
21057 2001-09-22 Akim Demaille <akim@epita.fr>
21058
21059 Remove `translations' as it is always set to true.
21060
21061 * src/gram.h: Adjust.
21062 * src/reader.c (packsymbols, parse_token_decl): Adjust
21063 * src/print.c (print_grammar): Adjust.
21064 * src/output.c (output_token_translations): Adjust.
21065 * src/lex.c (lex): Adjust.
21066 * src/gram.c: Be sure the set pointers to NULL.
21067 (dummy): Rename as...
21068 (gram_free): this.
21069
21070 2001-09-22 Akim Demaille <akim@epita.fr>
21071
21072 * configure.in: Invoke AM_LIB_DMALLOC.
21073 * src/system.h: Use dmalloc.
21074 * src/LR0.c: Be sure to have pointers initialized to NULL.
21075 (allocate_itemsets): Allocate kernel_items only if needed.
21076
21077 2001-09-22 Akim Demaille <akim@epita.fr>
21078
21079 * configure.in: Bump to 1.29b.
21080 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21081 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21082 need xmalloc.c in calc.y.
21083 From Pascal Bart.
21084
21085 2001-09-21 Akim Demaille <akim@epita.fr>
21086
21087 Version 1.29a.
21088 * Makefile.maint, config/config.guess, config/config.sub,
21089 * config/missing: Update from masters.
21090 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21091 upon package.m4.
21092 * configure.in (ALL_LINGUAS): Add `tr'.
21093
21094 2001-09-21 Akim Demaille <akim@epita.fr>
21095
21096 * tests/Makefile.am (package.m4): Move to...
21097 ($(srcdir)/$(TESTSUITE)): here.
21098
21099 2001-09-20 Akim Demaille <akim@epita.fr>
21100
21101 * src/complain.c: No longer try to be standalone: use system.h.
21102 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21103 * src/complain.h: Likewise.
21104 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21105 Remove the unused variable `n'.
21106 From Albert Chin-A-Young.
21107
21108 2001-09-18 Marc Autret <autret_m@epita.fr>
21109
21110 * doc/bison.1: Update.
21111 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21112 descriptions.
21113 (Option Cross Key): Update.
21114 Add --graph.
21115
21116 2001-09-18 Marc Autret <autret_m@epita.fr>
21117
21118 * tests/regression.at: New test (comment in %union).
21119
21120 2001-09-18 Marc Autret <autret_m@epita.fr>
21121
21122 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21123 do that.
21124 Reported by Keith Browne.
21125
21126 2001-09-18 Marc Autret <autret_m@epita.fr>
21127
21128 * tests/output.at: Add tests for --defines and --graph.
21129
21130 2001-09-18 Marc Autret <autret_m@epita.fr>
21131
21132 * tests/output.at: Removes tests of %{header,src}_extension features.
21133
21134 2001-09-18 Akim Demaille <akim@epita.fr>
21135
21136 * tests/Makefile.am (package.m4): New.
21137 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21138 (_AT_CHECK_CALC_ERROR): Likewise.
21139 Factor the `, ' part of verbose error messages.
21140
21141 2001-09-18 Marc Autret <autret_m@epita.fr>
21142
21143 * src/getargs.c (longopts): Declare --defines and --graph as options
21144 with optional arguments.
21145 * src/files.h: Add extern declarations.
21146 * src/files.c (spec_graph_file, spec_defines_file): New.
21147 (output_files): Update.
21148 Remove CPP-outed code.
21149
21150 2001-09-18 Marc Autret <autret_m@epita.fr>
21151
21152 Turn off %{source,header}_extension feature.
21153
21154 * src/files.c (compute_exts_from_gf): Update.
21155 (compute_exts_from_src): Update.
21156 (output_files): CPP-out useless code.
21157 * src/files.h: Remove {header,source}_extension extern declarations.
21158 * src/reader.c (parse_dquoted_param): CPP-out.
21159 (parse_header_extension_decl): Remove.
21160 (parse_source_extension_decl): Remove.
21161 (read_declarations): Remove cases tok_{hdrext,srcext}.
21162 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21163 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21164
21165 2001-09-10 Akim Demaille <akim@epita.fr>
21166
21167 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21168 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21169 (AT_CHECK_OUTPUT): this.
21170 Merely check ls' exit status, its output is useless.
21171
21172 2001-09-10 Akim Demaille <akim@epita.fr>
21173
21174 * tests/calc.at: Use m4_match.
21175 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21176
21177 2001-09-10 Marc Autret <autret_m@epita.fr>,
21178 Akim Demaille <akim@epita.fr>
21179
21180 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21181 enum color_e.
21182 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21183 to `normal'.
21184 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21185 * src/lex.h: Adjust prototype.
21186 (token_t): Add `tok_undef'.
21187 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21188 (parse_percent_token): Now returns token_t.
21189 Add default statement in switch.
21190 (lex): Separate `c' as an input variable, from the token_t result
21191 part.
21192 (unlexed): Is a token_t.
21193
21194 2001-09-10 Akim Demaille <akim@epita.fr>
21195
21196 * configure.in: Bump to 1.29a.
21197
21198 2001-09-07 Akim Demaille <akim@epita.fr>
21199
21200 Version 1.29.
21201
21202 2001-08-30 Akim Demaille <akim@epita.fr>
21203
21204 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21205 * m4/atconfig.m4: Remove.
21206 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21207 * tests/bison: New.
21208 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21209 m4_if, m4_patsubst, and m4_regexp.
21210 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21211 `input' file instead of echo.
21212
21213 2001-08-29 Akim Demaille <akim@epita.fr>
21214
21215 Bump to 1.28e.
21216
21217 2001-08-29 Akim Demaille <akim@epita.fr>
21218
21219 Version 1.28d.
21220
21221 2001-08-29 Paul Eggert <eggert@twinsun.com>
21222
21223 * src/bison.simple (yyparse): Don't take the address of an
21224 item before the start of an array, as that doesn't conform to
21225 the C Standard.
21226
21227 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21228
21229 * doc/bison.texinfo (Location Tracking Calc): New node.
21230
21231 2001-08-29 Paul Eggert <eggert@twinsun.com>
21232
21233 * src/output.c (output): Do not define const, as this now
21234 causes more problems than it cures.
21235
21236 2001-08-29 Akim Demaille <akim@epita.fr>
21237
21238 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21239 the nodes.
21240 Be sure to tag the `detailmenu'.
21241
21242 2001-08-29 Akim Demaille <akim@epita.fr>
21243
21244 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21245 download in a tmp dir.
21246
21247 2001-08-28 Marc Autret <autret_m@epita.fr>
21248
21249 * config/depcomp: New file.
21250
21251 2001-08-28 Marc Autret <autret_m@epita.fr>
21252
21253 * doc/bison.1 (mandoc): Adjust.
21254 From Juan Manuel Guerrero.
21255
21256 2001-08-28 Marc Autret <autret_m@epita.fr>
21257
21258 * src/print_graph.c (print_state): Fix.
21259
21260 2001-08-27 Marc Autret <autret_m@epita.fr>
21261
21262 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21263 char * members.
21264 Echo modifications to the functions prototypes.
21265 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21266
21267 2001-08-27 Marc Autret <autret_m@epita.fr>
21268
21269 * src/vcg.c: Include `xalloc.h'.
21270 (add_colorentry): New.
21271 (add_classname): New.
21272 (add_infoname): New.
21273 * src/vcg.h: Add new prototypes.
21274
21275 2001-08-27 Akim Demaille <akim@epita.fr>
21276
21277 * Makefile.maint: Sync. again with CVS Autoconf.
21278
21279 2001-08-27 Akim Demaille <akim@epita.fr>
21280
21281 * Makefile.maint: Formatting changes.
21282 (po-update, cvs-update, update): New targets.
21283 (AMTAR): Remove.
21284
21285 2001-08-27 Akim Demaille <akim@epita.fr>
21286
21287 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21288 * Makefile.maint: Sync. with CVS Autoconf.
21289
21290 2001-08-27 Marc Autret <autret_m@epita.fr>
21291
21292 * src/vcg.h (struct infoname_s): New.
21293 (struct colorentry_s): New.
21294 (graph_s): New fields {vertical,horizontal}_order in structure.
21295 Add `infoname' field.
21296 Add `colorentry' field;
21297 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21298 (G_HORIZONTAL_ORDER): New.
21299 (G_INFONAME): New.
21300 (G_COLORENTRY): New.
21301 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21302 Add output of `infoname'.
21303 Add output of `colorentry'.
21304
21305 2001-08-27 Marc Autret <autret_m@epita.fr>
21306
21307 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21308 This one shadowed a global parameter.
21309
21310 2001-08-24 Marc Autret <autret_m@epita.fr>
21311
21312 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21313 instead of `unsigned'.
21314 (print_state): Do not call obstack_object_size () in obstack_grow ()
21315 to avoid macro variables shadowing.
21316
21317 2001-08-23 Marc Autret <autret_m@epita.fr>
21318
21319 * src/lex.c (percent_table): Typo: s/naem/name/.
21320 Add graph option.
21321 Normalize new options declarations.
21322
21323 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21324
21325 * tests/suite.at: Exercise %header_extension and %source_extension.
21326
21327 2001-08-16 Marc Autret <autret_m@epita.fr>
21328
21329 * src/reader.c (parse_dquoted_param): New.
21330 (parse_header_extension_decl): Use it.
21331 (parse_source_extension_decl): Likewise.
21332
21333 2001-08-16 Marc Autret <autret_m@epita.fr>
21334
21335 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21336 (get_xxxx_str): Use assert () instead of complain ().
21337 Remove return invokations in default cases.
21338 (get_decision_str): Modify default behaviour. Remove second argument.
21339 Echo modifications on calls.
21340 (output_graph): Fix.
21341
21342 2001-08-16 Marc Autret <autret_m@epita.fr>
21343
21344 * src/getargs.c (usage): Update with ``-g, --graph''.
21345
21346 2001-08-16 Marc Autret <autret_m@epita.fr>
21347
21348 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21349 (Option Cross Key): Likewise.
21350 * doc/bison.1: Update.
21351
213522001-09-25 Pascal Bart <pascal.bart@epita.fr>
21353
21354 * src/output.c (output_master_parser): Don't finish action_obstack.
21355 (output_parser): Don't care about the muscle action, here.
21356 (prepare): Copy the action_obstack in the action muscle.
21357 (output): Free action_obstack.
21358
213592001-09-23 Pascal Bart <pascal.bart@epita.fr>
21360
21361 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21362 will contain `%union' declaration.
21363 (parse_union_decl): Delete #line directive output.
21364 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21365 informations about %union.
21366 (parse_union_decl): Copy the union_obstack in the muscle stype.
21367 * src/bison.simple: Add new #line directive.
21368 Add typdef %%stype YYSTYPE.
21369
213702001-09-23 Pascal Bart <pascal.bart@epita.fr>
21371
21372 * src/bison.simple: Add new `#line' directive.
21373
213742001-09-22 Pascal Bart <pascal.bart@epita.fr>
21375
21376 * src/bison.simple: New `#line' directive.
21377 * src/output.c (output_parser): Support new dynamic muscle input_line.
21378
213792001-09-22 Marc Autret <autret_m@epita.fr>
21380
21381 * src/output.c (output_master_parser): New.
21382 (output_parser): Be more re-entrant.
21383
213842001-09-21 Marc Autret <autret_m@epita.fr>
21385
21386 * src/reader.c (copy_definition, parse_union_decl): Update and use
21387 `linef' muscle.
21388 (copy_action): Likewise.
21389 Use obstack_1grow ().
21390 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21391
213922001-09-21 Marc Autret <autret_m@epita.fr>
21393
21394 * src/options.c (option_table): Adjust.
21395 * src/lex.c (parse_percent_token): Fix.
21396
213972001-09-20 Pascal Bart <pascal.bart@epita.fr>
21398
21399 * src/options.c (symtab.h): Include it, need by lex.h.
21400
214012001-09-20 Pascal Bart <pascal.bart@epita.fr>
21402
21403 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21404 is now an option_table_struct*.
21405 (option_strcmp): New function option_strcmp.
21406 (parse_percent_token): Call option_strcmp.
21407 * src/getargs.c (xalloc.h, options.h): Include it.
21408 (getargs): Call create_long_option_table.
21409 (getargs): Free longopts at the end of the function.
21410 (shortopts): Move in options.c.
21411 * src/options.c (create_long_option_table): New function. Convert
21412 information from option_table to option structure.
21413 * src/reader.c (options.h): Include it.
21414
21415 * src/Makefile.am: Adjust.
21416 * src/options.c (option_table): Create from longopts and percent_table.
21417 * src/getargs.c (longopts): Delete.
21418 * src/lex.c (struct percent_table_struct): Delete.
21419 (percent_table): Delete.
21420 (options.h): Include it.
21421 * src/options.c: Create.
21422 * src/options.h: Create.
21423 Declare enum opt_access_e.
21424 Define struct option_table_struct.
21425
214262001-09-20 Marc Autret <autret_m@epita.fr>
21427
21428 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21429 sections of Bison.
21430
214312001-09-19 Pascal Bart <pascal.bart@epita.fr>
21432
21433 * src/bison.simple: s/%%filename/%%skeleton.
21434 * src/muscle_tab.c (getargs.h): Include it.
21435 (muscle_init): Insert new muscle skeleton.
21436
214372001-09-18 Pascal Bart <pascal.bart@epita.fr>
21438
21439 * src/output.c (output_parser): Delete unused variable actions_dumped.
21440
214412001-09-07 Pascal Bart <pascal.bart@epita.fr>
21442
21443 * src/output.c (output): Delete call to reader_output_yylsp.
21444 * src/reader.c (reader): Likewise.
21445 * src/reader.h: Delete declaration of reader_output_yylsp.
21446
214472001-09-02 Marc Autret <autret_m@epita.fr>
21448
21449 * src/reader.c: Include muscle_tab.h.
21450 (parse_union_decl): Update.
21451 (parse_macro_decl): Rename parse_muscle_decl.
21452 Update to use renamed functions and variable.
21453 (read_declarations, copy_action, read_additionnal_code, : Updated
21454 with correct variables and functions names.
21455 (packsymbols, reader): Likewise.
21456
21457 * src/reader.h (muscle_obstack): Extern declaration update.
21458
21459 * src/output.c: Include muscle_tab.h
21460 In all functions using macro_insert, change by using muscle_insert ().
21461 (macro_obstack): Rename muscle_obstack.
21462 Echo modifications in the whole file.
21463 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21464 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21465 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21466
21467 * src/muscle_tab.h: Update double inclusion macros.
21468 (macro_entry_s): Rename muscle_entry_s.
21469 Update prototypes.
21470
21471 * src/muscle_tab.c: Include muscle_tab.h.
21472 Rename macro_tabble to muscle_table.
21473 (mhash1, mhash2, mcmp): Use muscle_entry.
21474 (macro_init): Rename muscle_init. Update.
21475 (macro_insert): Rename muscle_insert. Update.
21476 (macro_find): Rename muscle_find. Update.
21477
21478 * src/main.c: Include muscle_tab.h.
21479 (main): Call muscle_init ().
21480 * src/Makefile.am (bison_SOURCES): Echo modifications.
21481
214822001-09-02 Marc Autret <autret_m@epita.fr>
21483
21484 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21485
21486 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21487
214882001-09-02 Marc Autret <autret_m@epita.fr>
21489
21490 * src/macrotab.c, src/macrotab.h: Remove.
21491
214922001-09-01 Pascal Bart <pascal.bart@epita.fr>
21493
21494 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21495 filename.
21496
214972001-09-01 Marc Autret <autret_m@epita.fr>
21498
21499 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21500 to an explicit value to activate the feature. We do it here.
21501
215022001-08-31 Pascal Bart <pascal.bart@epita.fr>
21503
21504 * src/output.c (prepare): Delete the `filename' muscule insertion.
21505 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21506 (parse_union_decl): Likewise.
21507 * src/macrotab.c (macro_init): Initialize filename by infile.
21508
215092001-08-31 Marc Autret <autret_m@epita.fr>
21510
21511 * src/bison.simple (YYLSP_NEEDED): New definition.
21512 * src/output.c (prepare): Add macro insertion of `locations_flag'
21513
215142001-08-31 Pascal Bart <pascal.bart@epita.fr>
21515
21516 * src/output.c (prepare): Delete insertion of previous muscles,
21517 and insert the `prefix' muscles.
21518 * src/macrotab.c (macro_init): Likewise.
21519 (macro_init): Initialization prefix directive by `yy'.
21520 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21521 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21522 yylval, yydebug, yyerror, yynerrs and yyparse.
21523 New directive `#define' to substitute yydebug, ... with option
21524 name_prefix.
21525
215262001-08-31 Pascal Bart <pascal.bart@epita.fr>
21527
21528 * src/main.c (main): Standardize.
21529 * src/output.c (output_table_data, output_parser): Likewise.
21530 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21531
215322001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21533
21534 * src/reader.c (read_additionnal_code): Rename %%user_code to
21535 %%epilogue.
21536 * src/output.c (output): Rename %%declarations to %%prologue.
21537 * src/bison.simple: Echo modifications.
21538
215392001-08-31 Marc Autret <autret_m@epita.fr>
21540
21541 * src/reader.c (readgram): CleanUp.
21542 (output_token_defines): Likewise.
21543 (packsymbols): Likewise.
21544 (reader): Likewise.
21545 * src/output.c (output): CPP-out useless code.
21546
215472001-08-31 Pascal Bart <pascal.bart@epita.fr>
21548
21549 * src/reader.c (reader): Delete obsolete call to function
21550 output_trailers and output_headers.
21551 * src/output.h: Remove obsolete functions prototypes of output_headers
21552 and output_trailers.
21553
215542001-08-30 Pascal Bart <pascal.bart@epita.fr>
21555
21556 * src/main.c: Include macrotab.h.
21557 * src/macrotab.h (macro_entry_s): Constify fields.
21558 Adjust functions prototypes.
21559 * src/macrotab.c (macro_insert): Constify key and value.
21560 (macro_find): Constify key.
21561 (macro_insert): Include 'xalloc.h'
21562 (macro_insert): Use XMALLOC.
21563 (macro_find): Constify return value.
21564 * src/output.c (output_table_data): Rename table to table_data.
21565 (output_parser): Constify macro_key, macro_value.
21566
215672001-08-30 Marc Autret <autret_m@epita.fr>
21568
21569 * src/reader.c (parse_skel_decl): New.
21570 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21571 * src/lex.h (token_t): New token `tok_skel'.
21572 * src/lex.c (percent_table): Add skeleton option entry.
21573 Standardize.
21574
215752001-08-29 Marc Autret <autret_m@epita.fr>
21576
21577 * src/bison.simple: Add %%user_code directive at the end.
21578 * src/reader.c (read_additionnal_code): New.
21579 (reader): Use it.
21580 * src/output.c (output_program): Remove.
21581 (output): Update.
21582
215832001-08-28 Marc Autret <autret_m@epita.fr>
21584
21585 * src/output.c (output_actions): Clean up.
21586 (output_gram): CPP-out useless code.
21587 * src/reader.c (reader): Clean up, CPP-out useless code.
21588
215892001-08-28 Pascal Bart <pascal.bart@epita.fr>
21590
21591 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21592 directive.
21593 * src/bison.simple: Add `%%definitions'.
21594
215952001-08-28 Marc Autret <autret_m@epita.fr>
21596
21597 * config/depcomp: New file.
21598
215992001-08-27 Paul Eggert <eggert@twinsun.com>
21600
21601 * src/bison.simple (yyparse): Don't take the address of an
21602 item before the start of an array, as that doesn't conform to
21603 the C Standard.
21604
216052001-08-27 Robert Anisko <robert.anisko@epita.fr>
21606
21607 * src/output.c (output): Remove the initialization of the macro
21608 obstack. It was done too late here.
21609
21610 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21611 completely wrong.
21612 (reader): Initialize the macro obstack here, since we need it to grow
21613 '%define' directives.
21614
21615 * src/reader.h: Declare the macro obstack as extern.
21616
216172001-08-27 Robert Anisko <robert.anisko@epita.fr>
21618
21619 * src/output.c (output_parser): Fix. Store single '%' characters in
21620 the output obstack instead of throwing them away.
21621
216222001-08-27 Akim Demaille <akim@epita.fr>
21623
21624 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21625
216262001-08-25 Robert Anisko <robert.anisko@epita.fr>
21627
21628 * lib/Makefile.am: Adjust.
21629
216302001-08-25 Robert Anisko <robert.anisko@epita.fr>
21631
21632 * src/bison.simple: Update and add '%%' directives.
21633
216342001-08-25 Robert Anisko <robert.anisko@epita.fr>
21635
21636 * src/reader.c (reader): Remove calls to 'output_headers' and
21637 'output_trailers'. Remove some C output.
21638 (readgram): Disable a piece of code that was writing a default
21639 definition for 'YYSTYPE'.
21640 (reader_output_yylsp): Remove.
21641 (packsymbols): Output token defintions to a macro.
21642 (copy_definition): Disable C output.
21643
21644 * src/reader.c (parse_macro_decl): New function used to parse macro
21645 declarations.
21646 (copy_string2): Put the body of copy_string into this new function.
21647 Add a parameter to let the caller choose whether he wants to copy the
21648 string delimiters or not.
21649 (copy_string): Be a simple call to copy_string2 with the last argument
21650 bound to true.
21651 (read_declarations): Add case for macro definition.
21652 (copy_identifier): New.
21653 (parse_macro_decl): Read macro identifiers using copy_identifier
21654 rather than lex.
21655
216562001-08-25 Robert Anisko <robert.anisko@epita.fr>
21657
21658 * src/output.c (prepare): Add prefixed names.
21659 (output_parser): Output semantic actions.
21660 (output_parser): Fix bug on '%%line' directives.
21661
21662 * src/output.c (output_headers): Remove. The C code printed by this
21663 function should now be in the skeletons.
21664 (output_trailers): Remove.
21665 (output): Disable call to 'reader_output_yylsp'.
21666 (output_rule_data): Do not output tables to the table obstack.
21667
21668 * src/output.c: Remove some C dedicated output.
21669 Improve the use of macro and output obstacks.
21670 (output_defines): Remove.
21671
21672 * src/output.c (output_token_translations): Associate 'translate'
21673 table with a macro. No output to the table obstack.
21674 (output_gram): Same for 'rhs' and 'prhs'.
21675 (output_stos): Same for 'stos'.
21676 (output_rule_data): Same for 'r1' and 'r2'.
21677 (token_actions): Same for 'defact'.
21678 (goto_actions): Same for 'defgoto'.
21679 (output_base): Same for 'pact' and 'pgoto'.
21680 (output_table): Same for 'table'.
21681 (output_check): Same for 'check'.
21682
21683 * src/output.c (output_table_data): New function.
21684 (output_short_table): Remove.
21685 (output_short_or_char_table): Remove.
21686
21687 * src/output.c (output_parser): Replace most of the skeleton copy code
21688 with something new. Skeletons are now processed character by character
21689 rather than line by line, and Bison looks for '%%' macros. This is the
21690 first step in making Bison's output process (a lot) more flexible.
21691 (output_parser): Use the macro table.
21692
216932001-08-25 Robert Anisko <robert.anisko@epita.fr>
21694
21695 * src/main.c (main): Initialize the macro table.
21696
216972001-08-25 Robert Anisko <robert.anisko@epita.fr>
21698
21699 * src/lex.c (percent_table): Add tok_define.
21700 * src/lex.h: Add tok_define.
21701
217022001-08-25 Robert Anisko <robert.anisko@epita.fr>
21703
21704 * src/macrotab.c: New file.
21705 * src/macrotab.h: New file.
21706 * src/Makefile.am: Update.
21707
217082001-08-25 Robert Anisko <robert.anisko@epita.fr>
21709
21710 * lib/hash.c: New file.
21711 * lib/hash.h: New file.
21712 * lib/Makefile.am: Update.
21713
217142001-08-15 Akim Demaille <akim@epita.fr>
21715
21716 Version 1.28c.
21717
217182001-08-15 Marc Autret <autret_m@epita.fr>
21719
21720 * src/reader.c (readgram): Indent output macro YYSTYPE.
21721 (packsymbols): Likewise.
21722 (output_token_defines): Likewise.
21723 * src/files.c: Standardize.
21724 (compute_header_macro): New.
21725 (defines_obstack_save): New. Use compute_header_macro.
21726 (output_files): Update. Use defines_obstack_save.
21727
217282001-08-15 Akim Demaille <akim@epita.fr>
21729
21730 * doc/bison.texinfo (Table of Symbols): Document
21731 YYSTACK_USE_ALLOCA.
21732
217332001-08-15 Akim Demaille <akim@epita.fr>
21734
21735 * missing: Update from CVS Automake.
21736 * config/config.guess, config/config.sub, config/texinfo.tex:
21737 Update from gnu.org.
21738
217392001-08-15 Akim Demaille <akim@epita.fr>
21740
21741 * Makefile.maint: Sync with CVS Autoconf.
21742
217432001-08-14 Pascal Bart <pascal.bart@epita.fr>
21744
21745 * doc/bison.texinfo: Include GNU Free Documentation License from
21746 `fdl.texi'.
21747 * doc/fdl.texi: Add to package.
21748
217492001-08-14 Marc Autret <autret_m@epita.fr>
21750
21751 Turn on %{source,header}_extension features.
21752
21753 * src/lex.c (percent_table): Un-CPP out header_extension and
21754 source_extension.
21755 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21756 (compute_exts_from_src): Remove conditions. It restores priorities
21757 between options.
21758
217592001-08-14 Marc Autret <autret_m@epita.fr>
21760
21761 * src/files.c (compute_base_names): Add extensions computing when
21762 `--file-prefix' used.
21763 Standardize function calls.
21764
217652001-08-13 Marc Autret <autret_m@epita.fr>
21766
21767 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21768 defining it (defined but null disables alloca).
21769
217702001-08-13 Marc Autret <autret_m@epita.fr>
21771
21772 * src/bison.simple (_yy_memcpy): CPP reformat.
21773
217742001-08-13 Pascal Bart <pascal.bart@epita.fr>
21775
21776 * tests/atconfig.in (CPPFLAGS): Fix.
21777
217782001-08-10 Pascal Bart <pascal.bart@epita.fr>
21779
21780 * doc/bison.texinfo: Include GNU General Public License from
21781 `gpl.texi'.
21782 * doc/gpl.texi: Add to package.
21783
217842001-08-10 Marc Autret <autret_m@epita.fr>
21785
21786 * src/print_graph.h: Fix.
21787 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21788
217892001-08-10 Akim Demaille <akim@epita.fr>
21790
21791 * src/system.h: Provide default declarations for stpcpy, strndup,
21792 and strnlen.
21793
217942001-08-10 Robert Anisko <anisko_r@epita.fr>
21795
21796 * doc/bison.texinfo (Locations): Update @$ stuff.
21797
217982001-08-09 Robert Anisko <anisko_r@epita.fr>
21799
21800 * src/bison.simple (YYLLOC_DEFAULT): Update.
21801 (yyparse): Adjust.
21802
218032001-08-08 Marc Autret <autret_m@epita.fr>
21804
21805 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21806 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21807 Reported by Fabrice Bauzac.
21808
218092001-08-08 Marc Autret <autret_m@epita.fr>
21810
21811 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21812 * src/vcg.c (output_node): Fix.
21813 * src/vcg.h: Cleanup.
21814 * src/print_graph.c: Add comments.
21815 (node_output_size): New global variable. Simplify the formatting of
21816 the VCG graph output.
21817 (print_actions): Unused code is now used. It notifies the final state
21818 and no action states in the VCG graph. It also give the reduce actions.
21819 The `shift and goto' edges are red and the `go to state' edges are
21820 blue.
21821 Get the current node name and node_obstack by argument.
21822 (node_obstack): New variable.
21823 (print_state): Manage node_obstack.
21824 (print_core): Use node_obstack given by argument.
21825 A node is not only computed here but in print_actions also.
21826 (print_graph): CPP out useless code instead of commenting it.
21827
218282001-08-07 Pascal Bart <pascal.bart@epita.fr>
21829
21830 * tests/atconfig.in (CPPFLAGS): Fix.
21831
218322001-08-07 Akim Demaille <akim@epita.fr>
21833
21834 * src/print_graph.c (quote): New.
21835 (print_core): Use it.
21836
218372001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21838
21839 * src/vcg.c (complain.h): Include it.
21840 Unepitaize `return' invocations.
21841 [NDEBUG] (main): Remove.
21842 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21843 * src/files.c (open_files): Initialize graph_obstack.
21844 * src/print_graph.c (print_actions): CPP out useless code.
21845 (print_core): Don't output the last `\n' in labels.
21846 Use `quote'.
21847 * src/files.c (output_files): Output the VCG file.
21848 * src/main.c (main): Invoke print_graph ();
21849
218502001-08-06 Marc Autret <autret_m@epita.fr>
21851
21852 Automaton VCG graph output.
21853 Using option ``-g'' or long option ``--graph'', you can generate
21854 a gram_filename.vcg file containing a VCG description of the LALR (1)
21855 automaton of your grammar.
21856
21857 * src/main.c: Call to print_graph() function.
21858 * src/getargs.h: Update.
21859 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21860 (graph_flag): New flag.
21861 (longopts): Update.
21862 (getargs): Add case `g'.
21863 * src/files.c (graph_obstack): New obstack struct.
21864 (open_files): Initialize new obstack.
21865 (output_files): Saves graph_obstack if required.
21866 * src/files.h (graph_obstack): New extern declaration.
21867 * src/Makefile.am: Add new source files.
21868
218692001-08-06 Marc Autret <autret_m@epita.fr>
21870
21871 * src/print_graph.c, src/print_graph.h (graph): New.
21872 * src/vcg.h: New file.
21873 * src/vcg.c: New file, VCG graph handling.
21874
218752001-08-06 Marc Autret <autret_m@epita.fr>
21876
21877 Add of %source_extension and %header_extension which specify
21878 the source or/and the header output file extension.
21879
21880 * src/files.c (compute_base_names): Remove initialisation of
21881 src_extension and header_extension.
21882 (compute_exts_from_gf): Update.
21883 (compute_exts_from_src): Update.
21884 (output_files): Update.
21885 * src/reader.c (parse_header_extension_decl): New.
21886 (parse_source_extension_decl): New.
21887 (read_declarations): New case statements for the new tokens.
21888 * src/lex.c (percent_table): Add entries for %source_extension
21889 and %header_extension.
21890 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21891
218922001-08-06 Marc Autret <autret_m@epita.fr>
21893
21894 * configure.in: Bump to 1.28c.
21895 * doc/bison.texinfo: Texinfo thingies.
21896
218972001-08-04 Pascal Bart <pascal.bart@epita.fr>
21898
21899 * tests/atconfig.in (CPPFLAGS): Add.
21900 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21901
219022001-08-03 Akim Demaille <akim@epita.fr>
21903
21904 Version 1.28b.
21905
219062001-08-03 Akim Demaille <akim@epita.fr>
21907
21908 * tests/Makefile.am (check-local): Ship testsuite.
21909 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21910 Include `string.h'.
21911
219122001-08-03 Akim Demaille <akim@epita.fr>
21913
21914 * configure.in: Try using -Wformat when compiling.
21915
219162001-08-03 Akim Demaille <akim@epita.fr>
21917
21918 * configure.in: Bump to 1.28b.
21919
219202001-08-03 Akim Demaille <akim@epita.fr>
21921
21922 * src/complain.c: Adjust strerror_r portability issues.
21923
219242001-08-03 Akim Demaille <akim@epita.fr>
21925
21926 Version 1.28a.
21927
219282001-08-03 Akim Demaille <akim@epita.fr>
21929
21930 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21931 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21932 * src/getargs.c: Include complain.h.
21933 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21934 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21935
219362001-08-03 Akim Demaille <akim@epita.fr>
21937
21938 * src/reader.c (readgram): Display hidden chars in error messages.
21939
219402001-08-03 Akim Demaille <akim@epita.fr>
21941
21942 Update to gettext 0.10.39.
21943
219442001-08-03 Akim Demaille <akim@epita.fr>
21945
21946 * lib/strspn.c: New.
21947
219482001-08-01 Marc Autret <autret_m@epita.fr>
21949
21950 * doc/bison.texinfo: Update.
21951 * doc/bison.1 (mandoc): Update.
21952 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21953 * src/files.c: Support output files extensions computing.
21954 (src_extension): New static variable.
21955 (header_extension): New static variable.
21956 (tr): New function.
21957 (get_extension_index): New function, gets the index of an extension
21958 filename in a string.
21959 (compute_exts_from_gf): New function, computes extensions from the
21960 grammar file extension.
21961 (compute_exts_from_src): New functions, computes extensions from the
21962 C source file extension, file given by ``-o'' option.
21963 (compute_base_names): Update.
21964 (output_files): Update.
21965
219662001-08-01 Robert Anisko <anisko_r@epita.fr>
21967
21968 * doc/bison.texi: Document @$.
21969 (Locations): New section.
21970
219712001-07-18 Akim Demaille <akim@epita.fr>
21972
21973 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21974 * config/prev-version.txt, config/move-if-change: New.
21975 * Makefile.am: Adjust.
21976
219772001-07-08 Pascal Bart <pascal.bart@epita.fr>
21978
21979 * src/bison.simple (yyparse): Suppress warning `comparaison
21980 between signed and unsigned'.
21981
219822001-07-05 Pascal Bart <pascal.bart@epita.fr>
21983
21984 * src/getargs.h (raw_flag): Remove.
21985 * src/getargs.c: Die on `-r'/`--raw'.
21986 * src/lex.c (parse_percent_token): Die on `%raw'.
21987 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21988 * tests/calc.at: Suppress test with option `--raw'.
21989
219902001-07-14 Akim Demaille <akim@epita.fr>
21991
21992 * config/: New.
21993 * configure.in: Require Autoconf 2.50.
21994 Update to gettext 0.10.38.
21995
219962001-03-16 Akim Demaille <akim@epita.fr>
21997
21998 * doc/bison.texinfo: ANSIfy the examples.
21999
220002001-03-16 Akim Demaille <akim@epita.fr>
22001
22002 * getargs.c (skeleton): New variable.
22003 (longopts): --skeleton is a new option.
22004 (shortopts, getargs): -S is a new option.
22005 * getargs.h: Declare skeleton.
22006 * output.c (output_parser): Use it.
22007
220082001-03-16 Akim Demaille <akim@epita.fr>
22009
22010 * m4/strerror_r.m4: New.
22011 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22012 * lib/error.h, lib/error.c: Update.
22013
220142001-03-16 Akim Demaille <akim@epita.fr>
22015
22016 * src/getargs.c (longopts): Clean up.
22017
220182001-02-21 Akim Demaille <akim@epita.fr>
22019
22020 * src/reader.c (gensym): `gensym_count' is your own.
22021 Use a static buf to create the symbol name, as token_buffer is no
22022 longer a buffer.
22023
220242001-02-08 Akim Demaille <akim@epita.fr>
22025
22026 * src/conflicts.c (conflict_report): Be sure not to append to res
22027 between two calls, which could happen if both first sprintf were
22028 skipped, but not the first cp += strlen.
22029
220302001-02-08 Akim Demaille <akim@epita.fr>
22031
22032 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22033 New, from fileutils 4.0.37.
22034 * configure.in: Require Autoconf 2.49c. I took some time before
22035 making this decision. This is the only way out for portability
22036 issues in Bison, it would mean way too much duplicate effort to
22037 import in Bison features implemented in 2.49c since 2.13.
22038 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22039
220402001-02-02 Akim Demaille <akim@epita.fr>
22041
22042 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22043 * lib/xalloc.h, lib/xmalloc.c: Update.
22044
220452001-01-19 Akim Demaille <akim@epita.fr>
22046
22047 Get rid of the ad hoc handling of token_buffer in the scanner: use
22048 the obstacks.
22049
22050 * src/lex.c (token_obstack): New.
22051 (init_lex): Initialize it. No longer call...
22052 (grow_token_buffer): this. Remove it.
22053 Adjust all the places which used it to use the obstack.
22054
220552001-01-19 Akim Demaille <akim@epita.fr>
22056
22057 * src/lex.h: Rename all the tokens:
22058 s/\bENDFILE\b/tok_eof/g;
22059 s/\bIDENTIFIER\b/tok_identifier/g;
22060 etc.
22061 Let them be enums, not #define, to ease debugging.
22062 Adjust all the code.
22063
220642001-01-18 Akim Demaille <akim@epita.fr>
22065
22066 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22067 * src/lex.c (maxtoken, grow_token_buffer): Static.
22068
220692001-01-18 Akim Demaille <akim@epita.fr>
22070
22071 Since we now use obstacks, more % directives can be enabled.
22072
22073 * src/lex.c (percent_table): Also accept `%yacc',
22074 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22075 `%debug'.
22076 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22077 instead of returning a token.
22078 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22079 * src/reader.c (read_declarations): Adjust.
22080 * src/files.c (open_files): Don't call `compute_base_names', don't
22081 compute `attrsfile' since they depend upon data which might be
22082 *in* the input file now.
22083 (output_files): Do it here.
22084 * src/output.c (output_headers): Document the fact that this patch
22085 introduces a guaranteed SEGV for semantic parsers.
22086 * doc/bison.texinfo: Document them.
22087 * tests/suite.at: Exercise these %options.
22088
220892000-12-20 Akim Demaille <akim@epita.fr>
22090
22091 Also handle the output file (--verbose) with obstacks.
22092
22093 * files.c (foutput): Remove.
22094 (output_obstack): New.
22095 Adjust all dependencies.
22096 * src/conflicts.c: Return a string.
22097 * src/system.h (obstack_grow_string): Rename as...
22098 (obstack_sgrow): this. Be ready to work with non literals.
22099 (obstack_fgrow4): New.
22100
221012000-12-20 Akim Demaille <akim@epita.fr>
22102
22103 * src/files.c (open_files): Fix the computation of short_base_name
22104 in the case of `-o foo.tab.c'.
22105
221062000-12-20 Akim Demaille <akim@epita.fr>
22107
22108 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22109 (copy_dollar): Now that everything uses obstacks, get rid of the
22110 FILE * parameters.
22111
221122000-12-20 Akim Demaille <akim@epita.fr>
22113
22114 * src/files.c (open_files): Actually the `.output' file is based
22115 on the short_base_name, not base_name.
22116 * tests/suite.at (Checking output file names): Adjust.
22117
221182000-12-20 Akim Demaille <akim@epita.fr>
22119
22120 * src/bison.s1: Remove, we now use directly...
22121 * src/bison.simple: this.
22122 * src/Makefile.am: Use pkgdata instead of data.
22123
221242000-12-20 Akim Demaille <akim@epita.fr>
22125
22126 * src/files.c (guard_obstack): New.
22127 (open_files): Initialize it.
22128 (output_files): Dump it...
22129 * src/files.h: Export it.
22130 * src/reader.c (copy_guard): Use it.
22131
221322000-12-19 Akim Demaille <akim@epita.fr>
22133
22134 * src/files.c (outfile, defsfile, actfile): Removed as global
22135 vars.
22136 (open_files): Don't compute them.
22137 (output_files): Adjust.
22138 (base_name, short_base_name): Be global.
22139 Adjust dependencies.
22140
221412000-12-19 Akim Demaille <akim@epita.fr>
22142
22143 * src/files.c (strsuffix): New.
22144 (stringappend): Be just like strcat but allocate.
22145 (base_names): Eve out from open_files.
22146 Try to simplify the rather hairy computation of base_name and
22147 short_base_name.
22148 (open_files): Use it.
22149 * tests/suite.at (Checking output file names): New test.
22150
221512000-12-19 Akim Demaille <akim@epita.fr>
22152
22153 * src/system.h (obstack_grow_literal_string): Rename as...
22154 (obstack_grow_string): this.
22155 * src/output.c (output_parser): Recognize `%% actions' instead of
22156 `$'.
22157 * src/bison.s1: s/$/%% actions/.
22158 * src/bison.hairy: Likewise.
22159
221602000-12-19 Akim Demaille <akim@epita.fr>
22161
22162 * src/output.c (output_parser): Compute the `#line' lines when
22163 there are.
22164 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22165 Suggested by Hans Aberg.
22166
221672000-12-19 Akim Demaille <akim@epita.fr>
22168
22169 Let the handling of the skeleton files be local to the procedures
22170 that use it.
22171
22172 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22173 longer static.
22174 (fparser, open_extra_files): Remove.
22175 (open_files, output_files): Don't take care of fparser.
22176 * src/files.h: Adjust.
22177 * src/output.c (output_parser): Open and close the file to the
22178 skeleton.
22179 * src/reader.c (read_declarations): When %semantic_parser, open
22180 fguard.
22181
221822000-12-19 Akim Demaille <akim@epita.fr>
22183
22184 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22185 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22186
221872000-12-19 Akim Demaille <akim@epita.fr>
22188
22189 * src/files.c (open_files): Yipee! We no longer need all the code
22190 looking for `/tmp' since we have no tmp file.
22191
221922000-12-19 Akim Demaille <akim@epita.fr>
22193
22194 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22195 New macros.
22196 * src/files.c (open_files): Less dependency on MSDOS etc.
22197
221982000-12-14 Akim Demaille <akim@epita.fr>
22199
22200 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22201 Provide a default definition.
22202 Use it when executing the default @ action.
22203 * src/reader.c (reader_output_yylsp): No longer include
22204 `timestamp' and `text' in the default YYLTYPE.
22205
222062000-12-12 Akim Demaille <akim@epita.fr>
22207
22208 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22209 (copy_guard): Quote the file names.
22210 Reported by Laurent Mascherpa.
22211
222122000-12-12 Akim Demaille <akim@epita.fr>
22213
22214 * src/output.c (output_headers, output_program, output): Be sure
22215 to escape special characters when outputting filenames.
22216 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22217 (output_headers): Don't depend on them, Use ACTSTR.
22218
222192000-11-17 Akim Demaille <akim@epita.fr>
22220
22221 * lib/obstack.h: Formatting changes.
22222 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22223 prevents type checking.
22224 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22225 cast the value to (void *): assigning a `foo *' to a `void *'
22226 variable is valid.
22227 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22228 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22229 append characters.
22230
222312000-11-17 Akim Demaille <akim@epita.fr>
22232
22233 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22234 as...
22235 (suite.m4, regression.m4, calc.m4): these.
22236 * tests/atgeneral.m4: Update from CVS Autoconf.
22237
222382000-11-17 Akim Demaille <akim@epita.fr>
22239
22240 * tests/regression.m4 (%union and --defines): New test,
22241 demonstrating a current bug in the obstack implementation.
22242
222432000-11-17 Akim Demaille <akim@epita.fr>
22244
22245 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22246 macros.
22247 Use them to declare the variables which are global or local to
22248 `yyparse'.
22249
222502000-11-17 Akim Demaille <akim@epita.fr>
22251
22252 * acconfig.h: Remove, no longer used.
22253
222542000-11-07 Akim Demaille <akim@epita.fr>
22255
22256 * src: s/Copyright (C)/Copyright/g.
22257
222582000-11-07 Akim Demaille <akim@epita.fr>
22259
22260 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22261 defining.
22262 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22263
222642000-11-07 Akim Demaille <akim@epita.fr>
22265
22266 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22267 Merge in a single CPP if/else.
22268
222692000-11-07 Akim Demaille <akim@epita.fr>
22270
22271 * src/output.c (output): Remove useless variables.
22272 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22273 argument `data' for consistency with the prototypes.
22274 Qualify it `const'.
22275 (obstack_copy, obstack_copy0): Rename the second argument as
22276 `address' for consistency. Qualify it `const'.
22277 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22278 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22279 `const' their input argument (`data' or `address').
22280 Adjust the corresponding macros to include `const' in casts.
22281
222822000-11-03 Akim Demaille <akim@epita.fr>
22283
22284 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22285 s/PFILE1/BISON_HAIRY/.
22286 Adjust dependencies.
22287
222882000-11-03 Akim Demaille <akim@epita.fr>
22289
22290 For some reason, this was not applied.
22291
22292 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22293 `unlink': it's no longer used.
22294
222952000-11-03 Akim Demaille <akim@epita.fr>
22296
22297 * src/files.c (skeleton_find): New function, eved out of...
22298 (open_files, open_extra_files): here.
22299
223002000-11-03 Akim Demaille <akim@epita.fr>
22301
22302 Don't use `atexit'.
22303
22304 * src/files.c (obstack_save): New function.
22305 (done): Rename as...
22306 (output_files): this.
22307 Use `obstack_save'.
22308 * src/main.c (main): Don't use `atexit' to register `done', since
22309 it no longer has to remove tmp files, just call `output_files'
22310 when there are no errors.
22311
223122000-11-02 Akim Demaille <akim@epita.fr>
22313
22314 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22315 `unlink': it's no longer used.
22316 * src/files.h: Formatting changes.
22317
223182000-11-02 Akim Demaille <akim@epita.fr>
22319
22320 Remove the last uses of mktemp and unlink/delete.
22321
22322 * src/files.c (fdefines, ftable): Removed.
22323 (defines_ostack, table_obstack): New.
22324 Adjust dependencies of the former into uses of the latter.
22325 * src/output.c (output_short_or_char_table, output_short_table):
22326 Convert to using obstacks.
22327 * src/reader.c (copy_comment2): Accept one FILE * and two
22328 obstacks.
22329 (output_token_defines, reader_output_yylsp): Use obstacks.
22330 * src/system.h (obstack_fgrow3): New.
22331 * po/POTFILES.in: Adjust.
22332
223332000-11-01 Akim Demaille <akim@epita.fr>
22334
22335 Change each use of `fattrs' into a use of `attrs_obstack'.
22336
22337 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22338 * src/files.c (fattrs): Remove.
22339 (attrs_obstack): New.
22340 Adjust all dependencies.
22341 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22342
223432000-11-01 Akim Demaille <akim@epita.fr>
22344
22345 Introduce obstacks.
22346 Change each use of `faction' into a use of `action_obstack'.
22347
22348 * lib/obstack.h, lib/obstack.c: New files.
22349 * src/files.c (faction): Remove.
22350 (action_obstack): New.
22351 Adjust all dependencies.
22352
223532000-10-20 Akim Demaille <akim@epita.fr>
22354
22355 * lib/quote.h (PARAMS): New macro. Use it.
22356
223572000-10-16 Akim Demaille <akim@epita.fr>
22358
22359 * src/output.c (output_short_or_char_table): New function.
22360 (output_short_table, output_token_translations): Use it.
22361 (goto_actions): Use output_short_table.
22362
223632000-10-16 Akim Demaille <akim@epita.fr>
22364
22365 * src/symtab.c (bucket_new): New function.
22366 (getsym): Use it.
22367
22368 * src/output.c (output_short_table): New argument to display the
22369 comment associated with the table.
22370 Adjust dependencies.
22371 (output_gram): Use it.
22372 (output_rule_data): Nicer output layout for YYTNAME.
22373
223742000-10-16 Akim Demaille <akim@epita.fr>
22375
22376 * src/lex.c (read_typename): New function.
22377 (lex): Use it.
22378 * src/reader.c (copy_dollar): Likewise.
22379
223802000-10-16 Akim Demaille <akim@epita.fr>
22381
22382 * src/reader.c (copy_comment2): Expect the input stream to be on
22383 the `/' which is suspected to open a comment, instead of being
22384 called after `//' or `/*' was read.
22385 (copy_comment, copy_definition, parse_union_decl, copy_action)
22386 (copy_guard): Adjust.
22387
223882000-10-16 Akim Demaille <akim@epita.fr>
22389
22390 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22391 `read_signed_integer'.
22392
223932000-10-16 Akim Demaille <akim@epita.fr>
22394
22395 * src/reader.c (copy_dollar): New function.
22396 (copy_guard, copy_action): Use it.
22397
223982000-10-16 Akim Demaille <akim@epita.fr>
22399
22400 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22401 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22402 New files, from Fileutils 4.0.27.
22403 * src/main.c (printable_version): Remove.
22404 * src/lex.c, src/reader.c: Use `quote'.
22405
224062000-10-04 Akim Demaille <akim@epita.fr>
22407
22408 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22409
224102000-10-04 Akim Demaille <akim@epita.fr>
22411
22412 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22413
224142000-10-04 Akim Demaille <akim@epita.fr>
22415
22416 When a literal string is used to define two different tokens,
22417 `bison -v' segfaults.
22418 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22419
22420 * tests/regression.m4: New file.
22421 Include the core of the sample provided by Piotr Gackiewicz.
22422 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22423 properly.
22424
224252000-10-04 Akim Demaille <akim@epita.fr>
22426
22427 * src/reader.c (parse_expect_decl): Keep `count' within the size
22428 of `buffer'.
22429 From Neil Booth.
22430
224312000-10-02 Paul Eggert <eggert@twinsun.com>
22432
22433 * bison.s1 (yyparse): Assign the default value
22434 unconditionally, to avoid a GCC warning and make the parser a
22435 tad smaller.
22436
224372000-10-02 Akim Demaille <akim@epita.fr>
22438
22439 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22440 options.
22441
224422000-10-02 Akim Demaille <akim@epita.fr>
22443
22444 * src/derives.c, src/print.c, src/reduce.c: To ease the
22445 translation, move some `\n' out of the translated strings.
22446
224472000-10-02 Akim Demaille <akim@epita.fr>
22448
22449 The location tracking mechanism is precious for parse error
22450 messages. Nevertheless, it is enabled only when `@n' is used in
22451 the grammar, which is a different issue (you can use it in error
22452 message, but not in the grammar per se). Therefore, there should
22453 be another means to enable it.
22454
22455 * src/getargs.c (getargs): Support `--locations'.
22456 (usage): Report it.
22457 * src/getargs.h (locationsflag): Export it.
22458 * src/lex.c (percent_table): Support `%locations'.
22459 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22460 with `locationsflag'.
22461 * doc/bison.texinfo: Document `--locations' and `%locations'.
22462 Sort the options.
22463 * tests/calc.m4: Test it.
22464
22465 For regularity of the names, replace each
22466 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22467 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22468 In addition replace each `flag' with `_flag'.
22469
224702000-10-02 Akim Demaille <akim@epita.fr>
22471
22472 Also test parse error messages, including with YYERROR_VERBOSE.
22473
22474 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22475 associative).
22476 Use it to check the computations.
22477 Use it to check `nonassoc' is honored.
22478 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22479 `--yyerror-verbose'.
22480 (_AT_CHECK_CALC): Adjust to this option.
22481 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22482
224832000-10-02 Akim Demaille <akim@epita.fr>
22484
22485 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22486 the latter demonstrates a flaw in the handling of non debugging
22487 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22488 was used in order to simplify:
22489
22490 #if YYDEBUG
22491 if (yydebug)
22492 {
22493 ...
22494 }
22495 #endif
22496
22497 into
22498
22499 if (yydebug)
22500 {
22501 ...
22502 }
22503
22504 unfortunately this leads to a CPP conflict when
22505 `--name-prefix=foo' is used since it produces `#define yydebug
22506 foodebug'.
22507
22508 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22509 (YYDPRINTF): New macro.
22510 Spread its use.
22511 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22512 the bison options.
22513 Also test `--verbose', `--defines' and `--name-prefix'.
22514
225152000-10-02 Akim Demaille <akim@epita.fr>
22516
22517 Improve the readability of the produced parsers.
22518
22519 * src/bison.s1: Formatting changes.
22520 Improve the comment related to the `$' mark.
22521 (yydefault): Don't fall through to `yyresume': `goto' there.
22522 * src/output.c (output_parser): When the `$' is met, skip the end
22523 of its line.
22524 New variable, `number_of_dollar_signs', to check there's exactly
22525 one `$' in the parser skeleton.
22526
225272000-10-02 Akim Demaille <akim@epita.fr>
22528
22529 * lib/xstrdup.c: New file, from the fileutils.
22530 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22531 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22532 instead of strlen + xmalloc + strcpy.
22533 * src/symtab.c (copys): Remove, use xstrdup instead.
22534
225352000-10-02 Akim Demaille <akim@epita.fr>
22536
22537 * src/gram.h (associativity): New enum type which replaces the
22538 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22539 `right_assoc', `left_assoc' and `non_assoc'.
22540 Adjust all dependencies.
22541 * src/reader.c: Formatting changes.
22542 (LTYPESTR): Don't define it, use it as a literal in
22543 `reader_output_yylsp'.
22544 * src/symtab.h (symbol_class): New enum type which replaces the
22545 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22546 `sunknown', `stoken and `snterm'.
22547
225482000-10-02 Akim Demaille <akim@epita.fr>
22549
22550 * src/getargs.c (fixed_outfiles): Rename as...
22551 (yaccflag): for consistency and accuracy.
22552 Adjust dependencies.
22553
225542000-10-02 Akim Demaille <akim@epita.fr>
22555
22556 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22557 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22558 difficult and introduced a lot of core dump. It turns out that
22559 Bison used an implementation of `xmalloc' based on `calloc', and
22560 at various places it does depend upon the initialization to 0. I
22561 have not tried to isolate the pertinent places, and all the former
22562 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22563 someone should address this issue.
22564
22565 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22566 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22567 files.
22568 Adjust dependencies.
22569 * src/warshall.h: New file.
22570 Propagate.
22571
225722000-10-02 Akim Demaille <akim@epita.fr>
22573
22574 Various anti-`extern in *.c' changes.
22575
22576 * src/system.h: Include `assert.h'.
22577
225782000-10-02 Akim Demaille <akim@epita.fr>
22579
22580 * src/state.h (nstates, final_state, first_state, first_shift)
22581 (first_reduction): Move their exportation from here...
22582 * src/LR0.h: to here.
22583 Adjust dependencies.
22584 * src/getargs.c (statisticsflag): New variable.
22585 Add support for `--statistics'.
22586 Adjust dependencies.
22587
22588 Remove a lot of now useless `extern' statements in most files.
22589
225902000-10-02 Akim Demaille <akim@epita.fr>
22591
22592 * src/LR0.h: New file.
22593 Propagate its use.
22594
225952000-10-02 Akim Demaille <akim@epita.fr>
22596
22597 * src/print.h: New file.
22598 Propagate its use.
22599 * src/print.c: Formatting and ordering changes.
22600 (verbose, terse): Replace with...
22601 (print_results): this new function.
22602 Adjust dependencies.
22603
226042000-10-02 Akim Demaille <akim@epita.fr>
22605
22606 * src/conflicts.c (conflict_report): New function.
22607 (conflict_log, verbose_conflict_log): Replace with...
22608 (print_conflicts): this function.
22609 Adjust dependencies.
22610 * src/conflicts.h: New file.
22611 Propagate its inclusion.
22612
226132000-10-02 Akim Demaille <akim@epita.fr>
22614
22615 * src/nullable.h: New file.
22616 Propagate its inclusion.
22617 * src/nullable.c: Formatting changes.
22618
226192000-10-02 Akim Demaille <akim@epita.fr>
22620
22621 * src/reduce.h: New file.
22622 Propagate its inclusion.
22623 * src/reduce.c: Topological sort and other formatting changes.
22624 (bool, TRUE, FALSE): Move their definition to...
22625 * src/system.h: here.
22626
226272000-10-02 Akim Demaille <akim@epita.fr>
22628
22629 * src/files.c: Formatting changes.
22630 (tryopen, tryclose, openfiles): Rename as...
22631 (xfopen, xfclose, open_files): this.
22632 (stringappend): static.
22633 * src/files.h: Complete the list of exported symbols.
22634 Propagate its use.
22635
226362000-10-02 Akim Demaille <akim@epita.fr>
22637
22638 * src/reader.h: New file.
22639 Propagate its use instead of tedious list of `extern' and
22640 prototypes.
22641 * src/reader.c: Formatting changes, topological sort,
22642 s/register//.
22643
226442000-10-02 Akim Demaille <akim@epita.fr>
22645
22646 * src/lex.h: Prototype `lex.c' exported functions.
22647 * src/reader.c: Adjust.
22648 * src/lex.c: Formatting changes.
22649 (safegetc): Rename as...
22650 (xgetc): this.
22651
226522000-10-02 Akim Demaille <akim@epita.fr>
22653
22654 * src/lalr.h: New file.
22655 Propagate its inclusion instead of prototypes and `extern'.
22656 * src/lalr.c: Formatting changes, topological sorting etc.
22657
226582000-10-02 Akim Demaille <akim@epita.fr>
22659
22660 * src/output.c (token_actions): Introduce a temporary array,
22661 YYDEFACT, that makes it possible for this function to use
22662 output_short_table.
22663
226642000-10-02 Akim Demaille <akim@epita.fr>
22665
22666 `user_toknums' is output as a `short[]' in `output.c', while it is
22667 defined as a `int[]' in `reader.c'. For consistency with the
22668 other output tables, `user_toknums' is now defined as a table of
22669 shorts.
22670
22671 * src/reader.c (user_toknums): Be a short table instead of an int
22672 table.
22673 Adjust dependencies.
22674
22675 Factor the short table outputs.
22676
22677 * src/output.c (output_short_table): New function.
22678 * src/output.c (output_gram, output_stos, output_rule_data)
22679 (output_base, output_table, output_check): Use it.
22680
226812000-10-02 Akim Demaille <akim@epita.fr>
22682
22683 * src/output.c (output): Topological sort of the functions, in
22684 order to get rid of the `static' prototypes.
22685 No longer use `register'.
22686 * src/output.h: New file.
22687 Propagate its inclusion in files explicitly prototyping functions
22688 from output.c.
22689
226902000-09-21 Akim Demaille <akim@epita.fr>
22691
22692 * src/atgeneral.m4: Update from Autoconf.
22693
226942000-09-21 Akim Demaille <akim@epita.fr>
22695
22696 * src/closure.h: New file.
22697 * src/closure.c: Formatting changes, topological sort over the
22698 functions, use of closure.h.
22699 (initialize_closure, finalize_closure): Rename as...
22700 (new_closure, free_closure): these. Adjust dependencies.
22701 * src/LR0.c: Formatting changes, topological sort, use of
22702 cloture.h.
22703 (initialize_states): Rename as...
22704 (new_states): this.
22705 * src/Makefile.am (noinst_HEADERS): Adjust.
22706
227072000-09-20 Akim Demaille <akim@epita.fr>
22708
22709 * src/acconfig.h: Don't protect config.h against multiple
22710 inclusion.
22711 Don't define PARAMS.
22712 * src/system.h: Define PARAMS.
22713 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22714 purpose of config.h. system.h must not try to fix wrong
22715 definitions in config.h.
22716
227172000-09-20 Akim Demaille <akim@epita.fr>
22718
22719 * src/derives.h: New file.
22720 * src/main.c, src/derives.h: Use it.
22721 Formatting changes.
22722 * src/Makefile.am (noinst_HEADERS): Adjust.
22723
227242000-09-20 Akim Demaille <akim@epita.fr>
22725
22726 * tests/atgeneral.m4: Update from Autoconf.
22727 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22728 (AT_CHECK_CALC): New macros.
22729 Use these macros to test bison with options `', `--raw',
22730 `--debug', `--yacc', `--yacc --debug'.
22731
227322000-09-19 Akim Demaille <akim@epita.fr>
22733
22734 * src/output.c: Formatting changes.
22735 * src/machine.h: Remove, leaving its contents in...
22736 * src/system.h: here.
22737 Include stdio.h.
22738 Adjust all dependencies on stdio.h and machine.h.
22739 * src/getargs.h: New file.
22740 Let all `extern' declarations about getargs.c be replaced with
22741 inclusion of `getargs.h'.
22742 * src/Makefile.am (noinst_HEADERS): Adjust.
22743
22744 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22745 scope.
22746 (yyerror): Returns void, not int.
22747 * doc/bison.texinfo: Formatting changes.
22748
227492000-09-19 Akim Demaille <akim@epita.fr>
22750
22751 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22752 portable.
22753
227542000-09-18 Akim Demaille <akim@epita.fr>
22755
22756 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22757 * src/Makefile.am (INCLUDES): Don't.
22758 Be ready to fetch headers in lib/.
22759
227602000-09-18 Akim Demaille <akim@epita.fr>
22761
22762 * doc/bison.texinfo: Update the copyright.
22763 ANSIfy and GNUify the examples.
22764 Remove the old menu.
22765
227662000-09-18 Akim Demaille <akim@epita.fr>
22767
22768 First set of tests: use the `calc' example from the documentation.
22769
22770 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22771 is defined only when YYDEBUG is.
22772 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22773 * src/files.c (tryopen, tryclose): Formatting changes.
22774 Move to the top and be static.
22775 * src/reader.c (read_signed_integer): Likewise.
22776 * tests/calc.m4: New file.
22777 * Makefile.am, suite.m4: Adjust.
22778 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22779
227802000-09-18 Akim Demaille <akim@epita.fr>
22781
22782 Add support for an Autotest test suite for Bison.
22783
22784 * m4/m4.m4, m4/atconfig.m4: New files.
22785 * m4/Makefile.am (EXTRA_DIST): Adjust.
22786 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22787 files.
22788 * src/getargs.c: Display a more standard --version message.
22789 * src/reader.c (reader): Formatting changes.
22790 No longer depend upon VERSION_STRING.
22791 * configure.in: No longer use `dnl'.
22792 Set up the test suite and the new directory `tests/.
22793 (VERSION_STRING): Remove.
22794
227952000-04-14 Akim Demaille <akim@epita.fr>
22796
22797 * src/reader.c (copy_comment2): New function, same as former
22798 `copy_comment', but outputs into two FILE *.
22799 (copy_comment): Use it.
22800 (parse_union_decl): Use it.
22801 (get_type, parse_start_decl): Use the same `invalid' message.
22802 (parse_start_decl, parse_union_decl): Use the same `multiple'
22803 message.
22804 (parse_union_decl, copy_guard, copy_action): Use the same
22805 `unmatched' message.
22806 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22807
228082000-03-31 Akim Demaille <akim@epita.fr>
22809
22810 * src/files.c (tryopen, tryclose): Move to the top.
22811 Be static.
22812
228132000-03-31 Akim Demaille <akim@epita.fr>
22814
22815 * src/main.c (main): Don't call `done', exit does it.
22816
228172000-03-31 Akim Demaille <akim@epita.fr>
22818
22819 * allocate.c: s/return (foo)/return foo/.
22820 * lalr.c: Likewise.
22821 * LR0.c: Likewise.
22822 * output.c: Likewise.
22823 * reader.c: Likewise.
22824 * symtab.c: Likewise.
22825 * vmsgetargs.c: Likewise.
22826
228272000-03-31 Akim Demaille <akim@epita.fr>
22828
22829 Clean up the error reporting functions.
22830
22831 * src/report.c: New file.
22832 * src/report.h: Likewise.
22833 * src/Makefile.am: Adjust.
22834 * m4/error.m4: New file.
22835 * m4/Makefile.am: Adjust.
22836 * configure.in (jm_PREREQ_ERROR): Call it.
22837 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22838 Remove.
22839 (fatal, fatals): Remove. All callers use complain.c::fatal.
22840 (warn, warni, warns, warnss, warnss): Remove. All callers use
22841 complain.c::complain.
22842 (toomany): Remove, use fatal instead.
22843 * src/files.c (done): No argument, use complain_message_count.
22844 * src/main.c (main): Register `done' to `atexit'.
22845
22846 * src/getargs.c (usage): More `fputs', less `fprintf'.
22847
228482000-03-28 Akim Demaille <akim@epita.fr>
22849
22850 * lib/: New directory.
22851 * Makefile.am (SUBDIRS): Adjust.
22852 * configure.in: Adjust.
22853 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22854 useless.
22855 * src/alloca.c: Moved to lib/.
22856 * src/getopt.c: Likewise.
22857 * src/getopt1.c: Likewise.
22858 * src/getopt.h: Likewise.
22859 * src/ansi2knr.c: Likewise.
22860 * src/ansi2knr.1: Likewise.
22861 * src/Makefile.am: Adjust.
22862 * lib/Makefile.am: New file.
22863
228642000-03-28 Akim Demaille <akim@epita.fr>
22865
22866 * src/getargs.c (usage): Refresh the help message.
22867
228682000-03-17 Akim Demaille <akim@epita.fr>
22869
22870 * src/getopt1.c: Updated from textutils 2.0e
22871 * src/getopt.c: Likewise.
22872 * src/getopt.h: Likewise.
22873
228742000-03-17 Akim Demaille <akim@epita.fr>
22875
22876 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22877 the file name, not the whole `#line LINE FILE'.
22878
228792000-03-17 Akim Demaille <akim@epita.fr>
22880
22881 On syntax errors, report the token on which we choked.
22882
22883 * src/bison.s1 (yyparse): In the label yyerrlab, when
22884 YYERROR_VERBOSE, add yychar in msg.
22885
228862000-03-17 Akim Demaille <akim@epita.fr>
22887
22888 * src/reader.c (copy_at): New function.
22889 (copy_guard): Use it.
22890 (copy_action): Use it.
22891
228922000-03-17 Akim Demaille <akim@epita.fr>
22893
22894 Be kind to translators, save some useless translations.
22895
22896 * src/main.c (banner): New function.
22897 (fatal_banner): Use it.
22898 (warn_banner): Use it.
22899
229002000-03-17 Akim Demaille <akim@epita.fr>
22901
22902 * src/reader.c (copy_definition): Use copy_string and
22903 copy_comment. Removed now unused `match', `ended',
22904 `cplus_comment'.
22905 (copy_comment, copy_string): Moved, to be visible from
22906 copy_definition.
22907
229082000-03-17 Akim Demaille <akim@epita.fr>
22909
22910 * src/reader.c (copy_string): Declare `static inline'. No
22911 problems with inline, since it is checked by configure.
22912 (copy_comment): Likewise.
22913
229142000-03-17 Akim Demaille <akim@epita.fr>
22915
22916 * src/reader.c (packsymbols): Formatting changes.
22917
229182000-03-17 Akim Demaille <akim@epita.fr>
22919
22920 * src/reader.c (copy_comment): New function, factored out from:
22921 (copy_action): Use it. Removed now unused `match', `ended',
22922 `cplus_comment'.
22923 (copy_guard): Likewise.
22924
229252000-03-17 Akim Demaille <akim@epita.fr>
22926
22927 * src/reader.c (copy_string): New function, factored out from:
22928 (copy_action): Use it.
22929 (copy_guard): Likewise.
22930
229312000-03-17 Akim Demaille <akim@epita.fr>
22932
22933 Change the handling of @s so that they behave exactly like $s.
22934 There is now a pseudo variable @$ (readble and writable), location
22935 of the lhs of the rule (by default ranging from the location of
22936 the first symbol of the rhs, to the location of the last symbol,
22937 or, if the rhs is empty, YYLLOC).
22938
22939 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22940 yyval.
22941 (yyparse): When providing a default semantic action, provide a
22942 default location action.
22943 (after the $): No longer change `*YYLSP', just stack YYLOC the
22944 same way you stack YYVAL.
22945 * src/reader.c (read_declarations): Use warns.
22946 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22947 (copy_action, case '@'): Likewise.
22948 Use a standard error message, to save useless work from
22949 translators.
22950
229512000-03-17 Akim Demaille <akim@epita.fr>
22952
22953 * src/bison.s1: Formatting and cosmetics changes.
22954 * src/reader.c: Likewise.
22955 Update the Copyright notice.
22956
229572000-03-17 Akim Demaille <akim@epita.fr>
22958
22959 * src/bison.s1 (#line): All set to `#line' only, since the
22960 Makefile now handles them.
22961
229622000-03-16 Akim Demaille <akim@epita.fr>
22963
22964 * src/output.c (output_rule_data): Output the documentation of
22965 some of the tables.
22966 (Copyright notice): Update.
22967 Formatting changes.
22968
229692000-03-16 Akim Demaille <akim@epita.fr>
22970
22971 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22972 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22973 One `#if YYDEBUG' remains, since it uses variables which are
22974 defined only if `YYDEBUG != 0'.
22975
229762000-03-16 Akim Demaille <akim@epita.fr>
22977
22978 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22979 and related variables so that the similarities are highlighted.
22980
229812000-03-16 Akim Demaille <akim@epita.fr>
22982
22983 * src/bison.s1: Properly indent CPP directives.
22984
229852000-03-16 Akim Demaille <akim@epita.fr>
22986
22987 * src/bison.s1: Properly indent the `alloca' CPP section.
22988
229892000-03-16 Akim Demaille <akim@epita.fr>
22990
22991 Do not hard code values of directories in `configure.in'.
22992 Update the `configure' tool chain.
22993
22994 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22995 src/makefile.am.
22996 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22997 (AC_OUTPUT): Add m4/Makefile.
22998 Bump to bison 1.28a, 1.29 has never been released.
22999 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23000 handled via src/Makefile.am.
23001 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23002 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23003 autoheader.
23004 * Makefile.am (SUBDIRS): Add m4.
23005 (ACLOCAL_AM_FLAGS): New variable.
23006 (AUTOMAKE_OPTIONS): Add check-news.
23007 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23008 the proper line number and file name.
23009 (DEFS): Propagate the location of bison library files and of the
23010 locale files.
23011 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23012 builddir.
23013 * acinclude.m4: Remove, replaced by the directory m4.
23014 * m4/Makefile.am (EXTRA_DIST): New variable.
23015 * m4/gettext.m4: New file, from the fileutils.
23016 * m4/lcmessage.m4: Likewise
23017 * m4/progtest.m4: Likewise.
23018 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23019
230202000-03-10 Akim Demaille <akim@epita.fr>
23021
23022 * src/closure.c:
23023 Formatting changes of various comments.
23024 Respect the GNU coding standards at various places.
23025 Don't use `_()' when no translation is needed.
23026
230271999-12-13 Jesse Thilo <jthilo@gnu.org>
23028
23029 * src/files.c:
23030 OS/2 honors TMPDIR environment variable.
23031
230321999-12-13 Jesse Thilo <jthilo@gnu.org>
23033
23034 * doc/bison.texinfo: Tweaked spelling and grammar.
23035 Updated ISBN.
23036 Removed reference to price of printed copy.
23037 Mention BISON_SIMPLE and BISON_HAIRY.
23038
230391999-12-13 Jesse Thilo <jthilo@gnu.org>
23040
23041 * configure.in, NEWS:
23042 Bison 1.29 released.
23043
230441999-10-27 Jesse Thilo <jthilo@gnu.org>
23045
23046 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23047 Added reference card.
23048
230491999-07-26 Jesse Thilo <jthilo@gnu.org>
23050
23051 * po/ru.po: Added Russian translation.
23052
230531999-07-26 Jesse Thilo <jthilo@gnu.org>
23054
23055 * configure.in: Added Russian translation.
23056
230571999-07-06 Jesse Thilo <jthilo@gnu.org>
23058
23059 * configure.in, NEWS, README:
23060 Released version 1.28.
23061
230621999-06-14 Jesse Thilo <jthilo@gnu.org>
23063
23064 * src/system.h:
23065 Squashed redefinition warning on some systems.
23066
23067 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23068 Have configure build version string instead of relying on ANSI string
23069 concatentation.
23070
230711999-06-14 Jesse Thilo <jthilo@gnu.org>
23072
23073 * po/POTFILES.in: Got rid of version.c.
23074
230751999-06-14 Jesse Thilo <jthilo@gnu.org>
23076
23077 * acconfig.h, configure.in:
23078 Have configure build version string instead of relying on ANSI string
23079 concatentation.
23080
230811999-06-08 Jesse Thilo <jthilo@gnu.org>
23082
23083 * doc/bison.1:
23084 Dropped mention of `+' for long-named options.
23085
230861999-05-30 Jesse Thilo <jthilo@gnu.org>
23087
23088 * src/files.c: Added <unistd.h> for unlink().
23089
23090 * src/Makefile.am, src/system.h:
23091 I18n fixes.
23092
230931999-05-30 Jesse Thilo <jthilo@gnu.org>
23094
23095 * README: Added a FAQ list.
23096
23097 * configure.in, acconfig.h:
23098 I18n fixes.
23099
231001999-05-30 Jesse Thilo <jthilo@gnu.org>
23101
23102 * doc/FAQ, doc/Makefile.am:
23103 Added a FAQ list.
23104
231051999-05-19 Jesse Thilo <jthilo@gnu.org>
23106
23107 * src/alloc.h, src/symtab.h, src/version.c:
23108 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23109
231101999-04-18 Jesse Thilo <jthilo@gnu.org>
23111
23112 * src/.cvsignore, src/Makefile.am:
23113 Reorganized: sources in `src', documentation in `doc'.
23114
23115 * src/lex.c (literalchar):
23116 fixed the code for escaping double quotes (thanks
23117 Jonathan Czisny.)
23118
231191999-04-18 Jesse Thilo <jthilo@gnu.org>
23120
23121 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23122 Adjusted paths to reflect directory reorganization.
23123
231241999-04-18 Jesse Thilo <jthilo@gnu.org>
23125
23126 * doc/.cvsignore, doc/Makefile.am:
23127 Reorganized: sources in `src', documentation in `doc'.
23128
231291999-04-18 Jesse Thilo <jthilo@gnu.org>
23130
23131 * configure.in:
23132 Updated AC_INIT file to reflect directory reorganization.
23133
23134 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23135 Reorganized: sources in `src', documentation in `doc'.
23136
231371999-04-13 Jesse Thilo <jthilo@gnu.org>
23138
23139 * src/allocate.c:
23140 Don't declare calloc() and realloc() if not necessary.
23141
231421999-04-13 Jesse Thilo <jthilo@gnu.org>
23143
23144 * configure.in, acconfig.h, acinclude.m4:
23145 Don't declare calloc() and realloc() if not necessary.
23146
231471999-03-23 Jesse Thilo <jthilo@gnu.org>
23148
23149 * po/.cvsignore: Added i18n support.
23150
231511999-03-23 Jesse Thilo <jthilo@gnu.org>
23152
23153 * acconfig.h, configure.in, Makefile.am:
23154 Added i18n support.
23155
231561999-03-22 Jesse Thilo <jthilo@gnu.org>
23157
23158 * src/bison.s1: Fixed #line numbers.
23159
231601999-03-15 Jesse Thilo <jthilo@gnu.org>
23161
23162 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23163 Added PO files from Translation Project.
23164
231651999-03-03 Jesse Thilo <jthilo@gnu.org>
23166
23167 * Makefile.am:
23168 Added support for non-ANSI compilers (ansi2knr).
23169
231701999-02-16 Jesse Thilo <jthilo@gnu.org>
23171
23172 * configure.in: Bumped version number to 1.27.
23173
23174 * Makefile.am:
23175 Added `bison.simple' to list of files removed by `make distclean'.
23176
231771999-02-12 Jesse Thilo <jthilo@gnu.org>
23178
23179 * src/files.c, src/files.h:
23180 Defined locations of parser files in config.h instead of Makefile.
23181
231821999-02-12 Jesse Thilo <jthilo@gnu.org>
23183
23184 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23185 Defined locations of parser files in config.h instead of Makefile.
23186
231871999-02-09 Jesse Thilo <jthilo@gnu.org>
23188
23189 * Makefile.am:
23190 Removed inappropriate use of $< macro.
23191
231921999-02-05 Jesse Thilo <jthilo@gnu.org>
23193
23194 * po/Makefile.in.in, po/POTFILES.in:
23195 Add `po' directory skeleton.
23196
231971999-01-27 Jesse Thilo <jthilo@gnu.org>
23198
23199 * README: Document help-bison list.
23200
23201 * configure.in: Add check for mkstemp().
23202
232031999-01-20 Jesse Thilo <jthilo@gnu.org>
23204
23205 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23206 Hush a few compiler warnings.
23207
23208 * src/files.c:
23209 Add tryclose(), which verifies that fclose was successful.
23210 Hush a couple of compiler warnings.
23211
232121999-01-20 Jesse Thilo <jthilo@gnu.org>
23213
23214 * Makefile.am, OChangeLog:
23215 ChangeLog is now automatically generated. Include the old version as
23216 OChangeLog.
23217
232181999-01-14 Jesse Thilo <jthilo@gnu.org>
23219
23220 * 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:
23221 Update FSF address.
23222
232231999-01-14 Jesse Thilo <jthilo@gnu.org>
23224
23225 * doc/bison.texinfo: Fix formatting glitch.
23226
23227 * doc/bison.texinfo: Update FSF address.
23228
232291999-01-14 Jesse Thilo <jthilo@gnu.org>
23230
23231 * acconfig.h: Update FSF address.
23232
232331999-01-08 Jesse Thilo <jthilo@gnu.org>
23234
23235 * src/system.h:
23236 Don't define PACKAGE here, since config.h defines it.
23237
232381998-12-30 Jesse Thilo <jthilo@gnu.org>
23239
23240 * src/reader.c: Update copyright date.
23241
23242 * src/main.c:
23243 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23244 favor of output directly to stderr (avoids buffer overruns).
23245
23246 * src/reader.c: Some checks for premature EOF.
23247
23248 * 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:
23249 Use prototypes if the compiler understands them.
23250
23251 * src/files.c: Honor TMPDIR on Unix hosts.
23252 Use prototypes if the compiler understands them.
23253
23254 * src/reader.c:
23255 Fix a couple of buffer overrun bugs.
23256 Use prototypes if the compiler understands them.
23257
23258 * src/system.h: Include unistd.h and ctype.h.
23259 Use #ifdef instead of #if for NLS symbols.
23260
232611998-12-30 Jesse Thilo <jthilo@gnu.org>
23262
23263 * doc/bison.texinfo:
23264 Delete comment "consider using @set for edition number, etc..." since
23265 we now are doing so.
23266
232671998-12-30 Jesse Thilo <jthilo@gnu.org>
23268
23269 * configure.in:
23270 Use prototypes if the compiler understands them.
23271
23272 * NEWS: Document 1.26 highlights.
23273
23274 * Makefile.am: Require Automake 1.3 or later.
23275
23276 * acconfig.h:
23277 Use prototypes if the compiler understands them.
23278
232791998-12-29 Jesse Thilo <jthilo@gnu.org>
23280
23281 * src/version.c:
23282 Use VERSION symbol from automake for version number.
23283
232841998-12-29 Jesse Thilo <jthilo@gnu.org>
23285
23286 * acconfig.h, configure.in, version.cin:
23287 Use VERSION symbol from automake for version number.
23288
232891998-11-28 Jesse Thilo <jthilo@gnu.org>
23290
23291 * Makefile.am:
23292 Distribute original version of simple parser (bison.s1), not built
23293 version (bison.simple).
23294
232951998-11-28 Jesse Thilo <jthilo@gnu.org>
23296
23297 * doc/bison.texinfo: Add info dir entry.
23298
23299 * doc/bison.texinfo:
23300 Let automake put version number into documentation.
23301
233021998-11-26 Jesse Thilo <jthilo@gnu.org>
23303
23304 * src/bison.cld, src/build.com, src/vmshlp.mar:
23305 Add non-RCS files from /gd/gnu/bison.
23306
233071998-11-26 Jesse Thilo <jthilo@gnu.org>
23308
23309 * doc/bison.1:
23310 Document the BISON_HAIRY and BISON_SIMPLE variables.
23311
233121998-11-25 Jesse Thilo <jthilo@gnu.org>
23313
23314 * src/version.c: Build version.c automatically.
23315
23316 * src/reader.c:
23317 Fix token numbering (used to start at 258, not 257).
23318
23319 * src/system.h: Include config.h.
23320
23321 * src/getargs.c: Update bug report address.
23322
23323 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23324 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23325
233261998-11-25 Jesse Thilo <jthilo@gnu.org>
23327
23328 * Makefile.am:
23329 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23330
23331 * configure.in, version.cin:
23332 Build version.c automatically.
23333
23334 * AUTHORS: Add AUTHORS file.
23335
23336 * README: Update bug report address.
23337
23338 * bison.simple:
23339 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23340
23341 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23342 Add automake stuff.
23343
233441998-11-25 Jesse Thilo <jthilo@gnu.org>
23345
23346 * doc/bison.texinfo: Clean up some formatting.
23347
233481998-05-05 Richard Stallman <rms@gnu.org>
23349
23350 * doc/bison.texinfo:
23351 Explain better why to make a pure parser.
23352
233531998-01-05 Richard Stallman <rms@gnu.org>
23354
23355 * src/files.c (openfiles):
23356 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23357 find a temporary directory, if possible. Do not unlink files while
23358 they are open.
23359
233601997-08-25 Richard Stallman <rms@gnu.org>
23361
23362 * src/reader.c (stack_offset;):
23363 Change some warni to warns.
23364
23365 * src/lex.c (literalchar): Use warns, not warni.
23366
233671997-06-28 Richard Stallman <rms@gnu.org>
23368
23369 * src/bison.s1: Add a Bison version comment.
23370
23371 * src/main.c (fatal, warn, berror):
23372 Use program_name.
23373
233741997-06-28 Richard Stallman <rms@gnu.org>
23375
23376 * Makefile.in (bison_version): New variable.
23377 (dist): Use that variable.
23378 (bison.s1): Substitute the Bison version into bison.simple.
23379
23380 * bison.simple: Add a Bison version comment.
23381
233821997-06-18 Richard Stallman <rms@gnu.org>
23383
23384 * src/main.c (fatal, warn, berror):
23385 Make error messages standard.
23386 (toomany): Improve error message text.
23387
23388 * 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:
23389 new.h renamed to alloc.h.
23390
233911997-06-18 Richard Stallman <rms@gnu.org>
23392
23393 * Makefile.in: new.h renamed to alloc.h.
23394
233951997-05-24 Richard Stallman <rms@gnu.org>
23396
23397 * src/lex.c (literalchar):
23398 Fix the code for escaping \, " and '.
23399
23400 (lex): Avoid trouble when there are many chars
23401 to discard in a char literal with just several chars in it.
23402
234031997-05-17 Richard Stallman <rms@gnu.org>
23404
23405 * src/bison.s1:
23406 Use malloc, if using alloca is troublesome.
23407 (YYSTACK_USE_ALLOCA): New flag macro.
23408 Define it for some systems and compilers.
23409 (YYSTACK_ALLOC): New macro.
23410 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23411 If it was malloc'd, free it.
23412
234131997-05-17 Richard Stallman <rms@gnu.org>
23414
23415 * bison.simple:
23416 Use malloc, if using alloca is troublesome.
23417 (YYSTACK_USE_ALLOCA): New flag macro.
23418 Define it for some systems and compilers.
23419 (YYSTACK_ALLOC): New macro.
23420 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23421 If it was malloc'd, free it.
23422
234231997-04-23 Richard Stallman <rms@gnu.org>
23424
23425 * src/bison.s1:
23426 (alloca) [__hpux]: Always define as __builtin_alloca.
23427
234281997-04-23 Richard Stallman <rms@gnu.org>
23429
23430 * bison.simple:
23431 (alloca) [__hpux]: Always define as __builtin_alloca.
23432
234331997-04-22 Richard Stallman <rms@gnu.org>
23434
23435 * src/bison.s1:
23436 [__hpux]: Include alloca.h (right for HPUX 10)
23437 instead of declaring alloca (right for HPUX 9).
23438
23439 * src/bison.s1 (__yy_memcpy):
23440 Declare arg `count' as unsigned int.
23441 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23442
234431997-04-22 Richard Stallman <rms@gnu.org>
23444
23445 * bison.simple:
23446 [__hpux]: Include alloca.h (right for HPUX 10)
23447 instead of declaring alloca (right for HPUX 9).
23448
23449 * bison.simple (__yy_memcpy):
23450 Declare arg `count' as unsigned int.
23451 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23452
234531997-01-03 Richard Stallman <rms@gnu.org>
23454
23455 * src/allocate.c: [__STDC__ or _MSC_VER]:
23456 Declare calloc and realloc to return void *.
23457
234581997-01-02 Richard Stallman <rms@gnu.org>
23459
23460 * src/system.h:
23461 [_MSC_VER]: Include stdlib.h and process.h.
23462 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23463
23464 * src/main.c (main): Return FAILURE as a value.
23465 (printable_version): Declare arg as int, not char.
23466
234671997-01-02 Richard Stallman <rms@gnu.org>
23468
23469 * Makefile.in (dist):
23470 Explicitly check for symlinks, and copy them.
23471
234721996-12-19 Richard Stallman <rms@gnu.org>
23473
23474 * src/files.c:
23475 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23476
234771996-12-18 Paul Eggert <eggert@gnu.org>
23478
23479 * src/bison.s1 (yyparse):
23480 If __GNUC__ and YYPARSE_PARAM are both defined,
23481 declare yyparse to have a void * argument.
23482
234831996-12-18 Paul Eggert <eggert@gnu.org>
23484
23485 * bison.simple (yyparse):
23486 If __GNUC__ and YYPARSE_PARAM are both defined,
23487 declare yyparse to have a void * argument.
23488
234891996-12-17 Richard Stallman <rms@gnu.org>
23490
23491 * src/reduce.c (nbits): Add some casts.
23492
234931996-08-12 Richard Stallman <rms@gnu.org>
23494
23495 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23496
234971996-08-12 Richard Stallman <rms@gnu.org>
23498
23499 * bison.simple: Test _MSDOS as well as _MSDOS_.
23500
235011996-07-31 Richard Stallman <rms@gnu.org>
23502
23503 * src/bison.s1:
23504 [__sun && __i386]: Include alloca.h.
23505
235061996-07-31 Richard Stallman <rms@gnu.org>
23507
23508 * bison.simple:
23509 [__sun && __i386]: Include alloca.h.
23510
235111996-07-30 Richard Stallman <rms@gnu.org>
23512
23513 * src/bison.s1: Comment change.
23514
23515 * src/bison.s1: Test _MSDOS_, not MSDOS.
23516
235171996-07-30 Richard Stallman <rms@gnu.org>
23518
23519 * bison.simple: Comment change.
23520
23521 * bison.simple: Test _MSDOS_, not MSDOS.
23522
235231996-06-01 Richard Stallman <rms@gnu.org>
23524
23525 * 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:
23526 Insert `_' macro around many string constants.
23527
23528 * src/main.c:
23529 Insert `_' macro around many string constants.
23530
23531 (main): Call setlocale, bindtextdomain and textdomain.
23532
23533 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23534 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23535 [ENABLE_NLS]: Include libintl.h.
23536 [ENABLE_NLS] (gettext): Define.
23537 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23538 (N_, PACKAGE, LOCALEDIR): New macros.
23539
235401996-06-01 Richard Stallman <rms@gnu.org>
23541
23542 * POTFILES.in: New file.
23543
23544 * Makefile.in (allocate.o):
23545 Define target explicitly.
23546
23547 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23548 (LDFLAGS): Set to @LDFLAGS@.
23549 (configure): Run autoconf only if preceding `cd' succeeds.
23550 (bison.s1): Redirect output to temporary file then move the
23551 temporary to the target, rather than redirecting directly to bison.s1.
23552 (clean): Remove config.status and config.log.
23553 (distclean): Don't remove config.status here.
23554
235551996-05-12 Richard Stallman <rms@gnu.org>
23556
23557 * src/bison.s1:
23558 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23559
235601996-05-12 Richard Stallman <rms@gnu.org>
23561
23562 * bison.simple:
23563 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23564
235651996-05-11 Richard Stallman <rms@gnu.org>
23566
23567 * src/bison.s1 (__yy_memcpy):
23568 Really reorder the args, as was supposedly done on Feb 14 1995.
23569 (yyparse): Calls changed accordingly.
23570
235711996-05-11 Richard Stallman <rms@gnu.org>
23572
23573 * Makefile.in (dist): Don't use $(srcdir).
23574
23575 * bison.simple (__yy_memcpy):
23576 Really reorder the args, as was supposedly done on Feb 14 1995.
23577 (yyparse): Calls changed accordingly.
23578
235791996-01-27 Richard Stallman <rms@gnu.org>
23580
23581 * src/output.c (output_rule_data):
23582 Test YYERROR_VERBOSE in the conditional
23583 around the definition of ttyname.
23584
235851995-12-29 Richard Stallman <rms@gnu.org>
23586
23587 * src/bison.s1:
23588 Fix line numbers in #line commands.
23589
235901995-12-29 Richard Stallman <rms@gnu.org>
23591
23592 * bison.simple:
23593 Fix line numbers in #line commands.
23594
235951995-12-27 Richard Stallman <rms@gnu.org>
23596
23597 * src/bison.s1 (YYPARSE_PARAM_DECL):
23598 In C++, make it always null.
23599 (YYPARSE_PARAM_ARG): New macro.
23600 (yyparse): Use YYPARSE_PARAM_ARG.
23601
236021995-12-27 Richard Stallman <rms@gnu.org>
23603
23604 * bison.simple (YYPARSE_PARAM_DECL):
23605 In C++, make it always null.
23606 (YYPARSE_PARAM_ARG): New macro.
23607 (yyparse): Use YYPARSE_PARAM_ARG.
23608
236091995-11-29 Richard Stallman <rms@gnu.org>
23610
23611 * doc/bison.texinfo:
23612 Describe literal string tokens, %raw, %no_lines, %token_table.
23613
236141995-11-29 Daniel Hagerty <hag@gnu.org>
23615
23616 * doc/bison.texinfo: Fixed update date
23617
236181995-10-16 Richard Stallman <rms@gnu.org>
23619
23620 * src/version.c: Version 1.25.
23621
236221995-10-16 Richard Stallman <rms@gnu.org>
23623
23624 * NEWS: *** empty log message ***
23625
236261995-10-16 Richard Stallman <rms@gnu.org>
23627
23628 * doc/bison.1, doc/bison.rnh:
23629 Add new options.
23630
236311995-10-15 Richard Stallman <rms@gnu.org>
23632
23633 * src/vmsgetargs.c, src/getargs.c:
23634 Added -n, -k, and -raw switches.
23635 (noparserflag, toknumflag, rawtoknumflag): New variables.
23636
23637 * src/symtab.h (SALIAS):
23638 New #define for adding aliases to %token.
23639 (struct bucket): Added `alias' field.
23640
23641 * src/reduce.c (reduce_grammar):
23642 Revise error message.
23643 (print_notices): Remove final `.' from error message.
23644
23645 * src/reader.c (reader_output_yylsp):
23646 New function.
23647 (readgram): Use `#if 0' around code that accepted %command
23648 inside grammar rules: The documentation doesn't allow it,
23649 and it will fail since the %command processors scan for the next %.
23650 (parse_token_decl): Extended the %token
23651 declaration to allow a multi-character symbol as an alias.
23652 (parse_thong_decl): New function.
23653 (read_declarations): Added %thong declarations.
23654 (read_declarations): Handle NOOP to deal with allowing
23655 % declarations as another means to specify the flags.
23656 (readgram): Allow %prec prior to semantics embedded in a rule.
23657 (skip_to_char, read_declarations, copy_definition)
23658 (parse_token_decl, parse_start_decl, parse_type_decl)
23659 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23660 (get_type_name, copy_guard, copy_action, readgram)
23661 (get_type, packsymbols): Revised most error messages.
23662 Changed `fatal' to `warnxxx' to avoid aborting for error.
23663 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23664 (read_declarations): Improve the error message for
23665 an invalid character. Do not abort.
23666 (read_declarations, copy_guard, copy_action): Use
23667 printable_version to avoid unprintable characters in printed output.
23668 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23669 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23670 Allow the type of a non-terminal can be given
23671 more than once, as long as all specifications give the same type.
23672
23673 * src/output.c:
23674 (output_headers, output_trailers, output, output_gram)
23675 (output_rule_data): Implement noparserflag variable.
23676 Implement toknumflag variable.
23677 (output): Call reader_output_yylsp to output LTYPESTR.
23678
23679 * src/main.c (main):
23680 If reader sees an error, don't process the grammar.
23681 (fatals): Updated to not use VARARGS1.
23682 (printable_version, int_to_string, warn, warni, warns, warnss)
23683 (warnsss): New error reporting functions. Avoid abort for error.
23684
23685 * src/lex.h:
23686 Added THONG and NOOP for alias processing.
23687 Added SETOPT for the new code that allows setting options with %flags.
23688
23689 * src/lex.c:
23690 Include getopt.h. Add some extern decls.
23691 (safegetc): New function to deal with EOF gracefully.
23692 (literalchar); new function to deal with reading \ escapes.
23693 (lex): Use literalchar.
23694 (lex): Implemented "..." tokens.
23695 (literalchar, lex, parse_percent_token): Made tokenbuffer
23696 always contain the token. This includes growing the token
23697 buffer while reading an integer.
23698 (parse_percent_token): Replaced if-else statement with percent_table.
23699 (parse_percent_token): Added % declarations as another
23700 way to specify the flags -n, -l, and -r. Also added hooks for
23701 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23702 major changes to files.c.
23703 (lex) Retain in the incoming stream a character following
23704 an incorrect '/'.
23705 (skip_white_space, lex): Revised most error messages
23706 and changed fatal to warn to avoid aborting.
23707 (percent_table): Added %thong declarations.
23708
23709 * src/gram.h: Comment changes.
23710
23711 * src/files.c (openfiles, open_extra_files, done):
23712 Add faction flag
23713 and actfile file. Handle noparserflag. Both for -n switch.
23714
23715 * src/conflicts.c (resolve_sr_conflict):
23716 Remove use of alloca.
23717
237181995-06-01 Jim Meyering <meyering@gnu.org>
23719
23720 * doc/bison.texinfo: *** empty log message ***
23721
237221995-05-06 Richard Stallman <rms@gnu.org>
23723
23724 * src/bison.s1: Comment change.
23725
237261995-05-06 Richard Stallman <rms@gnu.org>
23727
23728 * bison.simple: Comment change.
23729
237301995-05-03 Richard Stallman <rms@gnu.org>
23731
23732 * src/version.c: Version now 1.24.
23733
23734 * src/bison.s1: Change distribution terms.
23735
23736 * src/version.c: Version now 1.23.
23737
237381995-05-03 Richard Stallman <rms@gnu.org>
23739
23740 * doc/bison.texinfo:
23741 Rewrite "Conditions for Using Bison".
23742 Update version to 1.24.
23743
237441995-05-03 Richard Stallman <rms@gnu.org>
23745
23746 * bison.simple: Change distribution terms.
23747
237481995-02-23 Richard Stallman <rms@gnu.org>
23749
23750 * src/files.c: Test __VMS_POSIX as well as VMS.
23751
237521995-02-14 Jim Meyering <meyering@gnu.org>
23753
23754 * src/bison.s1 (__yy_memcpy):
23755 Renamed from __yy_bcopy to avoid
23756 confusion. Reverse FROM and TO arguments to be consistent with
23757 those of memcpy.
23758
237591995-02-14 Jim Meyering <meyering@gnu.org>
23760
23761 * bison.simple (__yy_memcpy):
23762 Renamed from __yy_bcopy to avoid
23763 confusion. Reverse FROM and TO arguments to be consistent with
23764 those of memcpy.
23765
237661994-11-10 David J. MacKenzie <djm@gnu.org>
23767
23768 * NEWS: reformat
23769
23770 * NEWS: New file.
23771
23772 * Makefile.in (DISTFILES): Include NEWS.
23773
23774 * Makefile.in (DISTFILES):
23775 Include install-sh, not install.sh.
23776
23777 * configure.in: Update to Autoconf v2 macro names.
23778
237791994-10-05 David J. MacKenzie <djm@gnu.org>
23780
23781 * Makefile.in: fix typo
23782
23783 * Makefile.in (prefix, exec_prefix):
23784 Let configure set them.
23785
237861994-09-28 David J. MacKenzie <djm@gnu.org>
23787
23788 * Makefile.in: Set datadir to $(prefix)/share.
23789
237901994-09-15 Richard Stallman <rms@gnu.org>
23791
23792 * src/bison.s1:
23793 Update copyright notice and GPL version.
23794
237951994-09-15 Richard Stallman <rms@gnu.org>
23796
23797 * bison.simple:
23798 Update copyright notice and GPL version.
23799
238001994-07-12 Richard Stallman <rms@gnu.org>
23801
23802 * src/reduce.c, src/reader.c:
23803 entered into RCS
23804
238051994-05-05 David J. MacKenzie <djm@gnu.org>
23806
23807 * Makefile.in: entered into RCS
23808
238091994-03-26 Richard Stallman <rms@gnu.org>
23810
23811 * src/bison.s1: entered into RCS
23812
238131994-03-26 Richard Stallman <rms@gnu.org>
23814
23815 * bison.simple: entered into RCS
23816
238171994-03-25 Richard Stallman <rms@gnu.org>
23818
23819 * src/main.c: entered into RCS
23820
238211994-03-24 Richard Stallman <rms@gnu.org>
23822
23823 * src/conflicts.c: entered into RCS
23824
238251994-01-02 Richard Stallman <rms@gnu.org>
23826
23827 * Makefile.in: *** empty log message ***
23828
238291993-11-21 Richard Stallman <rms@gnu.org>
23830
23831 * src/bison.s1: *** empty log message ***
23832
238331993-11-21 Richard Stallman <rms@gnu.org>
23834
23835 * doc/bison.texinfo: entered into RCS
23836
23837 * doc/bison.texinfo: *** empty log message ***
23838
238391993-11-21 Richard Stallman <rms@gnu.org>
23840
23841 * bison.simple: *** empty log message ***
23842
238431993-10-25 David J. MacKenzie <djm@gnu.org>
23844
23845 * doc/bison.texinfo: *** empty log message ***
23846
238471993-10-19 Richard Stallman <rms@gnu.org>
23848
23849 * src/bison.s1: *** empty log message ***
23850
238511993-10-19 Richard Stallman <rms@gnu.org>
23852
23853 * bison.simple: *** empty log message ***
23854
238551993-10-14 Richard Stallman <rms@gnu.org>
23856
23857 * src/bison.s1: *** empty log message ***
23858
238591993-10-14 Richard Stallman <rms@gnu.org>
23860
23861 * bison.simple: *** empty log message ***
23862
238631993-09-14 David J. MacKenzie <djm@gnu.org>
23864
23865 * doc/bison.texinfo: *** empty log message ***
23866
238671993-09-13 Noah Friedman <friedman@gnu.org>
23868
23869 * Makefile.in: *** empty log message ***
23870
238711993-09-10 Richard Stallman <rms@gnu.org>
23872
23873 * src/conflicts.c: *** empty log message ***
23874
23875 * src/system.h: entered into RCS
23876
238771993-09-10 Richard Stallman <rms@gnu.org>
23878
23879 * doc/bison.1: entered into RCS
23880
238811993-09-06 Noah Friedman <friedman@gnu.org>
23882
23883 * src/version.c: entered into RCS
23884
238851993-09-06 Noah Friedman <friedman@gnu.org>
23886
23887 * Makefile.in: *** empty log message ***
23888
238891993-07-30 David J. MacKenzie <djm@gnu.org>
23890
23891 * Makefile.in: *** empty log message ***
23892
238931993-07-24 Richard Stallman <rms@gnu.org>
23894
23895 * src/bison.s1: *** empty log message ***
23896
238971993-07-24 Richard Stallman <rms@gnu.org>
23898
23899 * bison.simple: *** empty log message ***
23900
239011993-07-08 David J. MacKenzie <djm@gnu.org>
23902
23903 * Makefile.in: *** empty log message ***
23904
239051993-07-04 Richard Stallman <rms@gnu.org>
23906
23907 * src/bison.s1: *** empty log message ***
23908
239091993-07-04 Richard Stallman <rms@gnu.org>
23910
23911 * bison.simple: *** empty log message ***
23912
239131993-06-26 David J. MacKenzie <djm@gnu.org>
23914
23915 * src/getargs.c: entered into RCS
23916
239171993-06-26 David J. MacKenzie <djm@gnu.org>
23918
23919 * doc/bison.texinfo: *** empty log message ***
23920
23921 * doc/bison.1: New file.
23922
239231993-06-25 Richard Stallman <rms@gnu.org>
23924
23925 * src/getargs.c: New file.
23926
239271993-06-16 Richard Stallman <rms@gnu.org>
23928
23929 * src/bison.s1: *** empty log message ***
23930
239311993-06-16 Richard Stallman <rms@gnu.org>
23932
23933 * bison.simple: *** empty log message ***
23934
239351993-06-03 Richard Stallman <rms@gnu.org>
23936
23937 * src/bison.s1: New file.
23938
239391993-06-03 Richard Stallman <rms@gnu.org>
23940
23941 * doc/bison.texinfo: *** empty log message ***
23942
239431993-06-03 Richard Stallman <rms@gnu.org>
23944
23945 * bison.simple: New file.
23946
239471993-05-19 Richard Stallman <rms@gnu.org>
23948
23949 * doc/bison.texinfo: New file.
23950
239511993-05-07 Noah Friedman <friedman@gnu.org>
23952
23953 * Makefile.in: *** empty log message ***
23954
239551993-04-28 Noah Friedman <friedman@gnu.org>
23956
23957 * src/reader.c: *** empty log message ***
23958
239591993-04-23 Noah Friedman <friedman@gnu.org>
23960
23961 * src/alloc.h: entered into RCS
23962
239631993-04-20 David J. MacKenzie <djm@gnu.org>
23964
23965 * src/version.c: *** empty log message ***
23966
23967 * src/files.c, src/allocate.c:
23968 entered into RCS
23969
23970 * src/reader.c: *** empty log message ***
23971
23972 * src/lex.c: entered into RCS
23973
23974 * src/conflicts.c: New file.
23975
23976 * src/symtab.c: entered into RCS
23977
23978 * src/alloc.h: New file.
23979
23980 * src/LR0.c: entered into RCS
23981
239821993-04-18 Noah Friedman <friedman@gnu.org>
23983
23984 * src/reader.c: New file.
23985
23986 * src/version.c: *** empty log message ***
23987
239881993-04-18 Noah Friedman <friedman@gnu.org>
23989
23990 * Makefile.in: *** empty log message ***
23991
239921993-04-17 Noah Friedman <friedman@gnu.org>
23993
23994 * Makefile.in: *** empty log message ***
23995
239961993-04-15 Richard Stallman <rms@gnu.org>
23997
23998 * src/main.c, src/files.c:
23999 New file.
24000
240011993-04-15 Noah Friedman <friedman@gnu.org>
24002
24003 * configure.in: entered into RCS
24004
24005 * configure.in: *** empty log message ***
24006
24007 * configure.in: New file.
24008
240091993-04-14 Richard Stallman <rms@gnu.org>
24010
24011 * Makefile.in: New file.
24012
240131993-04-13 Richard Stallman <rms@gnu.org>
24014
24015 * src/version.c: New file.
24016
240171993-03-25 Richard Stallman <rms@gnu.org>
24018
24019 * src/output.c: entered into RCS
24020
240211992-09-25 Richard Stallman <rms@gnu.org>
24022
24023 * configure.bat: entered into RCS
24024
240251992-06-22 Richard Stallman <rms@gnu.org>
24026
24027 * src/vmsgetargs.c: entered into RCS
24028
240291992-06-22 Richard Stallman <rms@gnu.org>
24030
24031 * doc/bison.rnh: entered into RCS
24032
240331992-04-20 David J. MacKenzie <djm@gnu.org>
24034
24035 * README: entered into RCS
24036
240371992-01-22 Richard Stallman <rms@gnu.org>
24038
24039 * src/machine.h: entered into RCS
24040
240411991-12-21 Richard Stallman <rms@gnu.org>
24042
24043 * src/lalr.c, src/closure.c:
24044 entered into RCS
24045
240461991-12-20 Richard Stallman <rms@gnu.org>
24047
24048 * src/state.h: entered into RCS
24049
240501991-12-18 Richard Stallman <rms@gnu.org>
24051
24052 * src/print.c, src/nullable.c, src/derives.c:
24053 entered into RCS
24054
240551991-11-03 David J. MacKenzie <djm@gnu.org>
24056
24057 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24058 entered into RCS
24059
240601988-09-09 Richard Stallman <rms@gnu.org>
24061
24062 * src/bison.hairy: entered into RCS
24063
240641987-12-16 Richard Stallman <rms@gnu.org>
24065
24066 * REFERENCES: entered into RCS
24067
24068
24069 -----
24070
24071 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
24072 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24073 2008, 2009 Free Software Foundation, Inc.
24074
24075 Copying and distribution of this file, with or without
24076 modification, are permitted provided the copyright notice and this
24077 notice are preserved.